JVM
framestack.h File Reference
#include "operandstack.h"
#include "attributes.h"
Include dependency graph for framestack.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  Frame
 Structure that will be associated with a method and holds the information necessary to run the method. More...
 
struct  FrameStack
 Stack of frames to store all frames created by method calling during execution of the JVM. More...
 

Typedefs

typedef struct Frame Frame
 
typedef struct FrameStack FrameStack
 

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...
 

Typedef Documentation

§ Frame

typedef struct Frame Frame

§ FrameStack

typedef struct FrameStack FrameStack

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: