shithub: femtolisp

ref: 8decdc4ae4ab1ec629e1d2db83f97d5d2b571743
dir: /femtolisp/opcodes.h/

View raw version
#ifndef __OPCODES_H_
#define __OPCODES_H_

enum {
    OP_NOP=0, OP_DUP, OP_POP, OP_CALL, OP_TCALL, OP_JMP, OP_BRF, OP_BRT,
    OP_JMPL, OP_BRFL, OP_BRTL, OP_RET,

    OP_EQ, OP_EQV, OP_EQUAL, OP_ATOMP, OP_NOT, OP_NULLP, OP_BOOLEANP,
    OP_SYMBOLP, OP_NUMBERP, OP_BOUNDP, OP_PAIRP, OP_BUILTINP, OP_VECTORP,
    OP_FIXNUMP, OP_FUNCTIONP,

    OP_CONS, OP_LIST, OP_CAR, OP_CDR, OP_SETCAR, OP_SETCDR,
    OP_APPLY,

    OP_ADD, OP_SUB, OP_MUL, OP_DIV, OP_IDIV, OP_NUMEQ, OP_LT, OP_COMPARE,

    OP_VECTOR, OP_AREF, OP_ASET,

    OP_LOADT, OP_LOADF, OP_LOADNIL, OP_LOAD0, OP_LOAD1, OP_LOADI8,
    OP_LOADV, OP_LOADVL,
    OP_LOADG, OP_LOADGL,
    OP_LOADA, OP_LOADAL, OP_LOADC, OP_LOADCL,
    OP_SETG, OP_SETGL,
    OP_SETA, OP_SETAL, OP_SETC, OP_SETCL,

    OP_CLOSURE, OP_ARGC, OP_VARGC, OP_TRYCATCH, OP_COPYENV, OP_LET, OP_FOR,
    OP_TAPPLY, OP_ADD2, OP_SUB2, OP_NEG, OP_LARGC, OP_LVARGC,
    OP_LOADA0, OP_LOADA1, OP_LOADC00, OP_LOADC01,

    OP_BOOL_CONST_T, OP_BOOL_CONST_F, OP_THE_EMPTY_LIST,

    N_OPCODES
};

#endif