pre-computed identifer hashes

This commit is contained in:
2022-08-11 18:36:03 +01:00
parent 1430aefdf3
commit 00812e7a73
5 changed files with 34 additions and 27 deletions

View File

@@ -10,12 +10,18 @@ typedef void (*PrintFn)(const char*);
//the interpreter acts depending on the bytecode instructions
typedef struct Interpreter {
LiteralArray literalCache; //generally doesn't change after initialization
Scope* scope;
//input
unsigned char* bytecode;
int length;
int count;
LiteralArray literalCache; //read-only - built from the bytecode
//operation
Scope* scope;
LiteralArray stack;
//output
// LiteralDictionary exports; //read-write - interface with Toy from C
PrintFn printOutput;
PrintFn assertOutput;
} Interpreter;