21 * questions.
22 *
23 */
24
25 package sun.jvm.hotspot.interpreter;
26
27 import sun.jvm.hotspot.oops.*;
28
29 public abstract class BytecodeWideable extends Bytecode {
30 BytecodeWideable(Method method, int bci) {
31 super(method, bci);
32 }
33
34 public boolean isWide() {
35 int prevBci = bci() - 1;
36 return (prevBci > -1 && method.getBytecodeOrBPAt(prevBci) == Bytecodes._wide);
37 }
38
39 // the local variable index
40 public int getLocalVarIndex() {
41 return (isWide()) ? (int) (0xFFFF & javaShortAt(1))
42 : (int) (0xFF & javaByteAt(1));
43 }
44 }
|
21 * questions.
22 *
23 */
24
25 package sun.jvm.hotspot.interpreter;
26
27 import sun.jvm.hotspot.oops.*;
28
29 public abstract class BytecodeWideable extends Bytecode {
30 BytecodeWideable(Method method, int bci) {
31 super(method, bci);
32 }
33
34 public boolean isWide() {
35 int prevBci = bci() - 1;
36 return (prevBci > -1 && method.getBytecodeOrBPAt(prevBci) == Bytecodes._wide);
37 }
38
39 // the local variable index
40 public int getLocalVarIndex() {
41 return (isWide()) ? getIndexU2(code(), true) : getIndexU1();
42 }
43 }
|