24. JVM 101
200 opcodes
Ten (or 16) “data endpoints”
Invocation Field Access Array Access
invokevirtual getfield *aload
invokeinterface setfield *astore
invokestatic getstatic b,s,c,i,l,d,f,a
invokespecial setstatic
All Java code revolves around these endpoints
Remaining ops are stack, local vars, flow control
allocation, and math/boolean/bit operations
61. bytecode
• invokedynamic
• like invokevirtual, invokestatic, etc
• Name and signature, like the others
• Additional bootstrap method
• JVM defers to you
94. Multi-dispatch
• Dispatch based on runtime types
• Java is single-dispatch
• Call site looks like normal invoke
• VM side examines target, args
• Multiple targets cached with branches
102. Thank You!
• @headius
• blog.headius.com
• invokedynamic post coming soon
• headius@headius.com
• Come to my deep dive at 16:00
• Have fun with invokedynamic!
Editor's Notes
\n
\n
\n
\n
\n
\n
\n
\n
Perhaps even more transcendental...\n
\n
\n
\n
\n
\n
\n
\n
Also loading constants, which are read-only; not as interesting\n
Also loading constants, which are read-only; not as interesting\n
Also loading constants, which are read-only; not as interesting\n
Also loading constants, which are read-only; not as interesting\n
Also loading constants, which are read-only; not as interesting\n
Also loading constants, which are read-only; not as interesting\n
Also loading constants, which are read-only; not as interesting\n
Also loading constants, which are read-only; not as interesting\n
Also loading constants, which are read-only; not as interesting\n
Also loading constants, which are read-only; not as interesting\n
Also loading constants, which are read-only; not as interesting\n
Also loading constants, which are read-only; not as interesting\n
Also loading constants, which are read-only; not as interesting\n
Also loading constants, which are read-only; not as interesting\n
Also loading constants, which are read-only; not as interesting\n
Also loading constants, which are read-only; not as interesting\n
Also loading constants, which are read-only; not as interesting\n
Also loading constants, which are read-only; not as interesting\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
Type check for instances; statics are known\nField offset remains static\n
Type check for instances; statics are known\nField offset remains static\n
Type check for instances; statics are known\nField offset remains static\n
Type check for instances; statics are known\nField offset remains static\n