line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
// Copyright (c) 2023 Yuki Kimoto |
2
|
|
|
|
|
|
|
// MIT License |
3
|
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
#include |
5
|
|
|
|
|
|
|
#include |
6
|
|
|
|
|
|
|
#include |
7
|
|
|
|
|
|
|
#include |
8
|
|
|
|
|
|
|
#include |
9
|
|
|
|
|
|
|
#include |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
#include "spvm_precompile.h" |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
#include "spvm_allocator.h" |
14
|
|
|
|
|
|
|
#include "spvm_native.h" |
15
|
|
|
|
|
|
|
#include "spvm_api.h" |
16
|
|
|
|
|
|
|
#include "spvm_api_runtime.h" |
17
|
|
|
|
|
|
|
#include "spvm_api_basic_type.h" |
18
|
|
|
|
|
|
|
#include "spvm_api_class_var.h" |
19
|
|
|
|
|
|
|
#include "spvm_api_field.h" |
20
|
|
|
|
|
|
|
#include "spvm_api_method.h" |
21
|
|
|
|
|
|
|
#include "spvm_api_arg.h" |
22
|
|
|
|
|
|
|
#include "spvm_api_type.h" |
23
|
|
|
|
|
|
|
#include "spvm_string_buffer.h" |
24
|
|
|
|
|
|
|
#include "spvm_opcode.h" |
25
|
|
|
|
|
|
|
#include "spvm_runtime_class_var.h" |
26
|
|
|
|
|
|
|
#include "spvm_runtime_field.h" |
27
|
|
|
|
|
|
|
#include "spvm_runtime_method.h" |
28
|
|
|
|
|
|
|
#include "spvm_runtime_basic_type.h" |
29
|
|
|
|
|
|
|
#include "spvm_runtime_string.h" |
30
|
|
|
|
|
|
|
|
31
|
515
|
|
|
|
|
|
SPVM_PRECOMPILE* SPVM_PRECOMPILE_new() { |
32
|
515
|
|
|
|
|
|
SPVM_PRECOMPILE* precompile = SPVM_ALLOCATOR_alloc_memory_block_unmanaged(sizeof(SPVM_PRECOMPILE)); |
33
|
|
|
|
|
|
|
|
34
|
515
|
|
|
|
|
|
return precompile; |
35
|
|
|
|
|
|
|
} |
36
|
|
|
|
|
|
|
|
37
|
515
|
|
|
|
|
|
void SPVM_PRECOMPILE_free(SPVM_PRECOMPILE* precompile) { |
38
|
|
|
|
|
|
|
|
39
|
515
|
|
|
|
|
|
SPVM_ALLOCATOR_free_memory_block_unmanaged(precompile); |
40
|
515
|
|
|
|
|
|
precompile = NULL; |
41
|
515
|
|
|
|
|
|
} |
42
|
|
|
|
|
|
|
|
43
|
515
|
|
|
|
|
|
void SPVM_PRECOMPILE_set_runtime(SPVM_PRECOMPILE* precompile, SPVM_RUNTIME* runtime) { |
44
|
|
|
|
|
|
|
|
45
|
515
|
|
|
|
|
|
precompile->runtime = runtime; |
46
|
515
|
|
|
|
|
|
} |
47
|
|
|
|
|
|
|
|
48
|
0
|
|
|
|
|
|
SPVM_RUNTIME* SPVM_PRECOMPILE_get_runtime(SPVM_PRECOMPILE* precompile) { |
49
|
|
|
|
|
|
|
|
50
|
0
|
|
|
|
|
|
return precompile->runtime; |
51
|
|
|
|
|
|
|
} |
52
|
|
|
|
|
|
|
|
53
|
636
|
|
|
|
|
|
void SPVM_PRECOMPILE_build_module_source(SPVM_PRECOMPILE* precompile, SPVM_STRING_BUFFER* string_buffer, SPVM_RUNTIME_BASIC_TYPE* basic_type) { |
54
|
636
|
|
|
|
|
|
SPVM_RUNTIME* runtime = precompile->runtime; |
55
|
|
|
|
|
|
|
|
56
|
636
|
|
|
|
|
|
int32_t basic_type_id = basic_type->id; |
57
|
636
|
|
|
|
|
|
int32_t basic_type_methods_length = basic_type->methods_length; |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
// Method implementations |
60
|
13697
|
100
|
|
|
|
|
for (int32_t method_index = 0; method_index < basic_type_methods_length; method_index++) { |
61
|
13061
|
|
|
|
|
|
SPVM_RUNTIME_METHOD* method = SPVM_API_BASIC_TYPE_get_method_by_index(runtime, basic_type, method_index); |
62
|
13061
|
|
|
|
|
|
const char* method_name = method->name; |
63
|
13061
|
|
|
|
|
|
int32_t method_has_precompile_flag = method->is_precompile; |
64
|
13061
|
100
|
|
|
|
|
if (method_has_precompile_flag) { |
65
|
5775
|
|
|
|
|
|
SPVM_PRECOMPILE_build_method_source(precompile, string_buffer, basic_type, method); |
66
|
|
|
|
|
|
|
} |
67
|
|
|
|
|
|
|
} |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
// If the basic type has anon methods, the anon methods is merged to this basic type |
70
|
636
|
|
|
|
|
|
int32_t basic_type_anon_basic_types_length = basic_type->anon_basic_types_length; |
71
|
636
|
100
|
|
|
|
|
if (basic_type_anon_basic_types_length > 0) { |
72
|
140
|
100
|
|
|
|
|
for (int32_t anon_basic_type_index = 0; anon_basic_type_index < basic_type_anon_basic_types_length; anon_basic_type_index++) { |
73
|
123
|
|
|
|
|
|
SPVM_RUNTIME_BASIC_TYPE* anon_basic_type = SPVM_API_BASIC_TYPE_get_anon_basic_type_by_index(runtime, basic_type, anon_basic_type_index); |
74
|
123
|
|
|
|
|
|
SPVM_PRECOMPILE_build_module_source(precompile, string_buffer, anon_basic_type); |
75
|
|
|
|
|
|
|
} |
76
|
|
|
|
|
|
|
} |
77
|
|
|
|
|
|
|
|
78
|
636
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, "\n"); |
79
|
636
|
|
|
|
|
|
} |
80
|
|
|
|
|
|
|
|
81
|
5777
|
|
|
|
|
|
void SPVM_PRECOMPILE_build_header(SPVM_PRECOMPILE* precompile, SPVM_STRING_BUFFER* string_buffer) { |
82
|
5777
|
|
|
|
|
|
SPVM_RUNTIME* runtime = precompile->runtime; |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
// Include headers and define macros |
85
|
5777
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, |
86
|
|
|
|
|
|
|
"#include \"spvm_native.h\"\n" |
87
|
|
|
|
|
|
|
"#include \"spvm_implement.h\"\n" |
88
|
|
|
|
|
|
|
"#include \n" |
89
|
|
|
|
|
|
|
"#include \n" |
90
|
|
|
|
|
|
|
"#include \n" |
91
|
|
|
|
|
|
|
"#include \n" |
92
|
|
|
|
|
|
|
"#include \n" |
93
|
|
|
|
|
|
|
); |
94
|
5777
|
|
|
|
|
|
} |
95
|
|
|
|
|
|
|
|
96
|
5777
|
|
|
|
|
|
void SPVM_PRECOMPILE_build_method_declaration(SPVM_PRECOMPILE* precompile, SPVM_STRING_BUFFER* string_buffer, SPVM_RUNTIME_BASIC_TYPE* basic_type, SPVM_RUNTIME_METHOD* method) { |
97
|
5777
|
|
|
|
|
|
SPVM_RUNTIME* runtime = precompile->runtime; |
98
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
// Method declaration |
100
|
5777
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, "int32_t SPVMPRECOMPILE__"); |
101
|
5777
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, (char*)basic_type->name); |
102
|
5777
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, (char*)"__"); |
103
|
5777
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, (char*)method->name); |
104
|
|
|
|
|
|
|
{ |
105
|
5777
|
|
|
|
|
|
int32_t index = string_buffer->length - (strlen(basic_type->name) + 2 + strlen(method->name)); |
106
|
|
|
|
|
|
|
|
107
|
237043
|
100
|
|
|
|
|
while (index < string_buffer->length) { |
108
|
231266
|
100
|
|
|
|
|
if (string_buffer->string[index] == ':') { |
109
|
12740
|
|
|
|
|
|
string_buffer->string[index] = '_'; |
110
|
|
|
|
|
|
|
} |
111
|
231266
|
|
|
|
|
|
index++; |
112
|
|
|
|
|
|
|
} |
113
|
|
|
|
|
|
|
} |
114
|
5777
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, "(SPVM_ENV* env, SPVM_VALUE* stack)"); |
115
|
5777
|
|
|
|
|
|
} |
116
|
|
|
|
|
|
|
|
117
|
5777
|
|
|
|
|
|
void SPVM_PRECOMPILE_build_method_source(SPVM_PRECOMPILE* precompile, SPVM_STRING_BUFFER* string_buffer, SPVM_RUNTIME_BASIC_TYPE* current_basic_type, SPVM_RUNTIME_METHOD* current_method) { |
118
|
5777
|
|
|
|
|
|
SPVM_RUNTIME* runtime = precompile->runtime; |
119
|
|
|
|
|
|
|
|
120
|
|
|
|
|
|
|
// Headers |
121
|
5777
|
|
|
|
|
|
SPVM_PRECOMPILE_build_header(precompile, string_buffer); |
122
|
|
|
|
|
|
|
|
123
|
|
|
|
|
|
|
// Current basic type id |
124
|
|
|
|
|
|
|
|
125
|
|
|
|
|
|
|
// Method declaration |
126
|
5777
|
|
|
|
|
|
SPVM_PRECOMPILE_build_method_declaration(precompile, string_buffer, current_basic_type, current_method); |
127
|
|
|
|
|
|
|
|
128
|
|
|
|
|
|
|
// Block start |
129
|
5777
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " {\n"); |
130
|
|
|
|
|
|
|
|
131
|
|
|
|
|
|
|
// The basic type name |
132
|
5777
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer," const char* current_basic_type_name = \""); |
133
|
5777
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, current_basic_type->name); |
134
|
5777
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, "\";\n"); |
135
|
|
|
|
|
|
|
|
136
|
5777
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer," void* current_basic_type = env->api->runtime->get_basic_type_by_name(env->runtime, current_basic_type_name);\n"); |
137
|
|
|
|
|
|
|
|
138
|
|
|
|
|
|
|
// Current method name |
139
|
5777
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " const char* current_method_name = \""); |
140
|
5777
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, current_method->name); |
141
|
5777
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, "\";\n"); |
142
|
|
|
|
|
|
|
|
143
|
5777
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer," void* current_method = env->api->basic_type->get_method_by_name(env->runtime, current_basic_type, current_method_name);\n"); |
144
|
|
|
|
|
|
|
|
145
|
|
|
|
|
|
|
// object variable declarations |
146
|
5777
|
|
|
|
|
|
int32_t object_vars_width = current_method->object_vars_width; |
147
|
5777
|
100
|
|
|
|
|
if (object_vars_width > 0) { |
148
|
4042
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " void* object_vars["); |
149
|
4042
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_int(string_buffer, object_vars_width); |
150
|
4042
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, "] = {0};\n"); |
151
|
|
|
|
|
|
|
} |
152
|
|
|
|
|
|
|
|
153
|
|
|
|
|
|
|
// ref variable declarations |
154
|
5777
|
|
|
|
|
|
int32_t ref_vars_width = current_method->ref_vars_width; |
155
|
5777
|
100
|
|
|
|
|
if (ref_vars_width > 0) { |
156
|
242
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " void* ref_vars["); |
157
|
242
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_int(string_buffer, ref_vars_width); |
158
|
242
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, "] = {0};\n"); |
159
|
|
|
|
|
|
|
} |
160
|
|
|
|
|
|
|
|
161
|
|
|
|
|
|
|
// double variable declarations |
162
|
5777
|
|
|
|
|
|
int32_t double_vars_width = current_method->double_vars_width; |
163
|
5777
|
100
|
|
|
|
|
if (double_vars_width > 0) { |
164
|
711
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " double double_vars["); |
165
|
711
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_int(string_buffer, double_vars_width); |
166
|
711
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, "];\n"); |
167
|
|
|
|
|
|
|
} |
168
|
|
|
|
|
|
|
|
169
|
|
|
|
|
|
|
// float variable declarations |
170
|
5777
|
|
|
|
|
|
int32_t float_vars_width = current_method->float_vars_width; |
171
|
5777
|
100
|
|
|
|
|
if (float_vars_width > 0) { |
172
|
623
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " float float_vars["); |
173
|
623
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_int(string_buffer, float_vars_width); |
174
|
623
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, "];\n"); |
175
|
|
|
|
|
|
|
} |
176
|
|
|
|
|
|
|
|
177
|
|
|
|
|
|
|
// long variable declarations |
178
|
5777
|
|
|
|
|
|
int32_t long_vars_width = current_method->long_vars_width; |
179
|
5777
|
100
|
|
|
|
|
if (long_vars_width > 0) { |
180
|
698
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " int64_t long_vars["); |
181
|
698
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_int(string_buffer, long_vars_width); |
182
|
698
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, "];\n"); |
183
|
|
|
|
|
|
|
} |
184
|
|
|
|
|
|
|
|
185
|
|
|
|
|
|
|
// int variable declarations |
186
|
5777
|
|
|
|
|
|
int32_t int_vars_width = current_method->int_vars_width; |
187
|
5777
|
50
|
|
|
|
|
if (int_vars_width > 0) { |
188
|
5777
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " int32_t int_vars["); |
189
|
5777
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_int(string_buffer, int_vars_width); |
190
|
5777
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, "];\n"); |
191
|
|
|
|
|
|
|
} |
192
|
|
|
|
|
|
|
|
193
|
|
|
|
|
|
|
// Exception |
194
|
|
|
|
|
|
|
// volatile attribute is not needed, but the environment "FreeBSD 9.1" and "gcc 4.2.1" seems to performe wrong optimisation |
195
|
|
|
|
|
|
|
// in double pointer logic. volatile attribute fixed the test "ref.t" "SPVM::TestCase::Ref->test_pass_mulnum_ref_byte". |
196
|
|
|
|
|
|
|
// SPVM_STRING_BUFFER_add(string_buffer, " volatile int32_t error_id = 0;\n"); |
197
|
|
|
|
|
|
|
|
198
|
5777
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " int32_t error_id = 0;\n"); |
199
|
|
|
|
|
|
|
|
200
|
5777
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " int32_t eval_error_id = 0;\n"); |
201
|
|
|
|
|
|
|
|
202
|
5777
|
|
|
|
|
|
int32_t method_mortal_stack_length = current_method->mortal_stack_length; |
203
|
5777
|
50
|
|
|
|
|
if (method_mortal_stack_length > 0) { |
204
|
5777
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " int32_t mortal_stack["); |
205
|
5777
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_int(string_buffer, method_mortal_stack_length); |
206
|
5777
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, "];\n"); |
207
|
5777
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " int32_t mortal_stack_top = 0;\n"); |
208
|
|
|
|
|
|
|
} |
209
|
|
|
|
|
|
|
|
210
|
|
|
|
|
|
|
// short variable declarations |
211
|
5777
|
|
|
|
|
|
int32_t short_vars_width = current_method->short_vars_width; |
212
|
5777
|
100
|
|
|
|
|
if (short_vars_width > 0) { |
213
|
579
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " int16_t short_vars["); |
214
|
579
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_int(string_buffer, short_vars_width); |
215
|
579
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, "];\n"); |
216
|
|
|
|
|
|
|
} |
217
|
|
|
|
|
|
|
|
218
|
|
|
|
|
|
|
// byte variable declarations |
219
|
5777
|
|
|
|
|
|
int32_t byte_vars_width = current_method->byte_vars_width; |
220
|
5777
|
100
|
|
|
|
|
if (byte_vars_width > 0) { |
221
|
662
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " int8_t byte_vars["); |
222
|
662
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_int(string_buffer, byte_vars_width); |
223
|
662
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, "];\n"); |
224
|
|
|
|
|
|
|
} |
225
|
|
|
|
|
|
|
|
226
|
|
|
|
|
|
|
// Convert string |
227
|
5777
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " char convert_string_buffer[21];\n"); |
228
|
5777
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " char message[256];\n"); |
229
|
|
|
|
|
|
|
|
230
|
5777
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " int32_t basic_type_id;\n"); |
231
|
5777
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " int32_t object_basic_type_id = 0;\n"); |
232
|
5777
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " int32_t src_basic_type_id;\n"); |
233
|
5777
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " void* basic_type = NULL;\n"); |
234
|
5777
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " void* object_basic_type = NULL;\n"); |
235
|
5777
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " void* src_basic_type = NULL;\n"); |
236
|
5777
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " void* invocant_decl_basic_type = NULL;\n"); |
237
|
5777
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " int32_t original_mortal_stack_top = 0;\n"); |
238
|
5777
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " int32_t line = 0;\n"); |
239
|
5777
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " int32_t arg_mem_id = 0;\n"); |
240
|
5777
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " int32_t stack_index = 0;\n"); |
241
|
5777
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " void* object = NULL;\n"); |
242
|
5777
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " void* object1 = NULL;\n"); |
243
|
5777
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " void* object2 = NULL;\n"); |
244
|
5777
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " void* object_address = NULL;\n"); |
245
|
5777
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " void* new_object_no_mortal = NULL;\n"); |
246
|
5777
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " void* array = NULL;\n"); |
247
|
5777
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " int32_t index = 0;\n"); |
248
|
5777
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " int32_t args_width = 0;\n"); |
249
|
5777
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " int32_t return_value = 0;\n"); |
250
|
5777
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " void* string = NULL;\n"); |
251
|
5777
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " void* string1 = NULL;\n"); |
252
|
5777
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " void* string2 = NULL;\n"); |
253
|
5777
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " void* string3 = NULL;\n"); |
254
|
5777
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " void* exception = NULL;\n"); |
255
|
5777
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " void* type_name = NULL;\n"); |
256
|
5777
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " void* get_field_object = NULL;\n"); |
257
|
5777
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " void* dump = NULL;\n"); |
258
|
5777
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " void* src_string = NULL;\n"); |
259
|
5777
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " void* byte_arra = NULL;\n"); |
260
|
5777
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " void** element_address = NULL;\n"); |
261
|
5777
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " void** get_field_object_ref = NULL;\n"); |
262
|
5777
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " void* src_byte_array = NULL;\n"); |
263
|
5777
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " void* byte_array = NULL;\n"); |
264
|
5777
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " int32_t elem_isa = 0;\n"); |
265
|
5777
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " int32_t cast_type_dimension = 0;\n"); |
266
|
5777
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " int32_t type_dimension = 0;\n"); |
267
|
5777
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " int32_t object_type_dimension_id = 0;\n"); |
268
|
5777
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " int32_t runtime_assignability = 0;\n"); |
269
|
5777
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_VALUE tmp_constant;\n"); |
270
|
5777
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " int8_t* mulnum_ref_byte;\n"); |
271
|
5777
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " int16_t* mulnum_ref_short;\n"); |
272
|
5777
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " int32_t* mulnum_ref_int;\n"); |
273
|
5777
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " int64_t* mulnum_ref_long;\n"); |
274
|
5777
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " float* mulnum_ref_float;\n"); |
275
|
5777
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " double* mulnum_ref_double;\n"); |
276
|
5777
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " int8_t value_byte;\n"); |
277
|
5777
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " int16_t value_short;\n"); |
278
|
5777
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " int32_t value_int;\n"); |
279
|
5777
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " int64_t value_long;\n"); |
280
|
5777
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " float value_float;\n"); |
281
|
5777
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " double value_double;\n"); |
282
|
5777
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_VALUE* fields;\n"); |
283
|
5777
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " int32_t src_string_length;\n"); |
284
|
5777
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " int8_t* src_byte_array_data;\n"); |
285
|
5777
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " int32_t src_byte_array_length;\n"); |
286
|
5777
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " int8_t* byte_array_data;\n"); |
287
|
5777
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " int32_t string_length;\n"); |
288
|
5777
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " char* src_string_data;\n"); |
289
|
5777
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " int32_t empty_or_undef;\n"); |
290
|
5777
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " char* bytes;\n"); |
291
|
5777
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " char* class_var_name;\n"); |
292
|
5777
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " int32_t is_read_only;\n"); |
293
|
5777
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " int32_t length;\n"); |
294
|
5777
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " int32_t length1;\n"); |
295
|
5777
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " int32_t length2;\n"); |
296
|
5777
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " char* bytes1;\n"); |
297
|
5777
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " char* bytes2;\n"); |
298
|
5777
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " int32_t short_string_length;\n"); |
299
|
5777
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " int32_t retval;\n"); |
300
|
5777
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " int32_t cmp;\n"); |
301
|
5777
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " int8_t* element_ptr_byte;\n"); |
302
|
5777
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " char* basic_type_name;\n"); |
303
|
5777
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " char* field_name;\n"); |
304
|
5777
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " char* method_name;\n"); |
305
|
5777
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " char* constant_string;\n"); |
306
|
5777
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " int32_t constant_string_length;\n"); |
307
|
|
|
|
|
|
|
|
308
|
5777
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " char* class_dir;\n"); |
309
|
5777
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " char* class_dir_sep;\n"); |
310
|
5777
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " char* class_rel_file;\n"); |
311
|
5777
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " int32_t field_index;\n"); |
312
|
5777
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " int32_t fields_length;\n"); |
313
|
5777
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " char tmp_buffer[256];\n"); |
314
|
5777
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " void* decl_class_var;\n"); |
315
|
5777
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " void* decl_method;\n"); |
316
|
5777
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " int32_t decl_field_offset;\n"); |
317
|
|
|
|
|
|
|
|
318
|
5777
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " int32_t object_header_size = env->api->runtime->get_object_data_offset(env->runtime);\n"); |
319
|
5777
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " int32_t object_length_offset = env->api->runtime->get_object_length_offset(env->runtime);\n"); |
320
|
|
|
|
|
|
|
|
321
|
5777
|
|
|
|
|
|
SPVM_OPCODE* opcodes = current_method->opcodes; |
322
|
5777
|
|
|
|
|
|
int32_t opcodes_length = current_method->opcodes_length; |
323
|
5777
|
|
|
|
|
|
int32_t opcode_index = 0; |
324
|
|
|
|
|
|
|
|
325
|
5777
|
|
|
|
|
|
SPVM_OPCODE* opcode = NULL; |
326
|
|
|
|
|
|
|
|
327
|
5777
|
|
|
|
|
|
int32_t string_buffer_begin_offset = string_buffer->length; |
328
|
5777
|
|
|
|
|
|
opcode_index = 0; |
329
|
262725
|
100
|
|
|
|
|
while (opcode_index < opcodes_length) { |
330
|
256948
|
|
|
|
|
|
opcode = &(opcodes[opcode_index]); |
331
|
256948
|
|
|
|
|
|
int32_t opcode_id = opcode->id; |
332
|
|
|
|
|
|
|
|
333
|
256948
|
|
|
|
|
|
int32_t basic_type_id = -1; |
334
|
256948
|
|
|
|
|
|
SPVM_RUNTIME_CLASS_VAR* class_var = NULL; |
335
|
256948
|
|
|
|
|
|
SPVM_RUNTIME_FIELD* field = NULL; |
336
|
256948
|
|
|
|
|
|
SPVM_RUNTIME_METHOD* method = NULL; |
337
|
256948
|
|
|
|
|
|
int32_t field_offset = -1; |
338
|
256948
|
|
|
|
|
|
int32_t id_set = 1; |
339
|
256948
|
|
|
|
|
|
switch(opcode_id) { |
340
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_MOVE_OBJECT_WITH_TYPE_CHECKING: { |
341
|
261
|
|
|
|
|
|
basic_type_id = opcode->operand2; |
342
|
261
|
|
|
|
|
|
break; |
343
|
|
|
|
|
|
|
} |
344
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_NEW_OBJECT: { |
345
|
297
|
|
|
|
|
|
basic_type_id = opcode->operand1; |
346
|
297
|
|
|
|
|
|
break; |
347
|
|
|
|
|
|
|
} |
348
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_NEW_OBJECT_ARRAY: { |
349
|
741
|
|
|
|
|
|
basic_type_id = opcode->operand1; |
350
|
741
|
|
|
|
|
|
break; |
351
|
|
|
|
|
|
|
} |
352
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_NEW_MULDIM_ARRAY: { |
353
|
27
|
|
|
|
|
|
basic_type_id = opcode->operand1; |
354
|
27
|
|
|
|
|
|
break; |
355
|
|
|
|
|
|
|
} |
356
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_NEW_MULNUM_ARRAY: { |
357
|
84
|
|
|
|
|
|
basic_type_id = opcode->operand1; |
358
|
84
|
|
|
|
|
|
break; |
359
|
|
|
|
|
|
|
} |
360
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_ISA: |
361
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_ISA_ERROR: |
362
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_IS_TYPE: |
363
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_IS_ERROR: |
364
|
|
|
|
|
|
|
{ |
365
|
315
|
|
|
|
|
|
basic_type_id = opcode->operand2; |
366
|
315
|
|
|
|
|
|
break; |
367
|
|
|
|
|
|
|
} |
368
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_SET_ERROR_ID: |
369
|
|
|
|
|
|
|
{ |
370
|
186
|
|
|
|
|
|
basic_type_id = opcode->operand0; |
371
|
186
|
|
|
|
|
|
break; |
372
|
|
|
|
|
|
|
} |
373
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_GET_BASIC_TYPE_ID: |
374
|
|
|
|
|
|
|
{ |
375
|
31
|
|
|
|
|
|
basic_type_id = opcode->operand1; |
376
|
31
|
|
|
|
|
|
break; |
377
|
|
|
|
|
|
|
} |
378
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_GET_FIELD_BYTE: |
379
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_GET_FIELD_SHORT: |
380
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_GET_FIELD_INT: |
381
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_GET_FIELD_LONG: |
382
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_GET_FIELD_FLOAT: |
383
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_GET_FIELD_DOUBLE: |
384
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_GET_FIELD_OBJECT: |
385
|
|
|
|
|
|
|
{ |
386
|
902
|
|
|
|
|
|
basic_type_id = opcode->operand2; |
387
|
902
|
|
|
|
|
|
int32_t field_index = opcode->operand3; |
388
|
902
|
|
|
|
|
|
SPVM_RUNTIME_BASIC_TYPE* basic_type = SPVM_API_RUNTIME_get_basic_type_by_id(runtime, basic_type_id); |
389
|
902
|
|
|
|
|
|
field = SPVM_API_BASIC_TYPE_get_field_by_index(runtime, basic_type, field_index); |
390
|
902
|
|
|
|
|
|
field_offset = field->offset; |
391
|
902
|
50
|
|
|
|
|
assert(field); |
392
|
902
|
|
|
|
|
|
break; |
393
|
|
|
|
|
|
|
} |
394
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_SET_FIELD_BYTE: |
395
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_SET_FIELD_SHORT: |
396
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_SET_FIELD_INT: |
397
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_SET_FIELD_LONG: |
398
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_SET_FIELD_FLOAT: |
399
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_SET_FIELD_DOUBLE: |
400
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_SET_FIELD_OBJECT: |
401
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_SET_FIELD_UNDEF: |
402
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_WEAKEN_FIELD: |
403
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_UNWEAKEN_FIELD: |
404
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_ISWEAK_FIELD: |
405
|
|
|
|
|
|
|
{ |
406
|
1097
|
|
|
|
|
|
basic_type_id = opcode->operand2; |
407
|
1097
|
|
|
|
|
|
int32_t field_index = opcode->operand3; |
408
|
1097
|
|
|
|
|
|
SPVM_RUNTIME_BASIC_TYPE* basic_type = SPVM_API_RUNTIME_get_basic_type_by_id(runtime, basic_type_id); |
409
|
1097
|
|
|
|
|
|
field = SPVM_API_BASIC_TYPE_get_field_by_index(runtime, basic_type, field_index); |
410
|
1097
|
50
|
|
|
|
|
assert(field); |
411
|
1097
|
|
|
|
|
|
field_offset = field->offset; |
412
|
1097
|
|
|
|
|
|
break; |
413
|
|
|
|
|
|
|
} |
414
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_GET_CLASS_VAR_BYTE: |
415
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_GET_CLASS_VAR_SHORT: |
416
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_GET_CLASS_VAR_INT: |
417
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_GET_CLASS_VAR_LONG: |
418
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_GET_CLASS_VAR_FLOAT: |
419
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_GET_CLASS_VAR_DOUBLE: |
420
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_GET_CLASS_VAR_OBJECT: |
421
|
|
|
|
|
|
|
{ |
422
|
445
|
|
|
|
|
|
basic_type_id = opcode->operand1; |
423
|
445
|
|
|
|
|
|
SPVM_RUNTIME_BASIC_TYPE* basic_type = SPVM_API_RUNTIME_get_basic_type_by_id(runtime, basic_type_id); |
424
|
445
|
|
|
|
|
|
int32_t class_var_index = opcode->operand2; |
425
|
445
|
|
|
|
|
|
class_var = SPVM_API_BASIC_TYPE_get_class_var_by_index(runtime, basic_type, class_var_index); |
426
|
445
|
|
|
|
|
|
break; |
427
|
|
|
|
|
|
|
} |
428
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_SET_CLASS_VAR_BYTE: |
429
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_SET_CLASS_VAR_SHORT: |
430
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_SET_CLASS_VAR_INT: |
431
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_SET_CLASS_VAR_LONG: |
432
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_SET_CLASS_VAR_FLOAT: |
433
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_SET_CLASS_VAR_DOUBLE: |
434
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_SET_CLASS_VAR_OBJECT: |
435
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_SET_CLASS_VAR_UNDEF: |
436
|
|
|
|
|
|
|
{ |
437
|
427
|
|
|
|
|
|
basic_type_id = opcode->operand0; |
438
|
427
|
|
|
|
|
|
SPVM_RUNTIME_BASIC_TYPE* basic_type = SPVM_API_RUNTIME_get_basic_type_by_id(runtime, basic_type_id); |
439
|
427
|
|
|
|
|
|
int32_t class_var_index = opcode->operand1; |
440
|
427
|
|
|
|
|
|
class_var = SPVM_API_BASIC_TYPE_get_class_var_by_index(runtime, basic_type, class_var_index); |
441
|
427
|
|
|
|
|
|
break; |
442
|
|
|
|
|
|
|
} |
443
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_CALL_CLASS_METHOD: |
444
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_CALL_INSTANCE_METHOD_STATIC: |
445
|
|
|
|
|
|
|
{ |
446
|
9441
|
|
|
|
|
|
basic_type_id = opcode->operand0; |
447
|
9441
|
|
|
|
|
|
SPVM_RUNTIME_BASIC_TYPE* basic_type = SPVM_API_RUNTIME_get_basic_type_by_id(runtime, basic_type_id); |
448
|
9441
|
|
|
|
|
|
int32_t method_index = opcode->operand1; |
449
|
9441
|
|
|
|
|
|
method = SPVM_API_BASIC_TYPE_get_method_by_index(runtime, basic_type, method_index); |
450
|
9441
|
|
|
|
|
|
break; |
451
|
|
|
|
|
|
|
} |
452
|
|
|
|
|
|
|
default: { |
453
|
242694
|
|
|
|
|
|
id_set = 0; |
454
|
|
|
|
|
|
|
} |
455
|
|
|
|
|
|
|
} |
456
|
|
|
|
|
|
|
|
457
|
256948
|
100
|
|
|
|
|
if (id_set) { |
458
|
14254
|
50
|
|
|
|
|
if (basic_type_id >= 0) { |
459
|
14254
|
|
|
|
|
|
SPVM_RUNTIME_BASIC_TYPE* basic_type = SPVM_API_RUNTIME_get_basic_type_by_id(runtime, basic_type_id); |
460
|
14254
|
|
|
|
|
|
const char* basic_type_name = basic_type->name; |
461
|
|
|
|
|
|
|
|
462
|
14254
|
|
|
|
|
|
int32_t found_basic_type = SPVM_PRECOMPILE_contains_basic_type(precompile, string_buffer->string + string_buffer_begin_offset, basic_type_name); |
463
|
14254
|
100
|
|
|
|
|
if (!found_basic_type) { |
464
|
|
|
|
|
|
|
|
465
|
6870
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " void* "); |
466
|
6870
|
|
|
|
|
|
SPVM_PRECOMPILE_add_basic_type(precompile, string_buffer, basic_type_name); |
467
|
6870
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " = NULL;\n"); |
468
|
|
|
|
|
|
|
|
469
|
6870
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " if (!"); |
470
|
6870
|
|
|
|
|
|
SPVM_PRECOMPILE_add_basic_type(precompile, string_buffer, basic_type_name); |
471
|
6870
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ") {\n"); |
472
|
6870
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " "); |
473
|
6870
|
|
|
|
|
|
SPVM_PRECOMPILE_add_basic_type(precompile, string_buffer, basic_type_name); |
474
|
6870
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " = SPVM_IMPLEMENT_GET_BASIC_TYPE_BY_NAME(env, stack, \""); |
475
|
6870
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, basic_type_name); |
476
|
6870
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, "\", message, &error_id);\n"); |
477
|
6870
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " if (error_id) {\n" |
478
|
|
|
|
|
|
|
" goto END_OF_METHOD;\n" |
479
|
|
|
|
|
|
|
" }\n"); |
480
|
6870
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " }\n"); |
481
|
|
|
|
|
|
|
|
482
|
|
|
|
|
|
|
} |
483
|
|
|
|
|
|
|
} |
484
|
|
|
|
|
|
|
|
485
|
14254
|
100
|
|
|
|
|
if (class_var) { |
486
|
872
|
50
|
|
|
|
|
assert(basic_type_id >= 0); |
487
|
|
|
|
|
|
|
|
488
|
872
|
|
|
|
|
|
const char* class_var_name = class_var->name; |
489
|
872
|
|
|
|
|
|
SPVM_RUNTIME_BASIC_TYPE* basic_type = SPVM_API_RUNTIME_get_basic_type_by_id(runtime, basic_type_id); |
490
|
872
|
|
|
|
|
|
const char* basic_type_name = basic_type->name; |
491
|
872
|
|
|
|
|
|
int32_t found = SPVM_PRECOMPILE_contains_class_var(precompile, string_buffer->string + string_buffer_begin_offset, basic_type_name, class_var_name); |
492
|
|
|
|
|
|
|
|
493
|
872
|
100
|
|
|
|
|
if (!found) { |
494
|
489
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " void* "); |
495
|
489
|
|
|
|
|
|
SPVM_PRECOMPILE_add_class_var(precompile, string_buffer, basic_type_name, class_var_name); |
496
|
489
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " = NULL;\n"); |
497
|
|
|
|
|
|
|
|
498
|
489
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " if (!"); |
499
|
489
|
|
|
|
|
|
SPVM_PRECOMPILE_add_class_var(precompile, string_buffer, basic_type_name, class_var_name); |
500
|
489
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ") {\n"); |
501
|
489
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " "); |
502
|
489
|
|
|
|
|
|
SPVM_PRECOMPILE_add_class_var(precompile, string_buffer, basic_type_name, class_var_name); |
503
|
489
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " = SPVM_IMPLEMENT_GET_CLASS_VAR_BY_NAME(env, stack, \""); |
504
|
489
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, basic_type_name); |
505
|
489
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, "\", \""); |
506
|
489
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, class_var_name); |
507
|
489
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, "\", message, &error_id);\n"); |
508
|
489
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " if (error_id) {\n" |
509
|
|
|
|
|
|
|
" goto END_OF_METHOD;\n" |
510
|
|
|
|
|
|
|
" }\n"); |
511
|
489
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " }\n"); |
512
|
|
|
|
|
|
|
} |
513
|
|
|
|
|
|
|
} |
514
|
|
|
|
|
|
|
|
515
|
14254
|
100
|
|
|
|
|
if (field) { |
516
|
1999
|
50
|
|
|
|
|
assert(basic_type_id >= 0); |
517
|
|
|
|
|
|
|
|
518
|
1999
|
|
|
|
|
|
const char* field_name = field->name; |
519
|
1999
|
|
|
|
|
|
SPVM_RUNTIME_BASIC_TYPE* basic_type = SPVM_API_RUNTIME_get_basic_type_by_id(runtime, basic_type_id); |
520
|
1999
|
|
|
|
|
|
const char* basic_type_name = basic_type->name; |
521
|
|
|
|
|
|
|
|
522
|
1999
|
|
|
|
|
|
int32_t found = SPVM_PRECOMPILE_contains_field_offset(precompile, string_buffer->string + string_buffer_begin_offset, basic_type_name, field_name); |
523
|
|
|
|
|
|
|
|
524
|
1999
|
100
|
|
|
|
|
if (!found) { |
525
|
1686
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " int32_t "); |
526
|
1686
|
|
|
|
|
|
SPVM_PRECOMPILE_add_field_offset(precompile, string_buffer, basic_type_name, field_name); |
527
|
1686
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " = -1;\n"); |
528
|
|
|
|
|
|
|
|
529
|
1686
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " if ("); |
530
|
1686
|
|
|
|
|
|
SPVM_PRECOMPILE_add_field_offset(precompile, string_buffer, basic_type_name, field_name); |
531
|
1686
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " < 0) {\n"); |
532
|
1686
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " "); |
533
|
1686
|
|
|
|
|
|
SPVM_PRECOMPILE_add_field_offset(precompile, string_buffer, basic_type_name, field_name); |
534
|
1686
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " = SPVM_IMPLEMENT_GET_FIELD_OFFSET_BY_NAME(env, stack, \""); |
535
|
1686
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, basic_type_name); |
536
|
1686
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, "\", \""); |
537
|
1686
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, field_name); |
538
|
1686
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, "\", message, &error_id);\n"); |
539
|
1686
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " if (error_id) {\n" |
540
|
|
|
|
|
|
|
" goto END_OF_METHOD;\n" |
541
|
|
|
|
|
|
|
" }\n"); |
542
|
1686
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " }\n"); |
543
|
|
|
|
|
|
|
} |
544
|
|
|
|
|
|
|
} |
545
|
|
|
|
|
|
|
|
546
|
14254
|
100
|
|
|
|
|
if (method) { |
547
|
9441
|
50
|
|
|
|
|
assert(basic_type_id >= 0); |
548
|
|
|
|
|
|
|
|
549
|
9441
|
|
|
|
|
|
const char* method_name = SPVM_API_METHOD_get_name(runtime, method); |
550
|
9441
|
|
|
|
|
|
SPVM_RUNTIME_BASIC_TYPE* basic_type = SPVM_API_RUNTIME_get_basic_type_by_id(runtime, basic_type_id); |
551
|
9441
|
|
|
|
|
|
const char* basic_type_name = basic_type->name; |
552
|
9441
|
|
|
|
|
|
int32_t found = SPVM_PRECOMPILE_contains_method(precompile, string_buffer->string + string_buffer_begin_offset, basic_type_name, method_name); |
553
|
|
|
|
|
|
|
|
554
|
9441
|
100
|
|
|
|
|
if (!found) { |
555
|
5885
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " void* "); |
556
|
5885
|
|
|
|
|
|
SPVM_PRECOMPILE_add_method(precompile, string_buffer, basic_type_name, method_name); |
557
|
5885
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " = NULL;\n"); |
558
|
|
|
|
|
|
|
|
559
|
5885
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " if (!"); |
560
|
5885
|
|
|
|
|
|
SPVM_PRECOMPILE_add_method(precompile, string_buffer, basic_type_name, method_name); |
561
|
5885
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ") {\n"); |
562
|
5885
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " "); |
563
|
5885
|
|
|
|
|
|
SPVM_PRECOMPILE_add_method(precompile, string_buffer, basic_type_name, method_name); |
564
|
5885
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " = SPVM_IMPLEMENT_GET_METHOD_BY_NAME(env, stack, \""); |
565
|
5885
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, basic_type_name); |
566
|
5885
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, "\", \""); |
567
|
5885
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, method_name); |
568
|
5885
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, "\", message, &error_id);\n"); |
569
|
5885
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " if (error_id) {\n" |
570
|
|
|
|
|
|
|
" goto END_OF_METHOD;\n" |
571
|
|
|
|
|
|
|
" }\n"); |
572
|
5885
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " }\n"); |
573
|
|
|
|
|
|
|
} |
574
|
|
|
|
|
|
|
} |
575
|
|
|
|
|
|
|
} |
576
|
|
|
|
|
|
|
|
577
|
256948
|
|
|
|
|
|
opcode_index++; |
578
|
|
|
|
|
|
|
} |
579
|
|
|
|
|
|
|
|
580
|
5777
|
|
|
|
|
|
opcode_index = 0; |
581
|
262725
|
100
|
|
|
|
|
while (opcode_index < opcodes_length) { |
582
|
|
|
|
|
|
|
|
583
|
|
|
|
|
|
|
// Line label |
584
|
256948
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, "L"); |
585
|
256948
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_int(string_buffer, opcode_index); |
586
|
256948
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ": "); |
587
|
|
|
|
|
|
|
|
588
|
256948
|
|
|
|
|
|
opcode = &(opcodes[opcode_index]); |
589
|
|
|
|
|
|
|
|
590
|
256948
|
|
|
|
|
|
int32_t opcode_id = opcode->id; |
591
|
|
|
|
|
|
|
|
592
|
256948
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, "// "); |
593
|
256948
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, (char*)(SPVM_OPCODE_C_ID_NAMES())[opcode_id]); |
594
|
256948
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, "\n"); |
595
|
|
|
|
|
|
|
|
596
|
256948
|
|
|
|
|
|
switch (opcode_id) { |
597
|
|
|
|
|
|
|
|
598
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_END_METHOD: { |
599
|
5777
|
|
|
|
|
|
break; |
600
|
|
|
|
|
|
|
} |
601
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_GOTO: { |
602
|
11333
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " goto L"); |
603
|
11333
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_int(string_buffer, opcode->operand0); |
604
|
11333
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
605
|
11333
|
|
|
|
|
|
break; |
606
|
|
|
|
|
|
|
} |
607
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_IF_EQ_ZERO: { |
608
|
4585
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " if ("); |
609
|
4585
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, 0); |
610
|
4585
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " == 0) { goto L"); |
611
|
4585
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_int(string_buffer, opcode->operand0); |
612
|
4585
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, "; }\n"); |
613
|
4585
|
|
|
|
|
|
break; |
614
|
|
|
|
|
|
|
} |
615
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_IF_NE_ZERO: { |
616
|
6612
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " if ("); |
617
|
6612
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, 0); |
618
|
6612
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " != 0) { goto L"); |
619
|
6612
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_int(string_buffer, opcode->operand0); |
620
|
6612
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, "; }\n"); |
621
|
6612
|
|
|
|
|
|
break; |
622
|
|
|
|
|
|
|
} |
623
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_GOTO_END_OF_EVAL_ON_EXCEPTION: { |
624
|
1795
|
|
|
|
|
|
int32_t line = opcode->operand2; |
625
|
|
|
|
|
|
|
|
626
|
1795
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " if (__builtin_expect(error_id, 0)) {\n" |
627
|
|
|
|
|
|
|
" eval_error_id = error_id;\n" |
628
|
|
|
|
|
|
|
" error_id = 0;\n" |
629
|
|
|
|
|
|
|
" env->set_exception(env, stack, env->new_stack_trace_no_mortal(env, stack, env->get_exception(env, stack), current_method, line = "); |
630
|
1795
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_int(string_buffer, line); |
631
|
1795
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, "));\n" |
632
|
|
|
|
|
|
|
" goto L"); |
633
|
1795
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_int(string_buffer, opcode->operand0); |
634
|
1795
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
635
|
1795
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " }\n"); |
636
|
|
|
|
|
|
|
|
637
|
1795
|
|
|
|
|
|
break; |
638
|
|
|
|
|
|
|
} |
639
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_GOTO_END_OF_METHOD_ON_EXCEPTION: { |
640
|
24471
|
|
|
|
|
|
int32_t line = opcode->operand2; |
641
|
|
|
|
|
|
|
|
642
|
24471
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " if (__builtin_expect(error_id, 0)) {\n" |
643
|
|
|
|
|
|
|
" env->set_exception(env, stack, env->new_stack_trace_no_mortal(env, stack, env->get_exception(env, stack), current_method, line = "); |
644
|
24471
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_int(string_buffer, line); |
645
|
24471
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, "));\n" |
646
|
|
|
|
|
|
|
" goto L"); |
647
|
24471
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_int(string_buffer, opcode->operand0); |
648
|
24471
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n" |
649
|
|
|
|
|
|
|
" }\n"); |
650
|
24471
|
|
|
|
|
|
break; |
651
|
|
|
|
|
|
|
} |
652
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_LOOKUP_SWITCH: { |
653
|
|
|
|
|
|
|
// Default branch |
654
|
38
|
|
|
|
|
|
int32_t default_opcode_rel_index = opcode->operand1; |
655
|
|
|
|
|
|
|
|
656
|
|
|
|
|
|
|
// Cases length |
657
|
38
|
|
|
|
|
|
int32_t case_infos_length = opcode->operand2; |
658
|
|
|
|
|
|
|
|
659
|
38
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " switch("); |
660
|
38
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand0); |
661
|
38
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ") {\n"); |
662
|
124
|
100
|
|
|
|
|
for (int32_t case_index = 0; case_index < case_infos_length; case_index++) { |
663
|
86
|
|
|
|
|
|
SPVM_OPCODE* opcode_case_info = &(opcodes[opcode_index + 1 + case_index]); |
664
|
|
|
|
|
|
|
|
665
|
86
|
|
|
|
|
|
int32_t match = opcode_case_info->operand1; |
666
|
86
|
|
|
|
|
|
int32_t opcode_rel_index = opcode_case_info->operand2; |
667
|
|
|
|
|
|
|
|
668
|
86
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " case "); |
669
|
86
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_int(string_buffer, match); |
670
|
86
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ": goto L"); |
671
|
86
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_int(string_buffer, opcode_rel_index); |
672
|
86
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
673
|
|
|
|
|
|
|
} |
674
|
38
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " default: goto L"); |
675
|
38
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_int(string_buffer, default_opcode_rel_index); |
676
|
38
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n" |
677
|
|
|
|
|
|
|
|
678
|
|
|
|
|
|
|
" }\n"); |
679
|
38
|
|
|
|
|
|
break; |
680
|
|
|
|
|
|
|
} |
681
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_CASE_INFO: { |
682
|
86
|
|
|
|
|
|
break; |
683
|
|
|
|
|
|
|
} |
684
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_PUSH_MORTAL: { |
685
|
16337
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_PUSH_MORTAL(mortal_stack, mortal_stack_top, "); |
686
|
16337
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_int(string_buffer, opcode->operand0); |
687
|
16337
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
688
|
16337
|
|
|
|
|
|
break; |
689
|
|
|
|
|
|
|
} |
690
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_LEAVE_SCOPE: { |
691
|
10137
|
|
|
|
|
|
int32_t original_mortal_stack_top = opcode->operand0; |
692
|
10137
|
50
|
|
|
|
|
if (method_mortal_stack_length > 0) { |
693
|
10137
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_LEAVE_SCOPE(env, stack, object_vars, mortal_stack, &mortal_stack_top, original_mortal_stack_top = "); |
694
|
10137
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_int(string_buffer, original_mortal_stack_top); |
695
|
10137
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
696
|
|
|
|
|
|
|
} |
697
|
10137
|
|
|
|
|
|
break; |
698
|
|
|
|
|
|
|
} |
699
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_MOVE_BYTE_ZERO: { |
700
|
70
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_MOVE_BYTE_ZERO("); |
701
|
70
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_BYTE, opcode->operand0); |
702
|
70
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
703
|
70
|
|
|
|
|
|
break; |
704
|
|
|
|
|
|
|
} |
705
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_MOVE_SHORT_ZERO: { |
706
|
69
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_MOVE_SHORT_ZERO("); |
707
|
69
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_SHORT, opcode->operand0); |
708
|
69
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
709
|
69
|
|
|
|
|
|
break; |
710
|
|
|
|
|
|
|
} |
711
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_MOVE_INT_ZERO: { |
712
|
10340
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_MOVE_INT_ZERO("); |
713
|
10340
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand0); |
714
|
10340
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
715
|
10340
|
|
|
|
|
|
break; |
716
|
|
|
|
|
|
|
} |
717
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_MOVE_LONG_ZERO: { |
718
|
166
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_MOVE_LONG_ZERO("); |
719
|
166
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_LONG, opcode->operand0); |
720
|
166
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
721
|
166
|
|
|
|
|
|
break; |
722
|
|
|
|
|
|
|
} |
723
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_MOVE_FLOAT_ZERO: { |
724
|
111
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_MOVE_FLOAT_ZERO("); |
725
|
111
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_FLOAT, opcode->operand0); |
726
|
111
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
727
|
111
|
|
|
|
|
|
break; |
728
|
|
|
|
|
|
|
} |
729
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_MOVE_DOUBLE_ZERO: { |
730
|
118
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_MOVE_DOUBLE_ZERO("); |
731
|
118
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_DOUBLE, opcode->operand0); |
732
|
118
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
733
|
118
|
|
|
|
|
|
break; |
734
|
|
|
|
|
|
|
} |
735
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_MOVE_OBJECT_UNDEF: { |
736
|
642
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_MOVE_OBJECT_UNDEF(env, stack, "); |
737
|
642
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand_address(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_OBJECT, opcode->operand0); |
738
|
642
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
739
|
642
|
|
|
|
|
|
break; |
740
|
|
|
|
|
|
|
} |
741
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_MOVE_MULNUM_BYTE_ZERO: { |
742
|
24
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_MOVE_MULNUM_BYTE_ZERO(env, stack, "); |
743
|
24
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand_address(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_BYTE, opcode->operand0); |
744
|
24
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
745
|
24
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_int(string_buffer, opcode->operand2); |
746
|
24
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
747
|
24
|
|
|
|
|
|
break; |
748
|
|
|
|
|
|
|
} |
749
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_MOVE_MULNUM_SHORT_ZERO: { |
750
|
22
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_MOVE_MULNUM_SHORT_ZERO(env, stack, "); |
751
|
22
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand_address(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_SHORT, opcode->operand0); |
752
|
22
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
753
|
22
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_int(string_buffer, opcode->operand2); |
754
|
22
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
755
|
22
|
|
|
|
|
|
break; |
756
|
|
|
|
|
|
|
} |
757
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_MOVE_MULNUM_INT_ZERO: { |
758
|
22
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_MOVE_MULNUM_INT_ZERO(env, stack, "); |
759
|
22
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand_address(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand0); |
760
|
22
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
761
|
22
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_int(string_buffer, opcode->operand2); |
762
|
22
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
763
|
22
|
|
|
|
|
|
break; |
764
|
|
|
|
|
|
|
} |
765
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_MOVE_MULNUM_LONG_ZERO: { |
766
|
22
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_MOVE_MULNUM_LONG_ZERO(env, stack, "); |
767
|
22
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand_address(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_LONG, opcode->operand0); |
768
|
22
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
769
|
22
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_int(string_buffer, opcode->operand2); |
770
|
22
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
771
|
22
|
|
|
|
|
|
break; |
772
|
|
|
|
|
|
|
} |
773
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_MOVE_MULNUM_FLOAT_ZERO: { |
774
|
22
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_MOVE_MULNUM_FLOAT_ZERO(env, stack, "); |
775
|
22
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand_address(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_FLOAT, opcode->operand0); |
776
|
22
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
777
|
22
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_int(string_buffer, opcode->operand2); |
778
|
22
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
779
|
22
|
|
|
|
|
|
break; |
780
|
|
|
|
|
|
|
} |
781
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_MOVE_MULNUM_DOUBLE_ZERO: { |
782
|
76
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_MOVE_MULNUM_DOUBLE_ZERO(env, stack, "); |
783
|
76
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand_address(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_DOUBLE, opcode->operand0); |
784
|
76
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
785
|
76
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_int(string_buffer, opcode->operand2); |
786
|
76
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
787
|
76
|
|
|
|
|
|
break; |
788
|
|
|
|
|
|
|
} |
789
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_MOVE_CONSTANT_BYTE: { |
790
|
432
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_MOVE_CONSTANT_BYTE("); |
791
|
432
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_BYTE, opcode->operand0); |
792
|
432
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
793
|
432
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_byte(string_buffer, (int8_t)opcode->operand1); |
794
|
432
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
795
|
432
|
|
|
|
|
|
break; |
796
|
|
|
|
|
|
|
} |
797
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_MOVE_CONSTANT_INT: { |
798
|
39435
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_MOVE_CONSTANT_INT("); |
799
|
39435
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand0); |
800
|
39435
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
801
|
39435
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_int(string_buffer, (int32_t)opcode->operand1); |
802
|
39435
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
803
|
39435
|
|
|
|
|
|
break; |
804
|
|
|
|
|
|
|
} |
805
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_MOVE_CONSTANT_LONG: { |
806
|
333
|
|
|
|
|
|
int64_t long_value = *(int64_t*)&opcode->operand1; |
807
|
|
|
|
|
|
|
|
808
|
333
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_MOVE_CONSTANT_LONG("); |
809
|
333
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_LONG, opcode->operand0); |
810
|
333
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
811
|
333
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_long(string_buffer, long_value); |
812
|
333
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
813
|
333
|
|
|
|
|
|
break; |
814
|
|
|
|
|
|
|
} |
815
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_MOVE_CONSTANT_FLOAT: { |
816
|
|
|
|
|
|
|
SPVM_VALUE value; |
817
|
452
|
|
|
|
|
|
value.ival = (int32_t)opcode->operand1; |
818
|
|
|
|
|
|
|
|
819
|
452
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_MOVE_CONSTANT_FLOAT("); |
820
|
452
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_FLOAT, opcode->operand0); |
821
|
452
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", (tmp_constant.ival = "); |
822
|
452
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_int(string_buffer, value.ival); |
823
|
452
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", tmp_constant.fval));\n"); |
824
|
452
|
|
|
|
|
|
break; |
825
|
|
|
|
|
|
|
} |
826
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_MOVE_CONSTANT_DOUBLE: { |
827
|
554
|
|
|
|
|
|
double double_value = *(double*)&opcode->operand1; |
828
|
|
|
|
|
|
|
SPVM_VALUE value; |
829
|
554
|
|
|
|
|
|
value.dval = double_value; |
830
|
|
|
|
|
|
|
|
831
|
554
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_MOVE_CONSTANT_DOUBLE("); |
832
|
554
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_DOUBLE, opcode->operand0); |
833
|
554
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", (tmp_constant.lval = "); |
834
|
554
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_long(string_buffer, value.lval); |
835
|
554
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", tmp_constant.dval));\n"); |
836
|
554
|
|
|
|
|
|
break; |
837
|
|
|
|
|
|
|
} |
838
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_MOVE_BYTE: { |
839
|
65
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_MOVE_BYTE("); |
840
|
65
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_BYTE, opcode->operand0); |
841
|
65
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
842
|
65
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_BYTE, opcode->operand1); |
843
|
65
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
844
|
65
|
|
|
|
|
|
break; |
845
|
|
|
|
|
|
|
} |
846
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_MOVE_SHORT: { |
847
|
65
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_MOVE_SHORT("); |
848
|
65
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_SHORT, opcode->operand0); |
849
|
65
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
850
|
65
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_SHORT, opcode->operand1); |
851
|
65
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
852
|
65
|
|
|
|
|
|
break; |
853
|
|
|
|
|
|
|
} |
854
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_MOVE_INT: { |
855
|
546
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_MOVE_INT("); |
856
|
546
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand0); |
857
|
546
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
858
|
546
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand1); |
859
|
546
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
860
|
546
|
|
|
|
|
|
break; |
861
|
|
|
|
|
|
|
} |
862
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_MOVE_LONG: { |
863
|
59
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_MOVE_LONG("); |
864
|
59
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_LONG, opcode->operand0); |
865
|
59
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
866
|
59
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_LONG, opcode->operand1); |
867
|
59
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
868
|
59
|
|
|
|
|
|
break; |
869
|
|
|
|
|
|
|
} |
870
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_MOVE_FLOAT: { |
871
|
53
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_MOVE_FLOAT("); |
872
|
53
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_FLOAT, opcode->operand0); |
873
|
53
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
874
|
53
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_FLOAT, opcode->operand1); |
875
|
53
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
876
|
53
|
|
|
|
|
|
break; |
877
|
|
|
|
|
|
|
} |
878
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_MOVE_DOUBLE: { |
879
|
56
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_MOVE_DOUBLE("); |
880
|
56
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_DOUBLE, opcode->operand0); |
881
|
56
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
882
|
56
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_DOUBLE, opcode->operand1); |
883
|
56
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
884
|
56
|
|
|
|
|
|
break; |
885
|
|
|
|
|
|
|
} |
886
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_MOVE_OBJECT: { |
887
|
1000
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_MOVE_OBJECT(env, stack, &"); |
888
|
1000
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_OBJECT, opcode->operand0); |
889
|
1000
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
890
|
1000
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_OBJECT, opcode->operand1); |
891
|
1000
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
892
|
1000
|
|
|
|
|
|
break; |
893
|
|
|
|
|
|
|
} |
894
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_MOVE_OBJECT_WITH_TYPE_CHECKING: { |
895
|
261
|
|
|
|
|
|
int32_t cast_basic_type_id = opcode->operand2; |
896
|
261
|
|
|
|
|
|
int32_t cast_type_dimension = opcode->operand3; |
897
|
|
|
|
|
|
|
|
898
|
261
|
|
|
|
|
|
SPVM_RUNTIME_BASIC_TYPE* cast_basic_type = SPVM_API_RUNTIME_get_basic_type_by_id(runtime, cast_basic_type_id); |
899
|
261
|
|
|
|
|
|
const char* cast_basic_type_name = cast_basic_type->name; |
900
|
|
|
|
|
|
|
|
901
|
261
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " basic_type_name = \""); |
902
|
261
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, (char*)cast_basic_type_name); |
903
|
261
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, "\";\n"); |
904
|
|
|
|
|
|
|
|
905
|
261
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " basic_type = "); |
906
|
261
|
|
|
|
|
|
SPVM_PRECOMPILE_add_basic_type(precompile, string_buffer, cast_basic_type_name); |
907
|
261
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
908
|
|
|
|
|
|
|
|
909
|
261
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " cast_type_dimension = "); |
910
|
261
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_int(string_buffer, opcode->operand3); |
911
|
261
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
912
|
|
|
|
|
|
|
|
913
|
261
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_MOVE_OBJECT_WITH_TYPE_CHECKING(env, stack, "); |
914
|
261
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand_address(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_OBJECT, opcode->operand0); |
915
|
261
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
916
|
261
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_OBJECT, opcode->operand1); |
917
|
261
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", basic_type, cast_type_dimension, &error_id);\n"); |
918
|
261
|
|
|
|
|
|
break; |
919
|
|
|
|
|
|
|
} |
920
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_MOVE_OBJECT_CHECK_READ_ONLY: { |
921
|
44
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_MOVE_OBJECT_CHECK_READ_ONLY(env, stack, "); |
922
|
44
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand_address(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_OBJECT, opcode->operand0); |
923
|
44
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
924
|
44
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_OBJECT, opcode->operand1); |
925
|
44
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", &error_id);\n"); |
926
|
44
|
|
|
|
|
|
break; |
927
|
|
|
|
|
|
|
} |
928
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_MOVE_REF: { |
929
|
4
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_MOVE_REF("); |
930
|
4
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_REF, opcode->operand0); |
931
|
4
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
932
|
4
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_REF, opcode->operand1); |
933
|
4
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
934
|
4
|
|
|
|
|
|
break; |
935
|
|
|
|
|
|
|
} |
936
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_ADD_INT: { |
937
|
902
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_ADD_INT("); |
938
|
902
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand0); |
939
|
902
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
940
|
902
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand1); |
941
|
902
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
942
|
902
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand2); |
943
|
902
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
944
|
902
|
|
|
|
|
|
break; |
945
|
|
|
|
|
|
|
} |
946
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_ADD_LONG: { |
947
|
175
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_ADD_LONG("); |
948
|
175
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_LONG, opcode->operand0); |
949
|
175
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
950
|
175
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_LONG, opcode->operand1); |
951
|
175
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
952
|
175
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_LONG, opcode->operand2); |
953
|
175
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
954
|
175
|
|
|
|
|
|
break; |
955
|
|
|
|
|
|
|
} |
956
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_ADD_FLOAT: { |
957
|
170
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_ADD_FLOAT("); |
958
|
170
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_FLOAT, opcode->operand0); |
959
|
170
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
960
|
170
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_FLOAT, opcode->operand1); |
961
|
170
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
962
|
170
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_FLOAT, opcode->operand2); |
963
|
170
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
964
|
170
|
|
|
|
|
|
break; |
965
|
|
|
|
|
|
|
} |
966
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_ADD_DOUBLE: { |
967
|
185
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_ADD_DOUBLE("); |
968
|
185
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_DOUBLE, opcode->operand0); |
969
|
185
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
970
|
185
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_DOUBLE, opcode->operand1); |
971
|
185
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
972
|
185
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_DOUBLE, opcode->operand2); |
973
|
185
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
974
|
185
|
|
|
|
|
|
break; |
975
|
|
|
|
|
|
|
} |
976
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_SUBTRACT_INT: { |
977
|
243
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_SUBTRACT_INT("); |
978
|
243
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand0); |
979
|
243
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
980
|
243
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand1); |
981
|
243
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
982
|
243
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand2); |
983
|
243
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
984
|
243
|
|
|
|
|
|
break; |
985
|
|
|
|
|
|
|
} |
986
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_SUBTRACT_LONG: { |
987
|
44
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_SUBTRACT_LONG("); |
988
|
44
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_LONG, opcode->operand0); |
989
|
44
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
990
|
44
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_LONG, opcode->operand1); |
991
|
44
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
992
|
44
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_LONG, opcode->operand2); |
993
|
44
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
994
|
44
|
|
|
|
|
|
break; |
995
|
|
|
|
|
|
|
} |
996
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_SUBTRACT_FLOAT: { |
997
|
41
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_SUBTRACT_FLOAT("); |
998
|
41
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_FLOAT, opcode->operand0); |
999
|
41
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
1000
|
41
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_FLOAT, opcode->operand1); |
1001
|
41
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
1002
|
41
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_FLOAT, opcode->operand2); |
1003
|
41
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
1004
|
41
|
|
|
|
|
|
break; |
1005
|
|
|
|
|
|
|
} |
1006
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_SUBTRACT_DOUBLE: { |
1007
|
42
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_SUBTRACT_DOUBLE("); |
1008
|
42
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_DOUBLE, opcode->operand0); |
1009
|
42
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
1010
|
42
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_DOUBLE, opcode->operand1); |
1011
|
42
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
1012
|
42
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_DOUBLE, opcode->operand2); |
1013
|
42
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
1014
|
42
|
|
|
|
|
|
break; |
1015
|
|
|
|
|
|
|
} |
1016
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_MULTIPLY_INT: { |
1017
|
81
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_MULTIPLY_INT("); |
1018
|
81
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand0); |
1019
|
81
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
1020
|
81
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand1); |
1021
|
81
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
1022
|
81
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand2); |
1023
|
81
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
1024
|
81
|
|
|
|
|
|
break; |
1025
|
|
|
|
|
|
|
} |
1026
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_MULTIPLY_LONG: { |
1027
|
9
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_MULTIPLY_LONG("); |
1028
|
9
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_LONG, opcode->operand0); |
1029
|
9
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
1030
|
9
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_LONG, opcode->operand1); |
1031
|
9
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
1032
|
9
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_LONG, opcode->operand2); |
1033
|
9
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
1034
|
9
|
|
|
|
|
|
break; |
1035
|
|
|
|
|
|
|
} |
1036
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_MULTIPLY_FLOAT: { |
1037
|
19
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_MULTIPLY_FLOAT("); |
1038
|
19
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_FLOAT, opcode->operand0); |
1039
|
19
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
1040
|
19
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_FLOAT, opcode->operand1); |
1041
|
19
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
1042
|
19
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_FLOAT, opcode->operand2); |
1043
|
19
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
1044
|
19
|
|
|
|
|
|
break; |
1045
|
|
|
|
|
|
|
} |
1046
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_MULTIPLY_DOUBLE: { |
1047
|
25
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_MULTIPLY_DOUBLE("); |
1048
|
25
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_DOUBLE, opcode->operand0); |
1049
|
25
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
1050
|
25
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_DOUBLE, opcode->operand1); |
1051
|
25
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
1052
|
25
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_DOUBLE, opcode->operand2); |
1053
|
25
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
1054
|
25
|
|
|
|
|
|
break; |
1055
|
|
|
|
|
|
|
} |
1056
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_DIVIDE_INT: { |
1057
|
40
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_DIVIDE_INT(env, stack, "); |
1058
|
40
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand_address(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand0); |
1059
|
40
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
1060
|
40
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand1); |
1061
|
40
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
1062
|
40
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand2); |
1063
|
40
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", &error_id);\n"); |
1064
|
40
|
|
|
|
|
|
break; |
1065
|
|
|
|
|
|
|
} |
1066
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_DIVIDE_LONG: { |
1067
|
3
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_DIVIDE_LONG(env, stack, "); |
1068
|
3
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand_address(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_LONG, opcode->operand0); |
1069
|
3
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
1070
|
3
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_LONG, opcode->operand1); |
1071
|
3
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
1072
|
3
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_LONG, opcode->operand2); |
1073
|
3
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", &error_id);\n"); |
1074
|
3
|
|
|
|
|
|
break; |
1075
|
|
|
|
|
|
|
} |
1076
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_DIVIDE_FLOAT: { |
1077
|
19
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_DIVIDE_FLOAT("); |
1078
|
19
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_FLOAT, opcode->operand0); |
1079
|
19
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
1080
|
19
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_FLOAT, opcode->operand1); |
1081
|
19
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
1082
|
19
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_FLOAT, opcode->operand2); |
1083
|
19
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
1084
|
19
|
|
|
|
|
|
break; |
1085
|
|
|
|
|
|
|
} |
1086
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_DIVIDE_DOUBLE: { |
1087
|
24
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_DIVIDE_DOUBLE("); |
1088
|
24
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_DOUBLE, opcode->operand0); |
1089
|
24
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
1090
|
24
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_DOUBLE, opcode->operand1); |
1091
|
24
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
1092
|
24
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_DOUBLE, opcode->operand2); |
1093
|
24
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
1094
|
24
|
|
|
|
|
|
break; |
1095
|
|
|
|
|
|
|
} |
1096
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_DIVIDE_UNSIGNED_INT: { |
1097
|
1
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_DIVIDE_UNSIGNED_INT(env, stack, "); |
1098
|
1
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand_address(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand0); |
1099
|
1
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
1100
|
1
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand1); |
1101
|
1
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
1102
|
1
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand2); |
1103
|
1
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", &error_id);\n"); |
1104
|
1
|
|
|
|
|
|
break; |
1105
|
|
|
|
|
|
|
} |
1106
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_DIVIDE_UNSIGNED_LONG: { |
1107
|
1
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_DIVIDE_UNSIGNED_LONG(env, stack, "); |
1108
|
1
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand_address(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_LONG, opcode->operand0); |
1109
|
1
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
1110
|
1
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_LONG, opcode->operand1); |
1111
|
1
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
1112
|
1
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_LONG, opcode->operand2); |
1113
|
1
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", &error_id);\n"); |
1114
|
1
|
|
|
|
|
|
break; |
1115
|
|
|
|
|
|
|
} |
1116
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_REMAINDER_INT: { |
1117
|
36
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_REMAINDER_INT(env, stack, "); |
1118
|
36
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand_address(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand0); |
1119
|
36
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
1120
|
36
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand1); |
1121
|
36
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
1122
|
36
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand2); |
1123
|
36
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", &error_id);\n"); |
1124
|
36
|
|
|
|
|
|
break; |
1125
|
|
|
|
|
|
|
} |
1126
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_REMAINDER_LONG: { |
1127
|
7
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_REMAINDER_LONG(env, stack, "); |
1128
|
7
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand_address(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_LONG, opcode->operand0); |
1129
|
7
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
1130
|
7
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_LONG, opcode->operand1); |
1131
|
7
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
1132
|
7
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_LONG, opcode->operand2); |
1133
|
7
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", &error_id);\n"); |
1134
|
7
|
|
|
|
|
|
break; |
1135
|
|
|
|
|
|
|
} |
1136
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_REMAINDER_UNSIGNED_INT: { |
1137
|
1
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_REMAINDER_UNSIGNED_INT(env, stack, "); |
1138
|
1
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand_address(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand0); |
1139
|
1
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
1140
|
1
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand1); |
1141
|
1
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
1142
|
1
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand2); |
1143
|
1
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", &error_id);\n"); |
1144
|
1
|
|
|
|
|
|
break; |
1145
|
|
|
|
|
|
|
} |
1146
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_REMAINDER_UNSIGNED_LONG: { |
1147
|
1
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_REMAINDER_UNSIGNED_LONG(env, stack, "); |
1148
|
1
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand_address(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_LONG, opcode->operand0); |
1149
|
1
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
1150
|
1
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_LONG, opcode->operand1); |
1151
|
1
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
1152
|
1
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_LONG, opcode->operand2); |
1153
|
1
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", &error_id);\n"); |
1154
|
1
|
|
|
|
|
|
break; |
1155
|
|
|
|
|
|
|
} |
1156
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_LEFT_SHIFT_INT: { |
1157
|
19
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_LEFT_SHIFT_INT("); |
1158
|
19
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand0); |
1159
|
19
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
1160
|
19
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand1); |
1161
|
19
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
1162
|
19
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand2); |
1163
|
19
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
1164
|
19
|
|
|
|
|
|
break; |
1165
|
|
|
|
|
|
|
} |
1166
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_LEFT_SHIFT_LONG: { |
1167
|
6
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_LEFT_SHIFT_LONG("); |
1168
|
6
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_LONG, opcode->operand0); |
1169
|
6
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
1170
|
6
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_LONG, opcode->operand1); |
1171
|
6
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
1172
|
6
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand2); |
1173
|
6
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
1174
|
6
|
|
|
|
|
|
break; |
1175
|
|
|
|
|
|
|
} |
1176
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_RIGHT_ARITHMETIC_SHIFT_INT: { |
1177
|
12
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_RIGHT_ARITHMETIC_SHIFT_INT("); |
1178
|
12
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand0); |
1179
|
12
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
1180
|
12
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand1); |
1181
|
12
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
1182
|
12
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand2); |
1183
|
12
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
1184
|
12
|
|
|
|
|
|
break; |
1185
|
|
|
|
|
|
|
} |
1186
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_RIGHT_ARITHMETIC_SHIFT_LONG: { |
1187
|
5
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_RIGHT_ARITHMETIC_SHIFT_LONG("); |
1188
|
5
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_LONG, opcode->operand0); |
1189
|
5
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
1190
|
5
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_LONG, opcode->operand1); |
1191
|
5
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
1192
|
5
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand2); |
1193
|
5
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
1194
|
5
|
|
|
|
|
|
break; |
1195
|
|
|
|
|
|
|
} |
1196
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_RIGHT_LOGICAL_SHIFT_INT: { |
1197
|
12
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_RIGHT_LOGICAL_SHIFT_INT("); |
1198
|
12
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand0); |
1199
|
12
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
1200
|
12
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand1); |
1201
|
12
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
1202
|
12
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand2); |
1203
|
12
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
1204
|
12
|
|
|
|
|
|
break; |
1205
|
|
|
|
|
|
|
} |
1206
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_RIGHT_LOGICAL_SHIFT_LONG: { |
1207
|
5
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_RIGHT_LOGICAL_SHIFT_LONG("); |
1208
|
5
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_LONG, opcode->operand0); |
1209
|
5
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
1210
|
5
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_LONG, opcode->operand1); |
1211
|
5
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
1212
|
5
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand2); |
1213
|
5
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
1214
|
5
|
|
|
|
|
|
break; |
1215
|
|
|
|
|
|
|
} |
1216
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_BIT_AND_INT: { |
1217
|
32
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_BIT_AND_INT("); |
1218
|
32
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand0); |
1219
|
32
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
1220
|
32
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand1); |
1221
|
32
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
1222
|
32
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand2); |
1223
|
32
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
1224
|
32
|
|
|
|
|
|
break; |
1225
|
|
|
|
|
|
|
} |
1226
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_BIT_AND_LONG: { |
1227
|
2
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_BIT_AND_LONG("); |
1228
|
2
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_LONG, opcode->operand0); |
1229
|
2
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
1230
|
2
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_LONG, opcode->operand1); |
1231
|
2
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
1232
|
2
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_LONG, opcode->operand2); |
1233
|
2
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
1234
|
2
|
|
|
|
|
|
break; |
1235
|
|
|
|
|
|
|
} |
1236
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_BIT_OR_INT: { |
1237
|
19
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_BIT_OR_INT("); |
1238
|
19
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand0); |
1239
|
19
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
1240
|
19
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand1); |
1241
|
19
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
1242
|
19
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand2); |
1243
|
19
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
1244
|
19
|
|
|
|
|
|
break; |
1245
|
|
|
|
|
|
|
} |
1246
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_BIT_OR_LONG: { |
1247
|
2
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_BIT_OR_LONG("); |
1248
|
2
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_LONG, opcode->operand0); |
1249
|
2
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
1250
|
2
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_LONG, opcode->operand1); |
1251
|
2
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
1252
|
2
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_LONG, opcode->operand2); |
1253
|
2
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
1254
|
2
|
|
|
|
|
|
break; |
1255
|
|
|
|
|
|
|
} |
1256
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_BIT_XOR_INT: { |
1257
|
19
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_BIT_XOR_INT("); |
1258
|
19
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand0); |
1259
|
19
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
1260
|
19
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand1); |
1261
|
19
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
1262
|
19
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand2); |
1263
|
19
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
1264
|
19
|
|
|
|
|
|
break; |
1265
|
|
|
|
|
|
|
} |
1266
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_BIT_XOR_LONG: { |
1267
|
2
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_BIT_XOR_LONG("); |
1268
|
2
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_LONG, opcode->operand0); |
1269
|
2
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
1270
|
2
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_LONG, opcode->operand1); |
1271
|
2
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
1272
|
2
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_LONG, opcode->operand2); |
1273
|
2
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
1274
|
2
|
|
|
|
|
|
break; |
1275
|
|
|
|
|
|
|
} |
1276
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_BIT_NOT_INT: { |
1277
|
14
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_BIT_NOT_INT("); |
1278
|
14
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand0); |
1279
|
14
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
1280
|
14
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand1); |
1281
|
14
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
1282
|
14
|
|
|
|
|
|
break; |
1283
|
|
|
|
|
|
|
} |
1284
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_BIT_NOT_LONG: { |
1285
|
4
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_BIT_NOT_LONG("); |
1286
|
4
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_LONG, opcode->operand0); |
1287
|
4
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
1288
|
4
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_LONG, opcode->operand1); |
1289
|
4
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
1290
|
4
|
|
|
|
|
|
break; |
1291
|
|
|
|
|
|
|
} |
1292
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_NEGATE_INT: { |
1293
|
11
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_NEGATE_INT("); |
1294
|
11
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand0); |
1295
|
11
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
1296
|
11
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand1); |
1297
|
11
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
1298
|
11
|
|
|
|
|
|
break; |
1299
|
|
|
|
|
|
|
} |
1300
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_NEGATE_LONG: { |
1301
|
3
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_NEGATE_LONG("); |
1302
|
3
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_LONG, opcode->operand0); |
1303
|
3
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
1304
|
3
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_LONG, opcode->operand1); |
1305
|
3
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
1306
|
3
|
|
|
|
|
|
break; |
1307
|
|
|
|
|
|
|
} |
1308
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_NEGATE_FLOAT: { |
1309
|
3
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_NEGATE_FLOAT("); |
1310
|
3
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_FLOAT, opcode->operand0); |
1311
|
3
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
1312
|
3
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_FLOAT, opcode->operand1); |
1313
|
3
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
1314
|
3
|
|
|
|
|
|
break; |
1315
|
|
|
|
|
|
|
} |
1316
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_NEGATE_DOUBLE: { |
1317
|
3
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_NEGATE_DOUBLE("); |
1318
|
3
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_DOUBLE, opcode->operand0); |
1319
|
3
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
1320
|
3
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_DOUBLE, opcode->operand1); |
1321
|
3
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
1322
|
3
|
|
|
|
|
|
break; |
1323
|
|
|
|
|
|
|
} |
1324
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_CONCAT: { |
1325
|
374
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_CONCAT(env, stack, "); |
1326
|
374
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand_address(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_OBJECT, opcode->operand0); |
1327
|
374
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
1328
|
374
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_OBJECT, opcode->operand1); |
1329
|
374
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
1330
|
374
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_OBJECT, opcode->operand2); |
1331
|
374
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", &error_id);\n"); |
1332
|
374
|
|
|
|
|
|
break; |
1333
|
|
|
|
|
|
|
} |
1334
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_BOOL_CONVERSION_INT: { |
1335
|
11569
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_BOOL_CONVERSION_INT("); |
1336
|
11569
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand0); |
1337
|
11569
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
1338
|
11569
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand1); |
1339
|
11569
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
1340
|
11569
|
|
|
|
|
|
break; |
1341
|
|
|
|
|
|
|
} |
1342
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_BOOL_CONVERSION_LONG: { |
1343
|
10
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_BOOL_CONVERSION_LONG("); |
1344
|
10
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand0); |
1345
|
10
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
1346
|
10
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_LONG, opcode->operand1); |
1347
|
10
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
1348
|
10
|
|
|
|
|
|
break; |
1349
|
|
|
|
|
|
|
} |
1350
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_BOOL_CONVERSION_FLOAT: { |
1351
|
10
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_BOOL_CONVERSION_FLOAT("); |
1352
|
10
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand0); |
1353
|
10
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
1354
|
10
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_FLOAT, opcode->operand1); |
1355
|
10
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
1356
|
10
|
|
|
|
|
|
break; |
1357
|
|
|
|
|
|
|
} |
1358
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_BOOL_CONVERSION_DOUBLE: { |
1359
|
47
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_BOOL_CONVERSION_DOUBLE("); |
1360
|
47
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand0); |
1361
|
47
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
1362
|
47
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_DOUBLE, opcode->operand1); |
1363
|
47
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
1364
|
47
|
|
|
|
|
|
break; |
1365
|
|
|
|
|
|
|
} |
1366
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_BOOL_CONVERSION_OBJECT: { |
1367
|
1141
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_BOOL_CONVERSION_OBJECT("); |
1368
|
1141
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand0); |
1369
|
1141
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
1370
|
1141
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_OBJECT, opcode->operand1); |
1371
|
1141
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
1372
|
1141
|
|
|
|
|
|
break; |
1373
|
|
|
|
|
|
|
} |
1374
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_BOOL_CONVERSION_REF: { |
1375
|
2
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_BOOL_CONVERSION_REF("); |
1376
|
2
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand0); |
1377
|
2
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
1378
|
2
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_REF, opcode->operand1); |
1379
|
2
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
1380
|
2
|
|
|
|
|
|
break; |
1381
|
|
|
|
|
|
|
} |
1382
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_BOOL_CONVERSION_BOOL_OBJECT: { |
1383
|
14
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_BOOL_CONVERSION_BOOL_OBJECT(env, stack, "); |
1384
|
14
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand0); |
1385
|
14
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
1386
|
14
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_OBJECT, opcode->operand1); |
1387
|
14
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
1388
|
14
|
|
|
|
|
|
break; |
1389
|
|
|
|
|
|
|
} |
1390
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_EQ_INT: { |
1391
|
4131
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_EQ_INT("); |
1392
|
4131
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand0); |
1393
|
4131
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
1394
|
4131
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand1); |
1395
|
4131
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
1396
|
4131
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand2); |
1397
|
4131
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
1398
|
4131
|
|
|
|
|
|
break; |
1399
|
|
|
|
|
|
|
} |
1400
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_EQ_LONG: { |
1401
|
568
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_EQ_LONG("); |
1402
|
568
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand0); |
1403
|
568
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
1404
|
568
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_LONG, opcode->operand1); |
1405
|
568
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
1406
|
568
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_LONG, opcode->operand2); |
1407
|
568
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
1408
|
568
|
|
|
|
|
|
break; |
1409
|
|
|
|
|
|
|
} |
1410
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_EQ_FLOAT: { |
1411
|
484
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_EQ_FLOAT("); |
1412
|
484
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand0); |
1413
|
484
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
1414
|
484
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_FLOAT, opcode->operand1); |
1415
|
484
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
1416
|
484
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_FLOAT, opcode->operand2); |
1417
|
484
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
1418
|
484
|
|
|
|
|
|
break; |
1419
|
|
|
|
|
|
|
} |
1420
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_EQ_DOUBLE: { |
1421
|
557
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_EQ_DOUBLE("); |
1422
|
557
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand0); |
1423
|
557
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
1424
|
557
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_DOUBLE, opcode->operand1); |
1425
|
557
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
1426
|
557
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_DOUBLE, opcode->operand2); |
1427
|
557
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
1428
|
557
|
|
|
|
|
|
break; |
1429
|
|
|
|
|
|
|
} |
1430
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_EQ_OBJECT: { |
1431
|
130
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_EQ_OBJECT("); |
1432
|
130
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand0); |
1433
|
130
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
1434
|
130
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_OBJECT, opcode->operand1); |
1435
|
130
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
1436
|
130
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_OBJECT, opcode->operand2); |
1437
|
130
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
1438
|
130
|
|
|
|
|
|
break; |
1439
|
|
|
|
|
|
|
} |
1440
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_EQ_REF: { |
1441
|
0
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_EQ_REF("); |
1442
|
0
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand0); |
1443
|
0
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
1444
|
0
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_REF, opcode->operand1); |
1445
|
0
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
1446
|
0
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_REF, opcode->operand2); |
1447
|
0
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
1448
|
0
|
|
|
|
|
|
break; |
1449
|
|
|
|
|
|
|
} |
1450
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_NE_INT: { |
1451
|
87
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_NE_INT("); |
1452
|
87
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand0); |
1453
|
87
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
1454
|
87
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand1); |
1455
|
87
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
1456
|
87
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand2); |
1457
|
87
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
1458
|
87
|
|
|
|
|
|
break; |
1459
|
|
|
|
|
|
|
} |
1460
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_NE_LONG: { |
1461
|
6
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_NE_LONG("); |
1462
|
6
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand0); |
1463
|
6
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
1464
|
6
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_LONG, opcode->operand1); |
1465
|
6
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
1466
|
6
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_LONG, opcode->operand2); |
1467
|
6
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
1468
|
6
|
|
|
|
|
|
break; |
1469
|
|
|
|
|
|
|
} |
1470
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_NE_FLOAT: { |
1471
|
5
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_NE_FLOAT("); |
1472
|
5
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand0); |
1473
|
5
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
1474
|
5
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_FLOAT, opcode->operand1); |
1475
|
5
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
1476
|
5
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_FLOAT, opcode->operand2); |
1477
|
5
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
1478
|
5
|
|
|
|
|
|
break; |
1479
|
|
|
|
|
|
|
} |
1480
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_NE_DOUBLE: { |
1481
|
5
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_NE_DOUBLE("); |
1482
|
5
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand0); |
1483
|
5
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
1484
|
5
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_DOUBLE, opcode->operand1); |
1485
|
5
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
1486
|
5
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_DOUBLE, opcode->operand2); |
1487
|
5
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
1488
|
5
|
|
|
|
|
|
break; |
1489
|
|
|
|
|
|
|
} |
1490
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_NE_OBJECT: { |
1491
|
15
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_NE_OBJECT("); |
1492
|
15
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand0); |
1493
|
15
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
1494
|
15
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_OBJECT, opcode->operand1); |
1495
|
15
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
1496
|
15
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_OBJECT, opcode->operand2); |
1497
|
15
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
1498
|
15
|
|
|
|
|
|
break; |
1499
|
|
|
|
|
|
|
} |
1500
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_NE_REF: { |
1501
|
4
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_NE_REF("); |
1502
|
4
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand0); |
1503
|
4
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
1504
|
4
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_REF, opcode->operand1); |
1505
|
4
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
1506
|
4
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_REF, opcode->operand2); |
1507
|
4
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
1508
|
4
|
|
|
|
|
|
break; |
1509
|
|
|
|
|
|
|
} |
1510
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_GT_INT: { |
1511
|
37
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_GT_INT("); |
1512
|
37
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand0); |
1513
|
37
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
1514
|
37
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand1); |
1515
|
37
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
1516
|
37
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand2); |
1517
|
37
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
1518
|
37
|
|
|
|
|
|
break; |
1519
|
|
|
|
|
|
|
} |
1520
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_GT_LONG: { |
1521
|
6
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_GT_LONG("); |
1522
|
6
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand0); |
1523
|
6
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
1524
|
6
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_LONG, opcode->operand1); |
1525
|
6
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
1526
|
6
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_LONG, opcode->operand2); |
1527
|
6
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
1528
|
6
|
|
|
|
|
|
break; |
1529
|
|
|
|
|
|
|
} |
1530
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_GT_FLOAT: { |
1531
|
6
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_GT_FLOAT("); |
1532
|
6
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand0); |
1533
|
6
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
1534
|
6
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_FLOAT, opcode->operand1); |
1535
|
6
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
1536
|
6
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_FLOAT, opcode->operand2); |
1537
|
6
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
1538
|
6
|
|
|
|
|
|
break; |
1539
|
|
|
|
|
|
|
} |
1540
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_GT_DOUBLE: { |
1541
|
7
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_GT_DOUBLE("); |
1542
|
7
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand0); |
1543
|
7
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
1544
|
7
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_DOUBLE, opcode->operand1); |
1545
|
7
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
1546
|
7
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_DOUBLE, opcode->operand2); |
1547
|
7
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
1548
|
7
|
|
|
|
|
|
break; |
1549
|
|
|
|
|
|
|
} |
1550
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_GE_INT: { |
1551
|
83
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_GE_INT("); |
1552
|
83
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand0); |
1553
|
83
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
1554
|
83
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand1); |
1555
|
83
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
1556
|
83
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand2); |
1557
|
83
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
1558
|
83
|
|
|
|
|
|
break; |
1559
|
|
|
|
|
|
|
} |
1560
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_GE_LONG: { |
1561
|
7
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_GE_LONG("); |
1562
|
7
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand0); |
1563
|
7
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
1564
|
7
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_LONG, opcode->operand1); |
1565
|
7
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
1566
|
7
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_LONG, opcode->operand2); |
1567
|
7
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
1568
|
7
|
|
|
|
|
|
break; |
1569
|
|
|
|
|
|
|
} |
1570
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_GE_FLOAT: { |
1571
|
6
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_GE_FLOAT("); |
1572
|
6
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand0); |
1573
|
6
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
1574
|
6
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_FLOAT, opcode->operand1); |
1575
|
6
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
1576
|
6
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_FLOAT, opcode->operand2); |
1577
|
6
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
1578
|
6
|
|
|
|
|
|
break; |
1579
|
|
|
|
|
|
|
} |
1580
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_GE_DOUBLE: { |
1581
|
7
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_GE_DOUBLE("); |
1582
|
7
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand0); |
1583
|
7
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
1584
|
7
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_DOUBLE, opcode->operand1); |
1585
|
7
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
1586
|
7
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_DOUBLE, opcode->operand2); |
1587
|
7
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
1588
|
7
|
|
|
|
|
|
break; |
1589
|
|
|
|
|
|
|
} |
1590
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_LT_INT: { |
1591
|
232
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_LT_INT("); |
1592
|
232
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand0); |
1593
|
232
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
1594
|
232
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand1); |
1595
|
232
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
1596
|
232
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand2); |
1597
|
232
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
1598
|
232
|
|
|
|
|
|
break; |
1599
|
|
|
|
|
|
|
} |
1600
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_LT_LONG: { |
1601
|
7
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_LT_LONG("); |
1602
|
7
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand0); |
1603
|
7
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
1604
|
7
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_LONG, opcode->operand1); |
1605
|
7
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
1606
|
7
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_LONG, opcode->operand2); |
1607
|
7
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
1608
|
7
|
|
|
|
|
|
break; |
1609
|
|
|
|
|
|
|
} |
1610
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_LT_FLOAT: { |
1611
|
6
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_LT_FLOAT("); |
1612
|
6
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand0); |
1613
|
6
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
1614
|
6
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_FLOAT, opcode->operand1); |
1615
|
6
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
1616
|
6
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_FLOAT, opcode->operand2); |
1617
|
6
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
1618
|
6
|
|
|
|
|
|
break; |
1619
|
|
|
|
|
|
|
} |
1620
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_LT_DOUBLE: { |
1621
|
7
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_LT_DOUBLE("); |
1622
|
7
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand0); |
1623
|
7
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
1624
|
7
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_DOUBLE, opcode->operand1); |
1625
|
7
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
1626
|
7
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_DOUBLE, opcode->operand2); |
1627
|
7
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
1628
|
7
|
|
|
|
|
|
break; |
1629
|
|
|
|
|
|
|
} |
1630
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_LE_INT: { |
1631
|
76
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_LE_INT("); |
1632
|
76
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand0); |
1633
|
76
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
1634
|
76
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand1); |
1635
|
76
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
1636
|
76
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand2); |
1637
|
76
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
1638
|
76
|
|
|
|
|
|
break; |
1639
|
|
|
|
|
|
|
} |
1640
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_LE_LONG: { |
1641
|
6
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_LE_LONG("); |
1642
|
6
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand0); |
1643
|
6
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
1644
|
6
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_LONG, opcode->operand1); |
1645
|
6
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
1646
|
6
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_LONG, opcode->operand2); |
1647
|
6
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
1648
|
6
|
|
|
|
|
|
break; |
1649
|
|
|
|
|
|
|
} |
1650
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_LE_FLOAT: { |
1651
|
6
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_LE_FLOAT("); |
1652
|
6
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand0); |
1653
|
6
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
1654
|
6
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_FLOAT, opcode->operand1); |
1655
|
6
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
1656
|
6
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_FLOAT, opcode->operand2); |
1657
|
6
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
1658
|
6
|
|
|
|
|
|
break; |
1659
|
|
|
|
|
|
|
} |
1660
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_LE_DOUBLE: { |
1661
|
6
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_LE_DOUBLE("); |
1662
|
6
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand0); |
1663
|
6
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
1664
|
6
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_DOUBLE, opcode->operand1); |
1665
|
6
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
1666
|
6
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_DOUBLE, opcode->operand2); |
1667
|
6
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
1668
|
6
|
|
|
|
|
|
break; |
1669
|
|
|
|
|
|
|
} |
1670
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_CMP_INT: { |
1671
|
98
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_CMP_INT("); |
1672
|
98
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand0); |
1673
|
98
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
1674
|
98
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand1); |
1675
|
98
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
1676
|
98
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand2); |
1677
|
98
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
1678
|
98
|
|
|
|
|
|
break; |
1679
|
|
|
|
|
|
|
} |
1680
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_CMP_LONG: { |
1681
|
24
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_CMP_LONG("); |
1682
|
24
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand0); |
1683
|
24
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
1684
|
24
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_LONG, opcode->operand1); |
1685
|
24
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
1686
|
24
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_LONG, opcode->operand2); |
1687
|
24
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
1688
|
24
|
|
|
|
|
|
break; |
1689
|
|
|
|
|
|
|
} |
1690
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_CMP_FLOAT: { |
1691
|
26
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_CMP_FLOAT("); |
1692
|
26
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand0); |
1693
|
26
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
1694
|
26
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_FLOAT, opcode->operand1); |
1695
|
26
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
1696
|
26
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_FLOAT, opcode->operand2); |
1697
|
26
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
1698
|
26
|
|
|
|
|
|
break; |
1699
|
|
|
|
|
|
|
} |
1700
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_CMP_DOUBLE: { |
1701
|
26
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_CMP_DOUBLE("); |
1702
|
26
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand0); |
1703
|
26
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
1704
|
26
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_DOUBLE, opcode->operand1); |
1705
|
26
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
1706
|
26
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_DOUBLE, opcode->operand2); |
1707
|
26
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
1708
|
26
|
|
|
|
|
|
break; |
1709
|
|
|
|
|
|
|
} |
1710
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_IS_UNDEF: { |
1711
|
144
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_IS_UNDEF("); |
1712
|
144
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand0); |
1713
|
144
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
1714
|
144
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_OBJECT, opcode->operand1); |
1715
|
144
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
1716
|
144
|
|
|
|
|
|
break; |
1717
|
|
|
|
|
|
|
} |
1718
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_IS_NOT_UNDEF: { |
1719
|
21
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_IS_NOT_UNDEF("); |
1720
|
21
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand0); |
1721
|
21
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
1722
|
21
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_OBJECT, opcode->operand1); |
1723
|
21
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
1724
|
21
|
|
|
|
|
|
break; |
1725
|
|
|
|
|
|
|
} |
1726
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_STRING_EQ: { |
1727
|
548
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_STRING_EQ(env, stack, "); |
1728
|
548
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand_address(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand0); |
1729
|
548
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
1730
|
548
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_OBJECT, opcode->operand1); |
1731
|
548
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
1732
|
548
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_OBJECT, opcode->operand2); |
1733
|
548
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
1734
|
548
|
|
|
|
|
|
break; |
1735
|
|
|
|
|
|
|
} |
1736
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_STRING_NE: { |
1737
|
23
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_STRING_NE(env, stack, "); |
1738
|
23
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand_address(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand0); |
1739
|
23
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
1740
|
23
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_OBJECT, opcode->operand1); |
1741
|
23
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
1742
|
23
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_OBJECT, opcode->operand2); |
1743
|
23
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
1744
|
23
|
|
|
|
|
|
break; |
1745
|
|
|
|
|
|
|
} |
1746
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_STRING_GT: { |
1747
|
22
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_STRING_GT(env, stack, "); |
1748
|
22
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand_address(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand0); |
1749
|
22
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
1750
|
22
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_OBJECT, opcode->operand1); |
1751
|
22
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
1752
|
22
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_OBJECT, opcode->operand2); |
1753
|
22
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
1754
|
22
|
|
|
|
|
|
break; |
1755
|
|
|
|
|
|
|
} |
1756
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_STRING_GE: { |
1757
|
22
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_STRING_GE(env, stack, "); |
1758
|
22
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand_address(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand0); |
1759
|
22
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
1760
|
22
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_OBJECT, opcode->operand1); |
1761
|
22
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
1762
|
22
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_OBJECT, opcode->operand2); |
1763
|
22
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
1764
|
22
|
|
|
|
|
|
break; |
1765
|
|
|
|
|
|
|
} |
1766
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_STRING_LT: { |
1767
|
22
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_STRING_LT(env, stack, "); |
1768
|
22
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand_address(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand0); |
1769
|
22
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
1770
|
22
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_OBJECT, opcode->operand1); |
1771
|
22
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
1772
|
22
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_OBJECT, opcode->operand2); |
1773
|
22
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
1774
|
22
|
|
|
|
|
|
break; |
1775
|
|
|
|
|
|
|
} |
1776
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_STRING_LE: { |
1777
|
22
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_STRING_LE(env, stack, "); |
1778
|
22
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand_address(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand0); |
1779
|
22
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
1780
|
22
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_OBJECT, opcode->operand1); |
1781
|
22
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
1782
|
22
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_OBJECT, opcode->operand2); |
1783
|
22
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
1784
|
22
|
|
|
|
|
|
break; |
1785
|
|
|
|
|
|
|
} |
1786
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_STRING_CMP: { |
1787
|
42
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_STRING_CMP(env, stack, "); |
1788
|
42
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand_address(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand0); |
1789
|
42
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
1790
|
42
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_OBJECT, opcode->operand1); |
1791
|
42
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
1792
|
42
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_OBJECT, opcode->operand2); |
1793
|
42
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
1794
|
42
|
|
|
|
|
|
break; |
1795
|
|
|
|
|
|
|
} |
1796
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_NEW_OBJECT: { |
1797
|
297
|
|
|
|
|
|
int32_t basic_type_id = opcode->operand1; |
1798
|
297
|
|
|
|
|
|
SPVM_RUNTIME_BASIC_TYPE* basic_type = SPVM_API_RUNTIME_get_basic_type_by_id(runtime, basic_type_id); |
1799
|
297
|
|
|
|
|
|
const char* basic_type_name = basic_type->name; |
1800
|
|
|
|
|
|
|
|
1801
|
297
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " basic_type_name = \""); |
1802
|
297
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, (char*)basic_type_name); |
1803
|
297
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, "\";\n"); |
1804
|
|
|
|
|
|
|
|
1805
|
297
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " basic_type = "); |
1806
|
297
|
|
|
|
|
|
SPVM_PRECOMPILE_add_basic_type(precompile, string_buffer, basic_type_name); |
1807
|
297
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
1808
|
|
|
|
|
|
|
|
1809
|
297
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_NEW_OBJECT(env, stack, "); |
1810
|
297
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand_address(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_OBJECT, opcode->operand0); |
1811
|
297
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", basic_type, &error_id);"); |
1812
|
|
|
|
|
|
|
|
1813
|
297
|
|
|
|
|
|
break; |
1814
|
|
|
|
|
|
|
} |
1815
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_NEW_OBJECT_ARRAY: { |
1816
|
741
|
|
|
|
|
|
int32_t basic_type_id = opcode->operand1; |
1817
|
741
|
|
|
|
|
|
SPVM_RUNTIME_BASIC_TYPE* basic_type = SPVM_API_RUNTIME_get_basic_type_by_id(runtime, basic_type_id); |
1818
|
741
|
|
|
|
|
|
const char* basic_type_name = basic_type->name; |
1819
|
|
|
|
|
|
|
|
1820
|
741
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " basic_type_name = \""); |
1821
|
741
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, (char*)basic_type_name); |
1822
|
741
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, "\";\n"); |
1823
|
|
|
|
|
|
|
|
1824
|
741
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " length = *(int32_t*)&"); |
1825
|
741
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand2); |
1826
|
741
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
1827
|
|
|
|
|
|
|
|
1828
|
741
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " basic_type = "); |
1829
|
741
|
|
|
|
|
|
SPVM_PRECOMPILE_add_basic_type(precompile, string_buffer, basic_type_name); |
1830
|
741
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
1831
|
|
|
|
|
|
|
|
1832
|
741
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_NEW_OBJECT_ARRAY(env, stack, "); |
1833
|
741
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand_address(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_OBJECT, opcode->operand0); |
1834
|
741
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", basic_type, length, &error_id);\n"); |
1835
|
741
|
|
|
|
|
|
break; |
1836
|
|
|
|
|
|
|
} |
1837
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_NEW_MULDIM_ARRAY: { |
1838
|
27
|
|
|
|
|
|
int32_t basic_type_id = opcode->operand1; |
1839
|
27
|
|
|
|
|
|
SPVM_RUNTIME_BASIC_TYPE* basic_type = SPVM_API_RUNTIME_get_basic_type_by_id(runtime, basic_type_id); |
1840
|
27
|
|
|
|
|
|
const char* basic_type_name = basic_type->name; |
1841
|
27
|
|
|
|
|
|
int32_t type_dimension = opcode->operand3; |
1842
|
|
|
|
|
|
|
|
1843
|
27
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " basic_type_name = \""); |
1844
|
27
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, (char*)basic_type_name); |
1845
|
27
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, "\";\n"); |
1846
|
|
|
|
|
|
|
|
1847
|
27
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " type_dimension = "); |
1848
|
27
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_int(string_buffer, type_dimension); |
1849
|
27
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
1850
|
|
|
|
|
|
|
|
1851
|
27
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " length = *(int32_t*)&"); |
1852
|
27
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand2); |
1853
|
27
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
1854
|
|
|
|
|
|
|
|
1855
|
27
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " basic_type = "); |
1856
|
27
|
|
|
|
|
|
SPVM_PRECOMPILE_add_basic_type(precompile, string_buffer, basic_type_name); |
1857
|
27
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
1858
|
|
|
|
|
|
|
|
1859
|
27
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_NEW_MULDIM_ARRAY(env, stack, "); |
1860
|
27
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand_address(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_OBJECT, opcode->operand0); |
1861
|
27
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", basic_type, type_dimension, length, &error_id);\n"); |
1862
|
|
|
|
|
|
|
|
1863
|
27
|
|
|
|
|
|
break; |
1864
|
|
|
|
|
|
|
} |
1865
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_NEW_MULNUM_ARRAY: { |
1866
|
84
|
|
|
|
|
|
int32_t basic_type_id = opcode->operand1; |
1867
|
84
|
|
|
|
|
|
SPVM_RUNTIME_BASIC_TYPE* basic_type = SPVM_API_RUNTIME_get_basic_type_by_id(runtime, basic_type_id); |
1868
|
84
|
|
|
|
|
|
const char* basic_type_name = basic_type->name; |
1869
|
|
|
|
|
|
|
|
1870
|
84
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " basic_type_name = \""); |
1871
|
84
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, (char*)basic_type_name); |
1872
|
84
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, "\";\n"); |
1873
|
|
|
|
|
|
|
|
1874
|
84
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " length = *(int32_t*)&"); |
1875
|
84
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand2); |
1876
|
84
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
1877
|
|
|
|
|
|
|
|
1878
|
84
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " basic_type = "); |
1879
|
84
|
|
|
|
|
|
SPVM_PRECOMPILE_add_basic_type(precompile, string_buffer, basic_type_name); |
1880
|
84
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
1881
|
|
|
|
|
|
|
|
1882
|
84
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_NEW_MULNUM_ARRAY(env, stack, "); |
1883
|
84
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand_address(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_OBJECT, opcode->operand0); |
1884
|
84
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", basic_type, length, &error_id);\n"); |
1885
|
|
|
|
|
|
|
|
1886
|
84
|
|
|
|
|
|
break; |
1887
|
|
|
|
|
|
|
} |
1888
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_NEW_BYTE_ARRAY: { |
1889
|
289
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " length = *(int32_t*)&"); |
1890
|
289
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand1); |
1891
|
289
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
1892
|
289
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_NEW_BYTE_ARRAY(env, stack, "); |
1893
|
289
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand_address(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_OBJECT, opcode->operand0); |
1894
|
289
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", length, &error_id);\n"); |
1895
|
289
|
|
|
|
|
|
break; |
1896
|
|
|
|
|
|
|
} |
1897
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_NEW_SHORT_ARRAY: { |
1898
|
228
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " length = *(int32_t*)&"); |
1899
|
228
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand1); |
1900
|
228
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
1901
|
228
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_NEW_SHORT_ARRAY(env, stack, "); |
1902
|
228
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand_address(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_OBJECT, opcode->operand0); |
1903
|
228
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", length, &error_id);\n"); |
1904
|
228
|
|
|
|
|
|
break; |
1905
|
|
|
|
|
|
|
} |
1906
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_NEW_INT_ARRAY: { |
1907
|
331
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " length = *(int32_t*)&"); |
1908
|
331
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand1); |
1909
|
331
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
1910
|
331
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_NEW_INT_ARRAY(env, stack, "); |
1911
|
331
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand_address(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_OBJECT, opcode->operand0); |
1912
|
331
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", length, &error_id);\n"); |
1913
|
331
|
|
|
|
|
|
break; |
1914
|
|
|
|
|
|
|
} |
1915
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_NEW_LONG_ARRAY: { |
1916
|
223
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " length = *(int32_t*)&"); |
1917
|
223
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand1); |
1918
|
223
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
1919
|
223
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_NEW_LONG_ARRAY(env, stack, "); |
1920
|
223
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand_address(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_OBJECT, opcode->operand0); |
1921
|
223
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", length, &error_id);\n"); |
1922
|
223
|
|
|
|
|
|
break; |
1923
|
|
|
|
|
|
|
} |
1924
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_NEW_FLOAT_ARRAY: { |
1925
|
224
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " length = *(int32_t*)&"); |
1926
|
224
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand1); |
1927
|
224
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
1928
|
224
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_NEW_FLOAT_ARRAY(env, stack, "); |
1929
|
224
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand_address(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_OBJECT, opcode->operand0); |
1930
|
224
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", length, &error_id);\n"); |
1931
|
224
|
|
|
|
|
|
break; |
1932
|
|
|
|
|
|
|
} |
1933
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_NEW_DOUBLE_ARRAY: { |
1934
|
232
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " length = *(int32_t*)&"); |
1935
|
232
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand1); |
1936
|
232
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
1937
|
232
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_NEW_DOUBLE_ARRAY(env, stack, "); |
1938
|
232
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand_address(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_OBJECT, opcode->operand0); |
1939
|
232
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", length, &error_id);\n"); |
1940
|
232
|
|
|
|
|
|
break; |
1941
|
|
|
|
|
|
|
} |
1942
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_NEW_STRING: { |
1943
|
3168
|
|
|
|
|
|
int32_t constant_string_index = opcode->operand1; |
1944
|
|
|
|
|
|
|
|
1945
|
3168
|
|
|
|
|
|
SPVM_RUNTIME_STRING* constant_string = ¤t_basic_type->constant_strings[constant_string_index]; |
1946
|
3168
|
|
|
|
|
|
const char* constant_string_value = constant_string->value; |
1947
|
3168
|
|
|
|
|
|
int32_t constant_string_length = constant_string->length; |
1948
|
3168
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, |
1949
|
|
|
|
|
|
|
" constant_string = \"" |
1950
|
|
|
|
|
|
|
); |
1951
|
46763
|
100
|
|
|
|
|
for (int32_t i = 0; i < constant_string_length; i++) { |
1952
|
43595
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_hex_char(string_buffer, constant_string_value[i]); |
1953
|
|
|
|
|
|
|
} |
1954
|
3168
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, "\";\n"); |
1955
|
|
|
|
|
|
|
|
1956
|
3168
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " constant_string_length = "); |
1957
|
3168
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_int(string_buffer, constant_string_length); |
1958
|
3168
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
1959
|
|
|
|
|
|
|
|
1960
|
3168
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_NEW_STRING(env, stack, "); |
1961
|
3168
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand_address(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_OBJECT, opcode->operand0); |
1962
|
3168
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", constant_string, constant_string_length, &error_id);\n"); |
1963
|
3168
|
|
|
|
|
|
break; |
1964
|
|
|
|
|
|
|
} |
1965
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_NEW_STRING_LEN: { |
1966
|
10
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " length = "); |
1967
|
10
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand1); |
1968
|
10
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
1969
|
|
|
|
|
|
|
|
1970
|
10
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_NEW_STRING_LEN(env, stack, "); |
1971
|
10
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand_address(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_OBJECT, opcode->operand0); |
1972
|
10
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", length, &error_id);\n"); |
1973
|
10
|
|
|
|
|
|
break; |
1974
|
|
|
|
|
|
|
} |
1975
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_IS_READ_ONLY: { |
1976
|
6
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_IS_READ_ONLY(env, stack, "); |
1977
|
6
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, 0); |
1978
|
6
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
1979
|
6
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_OBJECT, opcode->operand1); |
1980
|
6
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
1981
|
6
|
|
|
|
|
|
break; |
1982
|
|
|
|
|
|
|
} |
1983
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_MAKE_READ_ONLY: { |
1984
|
3
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_MAKE_READ_ONLY(env, stack, "); |
1985
|
3
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_OBJECT, opcode->operand0); |
1986
|
3
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
1987
|
3
|
|
|
|
|
|
break; |
1988
|
|
|
|
|
|
|
} |
1989
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_GET_ARRAY_ELEMENT_BYTE: { |
1990
|
549
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " array = "); |
1991
|
549
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_OBJECT, opcode->operand1); |
1992
|
549
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
1993
|
|
|
|
|
|
|
|
1994
|
549
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " index = "); |
1995
|
549
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand2); |
1996
|
549
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
1997
|
|
|
|
|
|
|
|
1998
|
549
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_GET_ARRAY_ELEMENT_BYTE(env, stack, "); |
1999
|
549
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand_address(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_BYTE, opcode->operand0); |
2000
|
549
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", array, index, &error_id, object_header_size, object_length_offset);\n"); |
2001
|
549
|
|
|
|
|
|
break; |
2002
|
|
|
|
|
|
|
} |
2003
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_GET_ARRAY_ELEMENT_SHORT: { |
2004
|
93
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " array = "); |
2005
|
93
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_OBJECT, opcode->operand1); |
2006
|
93
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
2007
|
|
|
|
|
|
|
|
2008
|
93
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " index = "); |
2009
|
93
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand2); |
2010
|
93
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
2011
|
|
|
|
|
|
|
|
2012
|
93
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_GET_ARRAY_ELEMENT_SHORT(env, stack, "); |
2013
|
93
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand_address(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_SHORT, opcode->operand0); |
2014
|
93
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", array, index, &error_id, object_header_size, object_length_offset);\n"); |
2015
|
93
|
|
|
|
|
|
break; |
2016
|
|
|
|
|
|
|
} |
2017
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_GET_ARRAY_ELEMENT_INT: { |
2018
|
212
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " array = "); |
2019
|
212
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_OBJECT, opcode->operand1); |
2020
|
212
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
2021
|
|
|
|
|
|
|
|
2022
|
212
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " index = "); |
2023
|
212
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand2); |
2024
|
212
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
2025
|
|
|
|
|
|
|
|
2026
|
212
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_GET_ARRAY_ELEMENT_INT(env, stack, "); |
2027
|
212
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand_address(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand0); |
2028
|
212
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", array, index, &error_id, object_header_size, object_length_offset);\n"); |
2029
|
212
|
|
|
|
|
|
break; |
2030
|
|
|
|
|
|
|
} |
2031
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_GET_ARRAY_ELEMENT_LONG: { |
2032
|
94
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " array = "); |
2033
|
94
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_OBJECT, opcode->operand1); |
2034
|
94
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
2035
|
|
|
|
|
|
|
|
2036
|
94
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " index = "); |
2037
|
94
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand2); |
2038
|
94
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
2039
|
|
|
|
|
|
|
|
2040
|
94
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_GET_ARRAY_ELEMENT_LONG(env, stack, "); |
2041
|
94
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand_address(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_LONG, opcode->operand0); |
2042
|
94
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", array, index, &error_id, object_header_size, object_length_offset);\n"); |
2043
|
94
|
|
|
|
|
|
break; |
2044
|
|
|
|
|
|
|
} |
2045
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_GET_ARRAY_ELEMENT_FLOAT: { |
2046
|
92
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " array = "); |
2047
|
92
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_OBJECT, opcode->operand1); |
2048
|
92
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
2049
|
|
|
|
|
|
|
|
2050
|
92
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " index = "); |
2051
|
92
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand2); |
2052
|
92
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
2053
|
|
|
|
|
|
|
|
2054
|
92
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_GET_ARRAY_ELEMENT_FLOAT(env, stack, "); |
2055
|
92
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand_address(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_FLOAT, opcode->operand0); |
2056
|
92
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", array, index, &error_id, object_header_size, object_length_offset);\n"); |
2057
|
92
|
|
|
|
|
|
break; |
2058
|
|
|
|
|
|
|
} |
2059
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_GET_ARRAY_ELEMENT_DOUBLE: { |
2060
|
92
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " array = "); |
2061
|
92
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_OBJECT, opcode->operand1); |
2062
|
92
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
2063
|
|
|
|
|
|
|
|
2064
|
92
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " index = "); |
2065
|
92
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand2); |
2066
|
92
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
2067
|
|
|
|
|
|
|
|
2068
|
92
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_GET_ARRAY_ELEMENT_DOUBLE(env, stack, "); |
2069
|
92
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand_address(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_DOUBLE, opcode->operand0); |
2070
|
92
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", array, index, &error_id, object_header_size, object_length_offset);\n"); |
2071
|
92
|
|
|
|
|
|
break; |
2072
|
|
|
|
|
|
|
} |
2073
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_GET_ARRAY_ELEMENT_OBJECT: { |
2074
|
514
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " array = "); |
2075
|
514
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_OBJECT, opcode->operand1); |
2076
|
514
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
2077
|
|
|
|
|
|
|
|
2078
|
514
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " index = "); |
2079
|
514
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand2); |
2080
|
514
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
2081
|
|
|
|
|
|
|
|
2082
|
514
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_GET_ARRAY_ELEMENT_OBJECT(env, stack, "); |
2083
|
514
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand_address(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_OBJECT, opcode->operand0); |
2084
|
514
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", array, index, &error_id, object_header_size, object_length_offset);\n"); |
2085
|
|
|
|
|
|
|
|
2086
|
514
|
|
|
|
|
|
break; |
2087
|
|
|
|
|
|
|
} |
2088
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_SET_ARRAY_ELEMENT_BYTE: { |
2089
|
747
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " array = "); |
2090
|
747
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_OBJECT, opcode->operand0); |
2091
|
747
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
2092
|
|
|
|
|
|
|
|
2093
|
747
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " index = "); |
2094
|
747
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand1); |
2095
|
747
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
2096
|
|
|
|
|
|
|
|
2097
|
747
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_SET_ARRAY_ELEMENT_BYTE(env, stack, array, index, "); |
2098
|
747
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_BYTE, opcode->operand2); |
2099
|
747
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", &error_id, object_header_size, object_length_offset);\n"); |
2100
|
747
|
|
|
|
|
|
break; |
2101
|
|
|
|
|
|
|
} |
2102
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_SET_ARRAY_ELEMENT_SHORT: { |
2103
|
620
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " array = "); |
2104
|
620
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_OBJECT, opcode->operand0); |
2105
|
620
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
2106
|
|
|
|
|
|
|
|
2107
|
620
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " index = "); |
2108
|
620
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand1); |
2109
|
620
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
2110
|
|
|
|
|
|
|
|
2111
|
620
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_SET_ARRAY_ELEMENT_SHORT(env, stack, array, index, "); |
2112
|
620
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_SHORT, opcode->operand2); |
2113
|
620
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", &error_id, object_header_size, object_length_offset);\n"); |
2114
|
620
|
|
|
|
|
|
break; |
2115
|
|
|
|
|
|
|
} |
2116
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_SET_ARRAY_ELEMENT_INT: { |
2117
|
901
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " array = "); |
2118
|
901
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_OBJECT, opcode->operand0); |
2119
|
901
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
2120
|
|
|
|
|
|
|
|
2121
|
901
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " index = "); |
2122
|
901
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand1); |
2123
|
901
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
2124
|
|
|
|
|
|
|
|
2125
|
901
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_SET_ARRAY_ELEMENT_INT(env, stack, array, index, "); |
2126
|
901
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand2); |
2127
|
901
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", &error_id, object_header_size, object_length_offset);\n"); |
2128
|
901
|
|
|
|
|
|
break; |
2129
|
|
|
|
|
|
|
} |
2130
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_SET_ARRAY_ELEMENT_LONG: { |
2131
|
613
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " array = "); |
2132
|
613
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_OBJECT, opcode->operand0); |
2133
|
613
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
2134
|
|
|
|
|
|
|
|
2135
|
613
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " index = "); |
2136
|
613
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand1); |
2137
|
613
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
2138
|
|
|
|
|
|
|
|
2139
|
613
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_SET_ARRAY_ELEMENT_LONG(env, stack, array, index, "); |
2140
|
613
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_LONG, opcode->operand2); |
2141
|
613
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", &error_id, object_header_size, object_length_offset);\n"); |
2142
|
613
|
|
|
|
|
|
break; |
2143
|
|
|
|
|
|
|
} |
2144
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_SET_ARRAY_ELEMENT_FLOAT: { |
2145
|
607
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " array = "); |
2146
|
607
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_OBJECT, opcode->operand0); |
2147
|
607
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
2148
|
|
|
|
|
|
|
|
2149
|
607
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " index = "); |
2150
|
607
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand1); |
2151
|
607
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
2152
|
|
|
|
|
|
|
|
2153
|
607
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_SET_ARRAY_ELEMENT_FLOAT(env, stack, array, index, "); |
2154
|
607
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_FLOAT, opcode->operand2); |
2155
|
607
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", &error_id, object_header_size, object_length_offset);\n"); |
2156
|
607
|
|
|
|
|
|
break; |
2157
|
|
|
|
|
|
|
} |
2158
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_SET_ARRAY_ELEMENT_DOUBLE: { |
2159
|
634
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " array = "); |
2160
|
634
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_OBJECT, opcode->operand0); |
2161
|
634
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
2162
|
|
|
|
|
|
|
|
2163
|
634
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " index = "); |
2164
|
634
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand1); |
2165
|
634
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
2166
|
|
|
|
|
|
|
|
2167
|
634
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_SET_ARRAY_ELEMENT_DOUBLE(env, stack, array, index, "); |
2168
|
634
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_DOUBLE, opcode->operand2); |
2169
|
634
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", &error_id, object_header_size, object_length_offset);\n"); |
2170
|
634
|
|
|
|
|
|
break; |
2171
|
|
|
|
|
|
|
} |
2172
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_SET_ARRAY_ELEMENT_OBJECT: { |
2173
|
1222
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " array = "); |
2174
|
1222
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_OBJECT, opcode->operand0); |
2175
|
1222
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
2176
|
|
|
|
|
|
|
|
2177
|
1222
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " index = "); |
2178
|
1222
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand1); |
2179
|
1222
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
2180
|
|
|
|
|
|
|
|
2181
|
1222
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_SET_ARRAY_ELEMENT_OBJECT(env, stack, array, index, "); |
2182
|
1222
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_OBJECT, opcode->operand2); |
2183
|
1222
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", &error_id, object_header_size, object_length_offset);\n"); |
2184
|
1222
|
|
|
|
|
|
break; |
2185
|
|
|
|
|
|
|
} |
2186
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_SET_ARRAY_ELEMENT_OBJECT_CHECK_TYPE: { |
2187
|
378
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " array = "); |
2188
|
378
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_OBJECT, opcode->operand0); |
2189
|
378
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
2190
|
378
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " index = "); |
2191
|
378
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand1); |
2192
|
378
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
2193
|
|
|
|
|
|
|
|
2194
|
378
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_SET_ARRAY_ELEMENT_OBJECT_CHECK_TYPE(env, stack, array, index, "); |
2195
|
378
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_OBJECT, opcode->operand2); |
2196
|
378
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", &error_id, object_header_size, object_length_offset);\n"); |
2197
|
|
|
|
|
|
|
|
2198
|
378
|
|
|
|
|
|
break; |
2199
|
|
|
|
|
|
|
} |
2200
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_SET_ARRAY_ELEMENT_UNDEF: { |
2201
|
20
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " array = "); |
2202
|
20
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_OBJECT, opcode->operand0); |
2203
|
20
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
2204
|
20
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " index = "); |
2205
|
20
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand1); |
2206
|
20
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
2207
|
20
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_SET_ARRAY_ELEMENT_UNDEF(env, stack, array, index, &error_id, object_header_size, object_length_offset);\n"); |
2208
|
20
|
|
|
|
|
|
break; |
2209
|
|
|
|
|
|
|
} |
2210
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_ARRAY_LENGTH: { |
2211
|
283
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " array = "); |
2212
|
283
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_OBJECT, opcode->operand1); |
2213
|
283
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
2214
|
|
|
|
|
|
|
|
2215
|
283
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_ARRAY_LENGTH(env, stack, "); |
2216
|
283
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand_address(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand0); |
2217
|
283
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", array, &error_id, object_length_offset);\n"); |
2218
|
283
|
|
|
|
|
|
break; |
2219
|
|
|
|
|
|
|
} |
2220
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_GET_FIELD_BYTE: |
2221
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_GET_FIELD_SHORT: |
2222
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_GET_FIELD_INT: |
2223
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_GET_FIELD_LONG: |
2224
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_GET_FIELD_FLOAT: |
2225
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_GET_FIELD_DOUBLE: |
2226
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_GET_FIELD_OBJECT: |
2227
|
|
|
|
|
|
|
{ |
2228
|
902
|
|
|
|
|
|
int32_t field_current_basic_type_id = opcode->operand2; |
2229
|
902
|
|
|
|
|
|
int32_t field_index = (uint16_t)opcode->operand3; |
2230
|
|
|
|
|
|
|
|
2231
|
902
|
|
|
|
|
|
SPVM_RUNTIME_BASIC_TYPE* field_current_basic_type = SPVM_API_RUNTIME_get_basic_type_by_id(runtime, field_current_basic_type_id); |
2232
|
902
|
|
|
|
|
|
SPVM_RUNTIME_FIELD* field = SPVM_API_BASIC_TYPE_get_field_by_index(runtime, field_current_basic_type, field_index); |
2233
|
902
|
|
|
|
|
|
const char* basic_type_name = field_current_basic_type->name; |
2234
|
902
|
|
|
|
|
|
const char* field_name = field->name; |
2235
|
|
|
|
|
|
|
|
2236
|
902
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " object = "); |
2237
|
902
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_OBJECT, opcode->operand1); |
2238
|
902
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
2239
|
|
|
|
|
|
|
|
2240
|
902
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " basic_type_name = \""); |
2241
|
902
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, (char*)basic_type_name); |
2242
|
902
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, "\";\n"); |
2243
|
|
|
|
|
|
|
|
2244
|
902
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " field_name = \""); |
2245
|
902
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, (char*)field_name); |
2246
|
902
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, "\";\n"); |
2247
|
|
|
|
|
|
|
|
2248
|
902
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " decl_field_offset = "); |
2249
|
902
|
|
|
|
|
|
SPVM_PRECOMPILE_add_field_offset(precompile, string_buffer, basic_type_name, field_name); |
2250
|
902
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
2251
|
|
|
|
|
|
|
|
2252
|
902
|
|
|
|
|
|
switch (opcode_id) { |
2253
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_GET_FIELD_BYTE: { |
2254
|
72
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_GET_FIELD_BYTE(env, stack, "); |
2255
|
72
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand_address(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_BYTE, opcode->operand0); |
2256
|
72
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", object, decl_field_offset, &error_id, object_header_size);\n"); |
2257
|
72
|
|
|
|
|
|
break; |
2258
|
|
|
|
|
|
|
} |
2259
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_GET_FIELD_SHORT: { |
2260
|
71
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_GET_FIELD_SHORT(env, stack, "); |
2261
|
71
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand_address(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_SHORT, opcode->operand0); |
2262
|
71
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", object, decl_field_offset, &error_id, object_header_size);\n"); |
2263
|
71
|
|
|
|
|
|
break; |
2264
|
|
|
|
|
|
|
} |
2265
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_GET_FIELD_INT: { |
2266
|
310
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_GET_FIELD_INT(env, stack, "); |
2267
|
310
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand_address(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand0); |
2268
|
310
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", object, decl_field_offset, &error_id, object_header_size);\n"); |
2269
|
310
|
|
|
|
|
|
break; |
2270
|
|
|
|
|
|
|
} |
2271
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_GET_FIELD_LONG: { |
2272
|
71
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_GET_FIELD_LONG(env, stack, "); |
2273
|
71
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand_address(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_LONG, opcode->operand0); |
2274
|
71
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", object, decl_field_offset, &error_id, object_header_size);\n"); |
2275
|
71
|
|
|
|
|
|
break; |
2276
|
|
|
|
|
|
|
} |
2277
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_GET_FIELD_FLOAT: { |
2278
|
71
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_GET_FIELD_FLOAT(env, stack, "); |
2279
|
71
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand_address(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_FLOAT, opcode->operand0); |
2280
|
71
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", object, decl_field_offset, &error_id, object_header_size);\n"); |
2281
|
71
|
|
|
|
|
|
break; |
2282
|
|
|
|
|
|
|
} |
2283
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_GET_FIELD_DOUBLE: { |
2284
|
71
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_GET_FIELD_DOUBLE(env, stack, "); |
2285
|
71
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand_address(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_DOUBLE, opcode->operand0); |
2286
|
71
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", object, decl_field_offset, &error_id, object_header_size);\n"); |
2287
|
71
|
|
|
|
|
|
break; |
2288
|
|
|
|
|
|
|
} |
2289
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_GET_FIELD_OBJECT: { |
2290
|
236
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_GET_FIELD_OBJECT(env, stack, "); |
2291
|
236
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand_address(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_OBJECT, opcode->operand0); |
2292
|
236
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", object, decl_field_offset, &error_id, object_header_size);\n"); |
2293
|
236
|
|
|
|
|
|
break; |
2294
|
|
|
|
|
|
|
} |
2295
|
|
|
|
|
|
|
default: { |
2296
|
0
|
|
|
|
|
|
assert(0); |
2297
|
|
|
|
|
|
|
} |
2298
|
|
|
|
|
|
|
} |
2299
|
902
|
|
|
|
|
|
break; |
2300
|
|
|
|
|
|
|
} |
2301
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_SET_FIELD_BYTE: |
2302
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_SET_FIELD_SHORT: |
2303
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_SET_FIELD_INT: |
2304
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_SET_FIELD_LONG: |
2305
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_SET_FIELD_FLOAT: |
2306
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_SET_FIELD_DOUBLE: |
2307
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_SET_FIELD_OBJECT: |
2308
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_SET_FIELD_UNDEF: |
2309
|
|
|
|
|
|
|
{ |
2310
|
1074
|
|
|
|
|
|
int32_t field_current_basic_type_id = opcode->operand2; |
2311
|
1074
|
|
|
|
|
|
int32_t field_index = (uint16_t)opcode->operand3; |
2312
|
|
|
|
|
|
|
|
2313
|
1074
|
|
|
|
|
|
SPVM_RUNTIME_BASIC_TYPE* field_current_basic_type = SPVM_API_RUNTIME_get_basic_type_by_id(runtime, field_current_basic_type_id); |
2314
|
1074
|
|
|
|
|
|
SPVM_RUNTIME_FIELD* field = SPVM_API_BASIC_TYPE_get_field_by_index(runtime, field_current_basic_type, field_index); |
2315
|
1074
|
|
|
|
|
|
const char* basic_type_name = field_current_basic_type->name; |
2316
|
1074
|
|
|
|
|
|
const char* field_name = field->name; |
2317
|
|
|
|
|
|
|
|
2318
|
1074
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " object = "); |
2319
|
1074
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_OBJECT, opcode->operand0); |
2320
|
1074
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
2321
|
|
|
|
|
|
|
|
2322
|
1074
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " basic_type_name = \""); |
2323
|
1074
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, (char*)basic_type_name); |
2324
|
1074
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, "\";\n"); |
2325
|
|
|
|
|
|
|
|
2326
|
1074
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " field_name = \""); |
2327
|
1074
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, (char*)field_name); |
2328
|
1074
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, "\";\n"); |
2329
|
|
|
|
|
|
|
|
2330
|
1074
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " decl_field_offset = "); |
2331
|
1074
|
|
|
|
|
|
SPVM_PRECOMPILE_add_field_offset(precompile, string_buffer, basic_type_name, field_name); |
2332
|
1074
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
2333
|
|
|
|
|
|
|
|
2334
|
1074
|
|
|
|
|
|
switch (opcode_id) { |
2335
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_SET_FIELD_BYTE: { |
2336
|
99
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_SET_FIELD_BYTE(env, stack, object, decl_field_offset, "); |
2337
|
99
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_BYTE, opcode->operand1); |
2338
|
99
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", &error_id, object_header_size);\n"); |
2339
|
99
|
|
|
|
|
|
break; |
2340
|
|
|
|
|
|
|
} |
2341
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_SET_FIELD_SHORT: { |
2342
|
99
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_SET_FIELD_SHORT(env, stack, object, decl_field_offset, "); |
2343
|
99
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_SHORT, opcode->operand1); |
2344
|
99
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", &error_id, object_header_size);\n"); |
2345
|
99
|
|
|
|
|
|
break; |
2346
|
|
|
|
|
|
|
} |
2347
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_SET_FIELD_INT: { |
2348
|
324
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_SET_FIELD_INT(env, stack, object, decl_field_offset, "); |
2349
|
324
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand1); |
2350
|
324
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", &error_id, object_header_size);\n"); |
2351
|
324
|
|
|
|
|
|
break; |
2352
|
|
|
|
|
|
|
} |
2353
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_SET_FIELD_LONG: { |
2354
|
99
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_SET_FIELD_LONG(env, stack, object, decl_field_offset, "); |
2355
|
99
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_LONG, opcode->operand1); |
2356
|
99
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", &error_id, object_header_size);\n"); |
2357
|
99
|
|
|
|
|
|
break; |
2358
|
|
|
|
|
|
|
} |
2359
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_SET_FIELD_FLOAT: { |
2360
|
99
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_SET_FIELD_FLOAT(env, stack, object, decl_field_offset, "); |
2361
|
99
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_FLOAT, opcode->operand1); |
2362
|
99
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", &error_id, object_header_size);\n"); |
2363
|
99
|
|
|
|
|
|
break; |
2364
|
|
|
|
|
|
|
} |
2365
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_SET_FIELD_DOUBLE: { |
2366
|
99
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_SET_FIELD_DOUBLE(env, stack, object, decl_field_offset, "); |
2367
|
99
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_DOUBLE, opcode->operand1); |
2368
|
99
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", &error_id, object_header_size);\n"); |
2369
|
99
|
|
|
|
|
|
break; |
2370
|
|
|
|
|
|
|
} |
2371
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_SET_FIELD_OBJECT: { |
2372
|
249
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_SET_FIELD_OBJECT(env, stack, object, decl_field_offset, "); |
2373
|
249
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_OBJECT, opcode->operand1); |
2374
|
249
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", &error_id, object_header_size);\n"); |
2375
|
249
|
|
|
|
|
|
break; |
2376
|
|
|
|
|
|
|
} |
2377
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_SET_FIELD_UNDEF: { |
2378
|
6
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_SET_FIELD_UNDEF(env, stack, object, decl_field_offset, &error_id, object_header_size);\n"); |
2379
|
6
|
|
|
|
|
|
break; |
2380
|
|
|
|
|
|
|
} |
2381
|
|
|
|
|
|
|
default: { |
2382
|
0
|
|
|
|
|
|
assert(0); |
2383
|
|
|
|
|
|
|
} |
2384
|
|
|
|
|
|
|
} |
2385
|
1074
|
|
|
|
|
|
break; |
2386
|
|
|
|
|
|
|
} |
2387
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_WEAKEN_FIELD: { |
2388
|
19
|
|
|
|
|
|
int32_t field_current_basic_type_id = opcode->operand2; |
2389
|
19
|
|
|
|
|
|
int32_t field_index = (uint16_t)opcode->operand3; |
2390
|
|
|
|
|
|
|
|
2391
|
19
|
|
|
|
|
|
SPVM_RUNTIME_BASIC_TYPE* field_current_basic_type = SPVM_API_RUNTIME_get_basic_type_by_id(runtime, field_current_basic_type_id); |
2392
|
19
|
|
|
|
|
|
SPVM_RUNTIME_FIELD* field = SPVM_API_BASIC_TYPE_get_field_by_index(runtime, field_current_basic_type, field_index); |
2393
|
19
|
|
|
|
|
|
const char* basic_type_name = field_current_basic_type->name; |
2394
|
19
|
|
|
|
|
|
const char* field_name = field->name; |
2395
|
|
|
|
|
|
|
|
2396
|
19
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " object = "); |
2397
|
19
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_OBJECT, opcode->operand0); |
2398
|
19
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
2399
|
|
|
|
|
|
|
|
2400
|
19
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " basic_type_name = \""); |
2401
|
19
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, (char*)basic_type_name); |
2402
|
19
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, "\";\n"); |
2403
|
|
|
|
|
|
|
|
2404
|
19
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " field_name = \""); |
2405
|
19
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, (char*)field_name); |
2406
|
19
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, "\";\n"); |
2407
|
|
|
|
|
|
|
|
2408
|
19
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " decl_field_offset = "); |
2409
|
19
|
|
|
|
|
|
SPVM_PRECOMPILE_add_field_offset(precompile, string_buffer, basic_type_name, field_name); |
2410
|
19
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
2411
|
|
|
|
|
|
|
|
2412
|
19
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_WEAKEN_FIELD(env, stack, object, decl_field_offset, &error_id, object_header_size);\n"); |
2413
|
|
|
|
|
|
|
|
2414
|
19
|
|
|
|
|
|
break; |
2415
|
|
|
|
|
|
|
} |
2416
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_UNWEAKEN_FIELD: { |
2417
|
1
|
|
|
|
|
|
int32_t field_current_basic_type_id = opcode->operand2; |
2418
|
1
|
|
|
|
|
|
int32_t field_index = (uint16_t)opcode->operand3; |
2419
|
|
|
|
|
|
|
|
2420
|
1
|
|
|
|
|
|
SPVM_RUNTIME_BASIC_TYPE* field_current_basic_type = SPVM_API_RUNTIME_get_basic_type_by_id(runtime, field_current_basic_type_id); |
2421
|
1
|
|
|
|
|
|
SPVM_RUNTIME_FIELD* field = SPVM_API_BASIC_TYPE_get_field_by_index(runtime, field_current_basic_type, field_index); |
2422
|
1
|
|
|
|
|
|
const char* basic_type_name = field_current_basic_type->name; |
2423
|
1
|
|
|
|
|
|
const char* field_name = field->name; |
2424
|
|
|
|
|
|
|
|
2425
|
1
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " object = "); |
2426
|
1
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_OBJECT, opcode->operand0); |
2427
|
1
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
2428
|
|
|
|
|
|
|
|
2429
|
1
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " basic_type_name = \""); |
2430
|
1
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, (char*)basic_type_name); |
2431
|
1
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, "\";\n"); |
2432
|
|
|
|
|
|
|
|
2433
|
1
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " field_name = \""); |
2434
|
1
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, (char*)field_name); |
2435
|
1
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, "\";\n"); |
2436
|
|
|
|
|
|
|
|
2437
|
1
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " decl_field_offset = "); |
2438
|
1
|
|
|
|
|
|
SPVM_PRECOMPILE_add_field_offset(precompile, string_buffer, basic_type_name, field_name); |
2439
|
1
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
2440
|
|
|
|
|
|
|
|
2441
|
1
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_UNWEAKEN_FIELD(env, stack, object, decl_field_offset, &error_id, object_header_size);\n"); |
2442
|
|
|
|
|
|
|
|
2443
|
1
|
|
|
|
|
|
break; |
2444
|
|
|
|
|
|
|
} |
2445
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_ISWEAK_FIELD: { |
2446
|
3
|
|
|
|
|
|
int32_t field_current_basic_type_id = opcode->operand2; |
2447
|
3
|
|
|
|
|
|
int32_t field_index = (uint16_t)opcode->operand3; |
2448
|
|
|
|
|
|
|
|
2449
|
3
|
|
|
|
|
|
SPVM_RUNTIME_BASIC_TYPE* field_current_basic_type = SPVM_API_RUNTIME_get_basic_type_by_id(runtime, field_current_basic_type_id); |
2450
|
3
|
|
|
|
|
|
SPVM_RUNTIME_FIELD* field = SPVM_API_BASIC_TYPE_get_field_by_index(runtime, field_current_basic_type, field_index); |
2451
|
3
|
|
|
|
|
|
const char* basic_type_name = field_current_basic_type->name; |
2452
|
3
|
|
|
|
|
|
const char* field_name = field->name; |
2453
|
|
|
|
|
|
|
|
2454
|
3
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " object = "); |
2455
|
3
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_OBJECT, opcode->operand1); |
2456
|
3
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
2457
|
|
|
|
|
|
|
|
2458
|
3
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " basic_type_name = \""); |
2459
|
3
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, (char*)basic_type_name); |
2460
|
3
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, "\";\n"); |
2461
|
|
|
|
|
|
|
|
2462
|
3
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " field_name = \""); |
2463
|
3
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, (char*)field_name); |
2464
|
3
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, "\";\n"); |
2465
|
|
|
|
|
|
|
|
2466
|
3
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " decl_field_offset = "); |
2467
|
3
|
|
|
|
|
|
SPVM_PRECOMPILE_add_field_offset(precompile, string_buffer, basic_type_name, field_name); |
2468
|
3
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
2469
|
|
|
|
|
|
|
|
2470
|
3
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_ISWEAK_FIELD(env, stack, &int_vars[0], object, decl_field_offset, &error_id, object_header_size);\n"); |
2471
|
|
|
|
|
|
|
|
2472
|
3
|
|
|
|
|
|
break; |
2473
|
|
|
|
|
|
|
} |
2474
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_GET_CLASS_VAR_BYTE: |
2475
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_GET_CLASS_VAR_SHORT: |
2476
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_GET_CLASS_VAR_INT: |
2477
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_GET_CLASS_VAR_LONG: |
2478
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_GET_CLASS_VAR_FLOAT: |
2479
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_GET_CLASS_VAR_DOUBLE: |
2480
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_GET_CLASS_VAR_OBJECT: |
2481
|
|
|
|
|
|
|
{ |
2482
|
445
|
|
|
|
|
|
int32_t class_var_current_basic_type_id = opcode->operand1; |
2483
|
445
|
|
|
|
|
|
int32_t class_var_index = opcode->operand2; |
2484
|
|
|
|
|
|
|
|
2485
|
445
|
|
|
|
|
|
SPVM_RUNTIME_BASIC_TYPE* class_var_current_basic_type = SPVM_API_RUNTIME_get_basic_type_by_id(runtime, class_var_current_basic_type_id); |
2486
|
445
|
|
|
|
|
|
SPVM_RUNTIME_CLASS_VAR* class_var = SPVM_API_BASIC_TYPE_get_class_var_by_index(runtime, class_var_current_basic_type, class_var_index); |
2487
|
445
|
|
|
|
|
|
const char* basic_type_name = class_var_current_basic_type->name; |
2488
|
445
|
|
|
|
|
|
const char* class_var_name = class_var->name; |
2489
|
|
|
|
|
|
|
|
2490
|
445
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " basic_type_name = \""); |
2491
|
445
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, (char*)basic_type_name); |
2492
|
445
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, "\";\n"); |
2493
|
|
|
|
|
|
|
|
2494
|
445
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " class_var_name = \""); |
2495
|
445
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, (char*)class_var_name); |
2496
|
445
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, "\";\n"); |
2497
|
|
|
|
|
|
|
|
2498
|
445
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " decl_class_var = "); |
2499
|
445
|
|
|
|
|
|
SPVM_PRECOMPILE_add_class_var(precompile, string_buffer, basic_type_name, class_var_name); |
2500
|
445
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
2501
|
|
|
|
|
|
|
|
2502
|
445
|
|
|
|
|
|
switch (opcode_id) { |
2503
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_GET_CLASS_VAR_BYTE: { |
2504
|
34
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_GET_CLASS_VAR_BYTE(env, stack, "); |
2505
|
34
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_BYTE, opcode->operand0); |
2506
|
34
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", decl_class_var);\n"); |
2507
|
34
|
|
|
|
|
|
break; |
2508
|
|
|
|
|
|
|
} |
2509
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_GET_CLASS_VAR_SHORT: { |
2510
|
34
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_GET_CLASS_VAR_SHORT(env, stack, "); |
2511
|
34
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_SHORT, opcode->operand0); |
2512
|
34
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", decl_class_var);\n"); |
2513
|
34
|
|
|
|
|
|
break; |
2514
|
|
|
|
|
|
|
} |
2515
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_GET_CLASS_VAR_INT: { |
2516
|
179
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_GET_CLASS_VAR_INT(env, stack, "); |
2517
|
179
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand0); |
2518
|
179
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", decl_class_var);\n"); |
2519
|
179
|
|
|
|
|
|
break; |
2520
|
|
|
|
|
|
|
} |
2521
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_GET_CLASS_VAR_LONG: { |
2522
|
52
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_GET_CLASS_VAR_LONG(env, stack, "); |
2523
|
52
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_LONG, opcode->operand0); |
2524
|
52
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", decl_class_var);\n"); |
2525
|
52
|
|
|
|
|
|
break; |
2526
|
|
|
|
|
|
|
} |
2527
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_GET_CLASS_VAR_FLOAT: { |
2528
|
34
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_GET_CLASS_VAR_FLOAT(env, stack, "); |
2529
|
34
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_FLOAT, opcode->operand0); |
2530
|
34
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", decl_class_var);\n"); |
2531
|
34
|
|
|
|
|
|
break; |
2532
|
|
|
|
|
|
|
} |
2533
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_GET_CLASS_VAR_DOUBLE: { |
2534
|
34
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_GET_CLASS_VAR_DOUBLE(env, stack, "); |
2535
|
34
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_DOUBLE, opcode->operand0); |
2536
|
34
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", decl_class_var);\n"); |
2537
|
34
|
|
|
|
|
|
break; |
2538
|
|
|
|
|
|
|
} |
2539
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_GET_CLASS_VAR_OBJECT: { |
2540
|
78
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_GET_CLASS_VAR_OBJECT(env, stack, &"); |
2541
|
78
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_OBJECT, opcode->operand0); |
2542
|
78
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", decl_class_var);\n"); |
2543
|
78
|
|
|
|
|
|
break; |
2544
|
|
|
|
|
|
|
} |
2545
|
|
|
|
|
|
|
default: { |
2546
|
0
|
|
|
|
|
|
assert(0); |
2547
|
|
|
|
|
|
|
} |
2548
|
|
|
|
|
|
|
} |
2549
|
|
|
|
|
|
|
|
2550
|
445
|
|
|
|
|
|
break; |
2551
|
|
|
|
|
|
|
} |
2552
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_SET_CLASS_VAR_BYTE: |
2553
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_SET_CLASS_VAR_SHORT: |
2554
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_SET_CLASS_VAR_INT: |
2555
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_SET_CLASS_VAR_LONG: |
2556
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_SET_CLASS_VAR_FLOAT: |
2557
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_SET_CLASS_VAR_DOUBLE: |
2558
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_SET_CLASS_VAR_OBJECT: |
2559
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_SET_CLASS_VAR_UNDEF: |
2560
|
|
|
|
|
|
|
{ |
2561
|
427
|
|
|
|
|
|
int32_t class_var_current_basic_type_id = opcode->operand0; |
2562
|
427
|
|
|
|
|
|
int32_t class_var_index = opcode->operand1; |
2563
|
|
|
|
|
|
|
|
2564
|
427
|
|
|
|
|
|
SPVM_RUNTIME_BASIC_TYPE* class_var_current_basic_type = SPVM_API_RUNTIME_get_basic_type_by_id(runtime, class_var_current_basic_type_id); |
2565
|
427
|
|
|
|
|
|
SPVM_RUNTIME_CLASS_VAR* class_var = SPVM_API_BASIC_TYPE_get_class_var_by_index(runtime, class_var_current_basic_type, class_var_index); |
2566
|
427
|
|
|
|
|
|
const char* basic_type_name = class_var_current_basic_type->name; |
2567
|
427
|
|
|
|
|
|
const char* class_var_name = class_var->name; |
2568
|
|
|
|
|
|
|
|
2569
|
427
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " basic_type_name = \""); |
2570
|
427
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, (char*)basic_type_name); |
2571
|
427
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, "\";\n"); |
2572
|
|
|
|
|
|
|
|
2573
|
427
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " class_var_name = \""); |
2574
|
427
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, (char*)class_var_name); |
2575
|
427
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, "\";\n"); |
2576
|
|
|
|
|
|
|
|
2577
|
427
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " decl_class_var = "); |
2578
|
427
|
|
|
|
|
|
SPVM_PRECOMPILE_add_class_var(precompile, string_buffer, basic_type_name, class_var_name); |
2579
|
427
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
2580
|
|
|
|
|
|
|
|
2581
|
427
|
|
|
|
|
|
switch (opcode_id) { |
2582
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_SET_CLASS_VAR_BYTE: { |
2583
|
36
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_SET_CLASS_VAR_BYTE(env, stack, decl_class_var, "); |
2584
|
36
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_BYTE, opcode->operand2); |
2585
|
36
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
2586
|
36
|
|
|
|
|
|
break; |
2587
|
|
|
|
|
|
|
} |
2588
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_SET_CLASS_VAR_SHORT: { |
2589
|
34
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_SET_CLASS_VAR_SHORT(env, stack, decl_class_var, "); |
2590
|
34
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_SHORT, opcode->operand2); |
2591
|
34
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
2592
|
34
|
|
|
|
|
|
break; |
2593
|
|
|
|
|
|
|
} |
2594
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_SET_CLASS_VAR_INT: { |
2595
|
113
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_SET_CLASS_VAR_INT(env, stack, decl_class_var, "); |
2596
|
113
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand2); |
2597
|
113
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
2598
|
113
|
|
|
|
|
|
break; |
2599
|
|
|
|
|
|
|
} |
2600
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_SET_CLASS_VAR_LONG: { |
2601
|
51
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_SET_CLASS_VAR_LONG(env, stack, decl_class_var, "); |
2602
|
51
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_LONG, opcode->operand2); |
2603
|
51
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
2604
|
51
|
|
|
|
|
|
break; |
2605
|
|
|
|
|
|
|
} |
2606
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_SET_CLASS_VAR_FLOAT: { |
2607
|
34
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_SET_CLASS_VAR_FLOAT(env, stack, decl_class_var, "); |
2608
|
34
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_FLOAT, opcode->operand2); |
2609
|
34
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
2610
|
34
|
|
|
|
|
|
break; |
2611
|
|
|
|
|
|
|
} |
2612
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_SET_CLASS_VAR_DOUBLE: { |
2613
|
34
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_SET_CLASS_VAR_DOUBLE(env, stack, decl_class_var, "); |
2614
|
34
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_DOUBLE, opcode->operand2); |
2615
|
34
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
2616
|
34
|
|
|
|
|
|
break; |
2617
|
|
|
|
|
|
|
} |
2618
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_SET_CLASS_VAR_OBJECT: { |
2619
|
41
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_SET_CLASS_VAR_OBJECT(env, stack, decl_class_var, "); |
2620
|
41
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_OBJECT, opcode->operand2); |
2621
|
41
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
2622
|
41
|
|
|
|
|
|
break; |
2623
|
|
|
|
|
|
|
} |
2624
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_SET_CLASS_VAR_UNDEF: { |
2625
|
84
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_SET_CLASS_VAR_UNDEF(env, stack, decl_class_var);\n"); |
2626
|
84
|
|
|
|
|
|
break; |
2627
|
|
|
|
|
|
|
} |
2628
|
|
|
|
|
|
|
default: { |
2629
|
0
|
|
|
|
|
|
assert(0); |
2630
|
|
|
|
|
|
|
} |
2631
|
|
|
|
|
|
|
} |
2632
|
|
|
|
|
|
|
|
2633
|
427
|
|
|
|
|
|
break; |
2634
|
|
|
|
|
|
|
} |
2635
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_GET_EXCEPTION_VAR: { |
2636
|
1444
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_GET_EXCEPTION_VAR(env, stack, "); |
2637
|
1444
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand_address(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_OBJECT, opcode->operand0); |
2638
|
1444
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
2639
|
1444
|
|
|
|
|
|
break; |
2640
|
|
|
|
|
|
|
} |
2641
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_SET_EXCEPTION_VAR: { |
2642
|
213
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_SET_EXCEPTION_VAR(env, stack, "); |
2643
|
213
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_OBJECT, opcode->operand0); |
2644
|
213
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
2645
|
213
|
|
|
|
|
|
break; |
2646
|
|
|
|
|
|
|
} |
2647
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_SET_EXCEPTION_VAR_UNDEF: { |
2648
|
2246
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_SET_EXCEPTION_VAR_UNDEF(env, stack);\n"); |
2649
|
2246
|
|
|
|
|
|
break; |
2650
|
|
|
|
|
|
|
} |
2651
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_ISA: |
2652
|
|
|
|
|
|
|
{ |
2653
|
259
|
|
|
|
|
|
int32_t basic_type_id = opcode->operand2; |
2654
|
259
|
|
|
|
|
|
int32_t type_dimension = opcode->operand3; |
2655
|
259
|
|
|
|
|
|
SPVM_RUNTIME_BASIC_TYPE* basic_type = SPVM_API_RUNTIME_get_basic_type_by_id(runtime, basic_type_id); |
2656
|
259
|
|
|
|
|
|
const char* basic_type_name = basic_type->name; |
2657
|
|
|
|
|
|
|
|
2658
|
259
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " object = "); |
2659
|
259
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_OBJECT, opcode->operand1); |
2660
|
259
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
2661
|
|
|
|
|
|
|
|
2662
|
259
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " type_dimension = "); |
2663
|
259
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_int(string_buffer, type_dimension); |
2664
|
259
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
2665
|
|
|
|
|
|
|
|
2666
|
259
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " basic_type = "); |
2667
|
259
|
|
|
|
|
|
SPVM_PRECOMPILE_add_basic_type(precompile, string_buffer, basic_type_name); |
2668
|
259
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
2669
|
|
|
|
|
|
|
|
2670
|
259
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_ISA(env, stack, "); |
2671
|
259
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand_address(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, 0); |
2672
|
259
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", object, basic_type, type_dimension);\n"); |
2673
|
|
|
|
|
|
|
|
2674
|
259
|
|
|
|
|
|
break; |
2675
|
|
|
|
|
|
|
} |
2676
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_ISA_ERROR: |
2677
|
|
|
|
|
|
|
{ |
2678
|
7
|
|
|
|
|
|
int32_t basic_type_id = opcode->operand2; |
2679
|
7
|
|
|
|
|
|
int32_t type_dimension = opcode->operand3; |
2680
|
7
|
|
|
|
|
|
SPVM_RUNTIME_BASIC_TYPE* basic_type = SPVM_API_RUNTIME_get_basic_type_by_id(runtime, basic_type_id); |
2681
|
7
|
|
|
|
|
|
const char* basic_type_name = basic_type->name; |
2682
|
|
|
|
|
|
|
|
2683
|
7
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " src_basic_type_id = "); |
2684
|
7
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand1); |
2685
|
7
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
2686
|
|
|
|
|
|
|
|
2687
|
7
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " src_basic_type = env->api->runtime->get_basic_type_by_id(env->runtime, src_basic_type_id);"); |
2688
|
|
|
|
|
|
|
|
2689
|
7
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " type_dimension = "); |
2690
|
7
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_int(string_buffer, type_dimension); |
2691
|
7
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
2692
|
|
|
|
|
|
|
|
2693
|
7
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " basic_type = "); |
2694
|
7
|
|
|
|
|
|
SPVM_PRECOMPILE_add_basic_type(precompile, string_buffer, basic_type_name); |
2695
|
7
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
2696
|
|
|
|
|
|
|
|
2697
|
7
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_ISA_ERROR(env, stack, "); |
2698
|
7
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand_address(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, 0); |
2699
|
7
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", src_basic_type, basic_type, type_dimension);\n"); |
2700
|
|
|
|
|
|
|
|
2701
|
7
|
|
|
|
|
|
break; |
2702
|
|
|
|
|
|
|
} |
2703
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_IS_TYPE: |
2704
|
|
|
|
|
|
|
{ |
2705
|
43
|
|
|
|
|
|
int32_t basic_type_id = opcode->operand2; |
2706
|
43
|
|
|
|
|
|
int32_t type_dimension = opcode->operand3; |
2707
|
43
|
|
|
|
|
|
SPVM_RUNTIME_BASIC_TYPE* basic_type = SPVM_API_RUNTIME_get_basic_type_by_id(runtime, basic_type_id); |
2708
|
43
|
|
|
|
|
|
const char* basic_type_name = basic_type->name; |
2709
|
|
|
|
|
|
|
|
2710
|
43
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " object = "); |
2711
|
43
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_OBJECT, opcode->operand1); |
2712
|
43
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
2713
|
|
|
|
|
|
|
|
2714
|
43
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " type_dimension = "); |
2715
|
43
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_int(string_buffer, type_dimension); |
2716
|
43
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
2717
|
|
|
|
|
|
|
|
2718
|
43
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " basic_type = "); |
2719
|
43
|
|
|
|
|
|
SPVM_PRECOMPILE_add_basic_type(precompile, string_buffer, basic_type_name); |
2720
|
43
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
2721
|
|
|
|
|
|
|
|
2722
|
43
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_IS_TYPE(env, stack, "); |
2723
|
43
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand_address(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, 0); |
2724
|
43
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", object, basic_type, type_dimension);\n"); |
2725
|
|
|
|
|
|
|
|
2726
|
43
|
|
|
|
|
|
break; |
2727
|
|
|
|
|
|
|
} |
2728
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_IS_ERROR: |
2729
|
|
|
|
|
|
|
{ |
2730
|
6
|
|
|
|
|
|
int32_t basic_type_id = opcode->operand2; |
2731
|
6
|
|
|
|
|
|
int32_t type_dimension = opcode->operand3; |
2732
|
6
|
|
|
|
|
|
SPVM_RUNTIME_BASIC_TYPE* basic_type = SPVM_API_RUNTIME_get_basic_type_by_id(runtime, basic_type_id); |
2733
|
6
|
|
|
|
|
|
const char* basic_type_name = basic_type->name; |
2734
|
|
|
|
|
|
|
|
2735
|
6
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " src_basic_type_id = "); |
2736
|
6
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand1); |
2737
|
6
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
2738
|
|
|
|
|
|
|
|
2739
|
6
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " type_dimension = "); |
2740
|
6
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_int(string_buffer, type_dimension); |
2741
|
6
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
2742
|
|
|
|
|
|
|
|
2743
|
6
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " basic_type = "); |
2744
|
6
|
|
|
|
|
|
SPVM_PRECOMPILE_add_basic_type(precompile, string_buffer, basic_type_name); |
2745
|
6
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
2746
|
|
|
|
|
|
|
|
2747
|
6
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " src_basic_type = env->api->runtime->get_basic_type_by_id(env->runtime, src_basic_type_id);\n"); |
2748
|
|
|
|
|
|
|
|
2749
|
6
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_IS_ERROR(env, stack, "); |
2750
|
6
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand_address(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, 0); |
2751
|
6
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", src_basic_type, basic_type, type_dimension);\n"); |
2752
|
|
|
|
|
|
|
|
2753
|
6
|
|
|
|
|
|
break; |
2754
|
|
|
|
|
|
|
} |
2755
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_CAN: { |
2756
|
5
|
|
|
|
|
|
int32_t decl_basic_type_id = opcode->operand1; |
2757
|
5
|
|
|
|
|
|
int32_t decl_method_index = opcode->operand2; |
2758
|
|
|
|
|
|
|
|
2759
|
5
|
|
|
|
|
|
SPVM_RUNTIME_BASIC_TYPE* decl_basic_type = SPVM_API_RUNTIME_get_basic_type_by_id(runtime, decl_basic_type_id); |
2760
|
5
|
|
|
|
|
|
SPVM_RUNTIME_METHOD* method = SPVM_API_BASIC_TYPE_get_method_by_index(runtime, decl_basic_type, decl_method_index); |
2761
|
5
|
|
|
|
|
|
SPVM_RUNTIME_BASIC_TYPE* method_current_basic_type = method->current_basic_type; |
2762
|
5
|
|
|
|
|
|
const char* method_name = method->name; |
2763
|
|
|
|
|
|
|
|
2764
|
5
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " object = "); |
2765
|
5
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_OBJECT, opcode->operand0); |
2766
|
5
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
2767
|
|
|
|
|
|
|
|
2768
|
5
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " method_name = \""); |
2769
|
5
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, (char*)method_name); |
2770
|
5
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, "\";\n"); |
2771
|
|
|
|
|
|
|
|
2772
|
5
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_CAN(env, stack, "); |
2773
|
5
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, 0); |
2774
|
5
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", object, method_name);\n"); |
2775
|
|
|
|
|
|
|
|
2776
|
5
|
|
|
|
|
|
break; |
2777
|
|
|
|
|
|
|
} |
2778
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_PRINT: { |
2779
|
33
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " string = "); |
2780
|
33
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_OBJECT, opcode->operand0); |
2781
|
33
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
2782
|
|
|
|
|
|
|
|
2783
|
33
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_PRINT(env, stack, string);\n"); |
2784
|
33
|
|
|
|
|
|
break; |
2785
|
|
|
|
|
|
|
} |
2786
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_SAY: { |
2787
|
30
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " string = "); |
2788
|
30
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_OBJECT, opcode->operand0); |
2789
|
30
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
2790
|
|
|
|
|
|
|
|
2791
|
30
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_SAY(env, stack, string);\n"); |
2792
|
30
|
|
|
|
|
|
break; |
2793
|
|
|
|
|
|
|
} |
2794
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_WARN: { |
2795
|
93
|
|
|
|
|
|
int32_t line = opcode->operand1; |
2796
|
|
|
|
|
|
|
|
2797
|
93
|
|
|
|
|
|
const char* class_dir = current_basic_type->class_dir; |
2798
|
93
|
|
|
|
|
|
const char* class_rel_file = current_basic_type->class_rel_file; |
2799
|
|
|
|
|
|
|
const char* class_dir_sep; |
2800
|
93
|
50
|
|
|
|
|
if (class_dir) { |
2801
|
93
|
|
|
|
|
|
class_dir_sep = "/"; |
2802
|
|
|
|
|
|
|
} |
2803
|
|
|
|
|
|
|
else { |
2804
|
0
|
|
|
|
|
|
class_dir_sep = ""; |
2805
|
0
|
|
|
|
|
|
class_dir = ""; |
2806
|
|
|
|
|
|
|
} |
2807
|
|
|
|
|
|
|
|
2808
|
93
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " string = "); |
2809
|
93
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_OBJECT, opcode->operand0); |
2810
|
93
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
2811
|
|
|
|
|
|
|
|
2812
|
93
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " class_dir = \""); |
2813
|
93
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, class_dir); |
2814
|
93
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, "\";\n"); |
2815
|
|
|
|
|
|
|
|
2816
|
93
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " class_dir_sep = \""); |
2817
|
93
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, class_dir_sep); |
2818
|
93
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, "\";\n"); |
2819
|
|
|
|
|
|
|
|
2820
|
93
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " class_rel_file = \""); |
2821
|
93
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, class_rel_file); |
2822
|
93
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, "\";\n"); |
2823
|
|
|
|
|
|
|
|
2824
|
93
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " line = "); |
2825
|
93
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_int(string_buffer, line); |
2826
|
93
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
2827
|
|
|
|
|
|
|
|
2828
|
93
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_WARN(env, stack, string, class_dir, class_dir_sep, class_rel_file, line);\n"); |
2829
|
93
|
|
|
|
|
|
break; |
2830
|
|
|
|
|
|
|
} |
2831
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_CLEAR_EVAL_ERROR_ID: { |
2832
|
1450
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_CLEAR_EVAL_ERROR_ID(eval_error_id);\n"); |
2833
|
1450
|
|
|
|
|
|
break; |
2834
|
|
|
|
|
|
|
} |
2835
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_GET_EVAL_ERROR_ID: { |
2836
|
5
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_GET_EVAL_ERROR_ID("); |
2837
|
5
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand0); |
2838
|
5
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", eval_error_id);\n"); |
2839
|
|
|
|
|
|
|
|
2840
|
5
|
|
|
|
|
|
break; |
2841
|
|
|
|
|
|
|
} |
2842
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_SET_ERROR_ID: { |
2843
|
186
|
|
|
|
|
|
int32_t basic_type_id = opcode->operand0; |
2844
|
186
|
|
|
|
|
|
SPVM_RUNTIME_BASIC_TYPE* basic_type = SPVM_API_RUNTIME_get_basic_type_by_id(runtime, basic_type_id); |
2845
|
186
|
|
|
|
|
|
const char* basic_type_name = basic_type->name; |
2846
|
|
|
|
|
|
|
|
2847
|
186
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " basic_type_name = \""); |
2848
|
186
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, (char*)basic_type_name); |
2849
|
186
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, "\";\n"); |
2850
|
|
|
|
|
|
|
|
2851
|
186
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " basic_type = "); |
2852
|
186
|
|
|
|
|
|
SPVM_PRECOMPILE_add_basic_type(precompile, string_buffer, basic_type_name); |
2853
|
186
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
2854
|
|
|
|
|
|
|
|
2855
|
186
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_SET_ERROR_ID(error_id, basic_type);\n"); |
2856
|
186
|
|
|
|
|
|
break; |
2857
|
|
|
|
|
|
|
} |
2858
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_ARGS_WIDTH: { |
2859
|
5
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_ARGS_WIDTH(env, stack, "); |
2860
|
5
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand0); |
2861
|
5
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
2862
|
5
|
|
|
|
|
|
break; |
2863
|
|
|
|
|
|
|
} |
2864
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_GET_BASIC_TYPE_ID: { |
2865
|
31
|
|
|
|
|
|
int32_t basic_type_id = opcode->operand1; |
2866
|
31
|
|
|
|
|
|
SPVM_RUNTIME_BASIC_TYPE* basic_type = SPVM_API_RUNTIME_get_basic_type_by_id(runtime, basic_type_id); |
2867
|
31
|
|
|
|
|
|
const char* basic_type_name = basic_type->name; |
2868
|
|
|
|
|
|
|
|
2869
|
31
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " basic_type_name = \""); |
2870
|
31
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, (char*)basic_type_name); |
2871
|
31
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, "\";\n"); |
2872
|
|
|
|
|
|
|
|
2873
|
31
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " basic_type = "); |
2874
|
31
|
|
|
|
|
|
SPVM_PRECOMPILE_add_basic_type(precompile, string_buffer, basic_type_name); |
2875
|
31
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
2876
|
|
|
|
|
|
|
|
2877
|
31
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_GET_BASIC_TYPE_ID(env, stack, "); |
2878
|
31
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand0); |
2879
|
31
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", basic_type);\n"); |
2880
|
|
|
|
|
|
|
|
2881
|
31
|
|
|
|
|
|
break; |
2882
|
|
|
|
|
|
|
} |
2883
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_TYPE_NAME: { |
2884
|
|
|
|
|
|
|
|
2885
|
9
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " object = "); |
2886
|
9
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_OBJECT, opcode->operand1); |
2887
|
9
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
2888
|
|
|
|
|
|
|
|
2889
|
9
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_TYPE_NAME(env, stack, "); |
2890
|
9
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand_address(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_OBJECT, opcode->operand0); |
2891
|
9
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " , object);\n"); |
2892
|
9
|
|
|
|
|
|
break; |
2893
|
|
|
|
|
|
|
} |
2894
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_DUMP: { |
2895
|
19
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " object = "); |
2896
|
19
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_OBJECT, opcode->operand1); |
2897
|
19
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
2898
|
|
|
|
|
|
|
|
2899
|
19
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_DUMP(env, stack, "); |
2900
|
19
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand_address(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_OBJECT, opcode->operand0); |
2901
|
19
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", object);\n"); |
2902
|
19
|
|
|
|
|
|
break; |
2903
|
|
|
|
|
|
|
} |
2904
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_COPY: { |
2905
|
31
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " object = "); |
2906
|
31
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_OBJECT, opcode->operand1); |
2907
|
31
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
2908
|
|
|
|
|
|
|
|
2909
|
31
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_COPY(env, stack, "); |
2910
|
31
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand_address(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_OBJECT, opcode->operand0); |
2911
|
31
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", object, &error_id);\n"); |
2912
|
31
|
|
|
|
|
|
break; |
2913
|
|
|
|
|
|
|
} |
2914
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_REF_BYTE: { |
2915
|
34
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_REF_BYTE(*(void**)"); |
2916
|
34
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand_address(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_REF, opcode->operand0); |
2917
|
34
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
2918
|
34
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand_address(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_BYTE, opcode->operand1); |
2919
|
34
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
2920
|
34
|
|
|
|
|
|
break; |
2921
|
|
|
|
|
|
|
} |
2922
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_REF_SHORT: { |
2923
|
32
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_REF_SHORT(*(void**)"); |
2924
|
32
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand_address(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_REF, opcode->operand0); |
2925
|
32
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
2926
|
32
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand_address(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_SHORT, opcode->operand1); |
2927
|
32
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
2928
|
32
|
|
|
|
|
|
break; |
2929
|
|
|
|
|
|
|
} |
2930
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_REF_INT: { |
2931
|
72
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_REF_INT(*(void**)"); |
2932
|
72
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand_address(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_REF, opcode->operand0); |
2933
|
72
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
2934
|
72
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand_address(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand1); |
2935
|
72
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
2936
|
72
|
|
|
|
|
|
break; |
2937
|
|
|
|
|
|
|
} |
2938
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_REF_LONG: { |
2939
|
32
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_REF_LONG(*(void**)"); |
2940
|
32
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand_address(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_REF, opcode->operand0); |
2941
|
32
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
2942
|
32
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand_address(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_LONG, opcode->operand1); |
2943
|
32
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
2944
|
32
|
|
|
|
|
|
break; |
2945
|
|
|
|
|
|
|
} |
2946
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_REF_FLOAT: { |
2947
|
32
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_REF_FLOAT(*(void**)"); |
2948
|
32
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand_address(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_REF, opcode->operand0); |
2949
|
32
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
2950
|
32
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand_address(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_FLOAT, opcode->operand1); |
2951
|
32
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
2952
|
32
|
|
|
|
|
|
break; |
2953
|
|
|
|
|
|
|
} |
2954
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_REF_DOUBLE: { |
2955
|
33
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_REF_DOUBLE(*(void**)"); |
2956
|
33
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand_address(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_REF, opcode->operand0); |
2957
|
33
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
2958
|
33
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand_address(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_DOUBLE, opcode->operand1); |
2959
|
33
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
2960
|
33
|
|
|
|
|
|
break; |
2961
|
|
|
|
|
|
|
} |
2962
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_GET_DEREF_BYTE: { |
2963
|
36
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_GET_DEREF_BYTE("); |
2964
|
36
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_BYTE, opcode->operand0); |
2965
|
36
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
2966
|
36
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand_address(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_REF, opcode->operand1); |
2967
|
36
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
2968
|
36
|
|
|
|
|
|
break; |
2969
|
|
|
|
|
|
|
} |
2970
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_GET_DEREF_SHORT: { |
2971
|
35
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_GET_DEREF_SHORT("); |
2972
|
35
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_SHORT, opcode->operand0); |
2973
|
35
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
2974
|
35
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand_address(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_REF, opcode->operand1); |
2975
|
35
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
2976
|
35
|
|
|
|
|
|
break; |
2977
|
|
|
|
|
|
|
} |
2978
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_GET_DEREF_INT: { |
2979
|
49
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_GET_DEREF_INT("); |
2980
|
49
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand0); |
2981
|
49
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
2982
|
49
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand_address(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_REF, opcode->operand1); |
2983
|
49
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
2984
|
49
|
|
|
|
|
|
break; |
2985
|
|
|
|
|
|
|
} |
2986
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_GET_DEREF_LONG: { |
2987
|
35
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_GET_DEREF_LONG("); |
2988
|
35
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_LONG, opcode->operand0); |
2989
|
35
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
2990
|
35
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand_address(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_REF, opcode->operand1); |
2991
|
35
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
2992
|
35
|
|
|
|
|
|
break; |
2993
|
|
|
|
|
|
|
} |
2994
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_GET_DEREF_FLOAT: { |
2995
|
35
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_GET_DEREF_FLOAT("); |
2996
|
35
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_FLOAT, opcode->operand0); |
2997
|
35
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
2998
|
35
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand_address(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_REF, opcode->operand1); |
2999
|
35
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
3000
|
35
|
|
|
|
|
|
break; |
3001
|
|
|
|
|
|
|
} |
3002
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_GET_DEREF_DOUBLE: { |
3003
|
36
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_GET_DEREF_DOUBLE("); |
3004
|
36
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_DOUBLE, opcode->operand0); |
3005
|
36
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
3006
|
36
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand_address(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_REF, opcode->operand1); |
3007
|
36
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
3008
|
36
|
|
|
|
|
|
break; |
3009
|
|
|
|
|
|
|
} |
3010
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_SET_DEREF_BYTE: { |
3011
|
9
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_SET_DEREF_BYTE("); |
3012
|
9
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand_address(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_REF, opcode->operand0); |
3013
|
9
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
3014
|
9
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_BYTE, opcode->operand1); |
3015
|
9
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
3016
|
9
|
|
|
|
|
|
break; |
3017
|
|
|
|
|
|
|
} |
3018
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_SET_DEREF_SHORT: { |
3019
|
9
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_SET_DEREF_SHORT("); |
3020
|
9
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand_address(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_REF, opcode->operand0); |
3021
|
9
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
3022
|
9
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_SHORT, opcode->operand1); |
3023
|
9
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
3024
|
9
|
|
|
|
|
|
break; |
3025
|
|
|
|
|
|
|
} |
3026
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_SET_DEREF_INT: { |
3027
|
15
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_SET_DEREF_INT("); |
3028
|
15
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand_address(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_REF, opcode->operand0); |
3029
|
15
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
3030
|
15
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand1); |
3031
|
15
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
3032
|
15
|
|
|
|
|
|
break; |
3033
|
|
|
|
|
|
|
} |
3034
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_SET_DEREF_LONG: { |
3035
|
9
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_SET_DEREF_LONG("); |
3036
|
9
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand_address(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_REF, opcode->operand0); |
3037
|
9
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
3038
|
9
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_LONG, opcode->operand1); |
3039
|
9
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
3040
|
9
|
|
|
|
|
|
break; |
3041
|
|
|
|
|
|
|
} |
3042
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_SET_DEREF_FLOAT: { |
3043
|
9
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_SET_DEREF_FLOAT("); |
3044
|
9
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand_address(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_REF, opcode->operand0); |
3045
|
9
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
3046
|
9
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_FLOAT, opcode->operand1); |
3047
|
9
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
3048
|
9
|
|
|
|
|
|
break; |
3049
|
|
|
|
|
|
|
} |
3050
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_SET_DEREF_DOUBLE: { |
3051
|
9
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_SET_DEREF_DOUBLE("); |
3052
|
9
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand_address(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_REF, opcode->operand0); |
3053
|
9
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
3054
|
9
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_DOUBLE, opcode->operand1); |
3055
|
9
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
3056
|
9
|
|
|
|
|
|
break; |
3057
|
|
|
|
|
|
|
} |
3058
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_GET_MULNUM_FIELD_BYTE: { |
3059
|
89
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " field_index = "); |
3060
|
89
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_int(string_buffer, opcode->operand2); |
3061
|
89
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
3062
|
|
|
|
|
|
|
|
3063
|
89
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_GET_MULNUM_FIELD_BYTE("); |
3064
|
89
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_BYTE, opcode->operand0); |
3065
|
89
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
3066
|
89
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand_address(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_BYTE, opcode->operand1); |
3067
|
89
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", field_index);\n"); |
3068
|
89
|
|
|
|
|
|
break; |
3069
|
|
|
|
|
|
|
} |
3070
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_GET_MULNUM_FIELD_SHORT: { |
3071
|
85
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " field_index = "); |
3072
|
85
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_int(string_buffer, opcode->operand2); |
3073
|
85
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
3074
|
|
|
|
|
|
|
|
3075
|
85
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_GET_MULNUM_FIELD_SHORT("); |
3076
|
85
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_SHORT, opcode->operand0); |
3077
|
85
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
3078
|
85
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand_address(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_SHORT, opcode->operand1); |
3079
|
85
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", field_index);\n"); |
3080
|
85
|
|
|
|
|
|
break; |
3081
|
|
|
|
|
|
|
} |
3082
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_GET_MULNUM_FIELD_INT: { |
3083
|
85
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " field_index = "); |
3084
|
85
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_int(string_buffer, opcode->operand2); |
3085
|
85
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
3086
|
|
|
|
|
|
|
|
3087
|
85
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_GET_MULNUM_FIELD_INT("); |
3088
|
85
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand0); |
3089
|
85
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
3090
|
85
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand_address(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand1); |
3091
|
85
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", field_index);\n"); |
3092
|
85
|
|
|
|
|
|
break; |
3093
|
|
|
|
|
|
|
} |
3094
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_GET_MULNUM_FIELD_LONG: { |
3095
|
85
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " field_index = "); |
3096
|
85
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_int(string_buffer, opcode->operand2); |
3097
|
85
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
3098
|
|
|
|
|
|
|
|
3099
|
85
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_GET_MULNUM_FIELD_LONG("); |
3100
|
85
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_LONG, opcode->operand0); |
3101
|
85
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
3102
|
85
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand_address(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_LONG, opcode->operand1); |
3103
|
85
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", field_index);\n"); |
3104
|
85
|
|
|
|
|
|
break; |
3105
|
|
|
|
|
|
|
} |
3106
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_GET_MULNUM_FIELD_FLOAT: { |
3107
|
85
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " field_index = "); |
3108
|
85
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_int(string_buffer, opcode->operand2); |
3109
|
85
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
3110
|
|
|
|
|
|
|
|
3111
|
85
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_GET_MULNUM_FIELD_FLOAT("); |
3112
|
85
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_FLOAT, opcode->operand0); |
3113
|
85
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
3114
|
85
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand_address(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_FLOAT, opcode->operand1); |
3115
|
85
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", field_index);\n"); |
3116
|
85
|
|
|
|
|
|
break; |
3117
|
|
|
|
|
|
|
} |
3118
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_GET_MULNUM_FIELD_DOUBLE: { |
3119
|
92
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " field_index = "); |
3120
|
92
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_int(string_buffer, opcode->operand2); |
3121
|
92
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
3122
|
|
|
|
|
|
|
|
3123
|
92
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_GET_MULNUM_FIELD_DOUBLE("); |
3124
|
92
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_DOUBLE, opcode->operand0); |
3125
|
92
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
3126
|
92
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand_address(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_DOUBLE, opcode->operand1); |
3127
|
92
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", field_index);\n"); |
3128
|
92
|
|
|
|
|
|
break; |
3129
|
|
|
|
|
|
|
} |
3130
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_SET_MULNUM_FIELD_BYTE: { |
3131
|
79
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " field_index = "); |
3132
|
79
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_int(string_buffer, opcode->operand2); |
3133
|
79
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
3134
|
|
|
|
|
|
|
|
3135
|
79
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_SET_MULNUM_FIELD_BYTE("); |
3136
|
79
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand_address(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_BYTE, opcode->operand0); |
3137
|
79
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", field_index, "); |
3138
|
79
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_BYTE, opcode->operand1); |
3139
|
79
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
3140
|
79
|
|
|
|
|
|
break; |
3141
|
|
|
|
|
|
|
} |
3142
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_SET_MULNUM_FIELD_SHORT: { |
3143
|
77
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " field_index = "); |
3144
|
77
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_int(string_buffer, opcode->operand2); |
3145
|
77
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
3146
|
|
|
|
|
|
|
|
3147
|
77
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_SET_MULNUM_FIELD_SHORT("); |
3148
|
77
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand_address(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_SHORT, opcode->operand0); |
3149
|
77
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", field_index, "); |
3150
|
77
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_SHORT, opcode->operand1); |
3151
|
77
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
3152
|
77
|
|
|
|
|
|
break; |
3153
|
|
|
|
|
|
|
} |
3154
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_SET_MULNUM_FIELD_INT: { |
3155
|
77
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " field_index = "); |
3156
|
77
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_int(string_buffer, opcode->operand2); |
3157
|
77
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
3158
|
|
|
|
|
|
|
|
3159
|
77
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_SET_MULNUM_FIELD_INT("); |
3160
|
77
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand_address(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand0); |
3161
|
77
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", field_index, "); |
3162
|
77
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand1); |
3163
|
77
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
3164
|
77
|
|
|
|
|
|
break; |
3165
|
|
|
|
|
|
|
} |
3166
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_SET_MULNUM_FIELD_LONG: { |
3167
|
77
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " field_index = "); |
3168
|
77
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_int(string_buffer, opcode->operand2); |
3169
|
77
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
3170
|
|
|
|
|
|
|
|
3171
|
77
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_SET_MULNUM_FIELD_LONG("); |
3172
|
77
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand_address(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_LONG, opcode->operand0); |
3173
|
77
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", field_index, "); |
3174
|
77
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_LONG, opcode->operand1); |
3175
|
77
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
3176
|
77
|
|
|
|
|
|
break; |
3177
|
|
|
|
|
|
|
} |
3178
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_SET_MULNUM_FIELD_FLOAT: { |
3179
|
74
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " field_index = "); |
3180
|
74
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_int(string_buffer, opcode->operand2); |
3181
|
74
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
3182
|
|
|
|
|
|
|
|
3183
|
74
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_SET_MULNUM_FIELD_FLOAT("); |
3184
|
74
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand_address(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_FLOAT, opcode->operand0); |
3185
|
74
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", field_index, "); |
3186
|
74
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_FLOAT, opcode->operand1); |
3187
|
74
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
3188
|
74
|
|
|
|
|
|
break; |
3189
|
|
|
|
|
|
|
} |
3190
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_SET_MULNUM_FIELD_DOUBLE: { |
3191
|
79
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " field_index = "); |
3192
|
79
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_int(string_buffer, opcode->operand2); |
3193
|
79
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
3194
|
|
|
|
|
|
|
|
3195
|
79
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_SET_MULNUM_FIELD_DOUBLE("); |
3196
|
79
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand_address(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_DOUBLE, opcode->operand0); |
3197
|
79
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", field_index, "); |
3198
|
79
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_DOUBLE, opcode->operand1); |
3199
|
79
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
3200
|
79
|
|
|
|
|
|
break; |
3201
|
|
|
|
|
|
|
} |
3202
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_MOVE_MULNUM_BYTE: { |
3203
|
0
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " fields_length = "); |
3204
|
0
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_int(string_buffer, opcode->operand2); |
3205
|
0
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
3206
|
|
|
|
|
|
|
|
3207
|
0
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_MOVE_MULNUM_BYTE(env, stack, "); |
3208
|
0
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand_address(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_BYTE, opcode->operand0); |
3209
|
0
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
3210
|
0
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand_address(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_BYTE, opcode->operand1); |
3211
|
0
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", fields_length);\n"); |
3212
|
0
|
|
|
|
|
|
break; |
3213
|
|
|
|
|
|
|
} |
3214
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_MOVE_MULNUM_SHORT: { |
3215
|
0
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " fields_length = "); |
3216
|
0
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_int(string_buffer, opcode->operand2); |
3217
|
0
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
3218
|
|
|
|
|
|
|
|
3219
|
0
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_MOVE_MULNUM_SHORT(env, stack, "); |
3220
|
0
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand_address(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_SHORT, opcode->operand0); |
3221
|
0
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
3222
|
0
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand_address(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_SHORT, opcode->operand1); |
3223
|
0
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", fields_length);\n"); |
3224
|
0
|
|
|
|
|
|
break; |
3225
|
|
|
|
|
|
|
} |
3226
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_MOVE_MULNUM_INT: { |
3227
|
0
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " fields_length = "); |
3228
|
0
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_int(string_buffer, opcode->operand2); |
3229
|
0
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
3230
|
|
|
|
|
|
|
|
3231
|
0
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_MOVE_MULNUM_INT(env, stack, "); |
3232
|
0
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand_address(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand0); |
3233
|
0
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
3234
|
0
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand_address(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand1); |
3235
|
0
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", fields_length);\n"); |
3236
|
0
|
|
|
|
|
|
break; |
3237
|
|
|
|
|
|
|
} |
3238
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_MOVE_MULNUM_LONG: { |
3239
|
0
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " fields_length = "); |
3240
|
0
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_int(string_buffer, opcode->operand2); |
3241
|
0
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
3242
|
|
|
|
|
|
|
|
3243
|
0
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_MOVE_MULNUM_LONG(env, stack, "); |
3244
|
0
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand_address(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_LONG, opcode->operand0); |
3245
|
0
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
3246
|
0
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand_address(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_LONG, opcode->operand1); |
3247
|
0
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", fields_length);\n"); |
3248
|
0
|
|
|
|
|
|
break; |
3249
|
|
|
|
|
|
|
} |
3250
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_MOVE_MULNUM_FLOAT: { |
3251
|
0
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " fields_length = "); |
3252
|
0
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_int(string_buffer, opcode->operand2); |
3253
|
0
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
3254
|
|
|
|
|
|
|
|
3255
|
0
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_MOVE_MULNUM_FLOAT(env, stack, "); |
3256
|
0
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand_address(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_FLOAT, opcode->operand0); |
3257
|
0
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
3258
|
0
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand_address(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_FLOAT, opcode->operand1); |
3259
|
0
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", fields_length);\n"); |
3260
|
0
|
|
|
|
|
|
break; |
3261
|
|
|
|
|
|
|
} |
3262
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_MOVE_MULNUM_DOUBLE: { |
3263
|
3
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " fields_length = "); |
3264
|
3
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_int(string_buffer, opcode->operand2); |
3265
|
3
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
3266
|
|
|
|
|
|
|
|
3267
|
3
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_MOVE_MULNUM_DOUBLE(env, stack, "); |
3268
|
3
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand_address(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_DOUBLE, opcode->operand0); |
3269
|
3
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
3270
|
3
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand_address(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_DOUBLE, opcode->operand1); |
3271
|
3
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", fields_length);\n"); |
3272
|
3
|
|
|
|
|
|
break; |
3273
|
|
|
|
|
|
|
} |
3274
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_GET_MULNUM_ARRAY_BYTE: { |
3275
|
1
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " array = "); |
3276
|
1
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_OBJECT, opcode->operand1); |
3277
|
1
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
3278
|
|
|
|
|
|
|
|
3279
|
1
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " index = "); |
3280
|
1
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand2); |
3281
|
1
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
3282
|
|
|
|
|
|
|
|
3283
|
1
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " fields_length = "); |
3284
|
1
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_int(string_buffer, opcode->operand3); |
3285
|
1
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
3286
|
|
|
|
|
|
|
|
3287
|
1
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_GET_MULNUM_ARRAY_BYTE(env, stack, "); |
3288
|
1
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand_address(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_BYTE, opcode->operand0); |
3289
|
1
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", array, index, fields_length, &error_id, object_header_size, object_length_offset);\n"); |
3290
|
|
|
|
|
|
|
|
3291
|
1
|
|
|
|
|
|
break; |
3292
|
|
|
|
|
|
|
} |
3293
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_GET_MULNUM_ARRAY_SHORT: { |
3294
|
1
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " array = "); |
3295
|
1
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_OBJECT, opcode->operand1); |
3296
|
1
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
3297
|
|
|
|
|
|
|
|
3298
|
1
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " index = "); |
3299
|
1
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand2); |
3300
|
1
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
3301
|
|
|
|
|
|
|
|
3302
|
1
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " fields_length = "); |
3303
|
1
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_int(string_buffer, opcode->operand3); |
3304
|
1
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
3305
|
|
|
|
|
|
|
|
3306
|
1
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_GET_MULNUM_ARRAY_SHORT(env, stack, "); |
3307
|
1
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand_address(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_SHORT, opcode->operand0); |
3308
|
1
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", array, index, fields_length, &error_id, object_header_size, object_length_offset);\n"); |
3309
|
1
|
|
|
|
|
|
break; |
3310
|
|
|
|
|
|
|
} |
3311
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_GET_MULNUM_ARRAY_INT: { |
3312
|
1
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " array = "); |
3313
|
1
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_OBJECT, opcode->operand1); |
3314
|
1
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
3315
|
|
|
|
|
|
|
|
3316
|
1
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " index = "); |
3317
|
1
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand2); |
3318
|
1
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
3319
|
|
|
|
|
|
|
|
3320
|
1
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " fields_length = "); |
3321
|
1
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_int(string_buffer, opcode->operand3); |
3322
|
1
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
3323
|
|
|
|
|
|
|
|
3324
|
1
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_GET_MULNUM_ARRAY_INT(env, stack, "); |
3325
|
1
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand_address(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand0); |
3326
|
1
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", array, index, fields_length, &error_id, object_header_size, object_length_offset);\n"); |
3327
|
1
|
|
|
|
|
|
break; |
3328
|
|
|
|
|
|
|
} |
3329
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_GET_MULNUM_ARRAY_LONG: { |
3330
|
1
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " array = "); |
3331
|
1
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_OBJECT, opcode->operand1); |
3332
|
1
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
3333
|
|
|
|
|
|
|
|
3334
|
1
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " index = "); |
3335
|
1
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand2); |
3336
|
1
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
3337
|
|
|
|
|
|
|
|
3338
|
1
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " fields_length = "); |
3339
|
1
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_int(string_buffer, opcode->operand3); |
3340
|
1
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
3341
|
|
|
|
|
|
|
|
3342
|
1
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_GET_MULNUM_ARRAY_LONG(env, stack, "); |
3343
|
1
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand_address(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_LONG, opcode->operand0); |
3344
|
1
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", array, index, fields_length, &error_id, object_header_size, object_length_offset);\n"); |
3345
|
1
|
|
|
|
|
|
break; |
3346
|
|
|
|
|
|
|
} |
3347
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_GET_MULNUM_ARRAY_FLOAT: { |
3348
|
1
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " array = "); |
3349
|
1
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_OBJECT, opcode->operand1); |
3350
|
1
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
3351
|
|
|
|
|
|
|
|
3352
|
1
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " index = "); |
3353
|
1
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand2); |
3354
|
1
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
3355
|
|
|
|
|
|
|
|
3356
|
1
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " fields_length = "); |
3357
|
1
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_int(string_buffer, opcode->operand3); |
3358
|
1
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
3359
|
|
|
|
|
|
|
|
3360
|
1
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_GET_MULNUM_ARRAY_FLOAT(env, stack, "); |
3361
|
1
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand_address(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_FLOAT, opcode->operand0); |
3362
|
1
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", array, index, fields_length, &error_id, object_header_size, object_length_offset);\n"); |
3363
|
1
|
|
|
|
|
|
break; |
3364
|
|
|
|
|
|
|
} |
3365
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_GET_MULNUM_ARRAY_DOUBLE: { |
3366
|
1
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " array = "); |
3367
|
1
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_OBJECT, opcode->operand1); |
3368
|
1
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
3369
|
|
|
|
|
|
|
|
3370
|
1
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " index = "); |
3371
|
1
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand2); |
3372
|
1
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
3373
|
|
|
|
|
|
|
|
3374
|
1
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " fields_length = "); |
3375
|
1
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_int(string_buffer, opcode->operand3); |
3376
|
1
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
3377
|
|
|
|
|
|
|
|
3378
|
1
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_GET_MULNUM_ARRAY_DOUBLE(env, stack, "); |
3379
|
1
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand_address(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_DOUBLE, opcode->operand0); |
3380
|
1
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", array, index, fields_length, &error_id, object_header_size, object_length_offset);\n"); |
3381
|
1
|
|
|
|
|
|
break; |
3382
|
|
|
|
|
|
|
} |
3383
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_SET_MULNUM_ARRAY_BYTE: { |
3384
|
1
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " array = "); |
3385
|
1
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_OBJECT, opcode->operand0); |
3386
|
1
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
3387
|
|
|
|
|
|
|
|
3388
|
1
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " index = "); |
3389
|
1
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand1); |
3390
|
1
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
3391
|
|
|
|
|
|
|
|
3392
|
1
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " fields_length = "); |
3393
|
1
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_int(string_buffer, opcode->operand3); |
3394
|
1
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
3395
|
|
|
|
|
|
|
|
3396
|
1
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_SET_MULNUM_ARRAY_BYTE(env, stack, array, index, fields_length, "); |
3397
|
1
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand_address(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_BYTE, opcode->operand2); |
3398
|
1
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", &error_id, object_header_size, object_length_offset);\n"); |
3399
|
1
|
|
|
|
|
|
break; |
3400
|
|
|
|
|
|
|
} |
3401
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_SET_MULNUM_ARRAY_SHORT: { |
3402
|
1
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " array = "); |
3403
|
1
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_OBJECT, opcode->operand0); |
3404
|
1
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
3405
|
|
|
|
|
|
|
|
3406
|
1
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " index = "); |
3407
|
1
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand1); |
3408
|
1
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
3409
|
|
|
|
|
|
|
|
3410
|
1
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " fields_length = "); |
3411
|
1
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_int(string_buffer, opcode->operand3); |
3412
|
1
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
3413
|
|
|
|
|
|
|
|
3414
|
1
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_SET_MULNUM_ARRAY_SHORT(env, stack, array, index, fields_length, "); |
3415
|
1
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand_address(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_SHORT, opcode->operand2); |
3416
|
1
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", &error_id, object_header_size, object_length_offset);\n"); |
3417
|
1
|
|
|
|
|
|
break; |
3418
|
|
|
|
|
|
|
} |
3419
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_SET_MULNUM_ARRAY_INT: { |
3420
|
1
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " array = "); |
3421
|
1
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_OBJECT, opcode->operand0); |
3422
|
1
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
3423
|
|
|
|
|
|
|
|
3424
|
1
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " index = "); |
3425
|
1
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand1); |
3426
|
1
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
3427
|
|
|
|
|
|
|
|
3428
|
1
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " fields_length = "); |
3429
|
1
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_int(string_buffer, opcode->operand3); |
3430
|
1
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
3431
|
|
|
|
|
|
|
|
3432
|
1
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_SET_MULNUM_ARRAY_INT(env, stack, array, index, fields_length, "); |
3433
|
1
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand_address(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand2); |
3434
|
1
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", &error_id, object_header_size, object_length_offset);\n"); |
3435
|
1
|
|
|
|
|
|
break; |
3436
|
|
|
|
|
|
|
} |
3437
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_SET_MULNUM_ARRAY_LONG: { |
3438
|
1
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " array = "); |
3439
|
1
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_OBJECT, opcode->operand0); |
3440
|
1
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
3441
|
|
|
|
|
|
|
|
3442
|
1
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " index = "); |
3443
|
1
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand1); |
3444
|
1
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
3445
|
|
|
|
|
|
|
|
3446
|
1
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " fields_length = "); |
3447
|
1
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_int(string_buffer, opcode->operand3); |
3448
|
1
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
3449
|
|
|
|
|
|
|
|
3450
|
1
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_SET_MULNUM_ARRAY_LONG(env, stack, array, index, fields_length, "); |
3451
|
1
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand_address(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_LONG, opcode->operand2); |
3452
|
1
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", &error_id, object_header_size, object_length_offset);\n"); |
3453
|
1
|
|
|
|
|
|
break; |
3454
|
|
|
|
|
|
|
} |
3455
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_SET_MULNUM_ARRAY_FLOAT: { |
3456
|
1
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " array = "); |
3457
|
1
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_OBJECT, opcode->operand0); |
3458
|
1
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
3459
|
|
|
|
|
|
|
|
3460
|
1
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " index = "); |
3461
|
1
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand1); |
3462
|
1
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
3463
|
|
|
|
|
|
|
|
3464
|
1
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " fields_length = "); |
3465
|
1
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_int(string_buffer, opcode->operand3); |
3466
|
1
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
3467
|
|
|
|
|
|
|
|
3468
|
1
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_SET_MULNUM_ARRAY_FLOAT(env, stack, array, index, fields_length, "); |
3469
|
1
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand_address(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_FLOAT, opcode->operand2); |
3470
|
1
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", &error_id, object_header_size, object_length_offset);\n"); |
3471
|
1
|
|
|
|
|
|
break; |
3472
|
|
|
|
|
|
|
} |
3473
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_SET_MULNUM_ARRAY_DOUBLE: { |
3474
|
1
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " array = "); |
3475
|
1
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_OBJECT, opcode->operand0); |
3476
|
1
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
3477
|
|
|
|
|
|
|
|
3478
|
1
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " index = "); |
3479
|
1
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand1); |
3480
|
1
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
3481
|
|
|
|
|
|
|
|
3482
|
1
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " fields_length = "); |
3483
|
1
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_int(string_buffer, opcode->operand3); |
3484
|
1
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
3485
|
|
|
|
|
|
|
|
3486
|
1
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_SET_MULNUM_ARRAY_DOUBLE(env, stack, array, index, fields_length, "); |
3487
|
1
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand_address(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_DOUBLE, opcode->operand2); |
3488
|
1
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", &error_id, object_header_size, object_length_offset);\n"); |
3489
|
1
|
|
|
|
|
|
break; |
3490
|
|
|
|
|
|
|
} |
3491
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_GET_MULNUM_ARRAY_FIELD_BYTE: { |
3492
|
103
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " array = "); |
3493
|
103
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_OBJECT, opcode->operand1); |
3494
|
103
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
3495
|
|
|
|
|
|
|
|
3496
|
103
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " index = "); |
3497
|
103
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand2); |
3498
|
103
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
3499
|
|
|
|
|
|
|
|
3500
|
103
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " fields_length = "); |
3501
|
103
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_int(string_buffer, (opcode->operand3 & 0xFF) + 1); |
3502
|
103
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
3503
|
|
|
|
|
|
|
|
3504
|
103
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " field_index = "); |
3505
|
103
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_int(string_buffer, opcode->operand3 >> 8); |
3506
|
103
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
3507
|
|
|
|
|
|
|
|
3508
|
103
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_GET_MULNUM_ARRAY_FIELD_BYTE(env, stack, "); |
3509
|
103
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand_address(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_BYTE, opcode->operand0); |
3510
|
103
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", array, index, field_index, fields_length, &error_id, object_header_size, object_length_offset);\n"); |
3511
|
103
|
|
|
|
|
|
break; |
3512
|
|
|
|
|
|
|
} |
3513
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_GET_MULNUM_ARRAY_FIELD_SHORT: { |
3514
|
103
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " array = "); |
3515
|
103
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_OBJECT, opcode->operand1); |
3516
|
103
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
3517
|
|
|
|
|
|
|
|
3518
|
103
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " index = "); |
3519
|
103
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand2); |
3520
|
103
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
3521
|
|
|
|
|
|
|
|
3522
|
103
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " fields_length = "); |
3523
|
103
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_int(string_buffer, (opcode->operand3 & 0xFF) + 1); |
3524
|
103
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
3525
|
|
|
|
|
|
|
|
3526
|
103
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " field_index = "); |
3527
|
103
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_int(string_buffer, opcode->operand3 >> 8); |
3528
|
103
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
3529
|
|
|
|
|
|
|
|
3530
|
103
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_GET_MULNUM_ARRAY_FIELD_SHORT(env, stack, "); |
3531
|
103
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand_address(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_SHORT, opcode->operand0); |
3532
|
103
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", array, index, field_index, fields_length, &error_id, object_header_size, object_length_offset);\n"); |
3533
|
103
|
|
|
|
|
|
break; |
3534
|
|
|
|
|
|
|
} |
3535
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_GET_MULNUM_ARRAY_FIELD_INT: { |
3536
|
119
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " array = "); |
3537
|
119
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_OBJECT, opcode->operand1); |
3538
|
119
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
3539
|
|
|
|
|
|
|
|
3540
|
119
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " index = "); |
3541
|
119
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand2); |
3542
|
119
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
3543
|
|
|
|
|
|
|
|
3544
|
119
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " fields_length = "); |
3545
|
119
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_int(string_buffer, (opcode->operand3 & 0xFF) + 1); |
3546
|
119
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
3547
|
|
|
|
|
|
|
|
3548
|
119
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " field_index = "); |
3549
|
119
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_int(string_buffer, opcode->operand3 >> 8); |
3550
|
119
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
3551
|
|
|
|
|
|
|
|
3552
|
119
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_GET_MULNUM_ARRAY_FIELD_INT(env, stack, "); |
3553
|
119
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand_address(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand0); |
3554
|
119
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", array, index, field_index, fields_length, &error_id, object_header_size, object_length_offset);\n"); |
3555
|
119
|
|
|
|
|
|
break; |
3556
|
|
|
|
|
|
|
} |
3557
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_GET_MULNUM_ARRAY_FIELD_LONG: { |
3558
|
103
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " array = "); |
3559
|
103
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_OBJECT, opcode->operand1); |
3560
|
103
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
3561
|
|
|
|
|
|
|
|
3562
|
103
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " index = "); |
3563
|
103
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand2); |
3564
|
103
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
3565
|
|
|
|
|
|
|
|
3566
|
103
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " fields_length = "); |
3567
|
103
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_int(string_buffer, (opcode->operand3 & 0xFF) + 1); |
3568
|
103
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
3569
|
|
|
|
|
|
|
|
3570
|
103
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " field_index = "); |
3571
|
103
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_int(string_buffer, opcode->operand3 >> 8); |
3572
|
103
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
3573
|
|
|
|
|
|
|
|
3574
|
103
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_GET_MULNUM_ARRAY_FIELD_LONG(env, stack, "); |
3575
|
103
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand_address(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_LONG, opcode->operand0); |
3576
|
103
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", array, index, field_index, fields_length, &error_id, object_header_size, object_length_offset);\n"); |
3577
|
103
|
|
|
|
|
|
break; |
3578
|
|
|
|
|
|
|
} |
3579
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_GET_MULNUM_ARRAY_FIELD_FLOAT: { |
3580
|
103
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " array = "); |
3581
|
103
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_OBJECT, opcode->operand1); |
3582
|
103
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
3583
|
|
|
|
|
|
|
|
3584
|
103
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " index = "); |
3585
|
103
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand2); |
3586
|
103
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
3587
|
|
|
|
|
|
|
|
3588
|
103
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " fields_length = "); |
3589
|
103
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_int(string_buffer, (opcode->operand3 & 0xFF) + 1); |
3590
|
103
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
3591
|
|
|
|
|
|
|
|
3592
|
103
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " field_index = "); |
3593
|
103
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_int(string_buffer, opcode->operand3 >> 8); |
3594
|
103
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
3595
|
|
|
|
|
|
|
|
3596
|
103
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_GET_MULNUM_ARRAY_FIELD_FLOAT(env, stack, "); |
3597
|
103
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand_address(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_FLOAT, opcode->operand0); |
3598
|
103
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", array, index, field_index, fields_length, &error_id, object_header_size, object_length_offset);\n"); |
3599
|
103
|
|
|
|
|
|
break; |
3600
|
|
|
|
|
|
|
} |
3601
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_GET_MULNUM_ARRAY_FIELD_DOUBLE: { |
3602
|
120
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " array = "); |
3603
|
120
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_OBJECT, opcode->operand1); |
3604
|
120
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
3605
|
|
|
|
|
|
|
|
3606
|
120
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " index = "); |
3607
|
120
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand2); |
3608
|
120
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
3609
|
|
|
|
|
|
|
|
3610
|
120
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " fields_length = "); |
3611
|
120
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_int(string_buffer, (opcode->operand3 & 0xFF) + 1); |
3612
|
120
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
3613
|
|
|
|
|
|
|
|
3614
|
120
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " field_index = "); |
3615
|
120
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_int(string_buffer, opcode->operand3 >> 8); |
3616
|
120
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
3617
|
|
|
|
|
|
|
|
3618
|
120
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_GET_MULNUM_ARRAY_FIELD_DOUBLE(env, stack, "); |
3619
|
120
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand_address(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_DOUBLE, opcode->operand0); |
3620
|
120
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", array, index, field_index, fields_length, &error_id, object_header_size, object_length_offset);\n"); |
3621
|
120
|
|
|
|
|
|
break; |
3622
|
|
|
|
|
|
|
} |
3623
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_SET_MULNUM_ARRAY_FIELD_BYTE: { |
3624
|
73
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " array = "); |
3625
|
73
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_OBJECT, opcode->operand0); |
3626
|
73
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
3627
|
|
|
|
|
|
|
|
3628
|
73
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " index = "); |
3629
|
73
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand1); |
3630
|
73
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
3631
|
|
|
|
|
|
|
|
3632
|
73
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " fields_length = "); |
3633
|
73
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_int(string_buffer, (opcode->operand3 & 0xFF) + 1); |
3634
|
73
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
3635
|
|
|
|
|
|
|
|
3636
|
73
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " field_index = "); |
3637
|
73
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_int(string_buffer, opcode->operand3 >> 8); |
3638
|
73
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
3639
|
|
|
|
|
|
|
|
3640
|
73
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_SET_MULNUM_ARRAY_FIELD_BYTE(env, stack, array, index, field_index, fields_length, "); |
3641
|
73
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_BYTE, opcode->operand2); |
3642
|
73
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", &error_id, object_header_size, object_length_offset);"); |
3643
|
73
|
|
|
|
|
|
break; |
3644
|
|
|
|
|
|
|
} |
3645
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_SET_MULNUM_ARRAY_FIELD_SHORT: { |
3646
|
73
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " array = "); |
3647
|
73
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_OBJECT, opcode->operand0); |
3648
|
73
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
3649
|
|
|
|
|
|
|
|
3650
|
73
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " index = "); |
3651
|
73
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand1); |
3652
|
73
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
3653
|
|
|
|
|
|
|
|
3654
|
73
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " fields_length = "); |
3655
|
73
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_int(string_buffer, (opcode->operand3 & 0xFF) + 1); |
3656
|
73
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
3657
|
|
|
|
|
|
|
|
3658
|
73
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " field_index = "); |
3659
|
73
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_int(string_buffer, opcode->operand3 >> 8); |
3660
|
73
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
3661
|
|
|
|
|
|
|
|
3662
|
73
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_SET_MULNUM_ARRAY_FIELD_SHORT(env, stack, array, index, field_index, fields_length, "); |
3663
|
73
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_SHORT, opcode->operand2); |
3664
|
73
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", &error_id, object_header_size, object_length_offset);"); |
3665
|
73
|
|
|
|
|
|
break; |
3666
|
|
|
|
|
|
|
} |
3667
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_SET_MULNUM_ARRAY_FIELD_INT: { |
3668
|
82
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " array = "); |
3669
|
82
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_OBJECT, opcode->operand0); |
3670
|
82
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
3671
|
|
|
|
|
|
|
|
3672
|
82
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " index = "); |
3673
|
82
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand1); |
3674
|
82
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
3675
|
|
|
|
|
|
|
|
3676
|
82
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " fields_length = "); |
3677
|
82
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_int(string_buffer, (opcode->operand3 & 0xFF) + 1); |
3678
|
82
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
3679
|
|
|
|
|
|
|
|
3680
|
82
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " field_index = "); |
3681
|
82
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_int(string_buffer, opcode->operand3 >> 8); |
3682
|
82
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
3683
|
|
|
|
|
|
|
|
3684
|
82
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_SET_MULNUM_ARRAY_FIELD_INT(env, stack, array, index, field_index, fields_length, "); |
3685
|
82
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand2); |
3686
|
82
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", &error_id, object_header_size, object_length_offset);"); |
3687
|
82
|
|
|
|
|
|
break; |
3688
|
|
|
|
|
|
|
} |
3689
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_SET_MULNUM_ARRAY_FIELD_LONG: { |
3690
|
73
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " array = "); |
3691
|
73
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_OBJECT, opcode->operand0); |
3692
|
73
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
3693
|
|
|
|
|
|
|
|
3694
|
73
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " index = "); |
3695
|
73
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand1); |
3696
|
73
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
3697
|
|
|
|
|
|
|
|
3698
|
73
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " fields_length = "); |
3699
|
73
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_int(string_buffer, (opcode->operand3 & 0xFF) + 1); |
3700
|
73
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
3701
|
|
|
|
|
|
|
|
3702
|
73
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " field_index = "); |
3703
|
73
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_int(string_buffer, opcode->operand3 >> 8); |
3704
|
73
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
3705
|
|
|
|
|
|
|
|
3706
|
73
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_SET_MULNUM_ARRAY_FIELD_LONG(env, stack, array, index, field_index, fields_length, "); |
3707
|
73
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_LONG, opcode->operand2); |
3708
|
73
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", &error_id, object_header_size, object_length_offset);"); |
3709
|
73
|
|
|
|
|
|
break; |
3710
|
|
|
|
|
|
|
} |
3711
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_SET_MULNUM_ARRAY_FIELD_FLOAT: { |
3712
|
73
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " array = "); |
3713
|
73
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_OBJECT, opcode->operand0); |
3714
|
73
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
3715
|
|
|
|
|
|
|
|
3716
|
73
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " index = "); |
3717
|
73
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand1); |
3718
|
73
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
3719
|
|
|
|
|
|
|
|
3720
|
73
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " fields_length = "); |
3721
|
73
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_int(string_buffer, (opcode->operand3 & 0xFF) + 1); |
3722
|
73
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
3723
|
|
|
|
|
|
|
|
3724
|
73
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " field_index = "); |
3725
|
73
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_int(string_buffer, opcode->operand3 >> 8); |
3726
|
73
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
3727
|
|
|
|
|
|
|
|
3728
|
73
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_SET_MULNUM_ARRAY_FIELD_FLOAT(env, stack, array, index, field_index, fields_length, "); |
3729
|
73
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_FLOAT, opcode->operand2); |
3730
|
73
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", &error_id, object_header_size, object_length_offset);"); |
3731
|
73
|
|
|
|
|
|
break; |
3732
|
|
|
|
|
|
|
} |
3733
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_SET_MULNUM_ARRAY_FIELD_DOUBLE: { |
3734
|
85
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " array = "); |
3735
|
85
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_OBJECT, opcode->operand0); |
3736
|
85
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
3737
|
|
|
|
|
|
|
|
3738
|
85
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " index = "); |
3739
|
85
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand1); |
3740
|
85
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
3741
|
|
|
|
|
|
|
|
3742
|
85
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " fields_length = "); |
3743
|
85
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_int(string_buffer, (opcode->operand3 & 0xFF) + 1); |
3744
|
85
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
3745
|
|
|
|
|
|
|
|
3746
|
85
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " field_index = "); |
3747
|
85
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_int(string_buffer, opcode->operand3 >> 8); |
3748
|
85
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
3749
|
|
|
|
|
|
|
|
3750
|
85
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_SET_MULNUM_ARRAY_FIELD_DOUBLE(env, stack, array, index, field_index, fields_length, "); |
3751
|
85
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_DOUBLE, opcode->operand2); |
3752
|
85
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", &error_id, object_header_size, object_length_offset);"); |
3753
|
85
|
|
|
|
|
|
break; |
3754
|
|
|
|
|
|
|
} |
3755
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_DEREF_MULNUM_BYTE: { |
3756
|
2
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " fields_length = "); |
3757
|
2
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_int(string_buffer, opcode->operand3); |
3758
|
2
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
3759
|
|
|
|
|
|
|
|
3760
|
2
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_DEREF_MULNUM_BYTE(env, stack, "); |
3761
|
2
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand_address(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_BYTE, opcode->operand0); |
3762
|
2
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
3763
|
2
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_REF, opcode->operand1); |
3764
|
2
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", fields_length);\n"); |
3765
|
2
|
|
|
|
|
|
break; |
3766
|
|
|
|
|
|
|
} |
3767
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_DEREF_MULNUM_SHORT: { |
3768
|
1
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " fields_length = "); |
3769
|
1
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_int(string_buffer, opcode->operand3); |
3770
|
1
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
3771
|
|
|
|
|
|
|
|
3772
|
1
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_DEREF_MULNUM_SHORT(env, stack, "); |
3773
|
1
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand_address(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_SHORT, opcode->operand0); |
3774
|
1
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
3775
|
1
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_REF, opcode->operand1); |
3776
|
1
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", fields_length);\n"); |
3777
|
1
|
|
|
|
|
|
break; |
3778
|
|
|
|
|
|
|
} |
3779
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_DEREF_MULNUM_INT: { |
3780
|
1
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " fields_length = "); |
3781
|
1
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_int(string_buffer, opcode->operand3); |
3782
|
1
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
3783
|
|
|
|
|
|
|
|
3784
|
1
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_DEREF_MULNUM_INT(env, stack, "); |
3785
|
1
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand_address(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand0); |
3786
|
1
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
3787
|
1
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_REF, opcode->operand1); |
3788
|
1
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", fields_length);\n"); |
3789
|
1
|
|
|
|
|
|
break; |
3790
|
|
|
|
|
|
|
} |
3791
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_DEREF_MULNUM_LONG: { |
3792
|
1
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " fields_length = "); |
3793
|
1
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_int(string_buffer, opcode->operand3); |
3794
|
1
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
3795
|
|
|
|
|
|
|
|
3796
|
1
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_DEREF_MULNUM_LONG(env, stack, "); |
3797
|
1
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand_address(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_LONG, opcode->operand0); |
3798
|
1
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
3799
|
1
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_REF, opcode->operand1); |
3800
|
1
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", fields_length);\n"); |
3801
|
1
|
|
|
|
|
|
break; |
3802
|
|
|
|
|
|
|
} |
3803
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_DEREF_MULNUM_FLOAT: { |
3804
|
1
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " fields_length = "); |
3805
|
1
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_int(string_buffer, opcode->operand3); |
3806
|
1
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
3807
|
|
|
|
|
|
|
|
3808
|
1
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_DEREF_MULNUM_FLOAT(env, stack, "); |
3809
|
1
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand_address(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_FLOAT, opcode->operand0); |
3810
|
1
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
3811
|
1
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_REF, opcode->operand1); |
3812
|
1
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", fields_length);\n"); |
3813
|
1
|
|
|
|
|
|
break; |
3814
|
|
|
|
|
|
|
} |
3815
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_DEREF_MULNUM_DOUBLE: { |
3816
|
1
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " fields_length = "); |
3817
|
1
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_int(string_buffer, opcode->operand3); |
3818
|
1
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
3819
|
|
|
|
|
|
|
|
3820
|
1
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_DEREF_MULNUM_DOUBLE(env, stack, "); |
3821
|
1
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand_address(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_DOUBLE, opcode->operand0); |
3822
|
1
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
3823
|
1
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_REF, opcode->operand1); |
3824
|
1
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", fields_length);\n"); |
3825
|
1
|
|
|
|
|
|
break; |
3826
|
|
|
|
|
|
|
} |
3827
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_GET_MULNUM_FIELD_DEREF_BYTE: { |
3828
|
9
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " field_index = "); |
3829
|
9
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_int(string_buffer, opcode->operand2); |
3830
|
9
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
3831
|
|
|
|
|
|
|
|
3832
|
9
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_GET_MULNUM_FIELD_DEREF_BYTE("); |
3833
|
9
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_BYTE, opcode->operand0); |
3834
|
9
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
3835
|
9
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_REF, opcode->operand1); |
3836
|
9
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", field_index);\n"); |
3837
|
9
|
|
|
|
|
|
break; |
3838
|
|
|
|
|
|
|
} |
3839
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_GET_MULNUM_FIELD_DEREF_SHORT: { |
3840
|
9
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " field_index = "); |
3841
|
9
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_int(string_buffer, opcode->operand2); |
3842
|
9
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
3843
|
|
|
|
|
|
|
|
3844
|
9
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_GET_MULNUM_FIELD_DEREF_SHORT("); |
3845
|
9
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_SHORT, opcode->operand0); |
3846
|
9
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
3847
|
9
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_REF, opcode->operand1); |
3848
|
9
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", field_index);\n"); |
3849
|
9
|
|
|
|
|
|
break; |
3850
|
|
|
|
|
|
|
} |
3851
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_GET_MULNUM_FIELD_DEREF_INT: { |
3852
|
21
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " field_index = "); |
3853
|
21
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_int(string_buffer, opcode->operand2); |
3854
|
21
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
3855
|
|
|
|
|
|
|
|
3856
|
21
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_GET_MULNUM_FIELD_DEREF_INT("); |
3857
|
21
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand0); |
3858
|
21
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
3859
|
21
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_REF, opcode->operand1); |
3860
|
21
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", field_index);\n"); |
3861
|
21
|
|
|
|
|
|
break; |
3862
|
|
|
|
|
|
|
} |
3863
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_GET_MULNUM_FIELD_DEREF_LONG: { |
3864
|
9
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " field_index = "); |
3865
|
9
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_int(string_buffer, opcode->operand2); |
3866
|
9
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
3867
|
|
|
|
|
|
|
|
3868
|
9
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_GET_MULNUM_FIELD_DEREF_LONG("); |
3869
|
9
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_LONG, opcode->operand0); |
3870
|
9
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
3871
|
9
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_REF, opcode->operand1); |
3872
|
9
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", field_index);\n"); |
3873
|
9
|
|
|
|
|
|
break; |
3874
|
|
|
|
|
|
|
} |
3875
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_GET_MULNUM_FIELD_DEREF_FLOAT: { |
3876
|
9
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " field_index = "); |
3877
|
9
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_int(string_buffer, opcode->operand2); |
3878
|
9
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
3879
|
|
|
|
|
|
|
|
3880
|
9
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_GET_MULNUM_FIELD_DEREF_FLOAT("); |
3881
|
9
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_FLOAT, opcode->operand0); |
3882
|
9
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
3883
|
9
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_REF, opcode->operand1); |
3884
|
9
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", field_index);\n"); |
3885
|
9
|
|
|
|
|
|
break; |
3886
|
|
|
|
|
|
|
} |
3887
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_GET_MULNUM_FIELD_DEREF_DOUBLE: { |
3888
|
9
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " field_index = "); |
3889
|
9
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_int(string_buffer, opcode->operand2); |
3890
|
9
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
3891
|
|
|
|
|
|
|
|
3892
|
9
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_GET_MULNUM_FIELD_DEREF_DOUBLE("); |
3893
|
9
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_DOUBLE, opcode->operand0); |
3894
|
9
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
3895
|
9
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_REF, opcode->operand1); |
3896
|
9
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", field_index);\n"); |
3897
|
9
|
|
|
|
|
|
break; |
3898
|
|
|
|
|
|
|
} |
3899
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_SET_MULNUM_FIELD_DEREF_BYTE: { |
3900
|
12
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " field_index = "); |
3901
|
12
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_int(string_buffer, opcode->operand2); |
3902
|
12
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
3903
|
|
|
|
|
|
|
|
3904
|
12
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_SET_MULNUM_FIELD_DEREF_BYTE("); |
3905
|
12
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_REF, opcode->operand0); |
3906
|
12
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", field_index, "); |
3907
|
12
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_BYTE, opcode->operand1); |
3908
|
12
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
3909
|
12
|
|
|
|
|
|
break; |
3910
|
|
|
|
|
|
|
} |
3911
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_SET_MULNUM_FIELD_DEREF_SHORT: { |
3912
|
12
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " field_index = "); |
3913
|
12
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_int(string_buffer, opcode->operand2); |
3914
|
12
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
3915
|
|
|
|
|
|
|
|
3916
|
12
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_SET_MULNUM_FIELD_DEREF_SHORT("); |
3917
|
12
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_REF, opcode->operand0); |
3918
|
12
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", field_index, "); |
3919
|
12
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_SHORT, opcode->operand1); |
3920
|
12
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
3921
|
12
|
|
|
|
|
|
break; |
3922
|
|
|
|
|
|
|
} |
3923
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_SET_MULNUM_FIELD_DEREF_INT: { |
3924
|
24
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " field_index = "); |
3925
|
24
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_int(string_buffer, opcode->operand2); |
3926
|
24
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
3927
|
|
|
|
|
|
|
|
3928
|
24
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_SET_MULNUM_FIELD_DEREF_INT("); |
3929
|
24
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_REF, opcode->operand0); |
3930
|
24
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", field_index, "); |
3931
|
24
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand1); |
3932
|
24
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
3933
|
24
|
|
|
|
|
|
break; |
3934
|
|
|
|
|
|
|
} |
3935
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_SET_MULNUM_FIELD_DEREF_LONG: { |
3936
|
12
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " field_index = "); |
3937
|
12
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_int(string_buffer, opcode->operand2); |
3938
|
12
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
3939
|
|
|
|
|
|
|
|
3940
|
12
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_SET_MULNUM_FIELD_DEREF_LONG("); |
3941
|
12
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_REF, opcode->operand0); |
3942
|
12
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", field_index, "); |
3943
|
12
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_LONG, opcode->operand1); |
3944
|
12
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
3945
|
12
|
|
|
|
|
|
break; |
3946
|
|
|
|
|
|
|
} |
3947
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_SET_MULNUM_FIELD_DEREF_FLOAT: { |
3948
|
15
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " field_index = "); |
3949
|
15
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_int(string_buffer, opcode->operand2); |
3950
|
15
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
3951
|
|
|
|
|
|
|
|
3952
|
15
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_SET_MULNUM_FIELD_DEREF_FLOAT("); |
3953
|
15
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_REF, opcode->operand0); |
3954
|
15
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", field_index, "); |
3955
|
15
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_FLOAT, opcode->operand1); |
3956
|
15
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
3957
|
15
|
|
|
|
|
|
break; |
3958
|
|
|
|
|
|
|
} |
3959
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_SET_MULNUM_FIELD_DEREF_DOUBLE: { |
3960
|
15
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " field_index = "); |
3961
|
15
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_int(string_buffer, opcode->operand2); |
3962
|
15
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
3963
|
|
|
|
|
|
|
|
3964
|
15
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_SET_MULNUM_FIELD_DEREF_DOUBLE("); |
3965
|
15
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_REF, opcode->operand0); |
3966
|
15
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", field_index, "); |
3967
|
15
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_DOUBLE, opcode->operand1); |
3968
|
15
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
3969
|
15
|
|
|
|
|
|
break; |
3970
|
|
|
|
|
|
|
} |
3971
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_TYPE_CONVERSION_BYTE_TO_SHORT: { |
3972
|
5
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_TYPE_CONVERSION_BYTE_TO_SHORT("); |
3973
|
5
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_SHORT, opcode->operand0); |
3974
|
5
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
3975
|
5
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_BYTE, opcode->operand1); |
3976
|
5
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
3977
|
5
|
|
|
|
|
|
break; |
3978
|
|
|
|
|
|
|
} |
3979
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_TYPE_CONVERSION_BYTE_TO_INT: { |
3980
|
1719
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_TYPE_CONVERSION_BYTE_TO_INT("); |
3981
|
1719
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand0); |
3982
|
1719
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
3983
|
1719
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_BYTE, opcode->operand1); |
3984
|
1719
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
3985
|
1719
|
|
|
|
|
|
break; |
3986
|
|
|
|
|
|
|
} |
3987
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_TYPE_CONVERSION_BYTE_TO_LONG: { |
3988
|
5
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_TYPE_CONVERSION_BYTE_TO_LONG("); |
3989
|
5
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_LONG, opcode->operand0); |
3990
|
5
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
3991
|
5
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_BYTE, opcode->operand1); |
3992
|
5
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
3993
|
5
|
|
|
|
|
|
break; |
3994
|
|
|
|
|
|
|
} |
3995
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_TYPE_CONVERSION_BYTE_TO_FLOAT: { |
3996
|
14
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_TYPE_CONVERSION_BYTE_TO_FLOAT("); |
3997
|
14
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_FLOAT, opcode->operand0); |
3998
|
14
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
3999
|
14
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_BYTE, opcode->operand1); |
4000
|
14
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
4001
|
14
|
|
|
|
|
|
break; |
4002
|
|
|
|
|
|
|
} |
4003
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_TYPE_CONVERSION_BYTE_TO_DOUBLE: { |
4004
|
14
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_TYPE_CONVERSION_BYTE_TO_DOUBLE("); |
4005
|
14
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_DOUBLE, opcode->operand0); |
4006
|
14
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
4007
|
14
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_BYTE, opcode->operand1); |
4008
|
14
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
4009
|
14
|
|
|
|
|
|
break; |
4010
|
|
|
|
|
|
|
} |
4011
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_TYPE_CONVERSION_SHORT_TO_BYTE: { |
4012
|
2
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_TYPE_CONVERSION_SHORT_TO_BYTE("); |
4013
|
2
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_BYTE, opcode->operand0); |
4014
|
2
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
4015
|
2
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_SHORT, opcode->operand1); |
4016
|
2
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
4017
|
2
|
|
|
|
|
|
break; |
4018
|
|
|
|
|
|
|
} |
4019
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_TYPE_CONVERSION_SHORT_TO_INT: { |
4020
|
869
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_TYPE_CONVERSION_SHORT_TO_INT("); |
4021
|
869
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand0); |
4022
|
869
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
4023
|
869
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_SHORT, opcode->operand1); |
4024
|
869
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
4025
|
869
|
|
|
|
|
|
break; |
4026
|
|
|
|
|
|
|
} |
4027
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_TYPE_CONVERSION_SHORT_TO_LONG: { |
4028
|
3
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_TYPE_CONVERSION_SHORT_TO_LONG("); |
4029
|
3
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_LONG, opcode->operand0); |
4030
|
3
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
4031
|
3
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_SHORT, opcode->operand1); |
4032
|
3
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
4033
|
3
|
|
|
|
|
|
break; |
4034
|
|
|
|
|
|
|
} |
4035
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_TYPE_CONVERSION_SHORT_TO_FLOAT: { |
4036
|
12
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_TYPE_CONVERSION_SHORT_TO_FLOAT("); |
4037
|
12
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_FLOAT, opcode->operand0); |
4038
|
12
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
4039
|
12
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_SHORT, opcode->operand1); |
4040
|
12
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
4041
|
12
|
|
|
|
|
|
break; |
4042
|
|
|
|
|
|
|
} |
4043
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_TYPE_CONVERSION_SHORT_TO_DOUBLE: { |
4044
|
12
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_TYPE_CONVERSION_SHORT_TO_DOUBLE("); |
4045
|
12
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_DOUBLE, opcode->operand0); |
4046
|
12
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
4047
|
12
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_SHORT, opcode->operand1); |
4048
|
12
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
4049
|
12
|
|
|
|
|
|
break; |
4050
|
|
|
|
|
|
|
} |
4051
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_TYPE_CONVERSION_INT_TO_BYTE: { |
4052
|
1432
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_TYPE_CONVERSION_INT_TO_BYTE("); |
4053
|
1432
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_BYTE, opcode->operand0); |
4054
|
1432
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
4055
|
1432
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand1); |
4056
|
1432
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
4057
|
1432
|
|
|
|
|
|
break; |
4058
|
|
|
|
|
|
|
} |
4059
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_TYPE_CONVERSION_INT_TO_SHORT: { |
4060
|
1339
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_TYPE_CONVERSION_INT_TO_SHORT("); |
4061
|
1339
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_SHORT, opcode->operand0); |
4062
|
1339
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
4063
|
1339
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand1); |
4064
|
1339
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
4065
|
1339
|
|
|
|
|
|
break; |
4066
|
|
|
|
|
|
|
} |
4067
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_TYPE_CONVERSION_INT_TO_LONG: { |
4068
|
1266
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_TYPE_CONVERSION_INT_TO_LONG("); |
4069
|
1266
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_LONG, opcode->operand0); |
4070
|
1266
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
4071
|
1266
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand1); |
4072
|
1266
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
4073
|
1266
|
|
|
|
|
|
break; |
4074
|
|
|
|
|
|
|
} |
4075
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_TYPE_CONVERSION_INT_TO_FLOAT: { |
4076
|
1001
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_TYPE_CONVERSION_INT_TO_FLOAT("); |
4077
|
1001
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_FLOAT, opcode->operand0); |
4078
|
1001
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
4079
|
1001
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand1); |
4080
|
1001
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
4081
|
1001
|
|
|
|
|
|
break; |
4082
|
|
|
|
|
|
|
} |
4083
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_TYPE_CONVERSION_INT_TO_DOUBLE: { |
4084
|
1072
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_TYPE_CONVERSION_INT_TO_DOUBLE("); |
4085
|
1072
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_DOUBLE, opcode->operand0); |
4086
|
1072
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
4087
|
1072
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand1); |
4088
|
1072
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
4089
|
1072
|
|
|
|
|
|
break; |
4090
|
|
|
|
|
|
|
} |
4091
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_TYPE_CONVERSION_LONG_TO_BYTE: { |
4092
|
2
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_TYPE_CONVERSION_LONG_TO_BYTE("); |
4093
|
2
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_BYTE, opcode->operand0); |
4094
|
2
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
4095
|
2
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_LONG, opcode->operand1); |
4096
|
2
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
4097
|
2
|
|
|
|
|
|
break; |
4098
|
|
|
|
|
|
|
} |
4099
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_TYPE_CONVERSION_LONG_TO_SHORT: { |
4100
|
2
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_TYPE_CONVERSION_LONG_TO_SHORT("); |
4101
|
2
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_SHORT, opcode->operand0); |
4102
|
2
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
4103
|
2
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_LONG, opcode->operand1); |
4104
|
2
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
4105
|
2
|
|
|
|
|
|
break; |
4106
|
|
|
|
|
|
|
} |
4107
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_TYPE_CONVERSION_LONG_TO_INT: { |
4108
|
4
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_TYPE_CONVERSION_LONG_TO_INT("); |
4109
|
4
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand0); |
4110
|
4
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
4111
|
4
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_LONG, opcode->operand1); |
4112
|
4
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
4113
|
4
|
|
|
|
|
|
break; |
4114
|
|
|
|
|
|
|
} |
4115
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_TYPE_CONVERSION_LONG_TO_FLOAT: { |
4116
|
3
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_TYPE_CONVERSION_LONG_TO_FLOAT("); |
4117
|
3
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_FLOAT, opcode->operand0); |
4118
|
3
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
4119
|
3
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_LONG, opcode->operand1); |
4120
|
3
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
4121
|
3
|
|
|
|
|
|
break; |
4122
|
|
|
|
|
|
|
} |
4123
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_TYPE_CONVERSION_LONG_TO_DOUBLE: { |
4124
|
2
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_TYPE_CONVERSION_LONG_TO_DOUBLE("); |
4125
|
2
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_DOUBLE, opcode->operand0); |
4126
|
2
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
4127
|
2
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_LONG, opcode->operand1); |
4128
|
2
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
4129
|
2
|
|
|
|
|
|
break; |
4130
|
|
|
|
|
|
|
} |
4131
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_TYPE_CONVERSION_FLOAT_TO_BYTE: { |
4132
|
2
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_TYPE_CONVERSION_FLOAT_TO_BYTE("); |
4133
|
2
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_BYTE, opcode->operand0); |
4134
|
2
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
4135
|
2
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_FLOAT, opcode->operand1); |
4136
|
2
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
4137
|
2
|
|
|
|
|
|
break; |
4138
|
|
|
|
|
|
|
} |
4139
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_TYPE_CONVERSION_FLOAT_TO_SHORT: { |
4140
|
2
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_TYPE_CONVERSION_FLOAT_TO_SHORT("); |
4141
|
2
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_SHORT, opcode->operand0); |
4142
|
2
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
4143
|
2
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_FLOAT, opcode->operand1); |
4144
|
2
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
4145
|
2
|
|
|
|
|
|
break; |
4146
|
|
|
|
|
|
|
} |
4147
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_TYPE_CONVERSION_FLOAT_TO_INT: { |
4148
|
2
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_TYPE_CONVERSION_FLOAT_TO_INT("); |
4149
|
2
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand0); |
4150
|
2
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
4151
|
2
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_FLOAT, opcode->operand1); |
4152
|
2
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
4153
|
2
|
|
|
|
|
|
break; |
4154
|
|
|
|
|
|
|
} |
4155
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_TYPE_CONVERSION_FLOAT_TO_LONG: { |
4156
|
2
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_TYPE_CONVERSION_FLOAT_TO_LONG("); |
4157
|
2
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_LONG, opcode->operand0); |
4158
|
2
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
4159
|
2
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_FLOAT, opcode->operand1); |
4160
|
2
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
4161
|
2
|
|
|
|
|
|
break; |
4162
|
|
|
|
|
|
|
} |
4163
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_TYPE_CONVERSION_FLOAT_TO_DOUBLE: { |
4164
|
56
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_TYPE_CONVERSION_FLOAT_TO_DOUBLE("); |
4165
|
56
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_DOUBLE, opcode->operand0); |
4166
|
56
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
4167
|
56
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_FLOAT, opcode->operand1); |
4168
|
56
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
4169
|
56
|
|
|
|
|
|
break; |
4170
|
|
|
|
|
|
|
} |
4171
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_TYPE_CONVERSION_DOUBLE_TO_BYTE: { |
4172
|
2
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_TYPE_CONVERSION_DOUBLE_TO_BYTE("); |
4173
|
2
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_BYTE, opcode->operand0); |
4174
|
2
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
4175
|
2
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_DOUBLE, opcode->operand1); |
4176
|
2
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
4177
|
2
|
|
|
|
|
|
break; |
4178
|
|
|
|
|
|
|
} |
4179
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_TYPE_CONVERSION_DOUBLE_TO_SHORT: { |
4180
|
2
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_TYPE_CONVERSION_DOUBLE_TO_SHORT("); |
4181
|
2
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_SHORT, opcode->operand0); |
4182
|
2
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
4183
|
2
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_DOUBLE, opcode->operand1); |
4184
|
2
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
4185
|
2
|
|
|
|
|
|
break; |
4186
|
|
|
|
|
|
|
} |
4187
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_TYPE_CONVERSION_DOUBLE_TO_INT: { |
4188
|
4
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_TYPE_CONVERSION_DOUBLE_TO_INT("); |
4189
|
4
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand0); |
4190
|
4
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
4191
|
4
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_DOUBLE, opcode->operand1); |
4192
|
4
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
4193
|
4
|
|
|
|
|
|
break; |
4194
|
|
|
|
|
|
|
} |
4195
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_TYPE_CONVERSION_DOUBLE_TO_LONG: { |
4196
|
2
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_TYPE_CONVERSION_DOUBLE_TO_LONG("); |
4197
|
2
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_LONG, opcode->operand0); |
4198
|
2
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
4199
|
2
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_DOUBLE, opcode->operand1); |
4200
|
2
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
4201
|
2
|
|
|
|
|
|
break; |
4202
|
|
|
|
|
|
|
} |
4203
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_TYPE_CONVERSION_DOUBLE_TO_FLOAT: { |
4204
|
6
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_TYPE_CONVERSION_DOUBLE_TO_FLOAT("); |
4205
|
6
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_FLOAT, opcode->operand0); |
4206
|
6
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
4207
|
6
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_DOUBLE, opcode->operand1); |
4208
|
6
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
4209
|
6
|
|
|
|
|
|
break; |
4210
|
|
|
|
|
|
|
} |
4211
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_TYPE_CONVERSION_BYTE_TO_STRING: { |
4212
|
2
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_TYPE_CONVERSION_BYTE_TO_STRING(env, stack, "); |
4213
|
2
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand_address(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_OBJECT, opcode->operand0); |
4214
|
2
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
4215
|
2
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_BYTE, opcode->operand1); |
4216
|
2
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", tmp_buffer, sizeof(tmp_buffer));\n"); |
4217
|
2
|
|
|
|
|
|
break; |
4218
|
|
|
|
|
|
|
} |
4219
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_TYPE_CONVERSION_SHORT_TO_STRING: { |
4220
|
2
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_TYPE_CONVERSION_SHORT_TO_STRING(env, stack, "); |
4221
|
2
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand_address(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_OBJECT, opcode->operand0); |
4222
|
2
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
4223
|
2
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_SHORT, opcode->operand1); |
4224
|
2
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", tmp_buffer, sizeof(tmp_buffer));\n"); |
4225
|
2
|
|
|
|
|
|
break; |
4226
|
|
|
|
|
|
|
} |
4227
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_TYPE_CONVERSION_INT_TO_STRING: { |
4228
|
664
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_TYPE_CONVERSION_INT_TO_STRING(env, stack, "); |
4229
|
664
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand_address(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_OBJECT, opcode->operand0); |
4230
|
664
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
4231
|
664
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand1); |
4232
|
664
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", tmp_buffer, sizeof(tmp_buffer));\n"); |
4233
|
664
|
|
|
|
|
|
break; |
4234
|
|
|
|
|
|
|
} |
4235
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_TYPE_CONVERSION_LONG_TO_STRING: { |
4236
|
2
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_TYPE_CONVERSION_LONG_TO_STRING(env, stack, "); |
4237
|
2
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand_address(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_OBJECT, opcode->operand0); |
4238
|
2
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
4239
|
2
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_LONG, opcode->operand1); |
4240
|
2
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", tmp_buffer, sizeof(tmp_buffer));\n"); |
4241
|
2
|
|
|
|
|
|
break; |
4242
|
|
|
|
|
|
|
} |
4243
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_TYPE_CONVERSION_FLOAT_TO_STRING: { |
4244
|
34
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_TYPE_CONVERSION_FLOAT_TO_STRING(env, stack, "); |
4245
|
34
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand_address(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_OBJECT, opcode->operand0); |
4246
|
34
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
4247
|
34
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_FLOAT, opcode->operand1); |
4248
|
34
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", tmp_buffer, sizeof(tmp_buffer));\n"); |
4249
|
34
|
|
|
|
|
|
break; |
4250
|
|
|
|
|
|
|
} |
4251
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_TYPE_CONVERSION_DOUBLE_TO_STRING: { |
4252
|
32
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_TYPE_CONVERSION_DOUBLE_TO_STRING(env, stack, "); |
4253
|
32
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand_address(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_OBJECT, opcode->operand0); |
4254
|
32
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
4255
|
32
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_DOUBLE, opcode->operand1); |
4256
|
32
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", tmp_buffer, sizeof(tmp_buffer));\n"); |
4257
|
32
|
|
|
|
|
|
break; |
4258
|
|
|
|
|
|
|
} |
4259
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_TYPE_CONVERSION_STRING_TO_BYTE_ARRAY: { |
4260
|
31
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " src_string = "); |
4261
|
31
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_OBJECT, opcode->operand1); |
4262
|
31
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
4263
|
|
|
|
|
|
|
|
4264
|
31
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_TYPE_CONVERSION_STRING_TO_BYTE_ARRAY(env, stack, "); |
4265
|
31
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand_address(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_OBJECT, opcode->operand0); |
4266
|
31
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " , src_string);\n"); |
4267
|
31
|
|
|
|
|
|
break; |
4268
|
|
|
|
|
|
|
} |
4269
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_TYPE_CONVERSION_BYTE_ARRAY_TO_STRING: { |
4270
|
13
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " src_byte_array = "); |
4271
|
13
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_OBJECT, opcode->operand1); |
4272
|
13
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
4273
|
|
|
|
|
|
|
|
4274
|
13
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_TYPE_CONVERSION_BYTE_ARRAY_TO_STRING(env, stack, "); |
4275
|
13
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand_address(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_OBJECT, opcode->operand0); |
4276
|
13
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " , src_byte_array);\n"); |
4277
|
13
|
|
|
|
|
|
break; |
4278
|
|
|
|
|
|
|
} |
4279
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_TYPE_CONVERSION_BYTE_TO_BYTE_OBJECT: { |
4280
|
15
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " value_byte = "); |
4281
|
15
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_BYTE, opcode->operand1); |
4282
|
15
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
4283
|
|
|
|
|
|
|
|
4284
|
15
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_TYPE_CONVERSION_BYTE_TO_BYTE_OBJECT(env, stack, "); |
4285
|
15
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand_address(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_OBJECT, opcode->operand0); |
4286
|
15
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", value_byte, object_header_size);\n"); |
4287
|
15
|
|
|
|
|
|
break; |
4288
|
|
|
|
|
|
|
} |
4289
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_TYPE_CONVERSION_SHORT_TO_SHORT_OBJECT: { |
4290
|
8
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " value_short = "); |
4291
|
8
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_SHORT, opcode->operand1); |
4292
|
8
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
4293
|
|
|
|
|
|
|
|
4294
|
8
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_TYPE_CONVERSION_SHORT_TO_SHORT_OBJECT(env, stack, "); |
4295
|
8
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand_address(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_OBJECT, opcode->operand0); |
4296
|
8
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", value_short, object_header_size);\n"); |
4297
|
8
|
|
|
|
|
|
break; |
4298
|
|
|
|
|
|
|
} |
4299
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_TYPE_CONVERSION_INT_TO_INT_OBJECT: { |
4300
|
176
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " value_int = "); |
4301
|
176
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand1); |
4302
|
176
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
4303
|
|
|
|
|
|
|
|
4304
|
176
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_TYPE_CONVERSION_INT_TO_INT_OBJECT(env, stack, "); |
4305
|
176
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand_address(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_OBJECT, opcode->operand0); |
4306
|
176
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", value_int, object_header_size);\n"); |
4307
|
176
|
|
|
|
|
|
break; |
4308
|
|
|
|
|
|
|
} |
4309
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_TYPE_CONVERSION_LONG_TO_LONG_OBJECT: { |
4310
|
35
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " value_long = "); |
4311
|
35
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_LONG, opcode->operand1); |
4312
|
35
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
4313
|
|
|
|
|
|
|
|
4314
|
35
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_TYPE_CONVERSION_LONG_TO_LONG_OBJECT(env, stack, "); |
4315
|
35
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand_address(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_OBJECT, opcode->operand0); |
4316
|
35
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", value_long, object_header_size);\n"); |
4317
|
35
|
|
|
|
|
|
break; |
4318
|
|
|
|
|
|
|
} |
4319
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_TYPE_CONVERSION_FLOAT_TO_FLOAT_OBJECT: { |
4320
|
10
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " value_float = "); |
4321
|
10
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_FLOAT, opcode->operand1); |
4322
|
10
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
4323
|
|
|
|
|
|
|
|
4324
|
10
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_TYPE_CONVERSION_FLOAT_TO_FLOAT_OBJECT(env, stack, "); |
4325
|
10
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand_address(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_OBJECT, opcode->operand0); |
4326
|
10
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", value_float, object_header_size);\n"); |
4327
|
10
|
|
|
|
|
|
break; |
4328
|
|
|
|
|
|
|
} |
4329
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_TYPE_CONVERSION_DOUBLE_TO_DOUBLE_OBJECT: { |
4330
|
23
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " value_double = "); |
4331
|
23
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_DOUBLE, opcode->operand1); |
4332
|
23
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
4333
|
|
|
|
|
|
|
|
4334
|
23
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_TYPE_CONVERSION_DOUBLE_TO_DOUBLE_OBJECT(env, stack, "); |
4335
|
23
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand_address(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_OBJECT, opcode->operand0); |
4336
|
23
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", value_double, object_header_size);\n"); |
4337
|
23
|
|
|
|
|
|
break; |
4338
|
|
|
|
|
|
|
} |
4339
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_TYPE_CONVERSION_BYTE_OBJECT_TO_BYTE: { |
4340
|
7
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " object = "); |
4341
|
7
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_OBJECT, opcode->operand1); |
4342
|
7
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
4343
|
|
|
|
|
|
|
|
4344
|
7
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_TYPE_CONVERSION_BYTE_OBJECT_TO_BYTE(env, stack, "); |
4345
|
7
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand_address(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_BYTE, opcode->operand0); |
4346
|
7
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", object, &error_id, object_header_size);\n"); |
4347
|
7
|
|
|
|
|
|
break; |
4348
|
|
|
|
|
|
|
} |
4349
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_TYPE_CONVERSION_SHORT_OBJECT_TO_SHORT: { |
4350
|
7
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " object = "); |
4351
|
7
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_OBJECT, opcode->operand1); |
4352
|
7
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
4353
|
|
|
|
|
|
|
|
4354
|
7
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_TYPE_CONVERSION_SHORT_OBJECT_TO_SHORT(env, stack, "); |
4355
|
7
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand_address(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_SHORT, opcode->operand0); |
4356
|
7
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", object, &error_id, object_header_size);\n"); |
4357
|
7
|
|
|
|
|
|
break; |
4358
|
|
|
|
|
|
|
} |
4359
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_TYPE_CONVERSION_INT_OBJECT_TO_INT: { |
4360
|
71
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " object = "); |
4361
|
71
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_OBJECT, opcode->operand1); |
4362
|
71
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
4363
|
|
|
|
|
|
|
|
4364
|
71
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_TYPE_CONVERSION_INT_OBJECT_TO_INT(env, stack, "); |
4365
|
71
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand_address(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand0); |
4366
|
71
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", object, &error_id, object_header_size);\n"); |
4367
|
71
|
|
|
|
|
|
break; |
4368
|
|
|
|
|
|
|
} |
4369
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_TYPE_CONVERSION_LONG_OBJECT_TO_LONG: { |
4370
|
11
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " object = "); |
4371
|
11
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_OBJECT, opcode->operand1); |
4372
|
11
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
4373
|
|
|
|
|
|
|
|
4374
|
11
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_TYPE_CONVERSION_LONG_OBJECT_TO_LONG(env, stack, "); |
4375
|
11
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand_address(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_LONG, opcode->operand0); |
4376
|
11
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", object, &error_id, object_header_size);\n"); |
4377
|
11
|
|
|
|
|
|
break; |
4378
|
|
|
|
|
|
|
} |
4379
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_TYPE_CONVERSION_FLOAT_OBJECT_TO_FLOAT: { |
4380
|
7
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " object = "); |
4381
|
7
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_OBJECT, opcode->operand1); |
4382
|
7
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
4383
|
|
|
|
|
|
|
|
4384
|
7
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_TYPE_CONVERSION_FLOAT_OBJECT_TO_FLOAT(env, stack, "); |
4385
|
7
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand_address(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_FLOAT, opcode->operand0); |
4386
|
7
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", object, &error_id, object_header_size);\n"); |
4387
|
7
|
|
|
|
|
|
break; |
4388
|
|
|
|
|
|
|
} |
4389
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_TYPE_CONVERSION_DOUBLE_OBJECT_TO_DOUBLE: { |
4390
|
7
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " object = "); |
4391
|
7
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_OBJECT, opcode->operand1); |
4392
|
7
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
4393
|
|
|
|
|
|
|
|
4394
|
7
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_TYPE_CONVERSION_DOUBLE_OBJECT_TO_DOUBLE(env, stack, "); |
4395
|
7
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand_address(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_DOUBLE, opcode->operand0); |
4396
|
7
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", object, &error_id, object_header_size);\n"); |
4397
|
7
|
|
|
|
|
|
break; |
4398
|
|
|
|
|
|
|
} |
4399
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_GET_STACK_BYTE: { |
4400
|
185
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_GET_STACK_BYTE("); |
4401
|
185
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_BYTE, opcode->operand0); |
4402
|
185
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", stack, "); |
4403
|
185
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_int(string_buffer, opcode->operand3 & 0xFF); |
4404
|
185
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
4405
|
185
|
|
|
|
|
|
break; |
4406
|
|
|
|
|
|
|
} |
4407
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_GET_STACK_SHORT: { |
4408
|
185
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_GET_STACK_SHORT("); |
4409
|
185
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_SHORT, opcode->operand0); |
4410
|
185
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", stack, "); |
4411
|
185
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_int(string_buffer, opcode->operand3 & 0xFF); |
4412
|
185
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
4413
|
185
|
|
|
|
|
|
break; |
4414
|
|
|
|
|
|
|
} |
4415
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_GET_STACK_INT: { |
4416
|
5483
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_GET_STACK_INT("); |
4417
|
5483
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand0); |
4418
|
5483
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", stack, "); |
4419
|
5483
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_int(string_buffer, opcode->operand3 & 0xFF); |
4420
|
5483
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
4421
|
5483
|
|
|
|
|
|
break; |
4422
|
|
|
|
|
|
|
} |
4423
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_GET_STACK_LONG: { |
4424
|
823
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_GET_STACK_LONG("); |
4425
|
823
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_LONG, opcode->operand0); |
4426
|
823
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", stack, "); |
4427
|
823
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_int(string_buffer, opcode->operand3 & 0xFF); |
4428
|
823
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
4429
|
823
|
|
|
|
|
|
break; |
4430
|
|
|
|
|
|
|
} |
4431
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_GET_STACK_FLOAT: { |
4432
|
734
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_GET_STACK_FLOAT("); |
4433
|
734
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_FLOAT, opcode->operand0); |
4434
|
734
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", stack, "); |
4435
|
734
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_int(string_buffer, opcode->operand3 & 0xFF); |
4436
|
734
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
4437
|
734
|
|
|
|
|
|
break; |
4438
|
|
|
|
|
|
|
} |
4439
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_GET_STACK_DOUBLE: { |
4440
|
776
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_GET_STACK_DOUBLE("); |
4441
|
776
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_DOUBLE, opcode->operand0); |
4442
|
776
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", stack, "); |
4443
|
776
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_int(string_buffer, opcode->operand3 & 0xFF); |
4444
|
776
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
4445
|
776
|
|
|
|
|
|
break; |
4446
|
|
|
|
|
|
|
} |
4447
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_GET_STACK_OBJECT: { |
4448
|
4900
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_GET_STACK_OBJECT(env, "); |
4449
|
4900
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand_address(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_OBJECT, opcode->operand0); |
4450
|
4900
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", stack, "); |
4451
|
4900
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_int(string_buffer, opcode->operand3 & 0xFF); |
4452
|
4900
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
4453
|
4900
|
|
|
|
|
|
break; |
4454
|
|
|
|
|
|
|
} |
4455
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_GET_STACK_REF: { |
4456
|
53
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_GET_STACK_REF("); |
4457
|
53
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_REF, opcode->operand0); |
4458
|
53
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", stack, "); |
4459
|
53
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_int(string_buffer, opcode->operand3 & 0xFF); |
4460
|
53
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
4461
|
53
|
|
|
|
|
|
break; |
4462
|
|
|
|
|
|
|
} |
4463
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_GET_STACK_MULNUM_BYTE: { |
4464
|
12
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " args_width = "); |
4465
|
12
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_int(string_buffer, opcode->operand3 >> 8); |
4466
|
12
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
4467
|
|
|
|
|
|
|
|
4468
|
12
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_GET_STACK_MULNUM_BYTE(env, "); |
4469
|
12
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand_address(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_BYTE, opcode->operand0); |
4470
|
12
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " , stack, "); |
4471
|
12
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_int(string_buffer, opcode->operand3 & 0xFF); |
4472
|
12
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", args_width);\n"); |
4473
|
12
|
|
|
|
|
|
break; |
4474
|
|
|
|
|
|
|
} |
4475
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_GET_STACK_MULNUM_SHORT: { |
4476
|
11
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " args_width = "); |
4477
|
11
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_int(string_buffer, opcode->operand3 >> 8); |
4478
|
11
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
4479
|
|
|
|
|
|
|
|
4480
|
11
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_GET_STACK_MULNUM_SHORT(env, "); |
4481
|
11
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand_address(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_SHORT, opcode->operand0); |
4482
|
11
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " , stack, "); |
4483
|
11
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_int(string_buffer, opcode->operand3 & 0xFF); |
4484
|
11
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", args_width);\n"); |
4485
|
11
|
|
|
|
|
|
break; |
4486
|
|
|
|
|
|
|
} |
4487
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_GET_STACK_MULNUM_INT: { |
4488
|
11
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " args_width = "); |
4489
|
11
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_int(string_buffer, opcode->operand3 >> 8); |
4490
|
11
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
4491
|
|
|
|
|
|
|
|
4492
|
11
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_GET_STACK_MULNUM_INT(env, "); |
4493
|
11
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand_address(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand0); |
4494
|
11
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " , stack, "); |
4495
|
11
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_int(string_buffer, opcode->operand3 & 0xFF); |
4496
|
11
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", args_width);\n"); |
4497
|
11
|
|
|
|
|
|
break; |
4498
|
|
|
|
|
|
|
} |
4499
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_GET_STACK_MULNUM_LONG: { |
4500
|
11
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " args_width = "); |
4501
|
11
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_int(string_buffer, opcode->operand3 >> 8); |
4502
|
11
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
4503
|
|
|
|
|
|
|
|
4504
|
11
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_GET_STACK_MULNUM_LONG(env, "); |
4505
|
11
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand_address(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_LONG, opcode->operand0); |
4506
|
11
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " , stack, "); |
4507
|
11
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_int(string_buffer, opcode->operand3 & 0xFF); |
4508
|
11
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", args_width);\n"); |
4509
|
11
|
|
|
|
|
|
break; |
4510
|
|
|
|
|
|
|
} |
4511
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_GET_STACK_MULNUM_FLOAT: { |
4512
|
11
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " args_width = "); |
4513
|
11
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_int(string_buffer, opcode->operand3 >> 8); |
4514
|
11
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
4515
|
|
|
|
|
|
|
|
4516
|
11
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_GET_STACK_MULNUM_FLOAT(env, "); |
4517
|
11
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand_address(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_FLOAT, opcode->operand0); |
4518
|
11
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " , stack, "); |
4519
|
11
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_int(string_buffer, opcode->operand3 & 0xFF); |
4520
|
11
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", args_width);\n"); |
4521
|
11
|
|
|
|
|
|
break; |
4522
|
|
|
|
|
|
|
} |
4523
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_GET_STACK_MULNUM_DOUBLE: { |
4524
|
13
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " args_width = "); |
4525
|
13
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_int(string_buffer, opcode->operand3 >> 8); |
4526
|
13
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
4527
|
|
|
|
|
|
|
|
4528
|
13
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_GET_STACK_MULNUM_DOUBLE(env, "); |
4529
|
13
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand_address(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_DOUBLE, opcode->operand0); |
4530
|
13
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " , stack, "); |
4531
|
13
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_int(string_buffer, opcode->operand3 & 0xFF); |
4532
|
13
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", args_width);\n"); |
4533
|
13
|
|
|
|
|
|
break; |
4534
|
|
|
|
|
|
|
} |
4535
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_GET_STACK_OPTIONAL_BYTE: { |
4536
|
3
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " stack_index = "); |
4537
|
3
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_int(string_buffer, opcode->operand3 & 0xFF); |
4538
|
3
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
4539
|
|
|
|
|
|
|
|
4540
|
3
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_GET_STACK_OPTIONAL_BYTE(env, "); |
4541
|
3
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand_address(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_BYTE, opcode->operand0); |
4542
|
3
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", stack, stack_index, "); |
4543
|
3
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_int(string_buffer, (int8_t)(uint8_t)opcode->operand1); |
4544
|
3
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
4545
|
3
|
|
|
|
|
|
break; |
4546
|
|
|
|
|
|
|
} |
4547
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_GET_STACK_OPTIONAL_SHORT: { |
4548
|
3
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " stack_index = "); |
4549
|
3
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_int(string_buffer, opcode->operand3 & 0xFF); |
4550
|
3
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
4551
|
|
|
|
|
|
|
|
4552
|
3
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_GET_STACK_OPTIONAL_SHORT(env, "); |
4553
|
3
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand_address(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_SHORT, opcode->operand0); |
4554
|
3
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", stack, stack_index, "); |
4555
|
3
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_int(string_buffer, (int16_t)(uint16_t)opcode->operand1); |
4556
|
3
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
4557
|
3
|
|
|
|
|
|
break; |
4558
|
|
|
|
|
|
|
} |
4559
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_GET_STACK_OPTIONAL_INT: { |
4560
|
42
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " stack_index = "); |
4561
|
42
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_int(string_buffer, opcode->operand3 & 0xFF); |
4562
|
42
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
4563
|
|
|
|
|
|
|
|
4564
|
42
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_GET_STACK_OPTIONAL_INT(env, "); |
4565
|
42
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand_address(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand0); |
4566
|
42
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", stack, stack_index, "); |
4567
|
42
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_int(string_buffer, (int32_t)opcode->operand1); |
4568
|
42
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
4569
|
42
|
|
|
|
|
|
break; |
4570
|
|
|
|
|
|
|
} |
4571
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_GET_STACK_OPTIONAL_LONG: { |
4572
|
4
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " stack_index = "); |
4573
|
4
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_int(string_buffer, opcode->operand3 & 0xFF); |
4574
|
4
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
4575
|
|
|
|
|
|
|
|
4576
|
4
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_GET_STACK_OPTIONAL_LONG(env, "); |
4577
|
4
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand_address(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_LONG, opcode->operand0); |
4578
|
4
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", stack, stack_index, "); |
4579
|
4
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_long(string_buffer, *(int64_t*)&opcode->operand1); |
4580
|
4
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
4581
|
4
|
|
|
|
|
|
break; |
4582
|
|
|
|
|
|
|
} |
4583
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_GET_STACK_OPTIONAL_FLOAT: { |
4584
|
|
|
|
|
|
|
SPVM_VALUE value; |
4585
|
1
|
|
|
|
|
|
value.ival = (int32_t)opcode->operand1; |
4586
|
|
|
|
|
|
|
|
4587
|
1
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " stack_index = "); |
4588
|
1
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_int(string_buffer, opcode->operand3 & 0xFF); |
4589
|
1
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
4590
|
|
|
|
|
|
|
|
4591
|
1
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_GET_STACK_OPTIONAL_FLOAT(env, "); |
4592
|
1
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand_address(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_FLOAT, opcode->operand0); |
4593
|
1
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", stack, stack_index, (tmp_constant.ival = "); |
4594
|
1
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_int(string_buffer, value.ival); |
4595
|
1
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", tmp_constant.fval));\n"); |
4596
|
1
|
|
|
|
|
|
break; |
4597
|
|
|
|
|
|
|
} |
4598
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_GET_STACK_OPTIONAL_DOUBLE: { |
4599
|
1
|
|
|
|
|
|
double double_value = *(double*)&opcode->operand1; |
4600
|
|
|
|
|
|
|
SPVM_VALUE value; |
4601
|
1
|
|
|
|
|
|
value.dval = double_value; |
4602
|
|
|
|
|
|
|
|
4603
|
1
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " stack_index = "); |
4604
|
1
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_int(string_buffer, opcode->operand3 & 0xFF); |
4605
|
1
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
4606
|
|
|
|
|
|
|
|
4607
|
1
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_GET_STACK_OPTIONAL_DOUBLE(env, "); |
4608
|
1
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand_address(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_DOUBLE, opcode->operand0); |
4609
|
1
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", stack, stack_index, (tmp_constant.lval = "); |
4610
|
1
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_long(string_buffer, value.lval); |
4611
|
1
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", tmp_constant.dval));\n"); |
4612
|
1
|
|
|
|
|
|
break; |
4613
|
|
|
|
|
|
|
} |
4614
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_GET_STACK_OPTIONAL_OBJECT: { |
4615
|
6
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " stack_index = "); |
4616
|
6
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_int(string_buffer, opcode->operand3 & 0xFF); |
4617
|
6
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
4618
|
|
|
|
|
|
|
|
4619
|
6
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_GET_STACK_OPTIONAL_OBJECT(env, "); |
4620
|
6
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand_address(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_OBJECT, opcode->operand0); |
4621
|
6
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", stack, stack_index);\n"); |
4622
|
6
|
|
|
|
|
|
break; |
4623
|
|
|
|
|
|
|
} |
4624
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_END_ARGS: { |
4625
|
|
|
|
|
|
|
// Do nothing |
4626
|
5777
|
|
|
|
|
|
break; |
4627
|
|
|
|
|
|
|
} |
4628
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_SET_STACK_BYTE: |
4629
|
|
|
|
|
|
|
{ |
4630
|
83
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_SET_STACK_BYTE(stack, "); |
4631
|
83
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_int(string_buffer, opcode->operand3); |
4632
|
83
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
4633
|
83
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_BYTE, opcode->operand0); |
4634
|
83
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
4635
|
83
|
|
|
|
|
|
break; |
4636
|
|
|
|
|
|
|
} |
4637
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_SET_STACK_SHORT: |
4638
|
|
|
|
|
|
|
{ |
4639
|
70
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_SET_STACK_SHORT(stack, "); |
4640
|
70
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_int(string_buffer, opcode->operand3); |
4641
|
70
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
4642
|
70
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_SHORT, opcode->operand0); |
4643
|
70
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
4644
|
70
|
|
|
|
|
|
break; |
4645
|
|
|
|
|
|
|
} |
4646
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_SET_STACK_INT: |
4647
|
|
|
|
|
|
|
{ |
4648
|
3442
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_SET_STACK_INT(stack, "); |
4649
|
3442
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_int(string_buffer, opcode->operand3); |
4650
|
3442
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
4651
|
3442
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand0); |
4652
|
3442
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
4653
|
3442
|
|
|
|
|
|
break; |
4654
|
|
|
|
|
|
|
} |
4655
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_SET_STACK_LONG: |
4656
|
|
|
|
|
|
|
{ |
4657
|
144
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_SET_STACK_LONG(stack, "); |
4658
|
144
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_int(string_buffer, opcode->operand3); |
4659
|
144
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
4660
|
144
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_LONG, opcode->operand0); |
4661
|
144
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
4662
|
144
|
|
|
|
|
|
break; |
4663
|
|
|
|
|
|
|
} |
4664
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_SET_STACK_FLOAT: |
4665
|
|
|
|
|
|
|
{ |
4666
|
155
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_SET_STACK_FLOAT(stack, "); |
4667
|
155
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_int(string_buffer, opcode->operand3); |
4668
|
155
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
4669
|
155
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_FLOAT, opcode->operand0); |
4670
|
155
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
4671
|
155
|
|
|
|
|
|
break; |
4672
|
|
|
|
|
|
|
} |
4673
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_SET_STACK_DOUBLE: |
4674
|
|
|
|
|
|
|
{ |
4675
|
157
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_SET_STACK_DOUBLE(stack, "); |
4676
|
157
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_int(string_buffer, opcode->operand3); |
4677
|
157
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
4678
|
157
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_DOUBLE, opcode->operand0); |
4679
|
157
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
4680
|
157
|
|
|
|
|
|
break; |
4681
|
|
|
|
|
|
|
} |
4682
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_SET_STACK_OBJECT: |
4683
|
|
|
|
|
|
|
{ |
4684
|
8026
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_SET_STACK_OBJECT(stack, "); |
4685
|
8026
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_int(string_buffer, opcode->operand3); |
4686
|
8026
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
4687
|
8026
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_OBJECT, opcode->operand0); |
4688
|
8026
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
4689
|
8026
|
|
|
|
|
|
break; |
4690
|
|
|
|
|
|
|
} |
4691
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_SET_STACK_REF: |
4692
|
|
|
|
|
|
|
{ |
4693
|
167
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_SET_STACK_REF(stack, "); |
4694
|
167
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_int(string_buffer, opcode->operand3); |
4695
|
167
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", "); |
4696
|
167
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_REF, opcode->operand0); |
4697
|
167
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
4698
|
167
|
|
|
|
|
|
break; |
4699
|
|
|
|
|
|
|
} |
4700
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_SET_STACK_UNDEF: |
4701
|
|
|
|
|
|
|
{ |
4702
|
195
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_SET_STACK_UNDEF(stack, "); |
4703
|
195
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_int(string_buffer, opcode->operand3); |
4704
|
195
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
4705
|
195
|
|
|
|
|
|
break; |
4706
|
|
|
|
|
|
|
} |
4707
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_SET_STACK_MULNUM_BYTE: { |
4708
|
3
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " fields_length = "); |
4709
|
3
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_int(string_buffer, opcode->operand1); |
4710
|
3
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
4711
|
|
|
|
|
|
|
|
4712
|
3
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_SET_STACK_MULNUM_BYTE(env, stack, "); |
4713
|
3
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_int(string_buffer, opcode->operand3); |
4714
|
3
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", fields_length, "); |
4715
|
3
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand_address(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_BYTE, opcode->operand0); |
4716
|
3
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
4717
|
3
|
|
|
|
|
|
break; |
4718
|
|
|
|
|
|
|
} |
4719
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_SET_STACK_MULNUM_SHORT: { |
4720
|
3
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " fields_length = "); |
4721
|
3
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_int(string_buffer, opcode->operand1); |
4722
|
3
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
4723
|
|
|
|
|
|
|
|
4724
|
3
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_SET_STACK_MULNUM_SHORT(env, stack, "); |
4725
|
3
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_int(string_buffer, opcode->operand3); |
4726
|
3
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", fields_length, "); |
4727
|
3
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand_address(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_SHORT, opcode->operand0); |
4728
|
3
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
4729
|
3
|
|
|
|
|
|
break; |
4730
|
|
|
|
|
|
|
} |
4731
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_SET_STACK_MULNUM_INT: { |
4732
|
3
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " fields_length = "); |
4733
|
3
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_int(string_buffer, opcode->operand1); |
4734
|
3
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
4735
|
|
|
|
|
|
|
|
4736
|
3
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_SET_STACK_MULNUM_INT(env, stack, "); |
4737
|
3
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_int(string_buffer, opcode->operand3); |
4738
|
3
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", fields_length, "); |
4739
|
3
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand_address(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand0); |
4740
|
3
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
4741
|
3
|
|
|
|
|
|
break; |
4742
|
|
|
|
|
|
|
} |
4743
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_SET_STACK_MULNUM_LONG: { |
4744
|
3
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " fields_length = "); |
4745
|
3
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_int(string_buffer, opcode->operand1); |
4746
|
3
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
4747
|
|
|
|
|
|
|
|
4748
|
3
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_SET_STACK_MULNUM_LONG(env, stack, "); |
4749
|
3
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_int(string_buffer, opcode->operand3); |
4750
|
3
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", fields_length, "); |
4751
|
3
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand_address(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_LONG, opcode->operand0); |
4752
|
3
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
4753
|
3
|
|
|
|
|
|
break; |
4754
|
|
|
|
|
|
|
} |
4755
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_SET_STACK_MULNUM_FLOAT: { |
4756
|
3
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " fields_length = "); |
4757
|
3
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_int(string_buffer, opcode->operand1); |
4758
|
3
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
4759
|
|
|
|
|
|
|
|
4760
|
3
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_SET_STACK_MULNUM_FLOAT(env, stack, "); |
4761
|
3
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_int(string_buffer, opcode->operand3); |
4762
|
3
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", fields_length, "); |
4763
|
3
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand_address(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_FLOAT, opcode->operand0); |
4764
|
3
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
4765
|
3
|
|
|
|
|
|
break; |
4766
|
|
|
|
|
|
|
} |
4767
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_SET_STACK_MULNUM_DOUBLE: { |
4768
|
49
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " fields_length = "); |
4769
|
49
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_int(string_buffer, opcode->operand1); |
4770
|
49
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
4771
|
|
|
|
|
|
|
|
4772
|
49
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_SET_STACK_MULNUM_DOUBLE(env, stack, "); |
4773
|
49
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_int(string_buffer, opcode->operand3); |
4774
|
49
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", fields_length, "); |
4775
|
49
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand_address(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_DOUBLE, opcode->operand0); |
4776
|
49
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
4777
|
49
|
|
|
|
|
|
break; |
4778
|
|
|
|
|
|
|
} |
4779
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_RETURN_VOID: |
4780
|
|
|
|
|
|
|
{ |
4781
|
401
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " goto L"); |
4782
|
401
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_int(string_buffer, opcode->operand1); |
4783
|
401
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
4784
|
401
|
|
|
|
|
|
break; |
4785
|
|
|
|
|
|
|
} |
4786
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_RETURN_BYTE: { |
4787
|
87
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_RETURN_BYTE(stack, "); |
4788
|
87
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_BYTE, opcode->operand0); |
4789
|
87
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
4790
|
|
|
|
|
|
|
|
4791
|
87
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " goto L"); |
4792
|
87
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_int(string_buffer, opcode->operand1); |
4793
|
87
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
4794
|
87
|
|
|
|
|
|
break; |
4795
|
|
|
|
|
|
|
} |
4796
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_RETURN_SHORT: { |
4797
|
85
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_RETURN_SHORT(stack, "); |
4798
|
85
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_SHORT, opcode->operand0); |
4799
|
85
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
4800
|
|
|
|
|
|
|
|
4801
|
85
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " goto L"); |
4802
|
85
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_int(string_buffer, opcode->operand1); |
4803
|
85
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
4804
|
85
|
|
|
|
|
|
break; |
4805
|
|
|
|
|
|
|
} |
4806
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_RETURN_INT: { |
4807
|
16666
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_RETURN_INT(stack, "); |
4808
|
16666
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand0); |
4809
|
16666
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
4810
|
|
|
|
|
|
|
|
4811
|
16666
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " goto L"); |
4812
|
16666
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_int(string_buffer, opcode->operand1); |
4813
|
16666
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
4814
|
16666
|
|
|
|
|
|
break; |
4815
|
|
|
|
|
|
|
} |
4816
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_RETURN_LONG: { |
4817
|
334
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_RETURN_LONG(stack, "); |
4818
|
334
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_LONG, opcode->operand0); |
4819
|
334
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
4820
|
|
|
|
|
|
|
|
4821
|
334
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " goto L"); |
4822
|
334
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_int(string_buffer, opcode->operand1); |
4823
|
334
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
4824
|
334
|
|
|
|
|
|
break; |
4825
|
|
|
|
|
|
|
} |
4826
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_RETURN_FLOAT: { |
4827
|
178
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_RETURN_FLOAT(stack, "); |
4828
|
178
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_FLOAT, opcode->operand0); |
4829
|
178
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
4830
|
|
|
|
|
|
|
|
4831
|
178
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " goto L"); |
4832
|
178
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_int(string_buffer, opcode->operand1); |
4833
|
178
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
4834
|
178
|
|
|
|
|
|
break; |
4835
|
|
|
|
|
|
|
} |
4836
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_RETURN_DOUBLE: { |
4837
|
184
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_RETURN_DOUBLE(stack, "); |
4838
|
184
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_DOUBLE, opcode->operand0); |
4839
|
184
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
4840
|
|
|
|
|
|
|
|
4841
|
184
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " goto L"); |
4842
|
184
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_int(string_buffer, opcode->operand1); |
4843
|
184
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
4844
|
184
|
|
|
|
|
|
break; |
4845
|
|
|
|
|
|
|
} |
4846
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_RETURN_OBJECT: { |
4847
|
892
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_RETURN_OBJECT(env, stack, "); |
4848
|
892
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_OBJECT, opcode->operand0); |
4849
|
892
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ");\n"); |
4850
|
|
|
|
|
|
|
|
4851
|
892
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " goto L"); |
4852
|
892
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_int(string_buffer, opcode->operand1); |
4853
|
892
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
4854
|
892
|
|
|
|
|
|
break; |
4855
|
|
|
|
|
|
|
} |
4856
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_RETURN_UNDEF: { |
4857
|
19
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_RETURN_UNDEF(stack);\n"); |
4858
|
|
|
|
|
|
|
|
4859
|
19
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " goto L"); |
4860
|
19
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_int(string_buffer, opcode->operand1); |
4861
|
19
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
4862
|
19
|
|
|
|
|
|
break; |
4863
|
|
|
|
|
|
|
} |
4864
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_RETURN_MULNUM_BYTE: { |
4865
|
16
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " fields_length = "); |
4866
|
16
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_int(string_buffer, opcode->operand2); |
4867
|
16
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
4868
|
|
|
|
|
|
|
|
4869
|
16
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_RETURN_MULNUM_BYTE(env, stack, "); |
4870
|
16
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand_address(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_BYTE, opcode->operand0); |
4871
|
16
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", fields_length);\n"); |
4872
|
|
|
|
|
|
|
|
4873
|
16
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " goto L"); |
4874
|
16
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_int(string_buffer, opcode->operand1); |
4875
|
16
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
4876
|
16
|
|
|
|
|
|
break; |
4877
|
|
|
|
|
|
|
} |
4878
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_RETURN_MULNUM_SHORT: { |
4879
|
14
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " fields_length = "); |
4880
|
14
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_int(string_buffer, opcode->operand2); |
4881
|
14
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
4882
|
|
|
|
|
|
|
|
4883
|
14
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_RETURN_MULNUM_SHORT(env, stack, "); |
4884
|
14
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand_address(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_SHORT, opcode->operand0); |
4885
|
14
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", fields_length);\n"); |
4886
|
|
|
|
|
|
|
|
4887
|
14
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " goto L"); |
4888
|
14
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_int(string_buffer, opcode->operand1); |
4889
|
14
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
4890
|
14
|
|
|
|
|
|
break; |
4891
|
|
|
|
|
|
|
} |
4892
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_RETURN_MULNUM_INT: { |
4893
|
14
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " fields_length = "); |
4894
|
14
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_int(string_buffer, opcode->operand2); |
4895
|
14
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
4896
|
|
|
|
|
|
|
|
4897
|
14
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_RETURN_MULNUM_INT(env, stack, "); |
4898
|
14
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand_address(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_INT, opcode->operand0); |
4899
|
14
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", fields_length);\n"); |
4900
|
|
|
|
|
|
|
|
4901
|
14
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " goto L"); |
4902
|
14
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_int(string_buffer, opcode->operand1); |
4903
|
14
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
4904
|
14
|
|
|
|
|
|
break; |
4905
|
|
|
|
|
|
|
} |
4906
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_RETURN_MULNUM_LONG: { |
4907
|
14
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " fields_length = "); |
4908
|
14
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_int(string_buffer, opcode->operand2); |
4909
|
14
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
4910
|
|
|
|
|
|
|
|
4911
|
14
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_RETURN_MULNUM_LONG(env, stack, "); |
4912
|
14
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand_address(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_LONG, opcode->operand0); |
4913
|
14
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", fields_length);\n"); |
4914
|
|
|
|
|
|
|
|
4915
|
14
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " goto L"); |
4916
|
14
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_int(string_buffer, opcode->operand1); |
4917
|
14
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
4918
|
14
|
|
|
|
|
|
break; |
4919
|
|
|
|
|
|
|
} |
4920
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_RETURN_MULNUM_FLOAT: { |
4921
|
14
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " fields_length = "); |
4922
|
14
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_int(string_buffer, opcode->operand2); |
4923
|
14
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
4924
|
|
|
|
|
|
|
|
4925
|
14
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_RETURN_MULNUM_FLOAT(env, stack, "); |
4926
|
14
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand_address(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_FLOAT, opcode->operand0); |
4927
|
14
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", fields_length);\n"); |
4928
|
|
|
|
|
|
|
|
4929
|
14
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " goto L"); |
4930
|
14
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_int(string_buffer, opcode->operand1); |
4931
|
14
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
4932
|
14
|
|
|
|
|
|
break; |
4933
|
|
|
|
|
|
|
} |
4934
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_RETURN_MULNUM_DOUBLE: { |
4935
|
16
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " fields_length = "); |
4936
|
16
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_int(string_buffer, opcode->operand2); |
4937
|
16
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
4938
|
|
|
|
|
|
|
|
4939
|
16
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_RETURN_MULNUM_DOUBLE(env, stack, "); |
4940
|
16
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand_address(precompile, string_buffer, SPVM_PRECOMPILE_C_CTYPE_ID_DOUBLE, opcode->operand0); |
4941
|
16
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ", fields_length);\n"); |
4942
|
|
|
|
|
|
|
|
4943
|
16
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " goto L"); |
4944
|
16
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_int(string_buffer, opcode->operand1); |
4945
|
16
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
4946
|
16
|
|
|
|
|
|
break; |
4947
|
|
|
|
|
|
|
} |
4948
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_CALL_CLASS_METHOD: { |
4949
|
9437
|
|
|
|
|
|
int32_t invocant_decl_basic_type_id = opcode->operand0; |
4950
|
9437
|
|
|
|
|
|
int32_t decl_method_index = opcode->operand1; |
4951
|
9437
|
|
|
|
|
|
int32_t args_width = opcode->operand2; |
4952
|
|
|
|
|
|
|
|
4953
|
9437
|
|
|
|
|
|
SPVM_RUNTIME_BASIC_TYPE* invocant_decl_basic_type = SPVM_API_RUNTIME_get_basic_type_by_id(runtime, invocant_decl_basic_type_id); |
4954
|
9437
|
|
|
|
|
|
SPVM_RUNTIME_METHOD* decl_method = SPVM_API_BASIC_TYPE_get_method_by_index(runtime, invocant_decl_basic_type, decl_method_index); |
4955
|
9437
|
|
|
|
|
|
const char* method_name = decl_method->name; |
4956
|
9437
|
|
|
|
|
|
const char* basic_type_name = invocant_decl_basic_type->name; |
4957
|
|
|
|
|
|
|
|
4958
|
9437
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " basic_type_name = \""); |
4959
|
9437
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, (char*)basic_type_name); |
4960
|
9437
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, "\";\n"); |
4961
|
|
|
|
|
|
|
|
4962
|
9437
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " method_name = \""); |
4963
|
9437
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, (char*)method_name); |
4964
|
9437
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, "\";\n"); |
4965
|
|
|
|
|
|
|
|
4966
|
9437
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " args_width = "); |
4967
|
9437
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_int(string_buffer, args_width); |
4968
|
9437
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
4969
|
|
|
|
|
|
|
|
4970
|
9437
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " decl_method = "); |
4971
|
9437
|
|
|
|
|
|
SPVM_PRECOMPILE_add_method(precompile, string_buffer, basic_type_name, method_name); |
4972
|
9437
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
4973
|
|
|
|
|
|
|
|
4974
|
9437
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_CALL_CLASS_METHOD(env, stack, error_id, decl_method, args_width);\n"); |
4975
|
|
|
|
|
|
|
|
4976
|
9437
|
|
|
|
|
|
break; |
4977
|
|
|
|
|
|
|
} |
4978
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_CALL_INSTANCE_METHOD_STATIC: { |
4979
|
4
|
|
|
|
|
|
int32_t invocant_decl_basic_type_id = opcode->operand0; |
4980
|
4
|
|
|
|
|
|
int32_t decl_method_index = opcode->operand1; |
4981
|
4
|
|
|
|
|
|
int32_t args_width = opcode->operand2; |
4982
|
|
|
|
|
|
|
|
4983
|
4
|
|
|
|
|
|
SPVM_RUNTIME_BASIC_TYPE* invocant_decl_basic_type = SPVM_API_RUNTIME_get_basic_type_by_id(runtime, invocant_decl_basic_type_id); |
4984
|
4
|
|
|
|
|
|
SPVM_RUNTIME_METHOD* decl_method = SPVM_API_BASIC_TYPE_get_method_by_index(runtime, invocant_decl_basic_type, decl_method_index); |
4985
|
4
|
|
|
|
|
|
const char* method_name = decl_method->name; |
4986
|
4
|
|
|
|
|
|
const char* basic_type_name = invocant_decl_basic_type->name; |
4987
|
|
|
|
|
|
|
|
4988
|
4
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " basic_type_name = \""); |
4989
|
4
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, (char*)basic_type_name); |
4990
|
4
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, "\";\n"); |
4991
|
|
|
|
|
|
|
|
4992
|
4
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " method_name = \""); |
4993
|
4
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, (char*)method_name); |
4994
|
4
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, "\";\n"); |
4995
|
|
|
|
|
|
|
|
4996
|
4
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " args_width = "); |
4997
|
4
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_int(string_buffer, args_width); |
4998
|
4
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
4999
|
|
|
|
|
|
|
|
5000
|
4
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " decl_method = "); |
5001
|
4
|
|
|
|
|
|
SPVM_PRECOMPILE_add_method(precompile, string_buffer, basic_type_name, method_name); |
5002
|
4
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, ";\n"); |
5003
|
|
|
|
|
|
|
|
5004
|
4
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, |
5005
|
|
|
|
|
|
|
" SPVM_IMPLEMENT_CALL_INSTANCE_METHOD_STATIC(env, stack, error_id, decl_method, args_width);\n"); |
5006
|
|
|
|
|
|
|
|
5007
|
4
|
|
|
|
|
|
break; |
5008
|
|
|
|
|
|
|
} |
5009
|
|
|
|
|
|
|
case SPVM_OPCODE_C_ID_CALL_INSTANCE_METHOD: { |
5010
|
2517
|
|
|
|
|
|
int32_t invocant_decl_basic_type_id = opcode->operand0; |
5011
|
2517
|
|
|
|
|
|
int32_t decl_method_index = opcode->operand1; |
5012
|
2517
|
|
|
|
|
|
int32_t args_width = opcode->operand2; |
5013
|
|
|
|
|
|
|
|
5014
|
2517
|
|
|
|
|
|
SPVM_RUNTIME_BASIC_TYPE* invocant_decl_basic_type = SPVM_API_RUNTIME_get_basic_type_by_id(runtime, invocant_decl_basic_type_id); |
5015
|
2517
|
|
|
|
|
|
SPVM_RUNTIME_METHOD* decl_method = SPVM_API_BASIC_TYPE_get_method_by_index(runtime, invocant_decl_basic_type, decl_method_index); |
5016
|
2517
|
|
|
|
|
|
const char* method_name = decl_method->name; |
5017
|
2517
|
|
|
|
|
|
const char* basic_type_name = invocant_decl_basic_type->name; |
5018
|
|
|
|
|
|
|
|
5019
|
2517
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " basic_type_name = \""); |
5020
|
2517
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, (char*)basic_type_name); |
5021
|
2517
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, "\";\n"); |
5022
|
|
|
|
|
|
|
|
5023
|
2517
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " method_name = \""); |
5024
|
2517
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, (char*)method_name); |
5025
|
2517
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, "\";\n"); |
5026
|
|
|
|
|
|
|
|
5027
|
2517
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " args_width = "); |
5028
|
2517
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_int(string_buffer, args_width); |
5029
|
2517
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, |
5030
|
|
|
|
|
|
|
";\n"); |
5031
|
2517
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " SPVM_IMPLEMENT_CALL_INSTANCE_METHOD(env, stack, basic_type_name, method_name, args_width, &error_id, tmp_buffer, sizeof(tmp_buffer));\n"); |
5032
|
|
|
|
|
|
|
|
5033
|
2517
|
|
|
|
|
|
break; |
5034
|
|
|
|
|
|
|
} |
5035
|
|
|
|
|
|
|
default: { |
5036
|
0
|
|
|
|
|
|
spvm_warn("[Unexpected Error]The \"%s\" opcode is not defined", SPVM_OPCODE_get_opcode_name(opcode_id)); |
5037
|
0
|
|
|
|
|
|
assert(0); |
5038
|
|
|
|
|
|
|
} |
5039
|
|
|
|
|
|
|
} |
5040
|
256948
|
|
|
|
|
|
opcode_index++; |
5041
|
|
|
|
|
|
|
} |
5042
|
|
|
|
|
|
|
|
5043
|
|
|
|
|
|
|
// No exception |
5044
|
5777
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " END_OF_METHOD:\n"); |
5045
|
5777
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " if (error_id == 0) {\n"); |
5046
|
5777
|
|
|
|
|
|
SPVM_RUNTIME_BASIC_TYPE* current_method_return_basic_type = current_method->return_basic_type; |
5047
|
5777
|
|
|
|
|
|
int32_t current_method_return_type_dimension = current_method->return_type_dimension; |
5048
|
5777
|
|
|
|
|
|
int32_t current_method_return_type_flag =current_method->return_type_flag; |
5049
|
5777
|
|
|
|
|
|
int32_t method_return_type_is_object = SPVM_API_TYPE_is_object_type(runtime, current_method_return_basic_type, current_method_return_type_dimension, current_method_return_type_flag); |
5050
|
5777
|
100
|
|
|
|
|
if (method_return_type_is_object) { |
5051
|
437
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " if (stack[0].oval != NULL) {\n" |
5052
|
|
|
|
|
|
|
" env->api->internal->lock_object(env, stack, stack[0].oval);\n" |
5053
|
|
|
|
|
|
|
" env->api->internal->dec_ref_count(env, stack, stack[0].oval);\n" |
5054
|
|
|
|
|
|
|
" env->api->internal->unlock_object(env, stack, stack[0].oval);\n" |
5055
|
|
|
|
|
|
|
" }\n"); |
5056
|
|
|
|
|
|
|
} |
5057
|
5777
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, " }\n" |
5058
|
|
|
|
|
|
|
" return error_id;\n" |
5059
|
|
|
|
|
|
|
"}\n" |
5060
|
|
|
|
|
|
|
"\n"); |
5061
|
5777
|
|
|
|
|
|
} |
5062
|
|
|
|
|
|
|
|
5063
|
0
|
|
|
|
|
|
const char* SPVM_PRECOMPILE_get_ctype_name(SPVM_PRECOMPILE* precompile, int32_t ctype_id) { |
5064
|
0
|
|
|
|
|
|
SPVM_RUNTIME* runtime = precompile->runtime; |
5065
|
|
|
|
|
|
|
|
5066
|
|
|
|
|
|
|
|
5067
|
0
|
|
|
|
|
|
switch (ctype_id) { |
5068
|
|
|
|
|
|
|
case SPVM_PRECOMPILE_C_CTYPE_ID_BYTE: |
5069
|
0
|
|
|
|
|
|
return "int8_t"; |
5070
|
|
|
|
|
|
|
break; |
5071
|
|
|
|
|
|
|
case SPVM_PRECOMPILE_C_CTYPE_ID_SHORT: |
5072
|
0
|
|
|
|
|
|
return "int16_t"; |
5073
|
|
|
|
|
|
|
break; |
5074
|
|
|
|
|
|
|
case SPVM_PRECOMPILE_C_CTYPE_ID_INT: |
5075
|
0
|
|
|
|
|
|
return "int32_t"; |
5076
|
|
|
|
|
|
|
break; |
5077
|
|
|
|
|
|
|
case SPVM_PRECOMPILE_C_CTYPE_ID_LONG: |
5078
|
0
|
|
|
|
|
|
return "int64_t"; |
5079
|
|
|
|
|
|
|
break; |
5080
|
|
|
|
|
|
|
case SPVM_PRECOMPILE_C_CTYPE_ID_FLOAT: |
5081
|
0
|
|
|
|
|
|
return "float"; |
5082
|
|
|
|
|
|
|
break; |
5083
|
|
|
|
|
|
|
case SPVM_PRECOMPILE_C_CTYPE_ID_DOUBLE: |
5084
|
0
|
|
|
|
|
|
return "double"; |
5085
|
|
|
|
|
|
|
break; |
5086
|
|
|
|
|
|
|
case SPVM_PRECOMPILE_C_CTYPE_ID_OBJECT: |
5087
|
0
|
|
|
|
|
|
return "void*"; |
5088
|
|
|
|
|
|
|
break; |
5089
|
|
|
|
|
|
|
case SPVM_PRECOMPILE_C_CTYPE_ID_REF: |
5090
|
0
|
|
|
|
|
|
return "void*"; |
5091
|
|
|
|
|
|
|
break; |
5092
|
|
|
|
|
|
|
} |
5093
|
|
|
|
|
|
|
|
5094
|
0
|
|
|
|
|
|
return NULL; |
5095
|
|
|
|
|
|
|
} |
5096
|
|
|
|
|
|
|
|
5097
|
233458
|
|
|
|
|
|
void SPVM_PRECOMPILE_add_operand(SPVM_PRECOMPILE* precompile, SPVM_STRING_BUFFER* string_buffer, int32_t ctype_id, int32_t index) { |
5098
|
233458
|
|
|
|
|
|
SPVM_RUNTIME* runtime = precompile->runtime; |
5099
|
|
|
|
|
|
|
|
5100
|
233458
|
|
|
|
|
|
switch (ctype_id) { |
5101
|
|
|
|
|
|
|
case SPVM_PRECOMPILE_C_CTYPE_ID_BYTE: { |
5102
|
6419
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, "byte_vars["); |
5103
|
6419
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_int(string_buffer, index); |
5104
|
6419
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, "]"); |
5105
|
6419
|
|
|
|
|
|
break; |
5106
|
|
|
|
|
|
|
} |
5107
|
|
|
|
|
|
|
case SPVM_PRECOMPILE_C_CTYPE_ID_SHORT: { |
5108
|
4408
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, "short_vars["); |
5109
|
4408
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_int(string_buffer, index); |
5110
|
4408
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, "]"); |
5111
|
4408
|
|
|
|
|
|
break; |
5112
|
|
|
|
|
|
|
} |
5113
|
|
|
|
|
|
|
case SPVM_PRECOMPILE_C_CTYPE_ID_INT: { |
5114
|
157418
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, "int_vars["); |
5115
|
157418
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_int(string_buffer, index); |
5116
|
157418
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, "]"); |
5117
|
157418
|
|
|
|
|
|
break; |
5118
|
|
|
|
|
|
|
} |
5119
|
|
|
|
|
|
|
case SPVM_PRECOMPILE_C_CTYPE_ID_LONG: { |
5120
|
6933
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, "long_vars["); |
5121
|
6933
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_int(string_buffer, index); |
5122
|
6933
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, "]"); |
5123
|
6933
|
|
|
|
|
|
break; |
5124
|
|
|
|
|
|
|
} |
5125
|
|
|
|
|
|
|
case SPVM_PRECOMPILE_C_CTYPE_ID_FLOAT: { |
5126
|
6313
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, "float_vars["); |
5127
|
6313
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_int(string_buffer, index); |
5128
|
6313
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, "]"); |
5129
|
6313
|
|
|
|
|
|
break; |
5130
|
|
|
|
|
|
|
} |
5131
|
|
|
|
|
|
|
case SPVM_PRECOMPILE_C_CTYPE_ID_DOUBLE: { |
5132
|
7023
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, "double_vars["); |
5133
|
7023
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_int(string_buffer, index); |
5134
|
7023
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, "]"); |
5135
|
7023
|
|
|
|
|
|
break; |
5136
|
|
|
|
|
|
|
} |
5137
|
|
|
|
|
|
|
case SPVM_PRECOMPILE_C_CTYPE_ID_BOOL_CONVERSION_OBJECT: |
5138
|
|
|
|
|
|
|
case SPVM_PRECOMPILE_C_CTYPE_ID_OBJECT: |
5139
|
|
|
|
|
|
|
{ |
5140
|
44022
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, "object_vars["); |
5141
|
44022
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_int(string_buffer, index); |
5142
|
44022
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, "]"); |
5143
|
44022
|
|
|
|
|
|
break; |
5144
|
|
|
|
|
|
|
} |
5145
|
|
|
|
|
|
|
case SPVM_PRECOMPILE_C_CTYPE_ID_REF: { |
5146
|
922
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, "ref_vars["); |
5147
|
922
|
|
|
|
|
|
SPVM_STRING_BUFFER_add_int(string_buffer, index); |
5148
|
922
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, "]"); |
5149
|
922
|
|
|
|
|
|
break; |
5150
|
|
|
|
|
|
|
} |
5151
|
|
|
|
|
|
|
default: |
5152
|
0
|
|
|
|
|
|
assert(0); |
5153
|
|
|
|
|
|
|
} |
5154
|
233458
|
|
|
|
|
|
} |
5155
|
|
|
|
|
|
|
|
5156
|
21557
|
|
|
|
|
|
void SPVM_PRECOMPILE_add_operand_address(SPVM_PRECOMPILE* precompile, SPVM_STRING_BUFFER* string_buffer, int32_t ctype_id, int32_t var_index) { |
5157
|
21557
|
|
|
|
|
|
SPVM_RUNTIME* runtime = precompile->runtime; |
5158
|
21557
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, "&"); |
5159
|
21557
|
|
|
|
|
|
SPVM_PRECOMPILE_add_operand(precompile, string_buffer, ctype_id, var_index); |
5160
|
21557
|
|
|
|
|
|
} |
5161
|
|
|
|
|
|
|
|
5162
|
22552
|
|
|
|
|
|
void SPVM_PRECOMPILE_add_basic_type(SPVM_PRECOMPILE* precompile, SPVM_STRING_BUFFER* string_buffer, const char* basic_type_name) { |
5163
|
22552
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, "basic_type"); |
5164
|
22552
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, "____"); |
5165
|
22552
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, basic_type_name); |
5166
|
22552
|
|
|
|
|
|
SPVM_PRECOMPILE_replace_colon_with_under_score(precompile, string_buffer->string + string_buffer->length - strlen(basic_type_name)); |
5167
|
22552
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, "____"); |
5168
|
22552
|
|
|
|
|
|
} |
5169
|
|
|
|
|
|
|
|
5170
|
2339
|
|
|
|
|
|
void SPVM_PRECOMPILE_add_class_var(SPVM_PRECOMPILE* precompile, SPVM_STRING_BUFFER* string_buffer, const char* basic_type_name, const char* class_var_name) { |
5171
|
2339
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, "class_var"); |
5172
|
2339
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, "____"); |
5173
|
2339
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, basic_type_name); |
5174
|
2339
|
|
|
|
|
|
SPVM_PRECOMPILE_replace_colon_with_under_score(precompile, string_buffer->string + string_buffer->length - strlen(basic_type_name)); |
5175
|
2339
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, "____"); |
5176
|
2339
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, class_var_name); |
5177
|
2339
|
|
|
|
|
|
SPVM_PRECOMPILE_replace_colon_with_under_score(precompile, string_buffer->string + string_buffer->length - strlen(class_var_name)); |
5178
|
2339
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, "____"); |
5179
|
2339
|
|
|
|
|
|
} |
5180
|
|
|
|
|
|
|
|
5181
|
0
|
|
|
|
|
|
void SPVM_PRECOMPILE_add_field(SPVM_PRECOMPILE* precompile, SPVM_STRING_BUFFER* string_buffer, const char* basic_type_name, const char* field_name) { |
5182
|
0
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, "field"); |
5183
|
0
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, "____"); |
5184
|
0
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, basic_type_name); |
5185
|
0
|
|
|
|
|
|
SPVM_PRECOMPILE_replace_colon_with_under_score(precompile, string_buffer->string + string_buffer->length - strlen(basic_type_name)); |
5186
|
0
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, "____"); |
5187
|
0
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, field_name); |
5188
|
0
|
|
|
|
|
|
SPVM_PRECOMPILE_replace_colon_with_under_score(precompile, string_buffer->string + string_buffer->length - strlen(field_name)); |
5189
|
0
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, "____"); |
5190
|
0
|
|
|
|
|
|
} |
5191
|
|
|
|
|
|
|
|
5192
|
7057
|
|
|
|
|
|
void SPVM_PRECOMPILE_add_field_offset(SPVM_PRECOMPILE* precompile, SPVM_STRING_BUFFER* string_buffer, const char* basic_type_name, const char* field_name) { |
5193
|
7057
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, "field_offset"); |
5194
|
7057
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, "____"); |
5195
|
7057
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, basic_type_name); |
5196
|
7057
|
|
|
|
|
|
SPVM_PRECOMPILE_replace_colon_with_under_score(precompile, string_buffer->string + string_buffer->length - strlen(basic_type_name)); |
5197
|
7057
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, "____"); |
5198
|
7057
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, field_name); |
5199
|
7057
|
|
|
|
|
|
SPVM_PRECOMPILE_replace_colon_with_under_score(precompile, string_buffer->string + string_buffer->length - strlen(field_name)); |
5200
|
7057
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, "____"); |
5201
|
7057
|
|
|
|
|
|
} |
5202
|
|
|
|
|
|
|
|
5203
|
27096
|
|
|
|
|
|
void SPVM_PRECOMPILE_add_method(SPVM_PRECOMPILE* precompile, SPVM_STRING_BUFFER* string_buffer, const char* basic_type_name, const char* method_name) { |
5204
|
27096
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, "method"); |
5205
|
27096
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, "____"); |
5206
|
27096
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, basic_type_name); |
5207
|
27096
|
|
|
|
|
|
SPVM_PRECOMPILE_replace_colon_with_under_score(precompile, string_buffer->string + string_buffer->length - strlen(basic_type_name)); |
5208
|
27096
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, "____"); |
5209
|
27096
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, method_name); |
5210
|
27096
|
|
|
|
|
|
SPVM_PRECOMPILE_replace_colon_with_under_score(precompile, string_buffer->string + string_buffer->length - strlen(method_name)); |
5211
|
27096
|
|
|
|
|
|
SPVM_STRING_BUFFER_add(string_buffer, "____"); |
5212
|
27096
|
|
|
|
|
|
} |
5213
|
|
|
|
|
|
|
|
5214
|
872
|
|
|
|
|
|
int32_t SPVM_PRECOMPILE_contains_class_var(SPVM_PRECOMPILE* precompile, const char* string, const char* basic_type_name, const char* class_var_name) { |
5215
|
|
|
|
|
|
|
|
5216
|
872
|
|
|
|
|
|
const char* label = "class_var"; |
5217
|
872
|
|
|
|
|
|
int32_t found = SPVM_PRECOMPILE_contains_access_id(precompile,string, label, basic_type_name, class_var_name); |
5218
|
|
|
|
|
|
|
|
5219
|
872
|
|
|
|
|
|
return found; |
5220
|
|
|
|
|
|
|
} |
5221
|
|
|
|
|
|
|
|
5222
|
0
|
|
|
|
|
|
int32_t SPVM_PRECOMPILE_contains_field(SPVM_PRECOMPILE* precompile, const char* string, const char* basic_type_name, const char* field_name) { |
5223
|
|
|
|
|
|
|
|
5224
|
0
|
|
|
|
|
|
const char* label = "field"; |
5225
|
0
|
|
|
|
|
|
int32_t found = SPVM_PRECOMPILE_contains_access_id(precompile,string, label, basic_type_name, field_name); |
5226
|
|
|
|
|
|
|
|
5227
|
0
|
|
|
|
|
|
return found; |
5228
|
|
|
|
|
|
|
} |
5229
|
|
|
|
|
|
|
|
5230
|
1999
|
|
|
|
|
|
int32_t SPVM_PRECOMPILE_contains_field_offset(SPVM_PRECOMPILE* precompile, const char* string, const char* basic_type_name, const char* field_name) { |
5231
|
|
|
|
|
|
|
|
5232
|
1999
|
|
|
|
|
|
const char* label = "field_offset"; |
5233
|
1999
|
|
|
|
|
|
int32_t found = SPVM_PRECOMPILE_contains_access_id(precompile,string, label, basic_type_name, field_name); |
5234
|
|
|
|
|
|
|
|
5235
|
1999
|
|
|
|
|
|
return found; |
5236
|
|
|
|
|
|
|
} |
5237
|
|
|
|
|
|
|
|
5238
|
9441
|
|
|
|
|
|
int32_t SPVM_PRECOMPILE_contains_method(SPVM_PRECOMPILE* precompile, const char* string, const char* basic_type_name, const char* method_name) { |
5239
|
|
|
|
|
|
|
|
5240
|
9441
|
|
|
|
|
|
const char* label = "method"; |
5241
|
9441
|
|
|
|
|
|
int32_t found = SPVM_PRECOMPILE_contains_access_id(precompile,string, label, basic_type_name, method_name); |
5242
|
|
|
|
|
|
|
|
5243
|
9441
|
|
|
|
|
|
return found; |
5244
|
|
|
|
|
|
|
} |
5245
|
|
|
|
|
|
|
|
5246
|
14254
|
|
|
|
|
|
int32_t SPVM_PRECOMPILE_contains_basic_type(SPVM_PRECOMPILE* precompile, const char* string, const char* basic_type_name) { |
5247
|
|
|
|
|
|
|
|
5248
|
14254
|
|
|
|
|
|
const char* label = "basic_type"; |
5249
|
|
|
|
|
|
|
|
5250
|
14254
|
|
|
|
|
|
int32_t found = SPVM_PRECOMPILE_contains_access_id(precompile,string, label, basic_type_name, NULL); |
5251
|
|
|
|
|
|
|
|
5252
|
14254
|
|
|
|
|
|
return found; |
5253
|
|
|
|
|
|
|
} |
5254
|
|
|
|
|
|
|
|
5255
|
26566
|
|
|
|
|
|
int32_t SPVM_PRECOMPILE_contains_access_id(SPVM_PRECOMPILE* precompile, const char* string, const char* label, const char* name1, const char* name2) { |
5256
|
|
|
|
|
|
|
|
5257
|
26566
|
|
|
|
|
|
int32_t label_length = strlen(label); |
5258
|
|
|
|
|
|
|
|
5259
|
26566
|
|
|
|
|
|
const char* separator = "____"; |
5260
|
26566
|
|
|
|
|
|
int32_t separator_length = strlen(separator); |
5261
|
|
|
|
|
|
|
|
5262
|
26566
|
|
|
|
|
|
int32_t name1_length = strlen(name1); |
5263
|
|
|
|
|
|
|
|
5264
|
26566
|
|
|
|
|
|
int32_t name2_length = 0; |
5265
|
26566
|
100
|
|
|
|
|
if (name2) { |
5266
|
12312
|
|
|
|
|
|
name2_length = strlen(name2); |
5267
|
|
|
|
|
|
|
} |
5268
|
|
|
|
|
|
|
|
5269
|
26566
|
|
|
|
|
|
int32_t length = label_length + separator_length + name1_length + separator_length; |
5270
|
26566
|
100
|
|
|
|
|
if (name2) { |
5271
|
12312
|
|
|
|
|
|
length += separator_length + name2_length + separator_length; |
5272
|
|
|
|
|
|
|
} |
5273
|
|
|
|
|
|
|
|
5274
|
26566
|
|
|
|
|
|
char* name_abs = SPVM_ALLOCATOR_alloc_memory_block_unmanaged(length + 1); |
5275
|
|
|
|
|
|
|
|
5276
|
26566
|
|
|
|
|
|
memcpy(name_abs, label, label_length); |
5277
|
26566
|
|
|
|
|
|
memcpy(name_abs + label_length, separator, separator_length); |
5278
|
26566
|
|
|
|
|
|
memcpy(name_abs + label_length + separator_length, name1, name1_length); |
5279
|
26566
|
|
|
|
|
|
memcpy(name_abs + label_length + separator_length + name1_length, separator, separator_length); |
5280
|
26566
|
100
|
|
|
|
|
if (name2) { |
5281
|
12312
|
|
|
|
|
|
memcpy(name_abs + label_length + separator_length + name1_length + separator_length, name2, name2_length); |
5282
|
12312
|
|
|
|
|
|
memcpy(name_abs + label_length + separator_length + name1_length + separator_length + name2_length, separator, separator_length); |
5283
|
|
|
|
|
|
|
} |
5284
|
|
|
|
|
|
|
|
5285
|
26566
|
|
|
|
|
|
SPVM_PRECOMPILE_replace_colon_with_under_score(precompile, name_abs); |
5286
|
|
|
|
|
|
|
|
5287
|
26566
|
|
|
|
|
|
const char* found_ptr = strstr(string, name_abs); |
5288
|
26566
|
|
|
|
|
|
int32_t found = !!found_ptr; |
5289
|
|
|
|
|
|
|
|
5290
|
26566
|
|
|
|
|
|
SPVM_ALLOCATOR_free_memory_block_unmanaged(name_abs); |
5291
|
|
|
|
|
|
|
|
5292
|
26566
|
|
|
|
|
|
return found; |
5293
|
|
|
|
|
|
|
} |
5294
|
|
|
|
|
|
|
|
5295
|
122102
|
|
|
|
|
|
void SPVM_PRECOMPILE_replace_colon_with_under_score(SPVM_PRECOMPILE* precompile, char* string) { |
5296
|
122102
|
|
|
|
|
|
int32_t offset = 0; |
5297
|
2282495
|
100
|
|
|
|
|
while (string[offset] != '\0') { |
5298
|
2160393
|
100
|
|
|
|
|
if (string[offset] == ':') { |
5299
|
100050
|
|
|
|
|
|
string[offset] = '_'; |
5300
|
|
|
|
|
|
|
} |
5301
|
2160393
|
|
|
|
|
|
offset++; |
5302
|
|
|
|
|
|
|
} |
5303
|
122102
|
|
|
|
|
|
} |