line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
// Copyright (c) 2023 Yuki Kimoto |
2
|
|
|
|
|
|
|
// MIT License |
3
|
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
#include "spvm_opcode.h" |
5
|
|
|
|
|
|
|
#include "spvm_compiler.h" |
6
|
|
|
|
|
|
|
#include "spvm_allocator.h" |
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
|
262987
|
|
|
|
|
|
const char* const* SPVM_OPCODE_C_ID_NAMES(void) { |
101
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
static const char* const id_names[] = { |
103
|
|
|
|
|
|
|
"END_ARGS", |
104
|
|
|
|
|
|
|
"END_METHOD", |
105
|
|
|
|
|
|
|
"GOTO", |
106
|
|
|
|
|
|
|
"IF_EQ_ZERO", |
107
|
|
|
|
|
|
|
"IF_NE_ZERO", |
108
|
|
|
|
|
|
|
"LOOKUP_SWITCH", |
109
|
|
|
|
|
|
|
"CASE_INFO", |
110
|
|
|
|
|
|
|
"ENTER_SCOPE", |
111
|
|
|
|
|
|
|
"PUSH_MORTAL", |
112
|
|
|
|
|
|
|
"LEAVE_SCOPE", |
113
|
|
|
|
|
|
|
"MOVE_CONSTANT_BYTE", |
114
|
|
|
|
|
|
|
"MOVE_CONSTANT_INT", |
115
|
|
|
|
|
|
|
"MOVE_CONSTANT_LONG", |
116
|
|
|
|
|
|
|
"MOVE_CONSTANT_FLOAT", |
117
|
|
|
|
|
|
|
"MOVE_CONSTANT_DOUBLE", |
118
|
|
|
|
|
|
|
"MOVE_BYTE", |
119
|
|
|
|
|
|
|
"MOVE_BYTE_ZERO", |
120
|
|
|
|
|
|
|
"MOVE_SHORT", |
121
|
|
|
|
|
|
|
"MOVE_SHORT_ZERO", |
122
|
|
|
|
|
|
|
"MOVE_INT", |
123
|
|
|
|
|
|
|
"MOVE_INT_ZERO", |
124
|
|
|
|
|
|
|
"MOVE_LONG", |
125
|
|
|
|
|
|
|
"MOVE_LONG_ZERO", |
126
|
|
|
|
|
|
|
"MOVE_FLOAT", |
127
|
|
|
|
|
|
|
"MOVE_FLOAT_ZERO", |
128
|
|
|
|
|
|
|
"MOVE_DOUBLE", |
129
|
|
|
|
|
|
|
"MOVE_DOUBLE_ZERO", |
130
|
|
|
|
|
|
|
"MOVE_OBJECT", |
131
|
|
|
|
|
|
|
"MOVE_OBJECT_UNDEF", |
132
|
|
|
|
|
|
|
"MOVE_OBJECT_CHECK_ASSIGN", |
133
|
|
|
|
|
|
|
"MOVE_OBJECT_CHECK_READ_ONLY", |
134
|
|
|
|
|
|
|
"MOVE_OBJECT_NO_INC", |
135
|
|
|
|
|
|
|
"MOVE_REF", |
136
|
|
|
|
|
|
|
"ADD_INT", |
137
|
|
|
|
|
|
|
"ADD_LONG", |
138
|
|
|
|
|
|
|
"ADD_FLOAT", |
139
|
|
|
|
|
|
|
"ADD_DOUBLE", |
140
|
|
|
|
|
|
|
"SUBTRACT_INT", |
141
|
|
|
|
|
|
|
"SUBTRACT_LONG", |
142
|
|
|
|
|
|
|
"SUBTRACT_FLOAT", |
143
|
|
|
|
|
|
|
"SUBTRACT_DOUBLE", |
144
|
|
|
|
|
|
|
"MULTIPLY_INT", |
145
|
|
|
|
|
|
|
"MULTIPLY_LONG", |
146
|
|
|
|
|
|
|
"MULTIPLY_FLOAT", |
147
|
|
|
|
|
|
|
"MULTIPLY_DOUBLE", |
148
|
|
|
|
|
|
|
"DIVIDE_INT", |
149
|
|
|
|
|
|
|
"DIVIDE_LONG", |
150
|
|
|
|
|
|
|
"DIVIDE_FLOAT", |
151
|
|
|
|
|
|
|
"DIVIDE_DOUBLE", |
152
|
|
|
|
|
|
|
"DIVIDE_UNSIGNED_INT", |
153
|
|
|
|
|
|
|
"DIVIDE_UNSIGNED_LONG", |
154
|
|
|
|
|
|
|
"REMAINDER_INT", |
155
|
|
|
|
|
|
|
"REMAINDER_LONG", |
156
|
|
|
|
|
|
|
"REMAINDER_UNSIGNED_INT", |
157
|
|
|
|
|
|
|
"REMAINDER_UNSIGNED_LONG", |
158
|
|
|
|
|
|
|
"LEFT_SHIFT_INT", |
159
|
|
|
|
|
|
|
"LEFT_SHIFT_LONG", |
160
|
|
|
|
|
|
|
"RIGHT_ARITHMETIC_SHIFT_INT", |
161
|
|
|
|
|
|
|
"RIGHT_ARITHMETIC_SHIFT_LONG", |
162
|
|
|
|
|
|
|
"RIGHT_LOGICAL_SHIFT_INT", |
163
|
|
|
|
|
|
|
"RIGHT_LOGICAL_SHIFT_LONG", |
164
|
|
|
|
|
|
|
"BIT_AND_INT", |
165
|
|
|
|
|
|
|
"BIT_AND_LONG", |
166
|
|
|
|
|
|
|
"BIT_OR_INT", |
167
|
|
|
|
|
|
|
"BIT_OR_LONG", |
168
|
|
|
|
|
|
|
"BIT_XOR_INT", |
169
|
|
|
|
|
|
|
"BIT_XOR_LONG", |
170
|
|
|
|
|
|
|
"BIT_OMPLEMENT_INT", |
171
|
|
|
|
|
|
|
"BIT_NOT_LONG", |
172
|
|
|
|
|
|
|
"NEGATE_INT", |
173
|
|
|
|
|
|
|
"NEGATE_LONG", |
174
|
|
|
|
|
|
|
"NEGATE_FLOAT", |
175
|
|
|
|
|
|
|
"NEGATE_DOUBLE", |
176
|
|
|
|
|
|
|
"CONCAT", |
177
|
|
|
|
|
|
|
"BOOL_CONVERSION_INT", |
178
|
|
|
|
|
|
|
"BOOL_CONVERSION_LONG", |
179
|
|
|
|
|
|
|
"BOOL_CONVERSION_FLOAT", |
180
|
|
|
|
|
|
|
"BOOL_CONVERSION_DOUBLE", |
181
|
|
|
|
|
|
|
"BOOL_CONVERSION_OBJECT", |
182
|
|
|
|
|
|
|
"BOOL_CONVERSION_REF", |
183
|
|
|
|
|
|
|
"BOOL_CONVERSION_BOOL_OBJECT", |
184
|
|
|
|
|
|
|
"EQ_INT", |
185
|
|
|
|
|
|
|
"EQ_LONG", |
186
|
|
|
|
|
|
|
"EQ_FLOAT", |
187
|
|
|
|
|
|
|
"EQ_DOUBLE", |
188
|
|
|
|
|
|
|
"EQ_OBJECT", |
189
|
|
|
|
|
|
|
"EQ_REF", |
190
|
|
|
|
|
|
|
"NE_INT", |
191
|
|
|
|
|
|
|
"NE_LONG", |
192
|
|
|
|
|
|
|
"NE_FLOAT", |
193
|
|
|
|
|
|
|
"NE_DOUBLE", |
194
|
|
|
|
|
|
|
"NE_OBJECT", |
195
|
|
|
|
|
|
|
"NE_REF", |
196
|
|
|
|
|
|
|
"GT_INT", |
197
|
|
|
|
|
|
|
"GT_LONG", |
198
|
|
|
|
|
|
|
"GT_FLOAT", |
199
|
|
|
|
|
|
|
"GT_DOUBLE", |
200
|
|
|
|
|
|
|
"GE_INT", |
201
|
|
|
|
|
|
|
"GE_LONG", |
202
|
|
|
|
|
|
|
"GE_FLOAT", |
203
|
|
|
|
|
|
|
"GE_DOUBLE", |
204
|
|
|
|
|
|
|
"LT_INT", |
205
|
|
|
|
|
|
|
"LT_LONG", |
206
|
|
|
|
|
|
|
"LT_FLOAT", |
207
|
|
|
|
|
|
|
"LT_DOUBLE", |
208
|
|
|
|
|
|
|
"LE_INT", |
209
|
|
|
|
|
|
|
"LE_LONG", |
210
|
|
|
|
|
|
|
"LE_FLOAT", |
211
|
|
|
|
|
|
|
"LE_DOUBLE", |
212
|
|
|
|
|
|
|
"CMP_INT", |
213
|
|
|
|
|
|
|
"CMP_LONG", |
214
|
|
|
|
|
|
|
"CMP_FLOAT", |
215
|
|
|
|
|
|
|
"CMP_DOUBLE", |
216
|
|
|
|
|
|
|
"IS_UNDEF", |
217
|
|
|
|
|
|
|
"IS_NOT_UNDEF", |
218
|
|
|
|
|
|
|
"STRING_EQ", |
219
|
|
|
|
|
|
|
"STRING_NE", |
220
|
|
|
|
|
|
|
"STRING_GT", |
221
|
|
|
|
|
|
|
"STRING_GE", |
222
|
|
|
|
|
|
|
"STRING_LT", |
223
|
|
|
|
|
|
|
"STRING_LE", |
224
|
|
|
|
|
|
|
"STRING_CMP", |
225
|
|
|
|
|
|
|
"NEW_OBJECT", |
226
|
|
|
|
|
|
|
"NEW_OBJECT_ARRAY", |
227
|
|
|
|
|
|
|
"NEW_MULDIM_ARRAY", |
228
|
|
|
|
|
|
|
"NEW_MULNUM_ARRAY", |
229
|
|
|
|
|
|
|
"NEW_BYTE_ARRAY", |
230
|
|
|
|
|
|
|
"NEW_SHORT_ARRAY", |
231
|
|
|
|
|
|
|
"NEW_INT_ARRAY", |
232
|
|
|
|
|
|
|
"NEW_LONG_ARRAY", |
233
|
|
|
|
|
|
|
"NEW_FLOAT_ARRAY", |
234
|
|
|
|
|
|
|
"NEW_DOUBLE_ARRAY", |
235
|
|
|
|
|
|
|
"NEW_STRING", |
236
|
|
|
|
|
|
|
"NEW_STRING_LEN", |
237
|
|
|
|
|
|
|
"IS_READ_ONLY", |
238
|
|
|
|
|
|
|
"MAKE_READ_ONLY", |
239
|
|
|
|
|
|
|
"GET_ARRAY_ELEMENT_BYTE", |
240
|
|
|
|
|
|
|
"GET_ARRAY_ELEMENT_SHORT", |
241
|
|
|
|
|
|
|
"GET_ARRAY_ELEMENT_INT", |
242
|
|
|
|
|
|
|
"GET_ARRAY_ELEMENT_LONG", |
243
|
|
|
|
|
|
|
"GET_ARRAY_ELEMENT_FLOAT", |
244
|
|
|
|
|
|
|
"GET_ARRAY_ELEMENT_DOUBLE", |
245
|
|
|
|
|
|
|
"GET_ARRAY_ELEMENT_OBJECT", |
246
|
|
|
|
|
|
|
"SET_ARRAY_ELEMENT_BYTE", |
247
|
|
|
|
|
|
|
"SET_ARRAY_ELEMENT_SHORT", |
248
|
|
|
|
|
|
|
"SET_ARRAY_ELEMENT_INT", |
249
|
|
|
|
|
|
|
"SET_ARRAY_ELEMENT_LONG", |
250
|
|
|
|
|
|
|
"SET_ARRAY_ELEMENT_FLOAT", |
251
|
|
|
|
|
|
|
"SET_ARRAY_ELEMENT_DOUBLE", |
252
|
|
|
|
|
|
|
"SET_ARRAY_ELEMENT_OBJECT", |
253
|
|
|
|
|
|
|
"SET_ARRAY_ELEMENT_OBJECT_CHECK_TYPE", |
254
|
|
|
|
|
|
|
"SET_ARRAY_ELEMENT_UNDEF", |
255
|
|
|
|
|
|
|
"ARRAY_LENGTH", |
256
|
|
|
|
|
|
|
"GET_FIELD_BYTE", |
257
|
|
|
|
|
|
|
"GET_FIELD_SHORT", |
258
|
|
|
|
|
|
|
"GET_FIELD_INT", |
259
|
|
|
|
|
|
|
"GET_FIELD_LONG", |
260
|
|
|
|
|
|
|
"GET_FIELD_FLOAT", |
261
|
|
|
|
|
|
|
"GET_FIELD_DOUBLE", |
262
|
|
|
|
|
|
|
"GET_FIELD_OBJECT", |
263
|
|
|
|
|
|
|
"SET_FIELD_BYTE", |
264
|
|
|
|
|
|
|
"SET_FIELD_SHORT", |
265
|
|
|
|
|
|
|
"SET_FIELD_INT", |
266
|
|
|
|
|
|
|
"SET_FIELD_LONG", |
267
|
|
|
|
|
|
|
"SET_FIELD_FLOAT", |
268
|
|
|
|
|
|
|
"SET_FIELD_DOUBLE", |
269
|
|
|
|
|
|
|
"SET_FIELD_OBJECT", |
270
|
|
|
|
|
|
|
"SET_FIELD_UNDEF", |
271
|
|
|
|
|
|
|
"GET_CLASS_VAR_BYTE", |
272
|
|
|
|
|
|
|
"GET_CLASS_VAR_SHORT", |
273
|
|
|
|
|
|
|
"GET_CLASS_VAR_INT", |
274
|
|
|
|
|
|
|
"GET_CLASS_VAR_LONG", |
275
|
|
|
|
|
|
|
"GET_CLASS_VAR_FLOAT", |
276
|
|
|
|
|
|
|
"GET_CLASS_VAR_DOUBLE", |
277
|
|
|
|
|
|
|
"GET_CLASS_VAR_OBJECT", |
278
|
|
|
|
|
|
|
"SET_CLASS_VAR_BYTE", |
279
|
|
|
|
|
|
|
"SET_CLASS_VAR_SHORT", |
280
|
|
|
|
|
|
|
"SET_CLASS_VAR_INT", |
281
|
|
|
|
|
|
|
"SET_CLASS_VAR_LONG", |
282
|
|
|
|
|
|
|
"SET_CLASS_VAR_FLOAT", |
283
|
|
|
|
|
|
|
"SET_CLASS_VAR_DOUBLE", |
284
|
|
|
|
|
|
|
"SET_CLASS_VAR_OBJECT", |
285
|
|
|
|
|
|
|
"SET_CLASS_VAR_UNDEF", |
286
|
|
|
|
|
|
|
"GET_EXCEPTION_VAR", |
287
|
|
|
|
|
|
|
"SET_EXCEPTION_VAR", |
288
|
|
|
|
|
|
|
"SET_EXCEPTION_UNDEF", |
289
|
|
|
|
|
|
|
"IF_EXCEPTION_CATCH", |
290
|
|
|
|
|
|
|
"IF_EXCEPTION_RETURN", |
291
|
|
|
|
|
|
|
"ISA", |
292
|
|
|
|
|
|
|
"ISA_ERROR", |
293
|
|
|
|
|
|
|
"IS_TYPE", |
294
|
|
|
|
|
|
|
"IS_ERROR", |
295
|
|
|
|
|
|
|
"CAN", |
296
|
|
|
|
|
|
|
"PRINT", |
297
|
|
|
|
|
|
|
"SAY", |
298
|
|
|
|
|
|
|
"WARN", |
299
|
|
|
|
|
|
|
"DIE", |
300
|
|
|
|
|
|
|
"GET_DIE_ERROR_ID", |
301
|
|
|
|
|
|
|
"SET_DIE_ERROR_ID", |
302
|
|
|
|
|
|
|
"CLEAR_EVAL_ERROR_ID", |
303
|
|
|
|
|
|
|
"GET_EVAL_ERROR_ID", |
304
|
|
|
|
|
|
|
"GET_CLASS_ID", |
305
|
|
|
|
|
|
|
"GET_BASIC_TYPE_ID", |
306
|
|
|
|
|
|
|
"SET_ERROR_ID", |
307
|
|
|
|
|
|
|
"TYPE_NAME", |
308
|
|
|
|
|
|
|
"DUMP", |
309
|
|
|
|
|
|
|
"COPY", |
310
|
|
|
|
|
|
|
"REF", |
311
|
|
|
|
|
|
|
"REF_BYTE", |
312
|
|
|
|
|
|
|
"REF_SHORT", |
313
|
|
|
|
|
|
|
"REF_INT", |
314
|
|
|
|
|
|
|
"REF_LONG", |
315
|
|
|
|
|
|
|
"REF_FLOAT", |
316
|
|
|
|
|
|
|
"REF_DOUBLE", |
317
|
|
|
|
|
|
|
"GET_DEREF_BYTE", |
318
|
|
|
|
|
|
|
"GET_DEREF_SHORT", |
319
|
|
|
|
|
|
|
"GET_DEREF_INT", |
320
|
|
|
|
|
|
|
"GET_DEREF_LONG", |
321
|
|
|
|
|
|
|
"GET_DEREF_FLOAT", |
322
|
|
|
|
|
|
|
"GET_DEREF_DOUBLE", |
323
|
|
|
|
|
|
|
"SET_DEREF_BYTE", |
324
|
|
|
|
|
|
|
"SET_DEREF_SHORT", |
325
|
|
|
|
|
|
|
"SET_DEREF_INT", |
326
|
|
|
|
|
|
|
"SET_DEREF_LONG", |
327
|
|
|
|
|
|
|
"SET_DEREF_FLOAT", |
328
|
|
|
|
|
|
|
"SET_DEREF_DOUBLE", |
329
|
|
|
|
|
|
|
"GET_MULNUM_FIELD_BYTE", |
330
|
|
|
|
|
|
|
"GET_MULNUM_FIELD_SHORT", |
331
|
|
|
|
|
|
|
"GET_MULNUM_FIELD_INT", |
332
|
|
|
|
|
|
|
"GET_MULNUM_FIELD_LONG", |
333
|
|
|
|
|
|
|
"GET_MULNUM_FIELD_FLOAT", |
334
|
|
|
|
|
|
|
"GET_MULNUM_FIELD_DOUBLE", |
335
|
|
|
|
|
|
|
"SET_MULNUM_FIELD_BYTE", |
336
|
|
|
|
|
|
|
"SET_MULNUM_FIELD_SHORT", |
337
|
|
|
|
|
|
|
"SET_MULNUM_FIELD_INT", |
338
|
|
|
|
|
|
|
"SET_MULNUM_FIELD_LONG", |
339
|
|
|
|
|
|
|
"SET_MULNUM_FIELD_FLOAT", |
340
|
|
|
|
|
|
|
"SET_MULNUM_FIELD_DOUBLE", |
341
|
|
|
|
|
|
|
"MOVE_MULNUM_BYTE", |
342
|
|
|
|
|
|
|
"MOVE_MULNUM_BYTE_ZERO", |
343
|
|
|
|
|
|
|
"MOVE_MULNUM_SHORT", |
344
|
|
|
|
|
|
|
"MOVE_MULNUM_SHORT_ZERO", |
345
|
|
|
|
|
|
|
"MOVE_MULNUM_INT", |
346
|
|
|
|
|
|
|
"MOVE_MULNUM_INT_ZERO", |
347
|
|
|
|
|
|
|
"MOVE_MULNUM_LONG", |
348
|
|
|
|
|
|
|
"MOVE_MULNUM_LONG_ZERO", |
349
|
|
|
|
|
|
|
"MOVE_MULNUM_FLOAT", |
350
|
|
|
|
|
|
|
"MOVE_MULNUM_FLOAT_ZERO", |
351
|
|
|
|
|
|
|
"MOVE_MULNUM_DOUBLE", |
352
|
|
|
|
|
|
|
"MOVE_MULNUM_DOUBLE_ZERO", |
353
|
|
|
|
|
|
|
"GET_MULNUM_ARRAY_BYTE", |
354
|
|
|
|
|
|
|
"GET_MULNUM_ARRAY_SHORT", |
355
|
|
|
|
|
|
|
"GET_MULNUM_ARRAY_INT", |
356
|
|
|
|
|
|
|
"GET_MULNUM_ARRAY_LONG", |
357
|
|
|
|
|
|
|
"GET_MULNUM_ARRAY_FLOAT", |
358
|
|
|
|
|
|
|
"GET_MULNUM_ARRAY_DOUBLE", |
359
|
|
|
|
|
|
|
"SET_MULNUM_ARRAY_BYTE", |
360
|
|
|
|
|
|
|
"SET_MULNUM_ARRAY_SHORT", |
361
|
|
|
|
|
|
|
"SET_MULNUM_ARRAY_INT", |
362
|
|
|
|
|
|
|
"SET_MULNUM_ARRAY_LONG", |
363
|
|
|
|
|
|
|
"SET_MULNUM_ARRAY_FLOAT", |
364
|
|
|
|
|
|
|
"SET_MULNUM_ARRAY_DOUBLE", |
365
|
|
|
|
|
|
|
"GET_MULNUM_ARRAY_FIELD_BYTE", |
366
|
|
|
|
|
|
|
"GET_MULNUM_ARRAY_FIELD_SHORT", |
367
|
|
|
|
|
|
|
"GET_MULNUM_ARRAY_FIELD_INT", |
368
|
|
|
|
|
|
|
"GET_MULNUM_ARRAY_FIELD_LONG", |
369
|
|
|
|
|
|
|
"GET_MULNUM_ARRAY_FIELD_FLOAT", |
370
|
|
|
|
|
|
|
"GET_MULNUM_ARRAY_FIELD_DOUBLE", |
371
|
|
|
|
|
|
|
"SET_MULNUM_ARRAY_FIELD_BYTE", |
372
|
|
|
|
|
|
|
"SET_MULNUM_ARRAY_FIELD_SHORT", |
373
|
|
|
|
|
|
|
"SET_MULNUM_ARRAY_FIELD_INT", |
374
|
|
|
|
|
|
|
"SET_MULNUM_ARRAY_FIELD_LONG", |
375
|
|
|
|
|
|
|
"SET_MULNUM_ARRAY_FIELD_FLOAT", |
376
|
|
|
|
|
|
|
"SET_MULNUM_ARRAY_FIELD_DOUBLE", |
377
|
|
|
|
|
|
|
"DEREF_MULNUM_BYTE", |
378
|
|
|
|
|
|
|
"DEREF_MULNUM_SHORT", |
379
|
|
|
|
|
|
|
"DEREF_MULNUM_INT", |
380
|
|
|
|
|
|
|
"DEREF_MULNUM_LONG", |
381
|
|
|
|
|
|
|
"DEREF_MULNUM_FLOAT", |
382
|
|
|
|
|
|
|
"DEREF_MULNUM_DOUBLE", |
383
|
|
|
|
|
|
|
"GET_MULNUM_FIELD_DEREF_BYTE", |
384
|
|
|
|
|
|
|
"GET_MULNUM_FIELD_DEREF_SHORT", |
385
|
|
|
|
|
|
|
"GET_MULNUM_FIELD_DEREF_INT", |
386
|
|
|
|
|
|
|
"GET_MULNUM_FIELD_DEREF_LONG", |
387
|
|
|
|
|
|
|
"GET_MULNUM_FIELD_DEREF_FLOAT", |
388
|
|
|
|
|
|
|
"GET_MULNUM_FIELD_DEREF_DOUBLE", |
389
|
|
|
|
|
|
|
"SET_MULNUM_FIELD_DEREF_BYTE", |
390
|
|
|
|
|
|
|
"SET_MULNUM_FIELD_DEREF_SHORT", |
391
|
|
|
|
|
|
|
"SET_MULNUM_FIELD_DEREF_INT", |
392
|
|
|
|
|
|
|
"SET_MULNUM_FIELD_DEREF_LONG", |
393
|
|
|
|
|
|
|
"SET_MULNUM_FIELD_DEREF_FLOAT", |
394
|
|
|
|
|
|
|
"SET_MULNUM_FIELD_DEREF_DOUBLE", |
395
|
|
|
|
|
|
|
"WEAKEN_FIELD", |
396
|
|
|
|
|
|
|
"UNWEAKEN_FIELD", |
397
|
|
|
|
|
|
|
"ISWEAK_FIELD", |
398
|
|
|
|
|
|
|
"TYPE_CONVERSION_BYTE_TO_SHORT", |
399
|
|
|
|
|
|
|
"TYPE_CONVERSION_BYTE_TO_INT", |
400
|
|
|
|
|
|
|
"TYPE_CONVERSION_BYTE_TO_LONG", |
401
|
|
|
|
|
|
|
"TYPE_CONVERSION_BYTE_TO_FLOAT", |
402
|
|
|
|
|
|
|
"TYPE_CONVERSION_BYTE_TO_DOUBLE", |
403
|
|
|
|
|
|
|
"TYPE_CONVERSION_SHORT_TO_BYTE", |
404
|
|
|
|
|
|
|
"TYPE_CONVERSION_SHORT_TO_INT", |
405
|
|
|
|
|
|
|
"TYPE_CONVERSION_SHORT_TO_LONG", |
406
|
|
|
|
|
|
|
"TYPE_CONVERSION_SHORT_TO_FLOAT", |
407
|
|
|
|
|
|
|
"TYPE_CONVERSION_SHORT_TO_DOUBLE", |
408
|
|
|
|
|
|
|
"TYPE_CONVERSION_INT_TO_BYTE", |
409
|
|
|
|
|
|
|
"TYPE_CONVERSION_INT_TO_SHORT", |
410
|
|
|
|
|
|
|
"TYPE_CONVERSION_INT_TO_LONG", |
411
|
|
|
|
|
|
|
"TYPE_CONVERSION_INT_TO_FLOAT", |
412
|
|
|
|
|
|
|
"TYPE_CONVERSION_INT_TO_DOUBLE", |
413
|
|
|
|
|
|
|
"TYPE_CONVERSION_LONG_TO_BYTE", |
414
|
|
|
|
|
|
|
"TYPE_CONVERSION_LONG_TO_SHORT", |
415
|
|
|
|
|
|
|
"TYPE_CONVERSION_LONG_TO_INT", |
416
|
|
|
|
|
|
|
"TYPE_CONVERSION_LONG_TO_FLOAT", |
417
|
|
|
|
|
|
|
"TYPE_CONVERSION_LONG_TO_DOUBLE", |
418
|
|
|
|
|
|
|
"TYPE_CONVERSION_FLOAT_TO_BYTE", |
419
|
|
|
|
|
|
|
"TYPE_CONVERSION_FLOAT_TO_SHORT", |
420
|
|
|
|
|
|
|
"TYPE_CONVERSION_FLOAT_TO_INT", |
421
|
|
|
|
|
|
|
"TYPE_CONVERSION_FLOAT_TO_LONG", |
422
|
|
|
|
|
|
|
"TYPE_CONVERSION_FLOAT_TO_DOUBLE", |
423
|
|
|
|
|
|
|
"TYPE_CONVERSION_DOUBLE_TO_BYTE", |
424
|
|
|
|
|
|
|
"TYPE_CONVERSION_DOUBLE_TO_SHORT", |
425
|
|
|
|
|
|
|
"TYPE_CONVERSION_DOUBLE_TO_INT", |
426
|
|
|
|
|
|
|
"TYPE_CONVERSION_DOUBLE_TO_LONG", |
427
|
|
|
|
|
|
|
"TYPE_CONVERSION_DOUBLE_TO_FLOAT", |
428
|
|
|
|
|
|
|
"TYPE_CONVERSION_BYTE_TO_STRING", |
429
|
|
|
|
|
|
|
"TYPE_CONVERSION_SHORT_TO_STRING", |
430
|
|
|
|
|
|
|
"TYPE_CONVERSION_INT_TO_STRING", |
431
|
|
|
|
|
|
|
"TYPE_CONVERSION_LONG_TO_STRING", |
432
|
|
|
|
|
|
|
"TYPE_CONVERSION_FLOAT_TO_STRING", |
433
|
|
|
|
|
|
|
"TYPE_CONVERSION_DOUBLE_TO_STRING", |
434
|
|
|
|
|
|
|
"TYPE_CONVERSION_STRING_TO_BYTE_ARRAY", |
435
|
|
|
|
|
|
|
"TYPE_CONVERSION_BYTE_ARRAY_TO_STRING", |
436
|
|
|
|
|
|
|
"TYPE_CONVERSION_BYTE_TO_BYTE_OBJECT", |
437
|
|
|
|
|
|
|
"TYPE_CONVERSION_SHORT_TO_SHORT_OBJECT", |
438
|
|
|
|
|
|
|
"TYPE_CONVERSION_INT_TO_INT_OBJECT", |
439
|
|
|
|
|
|
|
"TYPE_CONVERSION_LONG_TO_LONG_OBJECT", |
440
|
|
|
|
|
|
|
"TYPE_CONVERSION_FLOAT_TO_FLOAT_OBJECT", |
441
|
|
|
|
|
|
|
"TYPE_CONVERSION_DOUBLE_TO_DOUBLE_OBJECT", |
442
|
|
|
|
|
|
|
"TYPE_CONVERSION_BYTE_OBJECT_TO_BYTE", |
443
|
|
|
|
|
|
|
"TYPE_CONVERSION_SHORT_OBJECT_TO_SHORT", |
444
|
|
|
|
|
|
|
"TYPE_CONVERSION_INT_OBJECT_TO_INT", |
445
|
|
|
|
|
|
|
"TYPE_CONVERSION_LONG_OBJECT_TO_LONG", |
446
|
|
|
|
|
|
|
"TYPE_CONVERSION_FLOAT_OBJECT_TO_FLOAT", |
447
|
|
|
|
|
|
|
"TYPE_CONVERSION_DOUBLE_OBJECT_TO_DOUBLE", |
448
|
|
|
|
|
|
|
"GET_STACK_BYTE", |
449
|
|
|
|
|
|
|
"GET_STACK_SHORT", |
450
|
|
|
|
|
|
|
"GET_STACK_INT", |
451
|
|
|
|
|
|
|
"GET_STACK_LONG", |
452
|
|
|
|
|
|
|
"GET_STACK_FLOAT", |
453
|
|
|
|
|
|
|
"GET_STACK_DOUBLE", |
454
|
|
|
|
|
|
|
"GET_STACK_OBJECT", |
455
|
|
|
|
|
|
|
"GET_STACK_REF", |
456
|
|
|
|
|
|
|
"GET_STACK_MULNUM_BYTE", |
457
|
|
|
|
|
|
|
"GET_STACK_MULNUM_SHORT", |
458
|
|
|
|
|
|
|
"GET_STACK_MULNUM_INT", |
459
|
|
|
|
|
|
|
"GET_STACK_MULNUM_LONG", |
460
|
|
|
|
|
|
|
"GET_STACK_MULNUM_FLOAT", |
461
|
|
|
|
|
|
|
"GET_STACK_MULNUM_DOUBLE", |
462
|
|
|
|
|
|
|
"GET_STACK_OPTIONAL_BYTE", |
463
|
|
|
|
|
|
|
"GET_STACK_OPTIONAL_SHORT", |
464
|
|
|
|
|
|
|
"GET_STACK_OPTIONAL_INT", |
465
|
|
|
|
|
|
|
"GET_STACK_OPTIONAL_LONG", |
466
|
|
|
|
|
|
|
"GET_STACK_OPTIONAL_FLOAT", |
467
|
|
|
|
|
|
|
"GET_STACK_OPTIONAL_DOUBLE", |
468
|
|
|
|
|
|
|
"GET_STACK_OPTIONAL_OBJECT", |
469
|
|
|
|
|
|
|
"SET_STACK_BYTE", |
470
|
|
|
|
|
|
|
"SET_STACK_SHORT", |
471
|
|
|
|
|
|
|
"SET_STACK_INT", |
472
|
|
|
|
|
|
|
"SET_STACK_LONG", |
473
|
|
|
|
|
|
|
"SET_STACK_FLOAT", |
474
|
|
|
|
|
|
|
"SET_STACK_DOUBLE", |
475
|
|
|
|
|
|
|
"SET_STACK_OBJECT", |
476
|
|
|
|
|
|
|
"SET_STACK_REF", |
477
|
|
|
|
|
|
|
"SET_STACK_UNDEF", |
478
|
|
|
|
|
|
|
"SET_STACK_MULNUM_BYTE", |
479
|
|
|
|
|
|
|
"SET_STACK_MULNUM_SHORT", |
480
|
|
|
|
|
|
|
"SET_STACK_MULNUM_INT", |
481
|
|
|
|
|
|
|
"SET_STACK_MULNUM_LONG", |
482
|
|
|
|
|
|
|
"SET_STACK_MULNUM_FLOAT", |
483
|
|
|
|
|
|
|
"SET_STACK_MULNUM_DOUBLE", |
484
|
|
|
|
|
|
|
"RETURN_VOID", |
485
|
|
|
|
|
|
|
"RETURN_BYTE", |
486
|
|
|
|
|
|
|
"RETURN_SHORT", |
487
|
|
|
|
|
|
|
"RETURN_INT", |
488
|
|
|
|
|
|
|
"RETURN_LONG", |
489
|
|
|
|
|
|
|
"RETURN_FLOAT", |
490
|
|
|
|
|
|
|
"RETURN_DOUBLE", |
491
|
|
|
|
|
|
|
"RETURN_OBJECT", |
492
|
|
|
|
|
|
|
"RETURN_UNDEF", |
493
|
|
|
|
|
|
|
"RETURN_MULNUM_BYTE", |
494
|
|
|
|
|
|
|
"RETURN_MULNUM_SHORT", |
495
|
|
|
|
|
|
|
"RETURN_MULNUM_INT", |
496
|
|
|
|
|
|
|
"RETURN_MULNUM_LONG", |
497
|
|
|
|
|
|
|
"RETURN_MULNUM_FLOAT", |
498
|
|
|
|
|
|
|
"RETURN_MULNUM_DOUBLE", |
499
|
|
|
|
|
|
|
"ARGS_WIDTH", |
500
|
|
|
|
|
|
|
"CALL_CLASS_METHOD", |
501
|
|
|
|
|
|
|
"CALL_INSTANCE_METHOD_STATIC", |
502
|
|
|
|
|
|
|
"CALL_INSTANCE_METHOD_DYNAMIC", |
503
|
|
|
|
|
|
|
}; |
504
|
|
|
|
|
|
|
|
505
|
262987
|
|
|
|
|
|
return id_names; |
506
|
|
|
|
|
|
|
} |
507
|
|
|
|
|
|
|
|
508
|
0
|
|
|
|
|
|
SPVM_OPCODE* SPVM_OPCODE_new(SPVM_COMPILER* compiler) { |
509
|
0
|
|
|
|
|
|
SPVM_OPCODE* opcode = SPVM_ALLOCATOR_alloc_memory_block_permanent(compiler->current_each_compile_allocator, sizeof(SPVM_OPCODE)); |
510
|
|
|
|
|
|
|
|
511
|
0
|
|
|
|
|
|
return opcode; |
512
|
|
|
|
|
|
|
} |
513
|
|
|
|
|
|
|
|
514
|
0
|
|
|
|
|
|
const char* SPVM_OPCODE_get_opcode_name(int32_t opcode_id) { |
515
|
0
|
|
|
|
|
|
return (SPVM_OPCODE_C_ID_NAMES())[opcode_id]; |
516
|
|
|
|
|
|
|
} |