8 #define MAX_STACK_DEPTH 1024
9 #define MAX_RECURSION 128
10 #define MAX_MARK_DEPTH 32
13 OP_AND, OP_OR, OP_NOT, OP_MUL, OP_PLUS, OP_MINUS, OP_DIV, OP_NEG,
14 OP_CAT, OP_LT, OP_LTE, OP_GT, OP_GTE, OP_EQ, OP_NEQ, OP_EACH,
15 OP_JMP, OP_JIFNOT, OP_JIFNIL, OP_FCALL, OP_MCALL, OP_RETURN,
16 OP_PUSHCONST, OP_PUSHONE, OP_PUSHZERO, OP_PUSHNIL, OP_POP,
17 OP_DUP, OP_XCHG, OP_INSERT, OP_EXTRACT, OP_MEMBER, OP_SETMEMBER,
18 OP_LOCAL, OP_SETLOCAL, OP_NEWVEC, OP_VAPPEND, OP_NEWHASH, OP_HAPPEND,
19 OP_LINE, OP_MARK, OP_UNMARK, OP_BREAK
23 naRef func; // naFunc object
24 naRef locals; // local per-call namespace
25 naRef args; // vector of arguments
26 int ip; // instruction pointer into code
27 int bp; // opStack pointer to start of frame
28 int line; // current line number
32 // Garbage collecting allocators:
33 struct naPool pools[NUM_NASAL_TYPES];
36 struct Frame fStack[MAX_RECURSION];
38 naRef opStack[MAX_STACK_DEPTH];
40 int markStack[MAX_MARK_DEPTH];
53 // GC-findable reference point for objects that may live on the
54 // processor ("real") stack during execution. naNew() places them
55 // here, and clears the array each time we return from a C
62 void printRefDEBUG(naRef r);