-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbytecc_codes.hh
116 lines (101 loc) · 2.85 KB
/
bytecc_codes.hh
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
// Copyright (c) 2019 ASMlover. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions
// are met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list ofconditions and the following disclaimer.
//
// * Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in
// the documentation and/or other materialsprovided with the
// distribution.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
// COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
// POSSIBILITY OF SUCH DAMAGE.
#ifndef BYTECC_CODEF
# define BYTECC_CODEF(c)
#endif
#ifndef BYTECC_CODE
# define BYTECC_CODE(c) BYTECC_CODEF(c)
#endif
BYTECC_CODE(CONSTANT)
BYTECC_CODE(NIL)
BYTECC_CODE(TRUE)
BYTECC_CODE(FALSE)
BYTECC_CODE(POP)
BYTECC_CODE(DEF_GLOBAL)
BYTECC_CODE(GET_GLOBAL)
BYTECC_CODE(SET_GLOBAL)
BYTECC_CODE(GET_LOCAL)
BYTECC_CODE(SET_LOCAL)
BYTECC_CODE(GET_UPVALUE)
BYTECC_CODE(SET_UPVALUE)
BYTECC_CODE(GET_ATTR)
BYTECC_CODE(SET_ATTR)
BYTECC_CODE(GET_SUPER)
BYTECC_CODE(EQ)
BYTECC_CODE(NE)
BYTECC_CODE(GT)
BYTECC_CODE(GE)
BYTECC_CODE(LT)
BYTECC_CODE(LE)
BYTECC_CODE(ADD)
BYTECC_CODE(SUB)
BYTECC_CODE(MUL)
BYTECC_CODE(DIV)
BYTECC_CODE(NOT)
BYTECC_CODE(NEG)
BYTECC_CODE(PRINT)
BYTECC_CODE(JUMP)
BYTECC_CODE(JUMP_IF_FALSE)
BYTECC_CODE(LOOP)
// calls and functions
BYTECC_CODE(CALL_0)
BYTECC_CODE(CALL_1)
BYTECC_CODE(CALL_2)
BYTECC_CODE(CALL_3)
BYTECC_CODE(CALL_4)
BYTECC_CODE(CALL_5)
BYTECC_CODE(CALL_6)
BYTECC_CODE(CALL_7)
BYTECC_CODE(CALL_8)
// methods and initializers
BYTECC_CODE(INVOKE_0)
BYTECC_CODE(INVOKE_1)
BYTECC_CODE(INVOKE_2)
BYTECC_CODE(INVOKE_3)
BYTECC_CODE(INVOKE_4)
BYTECC_CODE(INVOKE_5)
BYTECC_CODE(INVOKE_6)
BYTECC_CODE(INVOKE_7)
BYTECC_CODE(INVOKE_8)
// superclasses
BYTECC_CODE(SUPER_0)
BYTECC_CODE(SUPER_1)
BYTECC_CODE(SUPER_2)
BYTECC_CODE(SUPER_3)
BYTECC_CODE(SUPER_4)
BYTECC_CODE(SUPER_5)
BYTECC_CODE(SUPER_6)
BYTECC_CODE(SUPER_7)
BYTECC_CODE(SUPER_8)
BYTECC_CODE(CLOSURE)
BYTECC_CODE(CLOSE_UPVALUE)
BYTECC_CODE(RETURN)
BYTECC_CODE(CLASS)
BYTECC_CODE(SUBCLASS)
BYTECC_CODE(METHOD)
#undef BYTECC_CODE
#undef BYTECC_CODEF