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

Functions

uint8_t pushOperand (OperandStack **os, int32_t value, enum OperandType type)
 Push the operand on the top of OperandStack passed as parameter by reference. More...
 
uint8_t popOperand (OperandStack **os, int32_t *outPtr, enum OperandType *outType)
 Pop the operand out of the top of OperandStack passed as parameter by reference. More...
 
void freeOperandStack (OperandStack **os)
 Free all the elements of the OperandStack passed as parameter by reference. More...
 

Function Documentation

§ freeOperandStack()

void freeOperandStack ( OperandStack **  os)

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

Parameters
OperandStack**os - pointer to the OperandStack.
Here is the caller graph for this function:

§ popOperand()

uint8_t popOperand ( OperandStack **  os,
int32_t *  outPtr,
enum OperandType outType 
)

Pop the operand out of the top of OperandStack passed as parameter by reference.

Parameters
OperandStack**os - pointer to the OperandStack.
int32_t*outPtr - value of the operand that will be popped.
OperandTypeoutType - type of the operand that will be popped.
Returns
0 if the pop operation was not successful, 1 otherwise.

§ pushOperand()

uint8_t pushOperand ( OperandStack **  os,
int32_t  value,
enum OperandType  type 
)

Push the operand on the top of OperandStack passed as parameter by reference.

Parameters
OperandStack**os - pointer to the OperandStack where the operand will be pushed.
int32_tvalue - value of the operand.
OperandTypetype - type of the operand that will be pushed
Returns
0 if OperandStack* node is NULL, in other words, if the push was not successful, 1 otherwise