CPSC 359 Study Guide - Midterm Guide: Java Bytecode, Byte Addressing, Java Class File

698 views12 pages

Document Summary

. java --> javac --> . class --> java --> hardware. Ijvm: subset of jvm that deals with integers. Stacks are used to push operands during the computation of arithmetic expressions. Constant pool: constants, strings & pointers to other areas of memory. Does not change after loading (cannot be written by ijvm program). Cpp contains the address of the first word. Local variable frame/ operand stack: allocated to variables stored for the lifetime of a procedure. At the beginning of the frame: parameters, then local variables, then operand stack. Pc points to the instruction to be fetched next. Ivokevirtual disp: invokes another method. disp(16 bit) = position in constant pool that contains the address in method area where method starts. Cannot call methods except in the same object. (no object orientation) Caller: pushes objref being called onto stack. (not needed for ijvm). First 4 bytes of a method: first 2 are the number of parameters, including objref (param0)