use member functions to access Instruction fields

git-svn-id: https://svn.code.sf.net/p/jode/code/trunk@1068 379699f6-c40d-0410-875b-85095c16579e
branch_1_1
jochen 26 years ago
parent f301603e87
commit 0f38b5d122
  1. 54
      jode/jode/jvm/Interpreter.j

@ -197,9 +197,9 @@ skip_debugging:
dup dup
astore 6 astore 6
dup dup
getfield jode/bytecode/Instruction/nextByAddr Ljode/bytecode/Instruction; invokevirtual jode/bytecode/Instruction/getNextByAddr()Ljode/bytecode/Instruction;
astore 4 astore 4
getfield jode/bytecode/Instruction/opcode I invokevirtual jode/bytecode/Instruction/getOpcode()I
; stack: ; stack:
; instr.opcode ; instr.opcode
dup dup
@ -220,7 +220,7 @@ skip_debugging:
aaload aaload
iinc 5 1 iinc 5 1
aload 6 aload 6
getfield jode/bytecode/Instruction/objData Ljava/lang/Object; invokevirtual jode/bytecode/Instruction/getConstant()Ljava/lang/Object;
; Stack: ; Stack:
; instr.objData ; instr.objData
; stack_value ; stack_value
@ -256,7 +256,7 @@ load_store_instr:
aload_2 ; locals aload_2 ; locals
aload 6 aload 6
getfield jode/bytecode/Instruction/localSlot I invokevirtual jode/bytecode/Instruction/getLocalSlot()I
aaload aaload
invokevirtual jode/jvm/Value/setValue(Ljode/jvm/Value;)V invokevirtual jode/jvm/Value/setValue(Ljode/jvm/Value;)V
@ -332,7 +332,7 @@ store_instr:
aload_2 ; locals aload_2 ; locals
aload 6 aload 6
getfield jode/bytecode/Instruction/localSlot I invokevirtual jode/bytecode/Instruction/getLocalSlot()I
aaload aaload
iinc 5 -1 iinc 5 -1
aload_3 ; stack aload_3 ; stack
@ -670,12 +670,12 @@ iinc_instr:
pop2 pop2
aload_2 aload_2
aload 6 aload 6
getfield jode/bytecode/Instruction/localSlot I invokevirtual jode/bytecode/Instruction/getLocalSlot()I
aaload aaload
dup dup
invokevirtual jode/jvm/Value/intValue()I invokevirtual jode/jvm/Value/intValue()I
aload 6 aload 6
getfield jode/bytecode/Instruction/intData I invokevirtual jode/bytecode/Instruction/getIntData()I
iadd iadd
invokevirtual jode/jvm/Value/setInt(I)V invokevirtual jode/jvm/Value/setInt(I)V
goto big_loop goto big_loop
@ -1318,7 +1318,7 @@ ificmp_final:
ifge big_loop ifge big_loop
jump_succ: jump_succ:
aload 6 aload 6
getfield jode/bytecode/Instruction/succs [Ljode/bytecode/Instruction; invokevirtual jode/bytecode/Instruction/getSuccs()[Ljode/bytecode/Instruction;
iconst_0 iconst_0
aaload aaload
astore 4 astore 4
@ -1355,11 +1355,11 @@ tableswitch_instr:
aaload aaload
invokevirtual jode/jvm/Value/intValue()I invokevirtual jode/jvm/Value/intValue()I
aload 6 aload 6
getfield jode/bytecode/Instruction/intData I invokevirtual jode/bytecode/Instruction/getIntData()I
isub isub
dup dup
aload 6 aload 6
getfield jode/bytecode/Instruction/succs [Ljode/bytecode/Instruction; invokevirtual jode/bytecode/Instruction/getSuccs()[Ljode/bytecode/Instruction;
dup_x2 dup_x2
; Stack: ; Stack:
; succs ; succs
@ -1392,8 +1392,7 @@ lookupswitch_instr:
aaload aaload
invokevirtual jode/jvm/Value/intValue()I invokevirtual jode/jvm/Value/intValue()I
aload 6 aload 6
getfield jode/bytecode/Instruction/objData Ljava/lang/Object; invokevirtual jode/bytecode/Instruction/getValues()[I
checkcast [I
iconst_0 iconst_0
; Stack: ; Stack:
; i ; i
@ -1420,7 +1419,7 @@ lookup_found:
istore 7 istore 7
pop2 pop2
aload 6 aload 6
getfield jode/bytecode/Instruction/succs [Ljode/bytecode/Instruction; invokevirtual jode/bytecode/Instruction/getSuccs()[Ljode/bytecode/Instruction;
iload 7 iload 7
aaload aaload
astore 4 astore 4
@ -1450,8 +1449,7 @@ putfield_instr:
istore 7 istore 7
aload_0 aload_0
aload 6 aload 6
getfield jode/bytecode/Instruction/objData Ljava/lang/Object; invokevirtual jode/bytecode/Instruction/getReference()Ljode/bytecode/Reference;
checkcast jode/bytecode/Reference
dup dup
invokevirtual jode/bytecode/Reference/getType()Ljava/lang/String; invokevirtual jode/bytecode/Reference/getType()Ljava/lang/String;
dup dup
@ -1524,8 +1522,7 @@ getfield_instr:
getfield_do: getfield_do:
aload_0 aload_0
aload 6 aload 6
getfield jode/bytecode/Instruction/objData Ljava/lang/Object; invokevirtual jode/bytecode/Instruction/getReference()Ljode/bytecode/Reference;
checkcast jode/bytecode/Reference
dup_x2 dup_x2
aload 7 aload 7
getfield_start: getfield_start:
@ -1556,8 +1553,7 @@ invoke_instr:
istore 7 istore 7
aload_0 aload_0
aload 6 aload 6
getfield jode/bytecode/Instruction/objData Ljava/lang/Object; invokevirtual jode/bytecode/Instruction/getReference()Ljode/bytecode/Reference;
checkcast jode/bytecode/Reference
dup dup
invokevirtual jode/bytecode/Reference/getType()Ljava/lang/String; invokevirtual jode/bytecode/Reference/getType()Ljava/lang/String;
invokestatic jode/type/Type/tType(Ljava/lang/String;)Ljode/type/Type; invokestatic jode/type/Type/tType(Ljava/lang/String;)Ljode/type/Type;
@ -1714,8 +1710,7 @@ new_instr:
new jode/jvm/NewObject new jode/jvm/NewObject
dup dup
aload 6 aload 6
getfield jode/bytecode/Instruction/objData Ljava/lang/Object; invokevirtual jode/bytecode/Instruction/getClazzType()Ljava/lang/String;
checkcast java/lang/String
invokenonvirtual jode/jvm/NewObject/<init>(Ljava/lang/String;)V invokenonvirtual jode/jvm/NewObject/<init>(Ljava/lang/String;)V
invokevirtual jode/jvm/Value/setNewObject(Ljode/jvm/NewObject;)V invokevirtual jode/jvm/Value/setNewObject(Ljode/jvm/NewObject;)V
iinc 5 1 iinc 5 1
@ -1775,8 +1770,7 @@ checkcast_instr:
dup dup
ifnull popLL_big_loop ifnull popLL_big_loop
aload 6 aload 6
getfield jode/bytecode/Instruction/objData Ljava/lang/Object; invokevirtual jode/bytecode/Instruction/getClazzType()Ljava/lang/String;
checkcast java/lang/String
invokeinterface jode/jvm/RuntimeEnvironment/instanceOf(Ljava/lang/Object;Ljava/lang/String;)Z 3 invokeinterface jode/jvm/RuntimeEnvironment/instanceOf(Ljava/lang/Object;Ljava/lang/String;)Z 3
ifne big_loop ifne big_loop
new java/lang/ClassCastException new java/lang/ClassCastException
@ -1798,8 +1792,7 @@ instanceof_instr:
dup_x1 dup_x1
invokevirtual jode/jvm/Value/objectValue()Ljava/lang/Object; invokevirtual jode/jvm/Value/objectValue()Ljava/lang/Object;
aload 6 aload 6
getfield jode/bytecode/Instruction/objData Ljava/lang/Object; invokevirtual jode/bytecode/Instruction/getClazzType()Ljava/lang/String;
checkcast java/lang/String
invokeinterface jode/jvm/RuntimeEnvironment/instanceOf(Ljava/lang/Object;Ljava/lang/String;)Z 3 invokeinterface jode/jvm/RuntimeEnvironment/instanceOf(Ljava/lang/Object;Ljava/lang/String;)Z 3
invokevirtual jode/jvm/Value/setInt(I)V invokevirtual jode/jvm/Value/setInt(I)V
goto big_loop goto big_loop
@ -1828,7 +1821,7 @@ monitorexit_instr:
multianewarray_instr: multianewarray_instr:
pop pop
aload 6 aload 6
getfield jode/bytecode/Instruction/intData I invokevirtual jode/bytecode/Instruction/getIntData()I
dup dup
istore 7 istore 7
newarray int newarray int
@ -1853,8 +1846,7 @@ newarray_test:
iinc 5 1 iinc 5 1
aload_0 aload_0
aload 6 aload 6
getfield jode/bytecode/Instruction/objData Ljava/lang/Object; invokevirtual jode/bytecode/Instruction/getClazzType()Ljava/lang/String;
checkcast java/lang/String
aload 7 aload 7
newarray_start: newarray_start:
invokeinterface jode/jvm/RuntimeEnvironment/newArray(Ljava/lang/String;[I)Ljava/lang/Object; 3 invokeinterface jode/jvm/RuntimeEnvironment/newArray(Ljava/lang/String;[I)Ljava/lang/Object; 3
@ -1883,7 +1875,7 @@ handle_exception:
ifeq nohandlers ifeq nohandlers
istore 7 istore 7
aload 4 aload 4
getfield jode/bytecode/Instruction/addr I invokevirtual jode/bytecode/Instruction/getAddr()I
istore 4 istore 4
iconst_0 iconst_0
; Stack: ; Stack:
@ -1894,12 +1886,12 @@ handler_loop:
aaload aaload
dup dup
getfield jode/bytecode/Handler/start Ljode/bytecode/Instruction; getfield jode/bytecode/Handler/start Ljode/bytecode/Instruction;
getfield jode/bytecode/Instruction/addr I invokevirtual jode/bytecode/Instruction/getAddr()I
iload 4 iload 4
if_icmplt wrong_handler_pop if_icmplt wrong_handler_pop
dup dup
getfield jode/bytecode/Handler/end Ljode/bytecode/Instruction; getfield jode/bytecode/Handler/end Ljode/bytecode/Instruction;
getfield jode/bytecode/Instruction/addr I invokevirtual jode/bytecode/Instruction/getAddr()I
iload 4 iload 4
if_icmplt wrong_handler_pop if_icmplt wrong_handler_pop
dup dup

Loading…
Cancel
Save