-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathvm.h
66 lines (63 loc) · 1.43 KB
/
vm.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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
#ifndef _BEAN_VM_H
#define _BEAN_VM_H
typedef enum {
OP_BEAN_PUSH_NIL=2,
OP_BEAN_PUSH_FALSE,
OP_BEAN_PUSH_TRUE,
OP_BEAN_PUSH_STR,
OP_BEAN_PUSH_NUM,
OP_BEAN_BINARY_OP,
OP_BEAN_VARIABLE_GET,
OP_BEAN_VARIABLE_DEFINE,
OP_BEAN_SET_ARG,
OP_BEAN_IN_STACK,
OP_BEAN_RETURN,
OP_BEAN_INSPECT,
OP_BEAN_FUNCTION_DEFINE,
OP_BEAN_SET_FUNCTION_NAME,
OP_BEAN_FUNCTION_PUSH_SCOPE,
OP_BEAN_FUNCTION_CALL0,
OP_BEAN_FUNCTION_CALL1,
OP_BEAN_FUNCTION_CALL2,
OP_BEAN_FUNCTION_CALL3,
OP_BEAN_FUNCTION_CALL5,
OP_BEAN_FUNCTION_CALL6,
OP_BEAN_FUNCTION_CALL7,
OP_BEAN_FUNCTION_CALL8,
OP_BEAN_FUNCTION_CALL9,
OP_BEAN_FUNCTION_CALL10,
OP_BEAN_FUNCTION_CALL11,
OP_BEAN_FUNCTION_CALL12,
OP_BEAN_FUNCTION_CALL13,
OP_BEAN_FUNCTION_CALL14,
OP_BEAN_FUNCTION_CALL15,
OP_BEAN_ARRAY_PUSH,
OP_BEAN_ARRAY_ITEM,
OP_BEAN_HASH_NEW,
OP_BEAN_HASH_KEY,
OP_BEAN_HASH_VALUE,
OP_BEAN_HANDLE_PREFIX,
OP_BEAN_HANDLE_SUFFIX,
OP_BEAN_BINARY_OP_WITH_ASSIGN,
OP_BEAN_UNARY,
OP_BEAN_DROP,
OP_BEAN_JUMP,
OP_BEAN_JUMP_FALSE,
OP_BEAN_JUMP_FALSE_PUSH_BACK,
OP_BEAN_JUMP_TRUE,
OP_BEAN_JUMP_TRUE_PUSH_BACK,
OP_BEAN_LOOP,
OP_BEAN_LOOP_CONTINUE,
OP_BEAN_LOOP_BREAK,
OP_BEAN_NEW_SCOPE,
OP_BEAN_END_SCOPE,
OP_BEAN_NEW_FUNCTION_SCOPE,
OP_BEAN_CREATE_FRAME,
OP_BEAN_DROP_FRAME,
OP_BEAN_SELF_GET,
OP_BEAN_NEXT_STEP,
OP_BEAN_HASH_ATTRIBUTE_ASSIGN,
OP_BEAN_INDEX_OR_ATTRIBUTE_ASSIGN
} OpCode;
int executeInstruct();
#endif