59 #endif // FRAMESTACK_H Structure that will be associated with a method and holds the information necessary to run the method...
Definition: framestack.h:12
uint32_t code_length
Number of bytes the bytecode of the method contains.
Definition: framestack.h:26
uint8_t returnCount
Number of operands that should be moved from this frame to the caller frame when the method returns...
Definition: framestack.h:19
void freeFrameStack(FrameStack **fs)
Free all the elements of the FrameStack passed as parameter by reference.
Definition: framestack.c:110
uint8_t * code
Bytecode of the method.
Definition: framestack.h:29
OperandStack * operands
Stack of operands used by the method.
Definition: framestack.h:32
int32_t * localVariables
Array of local variables used by the method.
Definition: framestack.h:35
uint8_t popFrame(FrameStack **fs, Frame *outPtr)
Pop the Frame passed as parameter by reference.
Definition: framestack.c:91
struct FrameStack * next
Pointer to the next element of the stack.
Definition: framestack.h:50
uint8_t pushFrame(FrameStack **fs, Frame *frame)
Push the Frame into the FrameStack passed as parameter by reference.
Definition: framestack.c:71
Definition: javaclass.h:96
JavaClass * jc
Class of the method associated with this frame.
Definition: framestack.h:15
Frame * frame
The node value of the stack.
Definition: framestack.h:47
void freeFrame(Frame *frame)
Free the Frame passed as parameter.
Definition: framestack.c:54
Definition: operandstack.h:13
Stack of frames to store all frames created by method calling during execution of the JVM...
Definition: framestack.h:44
uint32_t pc
Index of the current bytecode being read from the method's instructions, Program Counter.
Definition: framestack.h:23
Frame * newFrame(JavaClass *jc, method_info *method)
A new frame is created each time a method is invoked.
Definition: framestack.c:10