-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathInnerInterpreter.h
46 lines (30 loc) · 918 Bytes
/
InnerInterpreter.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#pragma once
#include "Objects.h"
#include "Words.h"
// stack pointers and stack functions
Object DataStackPtr;
Object ReturnStackPtr;
void Push(Object* Stack, Object* Object);
void Pop(Object* Stack, Object* Object);
void LocalPop(Object* Stack, Object* Object); // Note: can only be used to get a local sizeof(Object) Object!
// Dictionary pointer and dictionary functions
Object DictionaryPtr;
void* AllocNative(size_t Size);
// Inner Interpreter registers
Object WordAddress;
Object InstructionAddress;
// Inner Interpreter execution state machine
void* _Run();
void* _Next();
void* _Colon();
void* _Semi();
void* _Terminate();
void* _Constant();
void* _Variable();
void* _DoRelativeJump();
void* _DoLoop();
void* _DoConditionalRelativeJump();
// Init Inner Interpreter
void InitInterpreter();
// Execute a Secondary Word (has to have a COLON & SEMI/TERMINATE to work)
void Execute(Word* Word);