JVM
operandstack.h File Reference
#include <stdint.h>
Include dependency graph for operandstack.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  OperandStack
 

Typedefs

typedef struct OperandStack OperandStack
 
typedef enum OperandType OperandType
 

Enumerations

enum  OperandType {
  OP_INTEGER, OP_FLOAT, OP_LONG, OP_DOUBLE,
  OP_NULL, OP_REFERENCE, OP_RETURNADDRESS
}
 

Functions

uint8_t pushOperand (OperandStack **os, int32_t value, OperandType type)
 Push the operand on the top of OperandStack passed as parameter by reference. More...
 
uint8_t popOperand (OperandStack **os, int32_t *outPtr, 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...
 

Typedef Documentation

§ OperandStack

typedef struct OperandStack OperandStack

§ OperandType

typedef enum OperandType OperandType

Enumeration Type Documentation

§ OperandType

Enumerator
OP_INTEGER 
OP_FLOAT 
OP_LONG 
OP_DOUBLE 
OP_NULL 
OP_REFERENCE 
OP_RETURNADDRESS 

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