Pages

Wednesday, February 23, 2011

Java Bytecode Fundamentals. Part II. Passing parameters

Judging from the feedback, the first Java Bytecode Fundamentals was rather a success. So I though maybe it is worth to continue the series on some other aspects of the topic.

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:

Disqus for Code Impossible