The interesting part of the bytecode is the one that covers method invocation and parameter passing. I have put up a full-blown post here: Java Bytecode Fundamentals: Using Objects and Calling Methods. The article covers how objects are created at the bytecode level, what the opcodes for method invocation are, how parameters are passed to the method invocations and how the return value is passed back. The important part to understand is how the stack is involved into the operations, along with the local variable table taking part in the game.
Just to reveal some parts of the full post, here's the slidecast demonstrating the parameter passing process in method invocation:
No comments:
Post a Comment