JVM
framestack.c File Reference
#include "framestack.h"
#include "debugging.h"
Include dependency graph for framestack.c:

Functions

FramenewFrame (JavaClass *jc, method_info *method)
 A new frame is created each time a method is invoked. More...
 
void freeFrame (Frame *frame)
 Free the Frame passed as parameter. More...
 
uint8_t pushFrame (FrameStack **fs, Frame *frame)
 Push the Frame into the FrameStack passed as parameter by reference. More...
 
uint8_t popFrame (FrameStack **fs, Frame *outPtr)
 Pop the Frame passed as parameter by reference. More...
 
void freeFrameStack (FrameStack **fs)
 Free all the elements of the FrameStack passed as parameter by reference. More...
 

Function Documentation

§ freeFrame()

void freeFrame ( Frame frame)

Free the Frame passed as parameter.

Parameters
Frame*frame - pointer to Frame to be freed.
Here is the call graph for this function:
Here is the caller graph for this function:

§ freeFrameStack()

void freeFrameStack ( FrameStack **  fs)

Free all the elements of the FrameStack passed as parameter by reference.

Parameters
FrameStack**fs - pointer to the FrameStack.
Here is the call graph for this function:
Here is the caller graph for this function:

§ newFrame()

Frame* newFrame ( JavaClass jc,
method_info method 
)

A new frame is created each time a method is invoked.

Parameters
JavaClass*jc - pointer to the javaClass holding the method.
method_info*method - pointer to the method
Returns
pointer to the Frame created.
Here is the call graph for this function:
Here is the caller graph for this function:

§ popFrame()

uint8_t popFrame ( FrameStack **  fs,
Frame outPtr 
)

Pop the Frame passed as parameter by reference.

Parameters
FrameStack**fs - pointer to the FrameStack.
Frame*outPtr - pointer to Frame that will be popped.
Returns
1 if the pop operation was sucessful, 0 otherwise.
Here is the caller graph for this function:

§ pushFrame()

uint8_t pushFrame ( FrameStack **  fs,
Frame frame 
)

Push the Frame into the FrameStack passed as parameter by reference.

Parameters
FrameStack**fs - pointer to the FrameStack where the Frame will be pushed.
Frame*frame - pointer to Frame to be pushed.
Returns
0 if node is NULL, in other words, if the push was not successful, any other integer value otherwise
Here is the caller graph for this function: