Mercurial > hg > truffle
comparison src/share/vm/interpreter/rewriter.cpp @ 2181:d25d4ca69222
Merge.
author | Thomas Wuerthinger <wuerthinger@ssw.jku.at> |
---|---|
date | Wed, 16 Feb 2011 13:47:20 +0100 |
parents | 06f017f7daa7 8012aa3ccede |
children | 2ab52cda08e5 |
comparison
equal
deleted
inserted
replaced
2108:50b45e2d9725 | 2181:d25d4ca69222 |
---|---|
1 /* | 1 /* |
2 * Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved. | 2 * Copyright (c) 1998, 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. |
219 // directly. Some more complicated bytecodes will report | 219 // directly. Some more complicated bytecodes will report |
220 // a length of zero, meaning we need to make another method | 220 // a length of zero, meaning we need to make another method |
221 // call to calculate the length. | 221 // call to calculate the length. |
222 bc_length = Bytecodes::length_for(c); | 222 bc_length = Bytecodes::length_for(c); |
223 if (bc_length == 0) { | 223 if (bc_length == 0) { |
224 bc_length = Bytecodes::length_at(bcp); | 224 bc_length = Bytecodes::length_at(method, bcp); |
225 | 225 |
226 // length_at will put us at the bytecode after the one modified | 226 // length_at will put us at the bytecode after the one modified |
227 // by 'wide'. We don't currently examine any of the bytecodes | 227 // by 'wide'. We don't currently examine any of the bytecodes |
228 // modified by wide, but in case we do in the future... | 228 // modified by wide, but in case we do in the future... |
229 if (c == Bytecodes::_wide) { | 229 if (c == Bytecodes::_wide) { |
236 | 236 |
237 switch (c) { | 237 switch (c) { |
238 case Bytecodes::_lookupswitch : { | 238 case Bytecodes::_lookupswitch : { |
239 #ifndef CC_INTERP | 239 #ifndef CC_INTERP |
240 if (!UseC1X) { | 240 if (!UseC1X) { |
241 Bytecode_lookupswitch* bc = Bytecode_lookupswitch_at(bcp); | 241 Bytecode_lookupswitch bc(method, bcp); |
242 (*bcp) = ( | 242 (*bcp) = ( |
243 bc->number_of_pairs() < BinarySwitchThreshold | 243 bc.number_of_pairs() < BinarySwitchThreshold |
244 ? Bytecodes::_fast_linearswitch | 244 ? Bytecodes::_fast_linearswitch |
245 : Bytecodes::_fast_binaryswitch | 245 : Bytecodes::_fast_binaryswitch |
246 ); | 246 ); |
247 } | 247 } |
248 #endif | 248 #endif |