9 JVM
9 JVM
9 JVM
From [1]
Our Compiler
Java Compiler
Java Byte Code
Assembler
compiling compiling
Java bytecode
running running
From [1]
From [1]
From [1]
From ($11.3.2,[3])
.line 9
aload_0 // push address of array referred by a
iconst_1 // push 1
iaload // pop a and 1, push a[1]
istore_1 // store to b
value 2
value 1 if value 1 == value 2
0
…
…
.line 6
iconst_1
int b = 1; istore_0
.line 7
float a = b; iload_0
i2f
fstore_1
value
value value value
… … … …
dup pop
used when translating a = b = … used when translating 1;
invokestatic invokevirtual/invokespecial
.line 3
new VD13
dup
invokespecial VD13/<init>()V
invokestatic VD13/goo(LVD13;)V
objref
.line 4
objref return
.end method
.line 9
aload_0
2.3 iconst_1
ldc 2.3
1 invokevirtual VD13/foo(IF)F
objref pop
3.3
Label1:
.line 10
return
.end method
Label0:
iload_1
i2f
fload_2
fadd
b Label1:
ab freturn
a+
.end method
.field a I
public static void .field static b I
main(String[] arg) {
(new
VD14()).foo(1,2.3F);
}
} .end method