comparison src/share/vm/interpreter/bytecodeStream.cpp @ 2142:8012aa3ccede

4926272: methodOopDesc::method_from_bcp is unsafe Reviewed-by: coleenp, jrose, kvn, dcubed
author never
date Thu, 13 Jan 2011 22:15:41 -0800
parents f95d63e2154a
children
comparison
equal deleted inserted replaced
2130:34d64ad817f4 2142:8012aa3ccede
1 /* 1 /*
2 * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. 2 * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 * 4 *
5 * This code is free software; you can redistribute it and/or modify it 5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as 6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
57 void BaseBytecodeStream::assert_raw_index_size(int size) const { 57 void BaseBytecodeStream::assert_raw_index_size(int size) const {
58 if (raw_code() == Bytecodes::_invokedynamic && is_raw()) { 58 if (raw_code() == Bytecodes::_invokedynamic && is_raw()) {
59 // in raw mode, pretend indy is "bJJ__" 59 // in raw mode, pretend indy is "bJJ__"
60 assert(size == 2, "raw invokedynamic instruction has 2-byte index only"); 60 assert(size == 2, "raw invokedynamic instruction has 2-byte index only");
61 } else { 61 } else {
62 bytecode()->assert_index_size(size, raw_code(), is_wide()); 62 bytecode().assert_index_size(size, raw_code(), is_wide());
63 } 63 }
64 } 64 }
65 65
66 void BaseBytecodeStream::assert_raw_stream(bool want_raw) const { 66 void BaseBytecodeStream::assert_raw_stream(bool want_raw) const {
67 if (want_raw) { 67 if (want_raw) {