simple-lisp/bootstrap/constants.c

60 lines
1.7 KiB
C
Raw Normal View History

2024-09-24 07:03:52 -07:00
#include "constants.h"
const char *INSTRUCTION_NAMES[] = {
[INST_NIL] = "NIL",
[INST_T] = "T",
[INST_STRING] = "STRING",
[INST_INT] = "INT",
[INST_FLOAT] = "FLOAT",
[INST_CONS] = "CONS",
[INST_LIST] = "LIST",
[INST_VECTOR] = "VECTOR",
[INST_INTERN_LIT] = "INTERN_LIT",
[INST_INTERN_DYN] = "INTERN_DYN",
[INST_SYMBOL_NAME] = "SYMBOL_NAME",
[INST_MOV] = "MOV",
[INST_FUNCALL] = "FUNCALL",
[INST_RETVAL_COUNT] = "RETVAL_COUNT",
[INST_ENTER_LEXENV] = "ENTER_LEXENV",
[INST_LEAVE_ELEXENV] = "LEAVE_ELEXENV",
[INST_ENTER_BLOCK] = "ENTER_BLOCK",
[INST_LEAVE_BLOCK] = "LEAVE_BLOCK",
[INST_SET_VALUE] = "SET_VALUE",
[INST_SET_FUNCTION] = "SET_FUNCTION",
[INST_GET_VALUE] = "GET_VALUE",
[INST_GET_FUNCTION] = "GET_FUNCTION",
[INST_NEWFUNCTION_LIT] = "NEWFUNCTION_LIT",
[INST_NEWFUNCTION_DYN] = "NEWFUNCTION_DYN",
[INST_PUT] = "PUT",
[INST_GET] = "GET",
[INST_AND] = "AND",
[INST_OR] = "OR",
[INST_XOR] = "XOR",
[INST_NOT] = "NOT",
[INST_CJMP] = "CJMP",
[INST_CAR] = "CAR",
[INST_CDR] = "CDR",
[INST_SETCAR] = "SETCAR",
[INST_SETCDR] = "SETCDR",
[INST_GETELT_LIT] = "GETELT_LIT",
[INST_GETELT_DYN] = "GETELT_DYN",
[INST_SETELT_LIT] = "SETELT_LIT",
[INST_SETELT_DYN] = "SETELT_DYN",
[INST_EQ_TWO] = "EQ_TWO",
[INST_EQ_N] = "EQ_N",
[INST_NUM_GT] = "NUM_GT",
[INST_NUM_GE] = "NUM_GE",
[INST_NUM_EQ] = "NUM_EQ",
[INST_NUM_LE] = "NUM_LE",
[INST_NUM_LT] = "NUM_LT",
};
const char *REGISTER_NAMES[] = {
[REG_VAL] = "val",
[REG_SAVED] = "saved",
[REG_ARG] = "arg",
[REG_RET] = "ret",
[REG_LEXENV] = "lexenv",
[REG_BLOCK] = "block",
};