BAM
Abstract Machine for Bottom-Up Evaluation with the Push Method
Typedefs | Enumerations | Functions
inst.h File Reference

Enumeration type for Abstract Machine Instructions (OpCodes) More...

#include "../base/ver.h"
#include "../base/str.h"
#include "../base/check.h"
#include "itype.h"

Go to the source code of this file.

Typedefs

typedef enum inst_enum inst_t
 

Enumerations

enum  inst_enum {
  INST_NULL,
  INST_HALT,
  INST_CALL,
  INST_RETURN,
  INST_DUPCHECK,
  INST_DUPCHECK_2,
  INST_DUPCHECK_2B,
  INST_SAVE_VAR,
  INST_RESTORE_VAR,
  INST_SAVE_LIST_CUR,
  INST_SAVE_MMAP_CUR,
  INST_SAVE_MMAP_1_1_CUR,
  INST_RESTORE_LIST_CUR,
  INST_RESTORE_MMAP_CUR,
  INST_RESTORE_MMAP_1_1_CUR,
  INST_LOOP_LIST,
  INST_LOOP_LIST_2,
  INST_LOOP_MMAP,
  INST_LOOP_MMAP_1_1,
  INST_GET_COL,
  INST_GET_LIST_2_COL_1,
  INST_GET_LIST_2_COL_2,
  INST_GET_MMAP_1_1_OUT_1,
  INST_END_LOOP,
  INST_END_LOOP_LIST_2,
  INST_END_LOOP_MMAP_1_1,
  INST_IF_VAR_IS,
  INST_IF_VAR_EQ,
  INST_INSERT_LIST,
  INST_INSERT_LIST_2,
  INST_INSERT_LIST_2_V,
  INST_INSERT_MMAP,
  INST_INSERT_MMAP_1_1,
  INST_TRACE_CALL_2
}
 

Functions

str_t inst_name (inst_t inst)
 
itype_t inst_type (inst_t inst)
 

Detailed Description

Enumeration type for Abstract Machine Instructions (OpCodes)

Typedef Documentation

typedef enum inst_enum inst_t

Instructions of the bottom-up abstract machine (OpCodes).

Enumeration Type Documentation

enum inst_enum

Instructions of the bottom-up abstract machine (OpCodes).

Function Documentation

str_t inst_name ( inst_t  inst)

String representation of the instruction OpCode.

Returns
OpCode as string, e.g. "CALL".
itype_t inst_type ( inst_t  inst)

Type of the instruction based on number and length of arguments.

Returns
value of enumeration type itype_t, e.g. ITYPE_8_16.