















































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!
















































Under the Hood: The Java Virtual Machine, Part II CS2110 Fall 2008 Lecture 24
Java program Java compiler Java bytecode (.class files) Compile for platform with JIT Interpret with JVM run native today last time
parameters other locals
byte[] data; void getData() { String x = "Hello world"; data = x.getBytes(); } Code(maxStack = 2, maxLocals = 2, codeLength = 12) 0: ldc "Hello world" 2: astore_ 3: aload_0 //object of which getData is a method 4: aload_ 5: invokevirtual java.lang.String.getBytes ()[B 8: putfield A.data [B 11: return
0: aconst_null 1: astore_ 2: new java.lang.Object 5: dup 6: invokespecial java.lang.Object.
0: aconst_null 1: astore_ 2: new java.lang.Object 5: dup 6: invokespecial java.lang.Object.
0: aconst_null 1: astore_ 2: new java.lang.Object 5: dup 6: invokespecial java.lang.Object.
0: aconst_null 1: astore_ 2: new java.lang.Object 5: dup 6: invokespecial java.lang.Object.