debase-ruby_core_source 0.8.0 → 0.8.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (52) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +1 -1
  3. data/CHANGELOG.md +4 -0
  4. data/lib/debase/ruby_core_source.rb +1 -0
  5. data/lib/debase/ruby_core_source/ruby-2.3.0-preview1/addr2line.h +21 -0
  6. data/lib/debase/ruby_core_source/ruby-2.3.0-preview1/ccan/build_assert/build_assert.h +40 -0
  7. data/lib/debase/ruby_core_source/ruby-2.3.0-preview1/ccan/check_type/check_type.h +63 -0
  8. data/lib/debase/ruby_core_source/ruby-2.3.0-preview1/ccan/container_of/container_of.h +142 -0
  9. data/lib/debase/ruby_core_source/ruby-2.3.0-preview1/ccan/list/list.h +773 -0
  10. data/lib/debase/ruby_core_source/ruby-2.3.0-preview1/ccan/str/str.h +16 -0
  11. data/lib/debase/ruby_core_source/ruby-2.3.0-preview1/constant.h +50 -0
  12. data/lib/debase/ruby_core_source/ruby-2.3.0-preview1/dln.h +51 -0
  13. data/lib/debase/ruby_core_source/ruby-2.3.0-preview1/encindex.h +67 -0
  14. data/lib/debase/ruby_core_source/ruby-2.3.0-preview1/eval_intern.h +325 -0
  15. data/lib/debase/ruby_core_source/ruby-2.3.0-preview1/gc.h +114 -0
  16. data/lib/debase/ruby_core_source/ruby-2.3.0-preview1/id.h +212 -0
  17. data/lib/debase/ruby_core_source/ruby-2.3.0-preview1/id_table.h +30 -0
  18. data/lib/debase/ruby_core_source/ruby-2.3.0-preview1/insns.inc +109 -0
  19. data/lib/debase/ruby_core_source/ruby-2.3.0-preview1/insns_info.inc +769 -0
  20. data/lib/debase/ruby_core_source/ruby-2.3.0-preview1/internal.h +1373 -0
  21. data/lib/debase/ruby_core_source/ruby-2.3.0-preview1/iseq.h +181 -0
  22. data/lib/debase/ruby_core_source/ruby-2.3.0-preview1/known_errors.inc +746 -0
  23. data/lib/debase/ruby_core_source/ruby-2.3.0-preview1/method.h +210 -0
  24. data/lib/debase/ruby_core_source/ruby-2.3.0-preview1/node.h +521 -0
  25. data/lib/debase/ruby_core_source/ruby-2.3.0-preview1/node_name.inc +208 -0
  26. data/lib/debase/ruby_core_source/ruby-2.3.0-preview1/opt_sc.inc +750 -0
  27. data/lib/debase/ruby_core_source/ruby-2.3.0-preview1/optinsn.inc +83 -0
  28. data/lib/debase/ruby_core_source/ruby-2.3.0-preview1/optunifs.inc +126 -0
  29. data/lib/debase/ruby_core_source/ruby-2.3.0-preview1/parse.h +204 -0
  30. data/lib/debase/ruby_core_source/ruby-2.3.0-preview1/probes_helper.h +43 -0
  31. data/lib/debase/ruby_core_source/ruby-2.3.0-preview1/regenc.h +234 -0
  32. data/lib/debase/ruby_core_source/ruby-2.3.0-preview1/regint.h +972 -0
  33. data/lib/debase/ruby_core_source/ruby-2.3.0-preview1/regparse.h +363 -0
  34. data/lib/debase/ruby_core_source/ruby-2.3.0-preview1/revision.h +1 -0
  35. data/lib/debase/ruby_core_source/ruby-2.3.0-preview1/ruby_atomic.h +233 -0
  36. data/lib/debase/ruby_core_source/ruby-2.3.0-preview1/siphash.h +48 -0
  37. data/lib/debase/ruby_core_source/ruby-2.3.0-preview1/symbol.h +108 -0
  38. data/lib/debase/ruby_core_source/ruby-2.3.0-preview1/thread_pthread.h +54 -0
  39. data/lib/debase/ruby_core_source/ruby-2.3.0-preview1/thread_win32.h +36 -0
  40. data/lib/debase/ruby_core_source/ruby-2.3.0-preview1/timev.h +42 -0
  41. data/lib/debase/ruby_core_source/ruby-2.3.0-preview1/transcode_data.h +139 -0
  42. data/lib/debase/ruby_core_source/ruby-2.3.0-preview1/version.h +55 -0
  43. data/lib/debase/ruby_core_source/ruby-2.3.0-preview1/vm.inc +3374 -0
  44. data/lib/debase/ruby_core_source/ruby-2.3.0-preview1/vm_call_iseq_optimized.inc +212 -0
  45. data/lib/debase/ruby_core_source/ruby-2.3.0-preview1/vm_core.h +1216 -0
  46. data/lib/debase/ruby_core_source/ruby-2.3.0-preview1/vm_debug.h +37 -0
  47. data/lib/debase/ruby_core_source/ruby-2.3.0-preview1/vm_exec.h +182 -0
  48. data/lib/debase/ruby_core_source/ruby-2.3.0-preview1/vm_insnhelper.h +246 -0
  49. data/lib/debase/ruby_core_source/ruby-2.3.0-preview1/vm_opts.h +57 -0
  50. data/lib/debase/ruby_core_source/ruby-2.3.0-preview1/vmtc.inc +107 -0
  51. data/lib/debase/ruby_core_source/version.rb +1 -1
  52. metadata +49 -3
@@ -0,0 +1,3374 @@
1
+ /* -*-c-*- *********************************************************/
2
+ /*******************************************************************/
3
+ /*******************************************************************/
4
+ /**
5
+ This file is VM main loop.
6
+
7
+ ----
8
+ This file is auto generated by insns2vm.rb
9
+ DO NOT TOUCH!
10
+
11
+ If you want to fix something, you must edit 'insns.def'
12
+ */
13
+
14
+
15
+ INSN_ENTRY(nop){
16
+ {
17
+
18
+
19
+ DEBUG_ENTER_INSN("nop");
20
+ ADD_PC(1+0);
21
+ PREFETCH(GET_PC());
22
+ #define CURRENT_INSN_nop 1
23
+ #define INSN_IS_SC() 0
24
+ #define INSN_LABEL(lab) LABEL_nop_##lab
25
+ #define LABEL_IS_SC(lab) LABEL_##lab##_##t
26
+ COLLECT_USAGE_INSN(BIN(nop));
27
+ {
28
+ #line 40 "insns.def"
29
+ /* none */
30
+
31
+ #line 32 "vm.inc"
32
+ #undef CURRENT_INSN_nop
33
+ #undef INSN_IS_SC
34
+ #undef INSN_LABEL
35
+ #undef LABEL_IS_SC
36
+ END_INSN(nop);}}}
37
+ INSN_ENTRY(getlocal){
38
+ {
39
+ VALUE val;
40
+ rb_num_t level = (rb_num_t)GET_OPERAND(2);
41
+ lindex_t idx = (lindex_t)GET_OPERAND(1);
42
+
43
+ DEBUG_ENTER_INSN("getlocal");
44
+ ADD_PC(1+2);
45
+ PREFETCH(GET_PC());
46
+ #define CURRENT_INSN_getlocal 1
47
+ #define INSN_IS_SC() 0
48
+ #define INSN_LABEL(lab) LABEL_getlocal_##lab
49
+ #define LABEL_IS_SC(lab) LABEL_##lab##_##t
50
+ COLLECT_USAGE_INSN(BIN(getlocal));
51
+ COLLECT_USAGE_OPERAND(BIN(getlocal), 0, idx);
52
+ COLLECT_USAGE_OPERAND(BIN(getlocal), 1, level);
53
+ {
54
+ #line 60 "insns.def"
55
+ int i, lev = (int)level;
56
+ VALUE *ep = GET_EP();
57
+
58
+ /* optimized insns generated for level == (0|1) in defs/opt_operand.def */
59
+ for (i = 0; i < lev; i++) {
60
+ ep = GET_PREV_EP(ep);
61
+ }
62
+ val = *(ep - idx);
63
+
64
+ #line 65 "vm.inc"
65
+ CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
66
+ PUSH(val);
67
+ #undef CURRENT_INSN_getlocal
68
+ #undef INSN_IS_SC
69
+ #undef INSN_LABEL
70
+ #undef LABEL_IS_SC
71
+ END_INSN(getlocal);}}}
72
+ INSN_ENTRY(setlocal){
73
+ {
74
+ rb_num_t level = (rb_num_t)GET_OPERAND(2);
75
+ lindex_t idx = (lindex_t)GET_OPERAND(1);
76
+ VALUE val = TOPN(0);
77
+ DEBUG_ENTER_INSN("setlocal");
78
+ ADD_PC(1+2);
79
+ PREFETCH(GET_PC());
80
+ POPN(1);
81
+ #define CURRENT_INSN_setlocal 1
82
+ #define INSN_IS_SC() 0
83
+ #define INSN_LABEL(lab) LABEL_setlocal_##lab
84
+ #define LABEL_IS_SC(lab) LABEL_##lab##_##t
85
+ COLLECT_USAGE_INSN(BIN(setlocal));
86
+ COLLECT_USAGE_OPERAND(BIN(setlocal), 0, idx);
87
+ COLLECT_USAGE_OPERAND(BIN(setlocal), 1, level);
88
+ {
89
+ #line 83 "insns.def"
90
+ int i, lev = (int)level;
91
+ VALUE *ep = GET_EP();
92
+
93
+ /* optimized insns generated for level == (0|1) in defs/opt_operand.def */
94
+ for (i = 0; i < lev; i++) {
95
+ ep = GET_PREV_EP(ep);
96
+ }
97
+ *(ep - idx) = val;
98
+
99
+ #line 100 "vm.inc"
100
+ #undef CURRENT_INSN_setlocal
101
+ #undef INSN_IS_SC
102
+ #undef INSN_LABEL
103
+ #undef LABEL_IS_SC
104
+ END_INSN(setlocal);}}}
105
+ INSN_ENTRY(getspecial){
106
+ {
107
+ VALUE val;
108
+ rb_num_t type = (rb_num_t)GET_OPERAND(2);
109
+ rb_num_t key = (rb_num_t)GET_OPERAND(1);
110
+
111
+ DEBUG_ENTER_INSN("getspecial");
112
+ ADD_PC(1+2);
113
+ PREFETCH(GET_PC());
114
+ #define CURRENT_INSN_getspecial 1
115
+ #define INSN_IS_SC() 0
116
+ #define INSN_LABEL(lab) LABEL_getspecial_##lab
117
+ #define LABEL_IS_SC(lab) LABEL_##lab##_##t
118
+ COLLECT_USAGE_INSN(BIN(getspecial));
119
+ COLLECT_USAGE_OPERAND(BIN(getspecial), 0, key);
120
+ COLLECT_USAGE_OPERAND(BIN(getspecial), 1, type);
121
+ {
122
+ #line 104 "insns.def"
123
+ val = vm_getspecial(th, GET_LEP(), key, type);
124
+
125
+ #line 126 "vm.inc"
126
+ CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
127
+ PUSH(val);
128
+ #undef CURRENT_INSN_getspecial
129
+ #undef INSN_IS_SC
130
+ #undef INSN_LABEL
131
+ #undef LABEL_IS_SC
132
+ END_INSN(getspecial);}}}
133
+ INSN_ENTRY(setspecial){
134
+ {
135
+ rb_num_t key = (rb_num_t)GET_OPERAND(1);
136
+ VALUE obj = TOPN(0);
137
+ DEBUG_ENTER_INSN("setspecial");
138
+ ADD_PC(1+1);
139
+ PREFETCH(GET_PC());
140
+ POPN(1);
141
+ #define CURRENT_INSN_setspecial 1
142
+ #define INSN_IS_SC() 0
143
+ #define INSN_LABEL(lab) LABEL_setspecial_##lab
144
+ #define LABEL_IS_SC(lab) LABEL_##lab##_##t
145
+ COLLECT_USAGE_INSN(BIN(setspecial));
146
+ COLLECT_USAGE_OPERAND(BIN(setspecial), 0, key);
147
+ {
148
+ #line 118 "insns.def"
149
+ lep_svar_set(th, GET_LEP(), key, obj);
150
+
151
+ #line 152 "vm.inc"
152
+ #undef CURRENT_INSN_setspecial
153
+ #undef INSN_IS_SC
154
+ #undef INSN_LABEL
155
+ #undef LABEL_IS_SC
156
+ END_INSN(setspecial);}}}
157
+ INSN_ENTRY(getinstancevariable){
158
+ {
159
+ VALUE val;
160
+ IC ic = (IC)GET_OPERAND(2);
161
+ ID id = (ID)GET_OPERAND(1);
162
+
163
+ DEBUG_ENTER_INSN("getinstancevariable");
164
+ ADD_PC(1+2);
165
+ PREFETCH(GET_PC());
166
+ #define CURRENT_INSN_getinstancevariable 1
167
+ #define INSN_IS_SC() 0
168
+ #define INSN_LABEL(lab) LABEL_getinstancevariable_##lab
169
+ #define LABEL_IS_SC(lab) LABEL_##lab##_##t
170
+ COLLECT_USAGE_INSN(BIN(getinstancevariable));
171
+ COLLECT_USAGE_OPERAND(BIN(getinstancevariable), 0, id);
172
+ COLLECT_USAGE_OPERAND(BIN(getinstancevariable), 1, ic);
173
+ {
174
+ #line 133 "insns.def"
175
+ val = vm_getinstancevariable(GET_SELF(), id, ic);
176
+
177
+ #line 178 "vm.inc"
178
+ CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
179
+ PUSH(val);
180
+ #undef CURRENT_INSN_getinstancevariable
181
+ #undef INSN_IS_SC
182
+ #undef INSN_LABEL
183
+ #undef LABEL_IS_SC
184
+ END_INSN(getinstancevariable);}}}
185
+ INSN_ENTRY(setinstancevariable){
186
+ {
187
+ IC ic = (IC)GET_OPERAND(2);
188
+ ID id = (ID)GET_OPERAND(1);
189
+ VALUE val = TOPN(0);
190
+ DEBUG_ENTER_INSN("setinstancevariable");
191
+ ADD_PC(1+2);
192
+ PREFETCH(GET_PC());
193
+ POPN(1);
194
+ #define CURRENT_INSN_setinstancevariable 1
195
+ #define INSN_IS_SC() 0
196
+ #define INSN_LABEL(lab) LABEL_setinstancevariable_##lab
197
+ #define LABEL_IS_SC(lab) LABEL_##lab##_##t
198
+ COLLECT_USAGE_INSN(BIN(setinstancevariable));
199
+ COLLECT_USAGE_OPERAND(BIN(setinstancevariable), 0, id);
200
+ COLLECT_USAGE_OPERAND(BIN(setinstancevariable), 1, ic);
201
+ {
202
+ #line 148 "insns.def"
203
+ vm_setinstancevariable(GET_SELF(), id, val, ic);
204
+
205
+ #line 206 "vm.inc"
206
+ #undef CURRENT_INSN_setinstancevariable
207
+ #undef INSN_IS_SC
208
+ #undef INSN_LABEL
209
+ #undef LABEL_IS_SC
210
+ END_INSN(setinstancevariable);}}}
211
+ INSN_ENTRY(getclassvariable){
212
+ {
213
+ VALUE val;
214
+ ID id = (ID)GET_OPERAND(1);
215
+
216
+ DEBUG_ENTER_INSN("getclassvariable");
217
+ ADD_PC(1+1);
218
+ PREFETCH(GET_PC());
219
+ #define CURRENT_INSN_getclassvariable 1
220
+ #define INSN_IS_SC() 0
221
+ #define INSN_LABEL(lab) LABEL_getclassvariable_##lab
222
+ #define LABEL_IS_SC(lab) LABEL_##lab##_##t
223
+ COLLECT_USAGE_INSN(BIN(getclassvariable));
224
+ COLLECT_USAGE_OPERAND(BIN(getclassvariable), 0, id);
225
+ {
226
+ #line 162 "insns.def"
227
+ val = rb_cvar_get(vm_get_cvar_base(rb_vm_get_cref(GET_EP()), GET_CFP()), id);
228
+
229
+ #line 230 "vm.inc"
230
+ CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
231
+ PUSH(val);
232
+ #undef CURRENT_INSN_getclassvariable
233
+ #undef INSN_IS_SC
234
+ #undef INSN_LABEL
235
+ #undef LABEL_IS_SC
236
+ END_INSN(getclassvariable);}}}
237
+ INSN_ENTRY(setclassvariable){
238
+ {
239
+ ID id = (ID)GET_OPERAND(1);
240
+ VALUE val = TOPN(0);
241
+ DEBUG_ENTER_INSN("setclassvariable");
242
+ ADD_PC(1+1);
243
+ PREFETCH(GET_PC());
244
+ POPN(1);
245
+ #define CURRENT_INSN_setclassvariable 1
246
+ #define INSN_IS_SC() 0
247
+ #define INSN_LABEL(lab) LABEL_setclassvariable_##lab
248
+ #define LABEL_IS_SC(lab) LABEL_##lab##_##t
249
+ COLLECT_USAGE_INSN(BIN(setclassvariable));
250
+ COLLECT_USAGE_OPERAND(BIN(setclassvariable), 0, id);
251
+ {
252
+ #line 176 "insns.def"
253
+ rb_cvar_set(vm_get_cvar_base(rb_vm_get_cref(GET_EP()), GET_CFP()), id, val);
254
+
255
+ #line 256 "vm.inc"
256
+ #undef CURRENT_INSN_setclassvariable
257
+ #undef INSN_IS_SC
258
+ #undef INSN_LABEL
259
+ #undef LABEL_IS_SC
260
+ END_INSN(setclassvariable);}}}
261
+ INSN_ENTRY(getconstant){
262
+ {
263
+ VALUE val;
264
+ ID id = (ID)GET_OPERAND(1);
265
+ VALUE klass = TOPN(0);
266
+ DEBUG_ENTER_INSN("getconstant");
267
+ ADD_PC(1+1);
268
+ PREFETCH(GET_PC());
269
+ POPN(1);
270
+ #define CURRENT_INSN_getconstant 1
271
+ #define INSN_IS_SC() 0
272
+ #define INSN_LABEL(lab) LABEL_getconstant_##lab
273
+ #define LABEL_IS_SC(lab) LABEL_##lab##_##t
274
+ COLLECT_USAGE_INSN(BIN(getconstant));
275
+ COLLECT_USAGE_OPERAND(BIN(getconstant), 0, id);
276
+ {
277
+ #line 197 "insns.def"
278
+ val = vm_get_ev_const(th, klass, id, 0);
279
+
280
+ #line 281 "vm.inc"
281
+ CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
282
+ PUSH(val);
283
+ #undef CURRENT_INSN_getconstant
284
+ #undef INSN_IS_SC
285
+ #undef INSN_LABEL
286
+ #undef LABEL_IS_SC
287
+ END_INSN(getconstant);}}}
288
+ INSN_ENTRY(setconstant){
289
+ {
290
+ ID id = (ID)GET_OPERAND(1);
291
+ VALUE val = TOPN(1);
292
+ VALUE cbase = TOPN(0);
293
+ DEBUG_ENTER_INSN("setconstant");
294
+ ADD_PC(1+1);
295
+ PREFETCH(GET_PC());
296
+ POPN(2);
297
+ #define CURRENT_INSN_setconstant 1
298
+ #define INSN_IS_SC() 0
299
+ #define INSN_LABEL(lab) LABEL_setconstant_##lab
300
+ #define LABEL_IS_SC(lab) LABEL_##lab##_##t
301
+ COLLECT_USAGE_INSN(BIN(setconstant));
302
+ COLLECT_USAGE_OPERAND(BIN(setconstant), 0, id);
303
+ {
304
+ #line 219 "insns.def"
305
+ vm_check_if_namespace(cbase);
306
+ rb_const_set(cbase, id, val);
307
+
308
+ #line 309 "vm.inc"
309
+ #undef CURRENT_INSN_setconstant
310
+ #undef INSN_IS_SC
311
+ #undef INSN_LABEL
312
+ #undef LABEL_IS_SC
313
+ END_INSN(setconstant);}}}
314
+ INSN_ENTRY(getglobal){
315
+ {
316
+ VALUE val;
317
+ GENTRY entry = (GENTRY)GET_OPERAND(1);
318
+
319
+ DEBUG_ENTER_INSN("getglobal");
320
+ ADD_PC(1+1);
321
+ PREFETCH(GET_PC());
322
+ #define CURRENT_INSN_getglobal 1
323
+ #define INSN_IS_SC() 0
324
+ #define INSN_LABEL(lab) LABEL_getglobal_##lab
325
+ #define LABEL_IS_SC(lab) LABEL_##lab##_##t
326
+ COLLECT_USAGE_INSN(BIN(getglobal));
327
+ COLLECT_USAGE_OPERAND(BIN(getglobal), 0, entry);
328
+ {
329
+ #line 234 "insns.def"
330
+ val = GET_GLOBAL((VALUE)entry);
331
+
332
+ #line 333 "vm.inc"
333
+ CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
334
+ PUSH(val);
335
+ #undef CURRENT_INSN_getglobal
336
+ #undef INSN_IS_SC
337
+ #undef INSN_LABEL
338
+ #undef LABEL_IS_SC
339
+ END_INSN(getglobal);}}}
340
+ INSN_ENTRY(setglobal){
341
+ {
342
+ GENTRY entry = (GENTRY)GET_OPERAND(1);
343
+ VALUE val = TOPN(0);
344
+ DEBUG_ENTER_INSN("setglobal");
345
+ ADD_PC(1+1);
346
+ PREFETCH(GET_PC());
347
+ POPN(1);
348
+ #define CURRENT_INSN_setglobal 1
349
+ #define INSN_IS_SC() 0
350
+ #define INSN_LABEL(lab) LABEL_setglobal_##lab
351
+ #define LABEL_IS_SC(lab) LABEL_##lab##_##t
352
+ COLLECT_USAGE_INSN(BIN(setglobal));
353
+ COLLECT_USAGE_OPERAND(BIN(setglobal), 0, entry);
354
+ {
355
+ #line 248 "insns.def"
356
+ SET_GLOBAL((VALUE)entry, val);
357
+
358
+ #line 359 "vm.inc"
359
+ #undef CURRENT_INSN_setglobal
360
+ #undef INSN_IS_SC
361
+ #undef INSN_LABEL
362
+ #undef LABEL_IS_SC
363
+ END_INSN(setglobal);}}}
364
+ INSN_ENTRY(putnil){
365
+ {
366
+ VALUE val;
367
+
368
+
369
+ DEBUG_ENTER_INSN("putnil");
370
+ ADD_PC(1+0);
371
+ PREFETCH(GET_PC());
372
+ #define CURRENT_INSN_putnil 1
373
+ #define INSN_IS_SC() 0
374
+ #define INSN_LABEL(lab) LABEL_putnil_##lab
375
+ #define LABEL_IS_SC(lab) LABEL_##lab##_##t
376
+ COLLECT_USAGE_INSN(BIN(putnil));
377
+ {
378
+ #line 267 "insns.def"
379
+ val = Qnil;
380
+
381
+ #line 382 "vm.inc"
382
+ CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
383
+ PUSH(val);
384
+ #undef CURRENT_INSN_putnil
385
+ #undef INSN_IS_SC
386
+ #undef INSN_LABEL
387
+ #undef LABEL_IS_SC
388
+ END_INSN(putnil);}}}
389
+ INSN_ENTRY(putself){
390
+ {
391
+ VALUE val;
392
+
393
+
394
+ DEBUG_ENTER_INSN("putself");
395
+ ADD_PC(1+0);
396
+ PREFETCH(GET_PC());
397
+ #define CURRENT_INSN_putself 1
398
+ #define INSN_IS_SC() 0
399
+ #define INSN_LABEL(lab) LABEL_putself_##lab
400
+ #define LABEL_IS_SC(lab) LABEL_##lab##_##t
401
+ COLLECT_USAGE_INSN(BIN(putself));
402
+ {
403
+ #line 281 "insns.def"
404
+ val = GET_SELF();
405
+
406
+ #line 407 "vm.inc"
407
+ CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
408
+ PUSH(val);
409
+ #undef CURRENT_INSN_putself
410
+ #undef INSN_IS_SC
411
+ #undef INSN_LABEL
412
+ #undef LABEL_IS_SC
413
+ END_INSN(putself);}}}
414
+ INSN_ENTRY(putobject){
415
+ {
416
+ VALUE val = (VALUE)GET_OPERAND(1);
417
+
418
+ DEBUG_ENTER_INSN("putobject");
419
+ ADD_PC(1+1);
420
+ PREFETCH(GET_PC());
421
+ #define CURRENT_INSN_putobject 1
422
+ #define INSN_IS_SC() 0
423
+ #define INSN_LABEL(lab) LABEL_putobject_##lab
424
+ #define LABEL_IS_SC(lab) LABEL_##lab##_##t
425
+ COLLECT_USAGE_INSN(BIN(putobject));
426
+ COLLECT_USAGE_OPERAND(BIN(putobject), 0, val);
427
+ {
428
+ #line 297 "insns.def"
429
+ /* */
430
+
431
+ #line 432 "vm.inc"
432
+ CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
433
+ PUSH(val);
434
+ #undef CURRENT_INSN_putobject
435
+ #undef INSN_IS_SC
436
+ #undef INSN_LABEL
437
+ #undef LABEL_IS_SC
438
+ END_INSN(putobject);}}}
439
+ INSN_ENTRY(putspecialobject){
440
+ {
441
+ VALUE val;
442
+ rb_num_t value_type = (rb_num_t)GET_OPERAND(1);
443
+
444
+ DEBUG_ENTER_INSN("putspecialobject");
445
+ ADD_PC(1+1);
446
+ PREFETCH(GET_PC());
447
+ #define CURRENT_INSN_putspecialobject 1
448
+ #define INSN_IS_SC() 0
449
+ #define INSN_LABEL(lab) LABEL_putspecialobject_##lab
450
+ #define LABEL_IS_SC(lab) LABEL_##lab##_##t
451
+ COLLECT_USAGE_INSN(BIN(putspecialobject));
452
+ COLLECT_USAGE_OPERAND(BIN(putspecialobject), 0, value_type);
453
+ {
454
+ #line 312 "insns.def"
455
+ enum vm_special_object_type type = (enum vm_special_object_type)value_type;
456
+
457
+ switch (type) {
458
+ case VM_SPECIAL_OBJECT_VMCORE:
459
+ val = rb_mRubyVMFrozenCore;
460
+ break;
461
+ case VM_SPECIAL_OBJECT_CBASE:
462
+ val = vm_get_cbase(GET_EP());
463
+ break;
464
+ case VM_SPECIAL_OBJECT_CONST_BASE:
465
+ val = vm_get_const_base(GET_EP());
466
+ break;
467
+ default:
468
+ rb_bug("putspecialobject insn: unknown value_type");
469
+ }
470
+
471
+ #line 472 "vm.inc"
472
+ CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
473
+ PUSH(val);
474
+ #undef CURRENT_INSN_putspecialobject
475
+ #undef INSN_IS_SC
476
+ #undef INSN_LABEL
477
+ #undef LABEL_IS_SC
478
+ END_INSN(putspecialobject);}}}
479
+ INSN_ENTRY(putiseq){
480
+ {
481
+ VALUE ret;
482
+ ISEQ iseq = (ISEQ)GET_OPERAND(1);
483
+
484
+ DEBUG_ENTER_INSN("putiseq");
485
+ ADD_PC(1+1);
486
+ PREFETCH(GET_PC());
487
+ #define CURRENT_INSN_putiseq 1
488
+ #define INSN_IS_SC() 0
489
+ #define INSN_LABEL(lab) LABEL_putiseq_##lab
490
+ #define LABEL_IS_SC(lab) LABEL_##lab##_##t
491
+ COLLECT_USAGE_INSN(BIN(putiseq));
492
+ COLLECT_USAGE_OPERAND(BIN(putiseq), 0, iseq);
493
+ {
494
+ #line 340 "insns.def"
495
+ ret = (VALUE)iseq;
496
+
497
+ #line 498 "vm.inc"
498
+ CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
499
+ PUSH(ret);
500
+ #undef CURRENT_INSN_putiseq
501
+ #undef INSN_IS_SC
502
+ #undef INSN_LABEL
503
+ #undef LABEL_IS_SC
504
+ END_INSN(putiseq);}}}
505
+ INSN_ENTRY(putstring){
506
+ {
507
+ VALUE val;
508
+ VALUE str = (VALUE)GET_OPERAND(1);
509
+
510
+ DEBUG_ENTER_INSN("putstring");
511
+ ADD_PC(1+1);
512
+ PREFETCH(GET_PC());
513
+ #define CURRENT_INSN_putstring 1
514
+ #define INSN_IS_SC() 0
515
+ #define INSN_LABEL(lab) LABEL_putstring_##lab
516
+ #define LABEL_IS_SC(lab) LABEL_##lab##_##t
517
+ COLLECT_USAGE_INSN(BIN(putstring));
518
+ COLLECT_USAGE_OPERAND(BIN(putstring), 0, str);
519
+ {
520
+ #line 354 "insns.def"
521
+ val = rb_str_resurrect(str);
522
+
523
+ #line 524 "vm.inc"
524
+ CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
525
+ PUSH(val);
526
+ #undef CURRENT_INSN_putstring
527
+ #undef INSN_IS_SC
528
+ #undef INSN_LABEL
529
+ #undef LABEL_IS_SC
530
+ END_INSN(putstring);}}}
531
+ INSN_ENTRY(concatstrings){
532
+ {
533
+ VALUE val;
534
+ rb_num_t num = (rb_num_t)GET_OPERAND(1);
535
+
536
+ DEBUG_ENTER_INSN("concatstrings");
537
+ ADD_PC(1+1);
538
+ PREFETCH(GET_PC());
539
+ #define CURRENT_INSN_concatstrings 1
540
+ #define INSN_IS_SC() 0
541
+ #define INSN_LABEL(lab) LABEL_concatstrings_##lab
542
+ #define LABEL_IS_SC(lab) LABEL_##lab##_##t
543
+ COLLECT_USAGE_INSN(BIN(concatstrings));
544
+ COLLECT_USAGE_OPERAND(BIN(concatstrings), 0, num);
545
+ {
546
+ #line 368 "insns.def"
547
+ rb_num_t i = num - 1;
548
+
549
+ val = rb_str_resurrect(TOPN(i));
550
+ while (i-- > 0) {
551
+ const VALUE v = TOPN(i);
552
+ rb_str_append_literal(val, v);
553
+ }
554
+ POPN(num);
555
+
556
+ #line 557 "vm.inc"
557
+ CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
558
+ PUSH(val);
559
+ #undef CURRENT_INSN_concatstrings
560
+ #undef INSN_IS_SC
561
+ #undef INSN_LABEL
562
+ #undef LABEL_IS_SC
563
+ END_INSN(concatstrings);}}}
564
+ INSN_ENTRY(tostring){
565
+ {
566
+
567
+ VALUE val = TOPN(0);
568
+ DEBUG_ENTER_INSN("tostring");
569
+ ADD_PC(1+0);
570
+ PREFETCH(GET_PC());
571
+ POPN(1);
572
+ #define CURRENT_INSN_tostring 1
573
+ #define INSN_IS_SC() 0
574
+ #define INSN_LABEL(lab) LABEL_tostring_##lab
575
+ #define LABEL_IS_SC(lab) LABEL_##lab##_##t
576
+ COLLECT_USAGE_INSN(BIN(tostring));
577
+ {
578
+ #line 389 "insns.def"
579
+ val = rb_obj_as_string(val);
580
+
581
+ #line 582 "vm.inc"
582
+ CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
583
+ PUSH(val);
584
+ #undef CURRENT_INSN_tostring
585
+ #undef INSN_IS_SC
586
+ #undef INSN_LABEL
587
+ #undef LABEL_IS_SC
588
+ END_INSN(tostring);}}}
589
+ INSN_ENTRY(toregexp){
590
+ {
591
+ VALUE val;
592
+ rb_num_t cnt = (rb_num_t)GET_OPERAND(2);
593
+ rb_num_t opt = (rb_num_t)GET_OPERAND(1);
594
+
595
+ DEBUG_ENTER_INSN("toregexp");
596
+ ADD_PC(1+2);
597
+ PREFETCH(GET_PC());
598
+ #define CURRENT_INSN_toregexp 1
599
+ #define INSN_IS_SC() 0
600
+ #define INSN_LABEL(lab) LABEL_toregexp_##lab
601
+ #define LABEL_IS_SC(lab) LABEL_##lab##_##t
602
+ COLLECT_USAGE_INSN(BIN(toregexp));
603
+ COLLECT_USAGE_OPERAND(BIN(toregexp), 0, opt);
604
+ COLLECT_USAGE_OPERAND(BIN(toregexp), 1, cnt);
605
+ {
606
+ #line 404 "insns.def"
607
+ VALUE rb_reg_new_ary(VALUE ary, int options);
608
+ rb_num_t i;
609
+ const VALUE ary = rb_ary_tmp_new(cnt);
610
+ for (i = 0; i < cnt; i++) {
611
+ rb_ary_store(ary, cnt-i-1, TOPN(i));
612
+ }
613
+ POPN(cnt);
614
+ val = rb_reg_new_ary(ary, (int)opt);
615
+ rb_ary_clear(ary);
616
+
617
+ #line 618 "vm.inc"
618
+ CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
619
+ PUSH(val);
620
+ #undef CURRENT_INSN_toregexp
621
+ #undef INSN_IS_SC
622
+ #undef INSN_LABEL
623
+ #undef LABEL_IS_SC
624
+ END_INSN(toregexp);}}}
625
+ INSN_ENTRY(newarray){
626
+ {
627
+ VALUE val;
628
+ rb_num_t num = (rb_num_t)GET_OPERAND(1);
629
+
630
+ DEBUG_ENTER_INSN("newarray");
631
+ ADD_PC(1+1);
632
+ PREFETCH(GET_PC());
633
+ #define CURRENT_INSN_newarray 1
634
+ #define INSN_IS_SC() 0
635
+ #define INSN_LABEL(lab) LABEL_newarray_##lab
636
+ #define LABEL_IS_SC(lab) LABEL_##lab##_##t
637
+ COLLECT_USAGE_INSN(BIN(newarray));
638
+ COLLECT_USAGE_OPERAND(BIN(newarray), 0, num);
639
+ {
640
+ #line 426 "insns.def"
641
+ val = rb_ary_new4((long)num, STACK_ADDR_FROM_TOP(num));
642
+ POPN(num);
643
+
644
+ #line 645 "vm.inc"
645
+ CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
646
+ PUSH(val);
647
+ #undef CURRENT_INSN_newarray
648
+ #undef INSN_IS_SC
649
+ #undef INSN_LABEL
650
+ #undef LABEL_IS_SC
651
+ END_INSN(newarray);}}}
652
+ INSN_ENTRY(duparray){
653
+ {
654
+ VALUE val;
655
+ VALUE ary = (VALUE)GET_OPERAND(1);
656
+
657
+ DEBUG_ENTER_INSN("duparray");
658
+ ADD_PC(1+1);
659
+ PREFETCH(GET_PC());
660
+ #define CURRENT_INSN_duparray 1
661
+ #define INSN_IS_SC() 0
662
+ #define INSN_LABEL(lab) LABEL_duparray_##lab
663
+ #define LABEL_IS_SC(lab) LABEL_##lab##_##t
664
+ COLLECT_USAGE_INSN(BIN(duparray));
665
+ COLLECT_USAGE_OPERAND(BIN(duparray), 0, ary);
666
+ {
667
+ #line 441 "insns.def"
668
+ val = rb_ary_resurrect(ary);
669
+
670
+ #line 671 "vm.inc"
671
+ CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
672
+ PUSH(val);
673
+ #undef CURRENT_INSN_duparray
674
+ #undef INSN_IS_SC
675
+ #undef INSN_LABEL
676
+ #undef LABEL_IS_SC
677
+ END_INSN(duparray);}}}
678
+ INSN_ENTRY(expandarray){
679
+ {
680
+ rb_num_t flag = (rb_num_t)GET_OPERAND(2);
681
+ rb_num_t num = (rb_num_t)GET_OPERAND(1);
682
+ VALUE ary = TOPN(0);
683
+ DEBUG_ENTER_INSN("expandarray");
684
+ ADD_PC(1+2);
685
+ PREFETCH(GET_PC());
686
+ POPN(1);
687
+ #define CURRENT_INSN_expandarray 1
688
+ #define INSN_IS_SC() 0
689
+ #define INSN_LABEL(lab) LABEL_expandarray_##lab
690
+ #define LABEL_IS_SC(lab) LABEL_##lab##_##t
691
+ COLLECT_USAGE_INSN(BIN(expandarray));
692
+ COLLECT_USAGE_OPERAND(BIN(expandarray), 0, num);
693
+ COLLECT_USAGE_OPERAND(BIN(expandarray), 1, flag);
694
+ {
695
+ #line 462 "insns.def"
696
+ vm_expandarray(GET_CFP(), ary, num, (int)flag);
697
+
698
+ #line 699 "vm.inc"
699
+ #undef CURRENT_INSN_expandarray
700
+ #undef INSN_IS_SC
701
+ #undef INSN_LABEL
702
+ #undef LABEL_IS_SC
703
+ END_INSN(expandarray);}}}
704
+ INSN_ENTRY(concatarray){
705
+ {
706
+ VALUE ary;
707
+
708
+ VALUE ary1 = TOPN(1);
709
+ VALUE ary2st = TOPN(0);
710
+ DEBUG_ENTER_INSN("concatarray");
711
+ ADD_PC(1+0);
712
+ PREFETCH(GET_PC());
713
+ POPN(2);
714
+ #define CURRENT_INSN_concatarray 1
715
+ #define INSN_IS_SC() 0
716
+ #define INSN_LABEL(lab) LABEL_concatarray_##lab
717
+ #define LABEL_IS_SC(lab) LABEL_##lab##_##t
718
+ COLLECT_USAGE_INSN(BIN(concatarray));
719
+ {
720
+ #line 476 "insns.def"
721
+ const VALUE ary2 = ary2st;
722
+ VALUE tmp1 = rb_check_convert_type(ary1, T_ARRAY, "Array", "to_a");
723
+ VALUE tmp2 = rb_check_convert_type(ary2, T_ARRAY, "Array", "to_a");
724
+
725
+ if (NIL_P(tmp1)) {
726
+ tmp1 = rb_ary_new3(1, ary1);
727
+ }
728
+
729
+ if (NIL_P(tmp2)) {
730
+ tmp2 = rb_ary_new3(1, ary2);
731
+ }
732
+
733
+ if (tmp1 == ary1) {
734
+ tmp1 = rb_ary_dup(ary1);
735
+ }
736
+ ary = rb_ary_concat(tmp1, tmp2);
737
+
738
+ #line 739 "vm.inc"
739
+ CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
740
+ PUSH(ary);
741
+ #undef CURRENT_INSN_concatarray
742
+ #undef INSN_IS_SC
743
+ #undef INSN_LABEL
744
+ #undef LABEL_IS_SC
745
+ END_INSN(concatarray);}}}
746
+ INSN_ENTRY(splatarray){
747
+ {
748
+ VALUE obj;
749
+ VALUE flag = (VALUE)GET_OPERAND(1);
750
+ VALUE ary = TOPN(0);
751
+ DEBUG_ENTER_INSN("splatarray");
752
+ ADD_PC(1+1);
753
+ PREFETCH(GET_PC());
754
+ POPN(1);
755
+ #define CURRENT_INSN_splatarray 1
756
+ #define INSN_IS_SC() 0
757
+ #define INSN_LABEL(lab) LABEL_splatarray_##lab
758
+ #define LABEL_IS_SC(lab) LABEL_##lab##_##t
759
+ COLLECT_USAGE_INSN(BIN(splatarray));
760
+ COLLECT_USAGE_OPERAND(BIN(splatarray), 0, flag);
761
+ {
762
+ #line 505 "insns.def"
763
+ VALUE tmp = rb_check_convert_type(ary, T_ARRAY, "Array", "to_a");
764
+ if (NIL_P(tmp)) {
765
+ tmp = rb_ary_new3(1, ary);
766
+ }
767
+ else if (RTEST(flag)) {
768
+ tmp = rb_ary_dup(tmp);
769
+ }
770
+ obj = tmp;
771
+
772
+ #line 773 "vm.inc"
773
+ CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
774
+ PUSH(obj);
775
+ #undef CURRENT_INSN_splatarray
776
+ #undef INSN_IS_SC
777
+ #undef INSN_LABEL
778
+ #undef LABEL_IS_SC
779
+ END_INSN(splatarray);}}}
780
+ INSN_ENTRY(newhash){
781
+ {
782
+ VALUE val;
783
+ rb_num_t num = (rb_num_t)GET_OPERAND(1);
784
+
785
+ DEBUG_ENTER_INSN("newhash");
786
+ ADD_PC(1+1);
787
+ PREFETCH(GET_PC());
788
+ #define CURRENT_INSN_newhash 1
789
+ #define INSN_IS_SC() 0
790
+ #define INSN_LABEL(lab) LABEL_newhash_##lab
791
+ #define LABEL_IS_SC(lab) LABEL_##lab##_##t
792
+ COLLECT_USAGE_INSN(BIN(newhash));
793
+ COLLECT_USAGE_OPERAND(BIN(newhash), 0, num);
794
+ {
795
+ #line 527 "insns.def"
796
+ rb_num_t i;
797
+
798
+ RUBY_DTRACE_CREATE_HOOK(HASH, num);
799
+
800
+ val = rb_hash_new();
801
+
802
+ for (i = num; i > 0; i -= 2) {
803
+ const VALUE v = TOPN(i - 2);
804
+ const VALUE k = TOPN(i - 1);
805
+ rb_hash_aset(val, k, v);
806
+ }
807
+ POPN(num);
808
+
809
+ #line 810 "vm.inc"
810
+ CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
811
+ PUSH(val);
812
+ #undef CURRENT_INSN_newhash
813
+ #undef INSN_IS_SC
814
+ #undef INSN_LABEL
815
+ #undef LABEL_IS_SC
816
+ END_INSN(newhash);}}}
817
+ INSN_ENTRY(newrange){
818
+ {
819
+ VALUE val;
820
+ rb_num_t flag = (rb_num_t)GET_OPERAND(1);
821
+ VALUE low = TOPN(1);
822
+ VALUE high = TOPN(0);
823
+ DEBUG_ENTER_INSN("newrange");
824
+ ADD_PC(1+1);
825
+ PREFETCH(GET_PC());
826
+ POPN(2);
827
+ #define CURRENT_INSN_newrange 1
828
+ #define INSN_IS_SC() 0
829
+ #define INSN_LABEL(lab) LABEL_newrange_##lab
830
+ #define LABEL_IS_SC(lab) LABEL_##lab##_##t
831
+ COLLECT_USAGE_INSN(BIN(newrange));
832
+ COLLECT_USAGE_OPERAND(BIN(newrange), 0, flag);
833
+ {
834
+ #line 552 "insns.def"
835
+ val = rb_range_new(low, high, (int)flag);
836
+
837
+ #line 838 "vm.inc"
838
+ CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
839
+ PUSH(val);
840
+ #undef CURRENT_INSN_newrange
841
+ #undef INSN_IS_SC
842
+ #undef INSN_LABEL
843
+ #undef LABEL_IS_SC
844
+ END_INSN(newrange);}}}
845
+ INSN_ENTRY(pop){
846
+ {
847
+
848
+ VALUE val = TOPN(0);
849
+ DEBUG_ENTER_INSN("pop");
850
+ ADD_PC(1+0);
851
+ PREFETCH(GET_PC());
852
+ POPN(1);
853
+ #define CURRENT_INSN_pop 1
854
+ #define INSN_IS_SC() 0
855
+ #define INSN_LABEL(lab) LABEL_pop_##lab
856
+ #define LABEL_IS_SC(lab) LABEL_##lab##_##t
857
+ COLLECT_USAGE_INSN(BIN(pop));
858
+ {
859
+ #line 570 "insns.def"
860
+ (void)val;
861
+ /* none */
862
+
863
+ #line 864 "vm.inc"
864
+ #undef CURRENT_INSN_pop
865
+ #undef INSN_IS_SC
866
+ #undef INSN_LABEL
867
+ #undef LABEL_IS_SC
868
+ END_INSN(pop);}}}
869
+ INSN_ENTRY(dup){
870
+ {
871
+ VALUE val2;
872
+ VALUE val1;
873
+
874
+ VALUE val = TOPN(0);
875
+ DEBUG_ENTER_INSN("dup");
876
+ ADD_PC(1+0);
877
+ PREFETCH(GET_PC());
878
+ POPN(1);
879
+ #define CURRENT_INSN_dup 1
880
+ #define INSN_IS_SC() 0
881
+ #define INSN_LABEL(lab) LABEL_dup_##lab
882
+ #define LABEL_IS_SC(lab) LABEL_##lab##_##t
883
+ COLLECT_USAGE_INSN(BIN(dup));
884
+ {
885
+ #line 585 "insns.def"
886
+ val1 = val2 = val;
887
+
888
+ #line 889 "vm.inc"
889
+ CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 2);
890
+ PUSH(val1);
891
+ PUSH(val2);
892
+ #undef CURRENT_INSN_dup
893
+ #undef INSN_IS_SC
894
+ #undef INSN_LABEL
895
+ #undef LABEL_IS_SC
896
+ END_INSN(dup);}}}
897
+ INSN_ENTRY(dupn){
898
+ {
899
+ rb_num_t n = (rb_num_t)GET_OPERAND(1);
900
+
901
+ DEBUG_ENTER_INSN("dupn");
902
+ ADD_PC(1+1);
903
+ PREFETCH(GET_PC());
904
+ #define CURRENT_INSN_dupn 1
905
+ #define INSN_IS_SC() 0
906
+ #define INSN_LABEL(lab) LABEL_dupn_##lab
907
+ #define LABEL_IS_SC(lab) LABEL_##lab##_##t
908
+ COLLECT_USAGE_INSN(BIN(dupn));
909
+ COLLECT_USAGE_OPERAND(BIN(dupn), 0, n);
910
+ {
911
+ #line 599 "insns.def"
912
+ rb_num_t i;
913
+ VALUE *sp = STACK_ADDR_FROM_TOP(n);
914
+ for (i = 0; i < n; i++) {
915
+ GET_SP()[i] = sp[i];
916
+ }
917
+ INC_SP(n);
918
+
919
+ #line 920 "vm.inc"
920
+ #undef CURRENT_INSN_dupn
921
+ #undef INSN_IS_SC
922
+ #undef INSN_LABEL
923
+ #undef LABEL_IS_SC
924
+ END_INSN(dupn);}}}
925
+ INSN_ENTRY(swap){
926
+ {
927
+
928
+ VALUE val = TOPN(1);
929
+ VALUE obj = TOPN(0);
930
+ DEBUG_ENTER_INSN("swap");
931
+ ADD_PC(1+0);
932
+ PREFETCH(GET_PC());
933
+ POPN(2);
934
+ #define CURRENT_INSN_swap 1
935
+ #define INSN_IS_SC() 0
936
+ #define INSN_LABEL(lab) LABEL_swap_##lab
937
+ #define LABEL_IS_SC(lab) LABEL_##lab##_##t
938
+ COLLECT_USAGE_INSN(BIN(swap));
939
+ {
940
+ #line 619 "insns.def"
941
+ /* none */
942
+
943
+ #line 944 "vm.inc"
944
+ CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 2);
945
+ PUSH(obj);
946
+ PUSH(val);
947
+ #undef CURRENT_INSN_swap
948
+ #undef INSN_IS_SC
949
+ #undef INSN_LABEL
950
+ #undef LABEL_IS_SC
951
+ END_INSN(swap);}}}
952
+ INSN_ENTRY(reverse){
953
+ {
954
+ rb_num_t n = (rb_num_t)GET_OPERAND(1);
955
+
956
+ DEBUG_ENTER_INSN("reverse");
957
+ ADD_PC(1+1);
958
+ PREFETCH(GET_PC());
959
+ #define CURRENT_INSN_reverse 1
960
+ #define INSN_IS_SC() 0
961
+ #define INSN_LABEL(lab) LABEL_reverse_##lab
962
+ #define LABEL_IS_SC(lab) LABEL_##lab##_##t
963
+ COLLECT_USAGE_INSN(BIN(reverse));
964
+ COLLECT_USAGE_OPERAND(BIN(reverse), 0, n);
965
+ {
966
+ #line 633 "insns.def"
967
+ rb_num_t i;
968
+ VALUE *sp = STACK_ADDR_FROM_TOP(n);
969
+
970
+ for (i=0; i<n/2; i++) {
971
+ VALUE v0 = sp[i];
972
+ VALUE v1 = TOPN(i);
973
+ sp[i] = v1;
974
+ TOPN(i) = v0;
975
+ }
976
+
977
+ #line 978 "vm.inc"
978
+ #undef CURRENT_INSN_reverse
979
+ #undef INSN_IS_SC
980
+ #undef INSN_LABEL
981
+ #undef LABEL_IS_SC
982
+ END_INSN(reverse);}}}
983
+ INSN_ENTRY(reput){
984
+ {
985
+
986
+ VALUE val = TOPN(0);
987
+ DEBUG_ENTER_INSN("reput");
988
+ ADD_PC(1+0);
989
+ PREFETCH(GET_PC());
990
+ POPN(1);
991
+ #define CURRENT_INSN_reput 1
992
+ #define INSN_IS_SC() 0
993
+ #define INSN_LABEL(lab) LABEL_reput_##lab
994
+ #define LABEL_IS_SC(lab) LABEL_##lab##_##t
995
+ COLLECT_USAGE_INSN(BIN(reput));
996
+ {
997
+ #line 655 "insns.def"
998
+ /* none */
999
+
1000
+ #line 1001 "vm.inc"
1001
+ CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
1002
+ PUSH(val);
1003
+ #undef CURRENT_INSN_reput
1004
+ #undef INSN_IS_SC
1005
+ #undef INSN_LABEL
1006
+ #undef LABEL_IS_SC
1007
+ END_INSN(reput);}}}
1008
+ INSN_ENTRY(topn){
1009
+ {
1010
+ VALUE val;
1011
+ rb_num_t n = (rb_num_t)GET_OPERAND(1);
1012
+
1013
+ DEBUG_ENTER_INSN("topn");
1014
+ ADD_PC(1+1);
1015
+ PREFETCH(GET_PC());
1016
+ #define CURRENT_INSN_topn 1
1017
+ #define INSN_IS_SC() 0
1018
+ #define INSN_LABEL(lab) LABEL_topn_##lab
1019
+ #define LABEL_IS_SC(lab) LABEL_##lab##_##t
1020
+ COLLECT_USAGE_INSN(BIN(topn));
1021
+ COLLECT_USAGE_OPERAND(BIN(topn), 0, n);
1022
+ {
1023
+ #line 669 "insns.def"
1024
+ val = TOPN(n);
1025
+
1026
+ #line 1027 "vm.inc"
1027
+ CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
1028
+ PUSH(val);
1029
+ #undef CURRENT_INSN_topn
1030
+ #undef INSN_IS_SC
1031
+ #undef INSN_LABEL
1032
+ #undef LABEL_IS_SC
1033
+ END_INSN(topn);}}}
1034
+ INSN_ENTRY(setn){
1035
+ {
1036
+ rb_num_t n = (rb_num_t)GET_OPERAND(1);
1037
+ VALUE val = TOPN(0);
1038
+ DEBUG_ENTER_INSN("setn");
1039
+ ADD_PC(1+1);
1040
+ PREFETCH(GET_PC());
1041
+ POPN(1);
1042
+ #define CURRENT_INSN_setn 1
1043
+ #define INSN_IS_SC() 0
1044
+ #define INSN_LABEL(lab) LABEL_setn_##lab
1045
+ #define LABEL_IS_SC(lab) LABEL_##lab##_##t
1046
+ COLLECT_USAGE_INSN(BIN(setn));
1047
+ COLLECT_USAGE_OPERAND(BIN(setn), 0, n);
1048
+ {
1049
+ #line 683 "insns.def"
1050
+ TOPN(n-1) = val;
1051
+
1052
+ #line 1053 "vm.inc"
1053
+ CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
1054
+ PUSH(val);
1055
+ #undef CURRENT_INSN_setn
1056
+ #undef INSN_IS_SC
1057
+ #undef INSN_LABEL
1058
+ #undef LABEL_IS_SC
1059
+ END_INSN(setn);}}}
1060
+ INSN_ENTRY(adjuststack){
1061
+ {
1062
+ rb_num_t n = (rb_num_t)GET_OPERAND(1);
1063
+
1064
+ DEBUG_ENTER_INSN("adjuststack");
1065
+ ADD_PC(1+1);
1066
+ PREFETCH(GET_PC());
1067
+ #define CURRENT_INSN_adjuststack 1
1068
+ #define INSN_IS_SC() 0
1069
+ #define INSN_LABEL(lab) LABEL_adjuststack_##lab
1070
+ #define LABEL_IS_SC(lab) LABEL_##lab##_##t
1071
+ COLLECT_USAGE_INSN(BIN(adjuststack));
1072
+ COLLECT_USAGE_OPERAND(BIN(adjuststack), 0, n);
1073
+ {
1074
+ #line 697 "insns.def"
1075
+ DEC_SP(n);
1076
+
1077
+ #line 1078 "vm.inc"
1078
+ #undef CURRENT_INSN_adjuststack
1079
+ #undef INSN_IS_SC
1080
+ #undef INSN_LABEL
1081
+ #undef LABEL_IS_SC
1082
+ END_INSN(adjuststack);}}}
1083
+ INSN_ENTRY(defined){
1084
+ {
1085
+ VALUE val;
1086
+ VALUE needstr = (VALUE)GET_OPERAND(3);
1087
+ VALUE obj = (VALUE)GET_OPERAND(2);
1088
+ rb_num_t op_type = (rb_num_t)GET_OPERAND(1);
1089
+ VALUE v = TOPN(0);
1090
+ DEBUG_ENTER_INSN("defined");
1091
+ ADD_PC(1+3);
1092
+ PREFETCH(GET_PC());
1093
+ POPN(1);
1094
+ #define CURRENT_INSN_defined 1
1095
+ #define INSN_IS_SC() 0
1096
+ #define INSN_LABEL(lab) LABEL_defined_##lab
1097
+ #define LABEL_IS_SC(lab) LABEL_##lab##_##t
1098
+ COLLECT_USAGE_INSN(BIN(defined));
1099
+ COLLECT_USAGE_OPERAND(BIN(defined), 0, op_type);
1100
+ COLLECT_USAGE_OPERAND(BIN(defined), 1, obj);
1101
+ COLLECT_USAGE_OPERAND(BIN(defined), 2, needstr);
1102
+ {
1103
+ #line 716 "insns.def"
1104
+ val = vm_defined(th, GET_CFP(), op_type, obj, needstr, v);
1105
+
1106
+ #line 1107 "vm.inc"
1107
+ CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
1108
+ PUSH(val);
1109
+ #undef CURRENT_INSN_defined
1110
+ #undef INSN_IS_SC
1111
+ #undef INSN_LABEL
1112
+ #undef LABEL_IS_SC
1113
+ END_INSN(defined);}}}
1114
+ INSN_ENTRY(checkmatch){
1115
+ {
1116
+ VALUE result;
1117
+ rb_num_t flag = (rb_num_t)GET_OPERAND(1);
1118
+ VALUE target = TOPN(1);
1119
+ VALUE pattern = TOPN(0);
1120
+ DEBUG_ENTER_INSN("checkmatch");
1121
+ ADD_PC(1+1);
1122
+ PREFETCH(GET_PC());
1123
+ POPN(2);
1124
+ #define CURRENT_INSN_checkmatch 1
1125
+ #define INSN_IS_SC() 0
1126
+ #define INSN_LABEL(lab) LABEL_checkmatch_##lab
1127
+ #define LABEL_IS_SC(lab) LABEL_##lab##_##t
1128
+ COLLECT_USAGE_INSN(BIN(checkmatch));
1129
+ COLLECT_USAGE_OPERAND(BIN(checkmatch), 0, flag);
1130
+ {
1131
+ #line 735 "insns.def"
1132
+ enum vm_check_match_type checkmatch_type =
1133
+ (enum vm_check_match_type)(flag & VM_CHECKMATCH_TYPE_MASK);
1134
+ result = Qfalse;
1135
+
1136
+ if (flag & VM_CHECKMATCH_ARRAY) {
1137
+ int i;
1138
+ for (i = 0; i < RARRAY_LEN(pattern); i++) {
1139
+ if (RTEST(check_match(RARRAY_AREF(pattern, i), target, checkmatch_type))) {
1140
+ result = Qtrue;
1141
+ break;
1142
+ }
1143
+ }
1144
+ }
1145
+ else {
1146
+ if (RTEST(check_match(pattern, target, checkmatch_type))) {
1147
+ result = Qtrue;
1148
+ }
1149
+ }
1150
+
1151
+ #line 1152 "vm.inc"
1152
+ CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
1153
+ PUSH(result);
1154
+ #undef CURRENT_INSN_checkmatch
1155
+ #undef INSN_IS_SC
1156
+ #undef INSN_LABEL
1157
+ #undef LABEL_IS_SC
1158
+ END_INSN(checkmatch);}}}
1159
+ INSN_ENTRY(checkkeyword){
1160
+ {
1161
+ VALUE ret;
1162
+ rb_num_t keyword_index = (rb_num_t)GET_OPERAND(2);
1163
+ lindex_t kw_bits_index = (lindex_t)GET_OPERAND(1);
1164
+
1165
+ DEBUG_ENTER_INSN("checkkeyword");
1166
+ ADD_PC(1+2);
1167
+ PREFETCH(GET_PC());
1168
+ #define CURRENT_INSN_checkkeyword 1
1169
+ #define INSN_IS_SC() 0
1170
+ #define INSN_LABEL(lab) LABEL_checkkeyword_##lab
1171
+ #define LABEL_IS_SC(lab) LABEL_##lab##_##t
1172
+ COLLECT_USAGE_INSN(BIN(checkkeyword));
1173
+ COLLECT_USAGE_OPERAND(BIN(checkkeyword), 0, kw_bits_index);
1174
+ COLLECT_USAGE_OPERAND(BIN(checkkeyword), 1, keyword_index);
1175
+ {
1176
+ #line 766 "insns.def"
1177
+ const VALUE *ep = GET_EP();
1178
+ const VALUE kw_bits = *(ep - kw_bits_index);
1179
+
1180
+ if (FIXNUM_P(kw_bits)) {
1181
+ int bits = FIX2INT(kw_bits);
1182
+ ret = (bits & (0x01 << keyword_index)) ? Qfalse : Qtrue;
1183
+ }
1184
+ else {
1185
+ assert(RB_TYPE_P(kw_bits, T_HASH));
1186
+ ret = rb_hash_has_key(kw_bits, INT2FIX(keyword_index)) ? Qfalse : Qtrue;
1187
+ }
1188
+
1189
+ #line 1190 "vm.inc"
1190
+ CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
1191
+ PUSH(ret);
1192
+ #undef CURRENT_INSN_checkkeyword
1193
+ #undef INSN_IS_SC
1194
+ #undef INSN_LABEL
1195
+ #undef LABEL_IS_SC
1196
+ END_INSN(checkkeyword);}}}
1197
+ INSN_ENTRY(trace){
1198
+ {
1199
+ rb_num_t nf = (rb_num_t)GET_OPERAND(1);
1200
+
1201
+ DEBUG_ENTER_INSN("trace");
1202
+ ADD_PC(1+1);
1203
+ PREFETCH(GET_PC());
1204
+ #define CURRENT_INSN_trace 1
1205
+ #define INSN_IS_SC() 0
1206
+ #define INSN_LABEL(lab) LABEL_trace_##lab
1207
+ #define LABEL_IS_SC(lab) LABEL_##lab##_##t
1208
+ COLLECT_USAGE_INSN(BIN(trace));
1209
+ COLLECT_USAGE_OPERAND(BIN(trace), 0, nf);
1210
+ {
1211
+ #line 790 "insns.def"
1212
+ rb_event_flag_t flag = (rb_event_flag_t)nf;
1213
+
1214
+ if (RUBY_DTRACE_METHOD_ENTRY_ENABLED() ||
1215
+ RUBY_DTRACE_METHOD_RETURN_ENABLED() ||
1216
+ RUBY_DTRACE_CMETHOD_ENTRY_ENABLED() ||
1217
+ RUBY_DTRACE_CMETHOD_RETURN_ENABLED()) {
1218
+
1219
+ switch (flag) {
1220
+ case RUBY_EVENT_CALL:
1221
+ RUBY_DTRACE_METHOD_ENTRY_HOOK(th, 0, 0);
1222
+ break;
1223
+ case RUBY_EVENT_C_CALL:
1224
+ RUBY_DTRACE_CMETHOD_ENTRY_HOOK(th, 0, 0);
1225
+ break;
1226
+ case RUBY_EVENT_RETURN:
1227
+ RUBY_DTRACE_METHOD_RETURN_HOOK(th, 0, 0);
1228
+ break;
1229
+ case RUBY_EVENT_C_RETURN:
1230
+ RUBY_DTRACE_CMETHOD_RETURN_HOOK(th, 0, 0);
1231
+ break;
1232
+ }
1233
+ }
1234
+
1235
+ EXEC_EVENT_HOOK(th, flag, GET_SELF(), 0, 0 /* id and klass are resolved at callee */,
1236
+ (flag & (RUBY_EVENT_RETURN | RUBY_EVENT_B_RETURN)) ? TOPN(0) : Qundef);
1237
+
1238
+ #line 1239 "vm.inc"
1239
+ #undef CURRENT_INSN_trace
1240
+ #undef INSN_IS_SC
1241
+ #undef INSN_LABEL
1242
+ #undef LABEL_IS_SC
1243
+ END_INSN(trace);}}}
1244
+ INSN_ENTRY(defineclass){
1245
+ {
1246
+ VALUE val;
1247
+ rb_num_t flags = (rb_num_t)GET_OPERAND(3);
1248
+ ISEQ class_iseq = (ISEQ)GET_OPERAND(2);
1249
+ ID id = (ID)GET_OPERAND(1);
1250
+ VALUE cbase = TOPN(1);
1251
+ VALUE super = TOPN(0);
1252
+ DEBUG_ENTER_INSN("defineclass");
1253
+ ADD_PC(1+3);
1254
+ PREFETCH(GET_PC());
1255
+ POPN(2);
1256
+ #define CURRENT_INSN_defineclass 1
1257
+ #define INSN_IS_SC() 0
1258
+ #define INSN_LABEL(lab) LABEL_defineclass_##lab
1259
+ #define LABEL_IS_SC(lab) LABEL_##lab##_##t
1260
+ COLLECT_USAGE_INSN(BIN(defineclass));
1261
+ COLLECT_USAGE_OPERAND(BIN(defineclass), 0, id);
1262
+ COLLECT_USAGE_OPERAND(BIN(defineclass), 1, class_iseq);
1263
+ COLLECT_USAGE_OPERAND(BIN(defineclass), 2, flags);
1264
+ {
1265
+ #line 836 "insns.def"
1266
+ VALUE klass;
1267
+ rb_vm_defineclass_type_t type = VM_DEFINECLASS_TYPE(flags);
1268
+
1269
+ switch (type) {
1270
+ case VM_DEFINECLASS_TYPE_CLASS:
1271
+ /* val is dummy. classdef returns class scope value */
1272
+
1273
+ if (VM_DEFINECLASS_HAS_SUPERCLASS_P(flags) &&
1274
+ !RB_TYPE_P(super, T_CLASS)) {
1275
+ rb_raise(rb_eTypeError, "superclass must be a Class (%"PRIsVALUE" given)",
1276
+ rb_obj_class(super));
1277
+ }
1278
+
1279
+ if (super == Qnil) {
1280
+ super = rb_cObject;
1281
+ }
1282
+
1283
+ vm_check_if_namespace(cbase);
1284
+
1285
+ /* find klass */
1286
+ rb_autoload_load(cbase, id);
1287
+ if ((klass = vm_search_const_defined_class(cbase, id)) != 0) {
1288
+ /* already exist */
1289
+ klass = VM_DEFINECLASS_SCOPED_P(flags) ?
1290
+ rb_public_const_get_at(klass, id) : rb_const_get_at(klass, id);
1291
+ if (!RB_TYPE_P(klass, T_CLASS)) {
1292
+ rb_raise(rb_eTypeError, "%"PRIsVALUE" is not a class", rb_id2str(id));
1293
+ }
1294
+
1295
+ if (super != rb_cObject) {
1296
+ VALUE tmp;
1297
+ tmp = rb_class_real(RCLASS_SUPER(klass));
1298
+
1299
+ if (tmp != super) {
1300
+ rb_raise(rb_eTypeError, "superclass mismatch for class %"PRIsVALUE"",
1301
+ rb_id2str(id));
1302
+ }
1303
+ }
1304
+ }
1305
+ else {
1306
+ /* new class declaration */
1307
+ klass = rb_define_class_id(id, super);
1308
+ rb_set_class_path_string(klass, cbase, rb_id2str(id));
1309
+ rb_const_set(cbase, id, klass);
1310
+ rb_class_inherited(super, klass);
1311
+ }
1312
+ break;
1313
+ case VM_DEFINECLASS_TYPE_SINGLETON_CLASS:
1314
+ /* val is dummy. classdef returns class scope value */
1315
+ /* super is dummy */
1316
+ klass = rb_singleton_class(cbase);
1317
+ break;
1318
+ case VM_DEFINECLASS_TYPE_MODULE:
1319
+ /* val is dummy. classdef returns class scope value */
1320
+ /* super is dummy */
1321
+
1322
+ vm_check_if_namespace(cbase);
1323
+
1324
+ /* find klass */
1325
+ if ((klass = vm_search_const_defined_class(cbase, id)) != 0) {
1326
+ klass = VM_DEFINECLASS_SCOPED_P(flags) ?
1327
+ rb_public_const_get_at(klass, id) : rb_const_get_at(klass, id);
1328
+ /* already exist */
1329
+ if (!RB_TYPE_P(klass, T_MODULE)) {
1330
+ rb_raise(rb_eTypeError, "%"PRIsVALUE" is not a module", rb_id2str(id));
1331
+ }
1332
+ }
1333
+ else {
1334
+ /* new module declaration */
1335
+ klass = rb_define_module_id(id);
1336
+ rb_set_class_path_string(klass, cbase, rb_id2str(id));
1337
+ rb_const_set(cbase, id, klass);
1338
+ }
1339
+ break;
1340
+ default:
1341
+ rb_bug("unknown defineclass type: %d", (int)type);
1342
+ }
1343
+
1344
+ /* enter scope */
1345
+ vm_push_frame(th, class_iseq, VM_FRAME_MAGIC_CLASS, klass,
1346
+ VM_ENVVAL_BLOCK_PTR(GET_BLOCK_PTR()),
1347
+ (VALUE)vm_cref_push(th, klass, NULL),
1348
+ class_iseq->body->iseq_encoded, GET_SP(),
1349
+ class_iseq->body->local_size, class_iseq->body->stack_max);
1350
+
1351
+ RESTORE_REGS();
1352
+ NEXT_INSN();
1353
+
1354
+ #line 1355 "vm.inc"
1355
+ CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
1356
+ PUSH(val);
1357
+ #undef CURRENT_INSN_defineclass
1358
+ #undef INSN_IS_SC
1359
+ #undef INSN_LABEL
1360
+ #undef LABEL_IS_SC
1361
+ END_INSN(defineclass);}}}
1362
+ INSN_ENTRY(send){
1363
+ {
1364
+ VALUE val;
1365
+ ISEQ blockiseq = (ISEQ)GET_OPERAND(3);
1366
+ CALL_CACHE cc = (CALL_CACHE)GET_OPERAND(2);
1367
+ CALL_INFO ci = (CALL_INFO)GET_OPERAND(1);
1368
+
1369
+ DEBUG_ENTER_INSN("send");
1370
+ ADD_PC(1+3);
1371
+ PREFETCH(GET_PC());
1372
+ #define CURRENT_INSN_send 1
1373
+ #define INSN_IS_SC() 0
1374
+ #define INSN_LABEL(lab) LABEL_send_##lab
1375
+ #define LABEL_IS_SC(lab) LABEL_##lab##_##t
1376
+ COLLECT_USAGE_INSN(BIN(send));
1377
+ COLLECT_USAGE_OPERAND(BIN(send), 0, ci);
1378
+ COLLECT_USAGE_OPERAND(BIN(send), 1, cc);
1379
+ COLLECT_USAGE_OPERAND(BIN(send), 2, blockiseq);
1380
+ {
1381
+ #line 941 "insns.def"
1382
+ struct rb_calling_info calling;
1383
+
1384
+ vm_caller_setup_arg_block(th, reg_cfp, &calling, ci, blockiseq, FALSE);
1385
+ vm_search_method(ci, cc, calling.recv = TOPN(calling.argc = ci->orig_argc));
1386
+ CALL_METHOD(&calling, ci, cc);
1387
+
1388
+ #line 1389 "vm.inc"
1389
+ CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
1390
+ PUSH(val);
1391
+ #undef CURRENT_INSN_send
1392
+ #undef INSN_IS_SC
1393
+ #undef INSN_LABEL
1394
+ #undef LABEL_IS_SC
1395
+ END_INSN(send);}}}
1396
+ INSN_ENTRY(opt_str_freeze){
1397
+ {
1398
+ VALUE val;
1399
+ VALUE str = (VALUE)GET_OPERAND(1);
1400
+
1401
+ DEBUG_ENTER_INSN("opt_str_freeze");
1402
+ ADD_PC(1+1);
1403
+ PREFETCH(GET_PC());
1404
+ #define CURRENT_INSN_opt_str_freeze 1
1405
+ #define INSN_IS_SC() 0
1406
+ #define INSN_LABEL(lab) LABEL_opt_str_freeze_##lab
1407
+ #define LABEL_IS_SC(lab) LABEL_##lab##_##t
1408
+ COLLECT_USAGE_INSN(BIN(opt_str_freeze));
1409
+ COLLECT_USAGE_OPERAND(BIN(opt_str_freeze), 0, str);
1410
+ {
1411
+ #line 954 "insns.def"
1412
+ if (BASIC_OP_UNREDEFINED_P(BOP_FREEZE, STRING_REDEFINED_OP_FLAG)) {
1413
+ val = str;
1414
+ }
1415
+ else {
1416
+ val = rb_funcall(rb_str_resurrect(str), idFreeze, 0);
1417
+ }
1418
+
1419
+ #line 1420 "vm.inc"
1420
+ CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
1421
+ PUSH(val);
1422
+ #undef CURRENT_INSN_opt_str_freeze
1423
+ #undef INSN_IS_SC
1424
+ #undef INSN_LABEL
1425
+ #undef LABEL_IS_SC
1426
+ END_INSN(opt_str_freeze);}}}
1427
+ INSN_ENTRY(opt_send_without_block){
1428
+ {
1429
+ VALUE val;
1430
+ CALL_CACHE cc = (CALL_CACHE)GET_OPERAND(2);
1431
+ CALL_INFO ci = (CALL_INFO)GET_OPERAND(1);
1432
+
1433
+ DEBUG_ENTER_INSN("opt_send_without_block");
1434
+ ADD_PC(1+2);
1435
+ PREFETCH(GET_PC());
1436
+ #define CURRENT_INSN_opt_send_without_block 1
1437
+ #define INSN_IS_SC() 0
1438
+ #define INSN_LABEL(lab) LABEL_opt_send_without_block_##lab
1439
+ #define LABEL_IS_SC(lab) LABEL_##lab##_##t
1440
+ COLLECT_USAGE_INSN(BIN(opt_send_without_block));
1441
+ COLLECT_USAGE_OPERAND(BIN(opt_send_without_block), 0, ci);
1442
+ COLLECT_USAGE_OPERAND(BIN(opt_send_without_block), 1, cc);
1443
+ {
1444
+ #line 973 "insns.def"
1445
+ struct rb_calling_info calling;
1446
+ calling.blockptr = NULL;
1447
+ vm_search_method(ci, cc, calling.recv = TOPN(calling.argc = ci->orig_argc));
1448
+ CALL_METHOD(&calling, ci, cc);
1449
+
1450
+ #line 1451 "vm.inc"
1451
+ CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
1452
+ PUSH(val);
1453
+ #undef CURRENT_INSN_opt_send_without_block
1454
+ #undef INSN_IS_SC
1455
+ #undef INSN_LABEL
1456
+ #undef LABEL_IS_SC
1457
+ END_INSN(opt_send_without_block);}}}
1458
+ INSN_ENTRY(invokesuper){
1459
+ {
1460
+ VALUE val;
1461
+ ISEQ blockiseq = (ISEQ)GET_OPERAND(3);
1462
+ CALL_CACHE cc = (CALL_CACHE)GET_OPERAND(2);
1463
+ CALL_INFO ci = (CALL_INFO)GET_OPERAND(1);
1464
+
1465
+ DEBUG_ENTER_INSN("invokesuper");
1466
+ ADD_PC(1+3);
1467
+ PREFETCH(GET_PC());
1468
+ #define CURRENT_INSN_invokesuper 1
1469
+ #define INSN_IS_SC() 0
1470
+ #define INSN_LABEL(lab) LABEL_invokesuper_##lab
1471
+ #define LABEL_IS_SC(lab) LABEL_##lab##_##t
1472
+ COLLECT_USAGE_INSN(BIN(invokesuper));
1473
+ COLLECT_USAGE_OPERAND(BIN(invokesuper), 0, ci);
1474
+ COLLECT_USAGE_OPERAND(BIN(invokesuper), 1, cc);
1475
+ COLLECT_USAGE_OPERAND(BIN(invokesuper), 2, blockiseq);
1476
+ {
1477
+ #line 990 "insns.def"
1478
+ struct rb_calling_info calling;
1479
+ calling.argc = ci->orig_argc;
1480
+
1481
+ vm_caller_setup_arg_block(th, reg_cfp, &calling, ci, blockiseq, TRUE);
1482
+ calling.recv = GET_SELF();
1483
+ vm_search_super_method(th, GET_CFP(), &calling, ci, cc);
1484
+ CALL_METHOD(&calling, ci, cc);
1485
+
1486
+ #line 1487 "vm.inc"
1487
+ CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
1488
+ PUSH(val);
1489
+ #undef CURRENT_INSN_invokesuper
1490
+ #undef INSN_IS_SC
1491
+ #undef INSN_LABEL
1492
+ #undef LABEL_IS_SC
1493
+ END_INSN(invokesuper);}}}
1494
+ INSN_ENTRY(invokeblock){
1495
+ {
1496
+ VALUE val;
1497
+ CALL_INFO ci = (CALL_INFO)GET_OPERAND(1);
1498
+
1499
+ DEBUG_ENTER_INSN("invokeblock");
1500
+ ADD_PC(1+1);
1501
+ PREFETCH(GET_PC());
1502
+ #define CURRENT_INSN_invokeblock 1
1503
+ #define INSN_IS_SC() 0
1504
+ #define INSN_LABEL(lab) LABEL_invokeblock_##lab
1505
+ #define LABEL_IS_SC(lab) LABEL_##lab##_##t
1506
+ COLLECT_USAGE_INSN(BIN(invokeblock));
1507
+ COLLECT_USAGE_OPERAND(BIN(invokeblock), 0, ci);
1508
+ {
1509
+ #line 1010 "insns.def"
1510
+ struct rb_calling_info calling;
1511
+ calling.argc = ci->orig_argc;
1512
+ calling.blockptr = NULL;
1513
+ calling.recv = GET_SELF();
1514
+
1515
+ val = vm_invoke_block(th, GET_CFP(), &calling, ci);
1516
+ if (val == Qundef) {
1517
+ RESTORE_REGS();
1518
+ NEXT_INSN();
1519
+ }
1520
+
1521
+ #line 1522 "vm.inc"
1522
+ CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
1523
+ PUSH(val);
1524
+ #undef CURRENT_INSN_invokeblock
1525
+ #undef INSN_IS_SC
1526
+ #undef INSN_LABEL
1527
+ #undef LABEL_IS_SC
1528
+ END_INSN(invokeblock);}}}
1529
+ INSN_ENTRY(leave){
1530
+ {
1531
+
1532
+ VALUE val = TOPN(0);
1533
+ DEBUG_ENTER_INSN("leave");
1534
+ ADD_PC(1+0);
1535
+ PREFETCH(GET_PC());
1536
+ POPN(1);
1537
+ #define CURRENT_INSN_leave 1
1538
+ #define INSN_IS_SC() 0
1539
+ #define INSN_LABEL(lab) LABEL_leave_##lab
1540
+ #define LABEL_IS_SC(lab) LABEL_##lab##_##t
1541
+ COLLECT_USAGE_INSN(BIN(leave));
1542
+ {
1543
+ #line 1033 "insns.def"
1544
+ if (OPT_CHECKED_RUN) {
1545
+ const VALUE *const bp = vm_base_ptr(reg_cfp);
1546
+ if (reg_cfp->sp != bp) {
1547
+ rb_bug("Stack consistency error (sp: %"PRIdPTRDIFF", bp: %"PRIdPTRDIFF")",
1548
+ VM_SP_CNT(th, reg_cfp->sp), VM_SP_CNT(th, bp));
1549
+ }
1550
+ }
1551
+
1552
+ RUBY_VM_CHECK_INTS(th);
1553
+
1554
+ if (UNLIKELY(VM_FRAME_TYPE_FINISH_P(GET_CFP()))) {
1555
+ vm_pop_frame(th);
1556
+
1557
+ #if OPT_CALL_THREADED_CODE
1558
+ th->retval = val;
1559
+ return 0;
1560
+ #else
1561
+ return val;
1562
+ #endif
1563
+ }
1564
+ else {
1565
+ vm_pop_frame(th);
1566
+ RESTORE_REGS();
1567
+ }
1568
+
1569
+ #line 1570 "vm.inc"
1570
+ CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
1571
+ PUSH(val);
1572
+ #undef CURRENT_INSN_leave
1573
+ #undef INSN_IS_SC
1574
+ #undef INSN_LABEL
1575
+ #undef LABEL_IS_SC
1576
+ END_INSN(leave);}}}
1577
+ INSN_ENTRY(throw){
1578
+ {
1579
+ VALUE val;
1580
+ rb_num_t throw_state = (rb_num_t)GET_OPERAND(1);
1581
+ VALUE throwobj = TOPN(0);
1582
+ DEBUG_ENTER_INSN("throw");
1583
+ ADD_PC(1+1);
1584
+ PREFETCH(GET_PC());
1585
+ POPN(1);
1586
+ #define CURRENT_INSN_throw 1
1587
+ #define INSN_IS_SC() 0
1588
+ #define INSN_LABEL(lab) LABEL_throw_##lab
1589
+ #define LABEL_IS_SC(lab) LABEL_##lab##_##t
1590
+ COLLECT_USAGE_INSN(BIN(throw));
1591
+ COLLECT_USAGE_OPERAND(BIN(throw), 0, throw_state);
1592
+ {
1593
+ #line 1074 "insns.def"
1594
+ RUBY_VM_CHECK_INTS(th);
1595
+ val = vm_throw(th, GET_CFP(), throw_state, throwobj);
1596
+ THROW_EXCEPTION(val);
1597
+ /* unreachable */
1598
+
1599
+ #line 1600 "vm.inc"
1600
+ CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
1601
+ PUSH(val);
1602
+ #undef CURRENT_INSN_throw
1603
+ #undef INSN_IS_SC
1604
+ #undef INSN_LABEL
1605
+ #undef LABEL_IS_SC
1606
+ END_INSN(throw);}}}
1607
+ INSN_ENTRY(jump){
1608
+ {
1609
+ OFFSET dst = (OFFSET)GET_OPERAND(1);
1610
+
1611
+ DEBUG_ENTER_INSN("jump");
1612
+ ADD_PC(1+1);
1613
+ PREFETCH(GET_PC());
1614
+ #define CURRENT_INSN_jump 1
1615
+ #define INSN_IS_SC() 0
1616
+ #define INSN_LABEL(lab) LABEL_jump_##lab
1617
+ #define LABEL_IS_SC(lab) LABEL_##lab##_##t
1618
+ COLLECT_USAGE_INSN(BIN(jump));
1619
+ COLLECT_USAGE_OPERAND(BIN(jump), 0, dst);
1620
+ {
1621
+ #line 1095 "insns.def"
1622
+ RUBY_VM_CHECK_INTS(th);
1623
+ JUMP(dst);
1624
+
1625
+ #line 1626 "vm.inc"
1626
+ #undef CURRENT_INSN_jump
1627
+ #undef INSN_IS_SC
1628
+ #undef INSN_LABEL
1629
+ #undef LABEL_IS_SC
1630
+ END_INSN(jump);}}}
1631
+ INSN_ENTRY(branchif){
1632
+ {
1633
+ OFFSET dst = (OFFSET)GET_OPERAND(1);
1634
+ VALUE val = TOPN(0);
1635
+ DEBUG_ENTER_INSN("branchif");
1636
+ ADD_PC(1+1);
1637
+ PREFETCH(GET_PC());
1638
+ POPN(1);
1639
+ #define CURRENT_INSN_branchif 1
1640
+ #define INSN_IS_SC() 0
1641
+ #define INSN_LABEL(lab) LABEL_branchif_##lab
1642
+ #define LABEL_IS_SC(lab) LABEL_##lab##_##t
1643
+ COLLECT_USAGE_INSN(BIN(branchif));
1644
+ COLLECT_USAGE_OPERAND(BIN(branchif), 0, dst);
1645
+ {
1646
+ #line 1110 "insns.def"
1647
+ if (RTEST(val)) {
1648
+ RUBY_VM_CHECK_INTS(th);
1649
+ JUMP(dst);
1650
+ }
1651
+
1652
+ #line 1653 "vm.inc"
1653
+ #undef CURRENT_INSN_branchif
1654
+ #undef INSN_IS_SC
1655
+ #undef INSN_LABEL
1656
+ #undef LABEL_IS_SC
1657
+ END_INSN(branchif);}}}
1658
+ INSN_ENTRY(branchunless){
1659
+ {
1660
+ OFFSET dst = (OFFSET)GET_OPERAND(1);
1661
+ VALUE val = TOPN(0);
1662
+ DEBUG_ENTER_INSN("branchunless");
1663
+ ADD_PC(1+1);
1664
+ PREFETCH(GET_PC());
1665
+ POPN(1);
1666
+ #define CURRENT_INSN_branchunless 1
1667
+ #define INSN_IS_SC() 0
1668
+ #define INSN_LABEL(lab) LABEL_branchunless_##lab
1669
+ #define LABEL_IS_SC(lab) LABEL_##lab##_##t
1670
+ COLLECT_USAGE_INSN(BIN(branchunless));
1671
+ COLLECT_USAGE_OPERAND(BIN(branchunless), 0, dst);
1672
+ {
1673
+ #line 1127 "insns.def"
1674
+ if (!RTEST(val)) {
1675
+ RUBY_VM_CHECK_INTS(th);
1676
+ JUMP(dst);
1677
+ }
1678
+
1679
+ #line 1680 "vm.inc"
1680
+ #undef CURRENT_INSN_branchunless
1681
+ #undef INSN_IS_SC
1682
+ #undef INSN_LABEL
1683
+ #undef LABEL_IS_SC
1684
+ END_INSN(branchunless);}}}
1685
+ INSN_ENTRY(branchnil){
1686
+ {
1687
+ OFFSET dst = (OFFSET)GET_OPERAND(1);
1688
+ VALUE val = TOPN(0);
1689
+ DEBUG_ENTER_INSN("branchnil");
1690
+ ADD_PC(1+1);
1691
+ PREFETCH(GET_PC());
1692
+ POPN(1);
1693
+ #define CURRENT_INSN_branchnil 1
1694
+ #define INSN_IS_SC() 0
1695
+ #define INSN_LABEL(lab) LABEL_branchnil_##lab
1696
+ #define LABEL_IS_SC(lab) LABEL_##lab##_##t
1697
+ COLLECT_USAGE_INSN(BIN(branchnil));
1698
+ COLLECT_USAGE_OPERAND(BIN(branchnil), 0, dst);
1699
+ {
1700
+ #line 1144 "insns.def"
1701
+ if (NIL_P(val)) {
1702
+ RUBY_VM_CHECK_INTS(th);
1703
+ JUMP(dst);
1704
+ }
1705
+
1706
+ #line 1707 "vm.inc"
1707
+ #undef CURRENT_INSN_branchnil
1708
+ #undef INSN_IS_SC
1709
+ #undef INSN_LABEL
1710
+ #undef LABEL_IS_SC
1711
+ END_INSN(branchnil);}}}
1712
+ INSN_ENTRY(getinlinecache){
1713
+ {
1714
+ VALUE val;
1715
+ IC ic = (IC)GET_OPERAND(2);
1716
+ OFFSET dst = (OFFSET)GET_OPERAND(1);
1717
+
1718
+ DEBUG_ENTER_INSN("getinlinecache");
1719
+ ADD_PC(1+2);
1720
+ PREFETCH(GET_PC());
1721
+ #define CURRENT_INSN_getinlinecache 1
1722
+ #define INSN_IS_SC() 0
1723
+ #define INSN_LABEL(lab) LABEL_getinlinecache_##lab
1724
+ #define LABEL_IS_SC(lab) LABEL_##lab##_##t
1725
+ COLLECT_USAGE_INSN(BIN(getinlinecache));
1726
+ COLLECT_USAGE_OPERAND(BIN(getinlinecache), 0, dst);
1727
+ COLLECT_USAGE_OPERAND(BIN(getinlinecache), 1, ic);
1728
+ {
1729
+ #line 1166 "insns.def"
1730
+ if (ic->ic_serial == GET_GLOBAL_CONSTANT_STATE() &&
1731
+ (ic->ic_cref == NULL || ic->ic_cref == rb_vm_get_cref(GET_EP()))) {
1732
+ val = ic->ic_value.value;
1733
+ JUMP(dst);
1734
+ }
1735
+ else {
1736
+ /* none */
1737
+ val = Qnil;
1738
+ }
1739
+
1740
+ #line 1741 "vm.inc"
1741
+ CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
1742
+ PUSH(val);
1743
+ #undef CURRENT_INSN_getinlinecache
1744
+ #undef INSN_IS_SC
1745
+ #undef INSN_LABEL
1746
+ #undef LABEL_IS_SC
1747
+ END_INSN(getinlinecache);}}}
1748
+ INSN_ENTRY(setinlinecache){
1749
+ {
1750
+ IC ic = (IC)GET_OPERAND(1);
1751
+ VALUE val = TOPN(0);
1752
+ DEBUG_ENTER_INSN("setinlinecache");
1753
+ ADD_PC(1+1);
1754
+ PREFETCH(GET_PC());
1755
+ POPN(1);
1756
+ #define CURRENT_INSN_setinlinecache 1
1757
+ #define INSN_IS_SC() 0
1758
+ #define INSN_LABEL(lab) LABEL_setinlinecache_##lab
1759
+ #define LABEL_IS_SC(lab) LABEL_##lab##_##t
1760
+ COLLECT_USAGE_INSN(BIN(setinlinecache));
1761
+ COLLECT_USAGE_OPERAND(BIN(setinlinecache), 0, ic);
1762
+ {
1763
+ #line 1188 "insns.def"
1764
+ VM_ASSERT(ic->ic_value.value != Qundef);
1765
+ ic->ic_value.value = val;
1766
+ ic->ic_serial = GET_GLOBAL_CONSTANT_STATE() - ruby_vm_const_missing_count;
1767
+ ic->ic_cref = vm_get_const_key_cref(GET_EP());
1768
+ ruby_vm_const_missing_count = 0;
1769
+
1770
+ #line 1771 "vm.inc"
1771
+ CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
1772
+ PUSH(val);
1773
+ #undef CURRENT_INSN_setinlinecache
1774
+ #undef INSN_IS_SC
1775
+ #undef INSN_LABEL
1776
+ #undef LABEL_IS_SC
1777
+ END_INSN(setinlinecache);}}}
1778
+ INSN_ENTRY(once){
1779
+ {
1780
+ VALUE val;
1781
+ IC ic = (IC)GET_OPERAND(2);
1782
+ ISEQ iseq = (ISEQ)GET_OPERAND(1);
1783
+
1784
+ DEBUG_ENTER_INSN("once");
1785
+ ADD_PC(1+2);
1786
+ PREFETCH(GET_PC());
1787
+ #define CURRENT_INSN_once 1
1788
+ #define INSN_IS_SC() 0
1789
+ #define INSN_LABEL(lab) LABEL_once_##lab
1790
+ #define LABEL_IS_SC(lab) LABEL_##lab##_##t
1791
+ COLLECT_USAGE_INSN(BIN(once));
1792
+ COLLECT_USAGE_OPERAND(BIN(once), 0, iseq);
1793
+ COLLECT_USAGE_OPERAND(BIN(once), 1, ic);
1794
+ {
1795
+ #line 1206 "insns.def"
1796
+ union iseq_inline_storage_entry *is = (union iseq_inline_storage_entry *)ic;
1797
+
1798
+ #define RUNNING_THREAD_ONCE_DONE ((rb_thread_t *)(0x1))
1799
+ retry:
1800
+ if (is->once.running_thread == RUNNING_THREAD_ONCE_DONE) {
1801
+ val = is->once.value;
1802
+ }
1803
+ else if (is->once.running_thread == NULL) {
1804
+ is->once.running_thread = th;
1805
+ val = is->once.value = rb_ensure(vm_once_exec, (VALUE)iseq, vm_once_clear, (VALUE)is);
1806
+ /* is->once.running_thread is cleared by vm_once_clear() */
1807
+ is->once.running_thread = RUNNING_THREAD_ONCE_DONE; /* success */
1808
+ rb_iseq_add_mark_object(GET_ISEQ(), val);
1809
+ }
1810
+ else if (is->once.running_thread == th) {
1811
+ /* recursive once */
1812
+ val = vm_once_exec((VALUE)iseq);
1813
+ }
1814
+ else {
1815
+ /* waiting for finish */
1816
+ RUBY_VM_CHECK_INTS(th);
1817
+ rb_thread_schedule();
1818
+ goto retry;
1819
+ }
1820
+
1821
+ #line 1822 "vm.inc"
1822
+ CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
1823
+ PUSH(val);
1824
+ #undef CURRENT_INSN_once
1825
+ #undef INSN_IS_SC
1826
+ #undef INSN_LABEL
1827
+ #undef LABEL_IS_SC
1828
+ END_INSN(once);}}}
1829
+ INSN_ENTRY(opt_case_dispatch){
1830
+ {
1831
+ OFFSET else_offset = (OFFSET)GET_OPERAND(2);
1832
+ CDHASH hash = (CDHASH)GET_OPERAND(1);
1833
+ VALUE key = TOPN(0);
1834
+ DEBUG_ENTER_INSN("opt_case_dispatch");
1835
+ ADD_PC(1+2);
1836
+ PREFETCH(GET_PC());
1837
+ POPN(1);
1838
+ #define CURRENT_INSN_opt_case_dispatch 1
1839
+ #define INSN_IS_SC() 0
1840
+ #define INSN_LABEL(lab) LABEL_opt_case_dispatch_##lab
1841
+ #define LABEL_IS_SC(lab) LABEL_##lab##_##t
1842
+ COLLECT_USAGE_INSN(BIN(opt_case_dispatch));
1843
+ COLLECT_USAGE_OPERAND(BIN(opt_case_dispatch), 0, hash);
1844
+ COLLECT_USAGE_OPERAND(BIN(opt_case_dispatch), 1, else_offset);
1845
+ {
1846
+ #line 1243 "insns.def"
1847
+ switch(TYPE(key)) {
1848
+ case T_FLOAT: {
1849
+ double ival;
1850
+ if (modf(RFLOAT_VALUE(key), &ival) == 0.0) {
1851
+ key = FIXABLE(ival) ? LONG2FIX((long)ival) : rb_dbl2big(ival);
1852
+ }
1853
+ }
1854
+ case T_SYMBOL: /* fall through */
1855
+ case T_FIXNUM:
1856
+ case T_BIGNUM:
1857
+ case T_STRING:
1858
+ if (BASIC_OP_UNREDEFINED_P(BOP_EQQ,
1859
+ SYMBOL_REDEFINED_OP_FLAG |
1860
+ FIXNUM_REDEFINED_OP_FLAG |
1861
+ BIGNUM_REDEFINED_OP_FLAG |
1862
+ STRING_REDEFINED_OP_FLAG)) {
1863
+ st_data_t val;
1864
+ if (st_lookup(RHASH_TBL_RAW(hash), key, &val)) {
1865
+ JUMP(FIX2INT((VALUE)val));
1866
+ }
1867
+ else {
1868
+ JUMP(else_offset);
1869
+ }
1870
+ break;
1871
+ }
1872
+ default:
1873
+ break;
1874
+ }
1875
+
1876
+ #line 1877 "vm.inc"
1877
+ #undef CURRENT_INSN_opt_case_dispatch
1878
+ #undef INSN_IS_SC
1879
+ #undef INSN_LABEL
1880
+ #undef LABEL_IS_SC
1881
+ END_INSN(opt_case_dispatch);}}}
1882
+ INSN_ENTRY(opt_plus){
1883
+ {
1884
+ VALUE val;
1885
+ CALL_CACHE cc = (CALL_CACHE)GET_OPERAND(2);
1886
+ CALL_INFO ci = (CALL_INFO)GET_OPERAND(1);
1887
+ VALUE recv = TOPN(1);
1888
+ VALUE obj = TOPN(0);
1889
+ DEBUG_ENTER_INSN("opt_plus");
1890
+ ADD_PC(1+2);
1891
+ PREFETCH(GET_PC());
1892
+ POPN(2);
1893
+ #define CURRENT_INSN_opt_plus 1
1894
+ #define INSN_IS_SC() 0
1895
+ #define INSN_LABEL(lab) LABEL_opt_plus_##lab
1896
+ #define LABEL_IS_SC(lab) LABEL_##lab##_##t
1897
+ COLLECT_USAGE_INSN(BIN(opt_plus));
1898
+ COLLECT_USAGE_OPERAND(BIN(opt_plus), 0, ci);
1899
+ COLLECT_USAGE_OPERAND(BIN(opt_plus), 1, cc);
1900
+ {
1901
+ #line 1286 "insns.def"
1902
+ if (FIXNUM_2_P(recv, obj) &&
1903
+ BASIC_OP_UNREDEFINED_P(BOP_PLUS,FIXNUM_REDEFINED_OP_FLAG)) {
1904
+ /* fixnum + fixnum */
1905
+ #ifndef LONG_LONG_VALUE
1906
+ val = (recv + (obj & (~1)));
1907
+ if ((~(recv ^ obj) & (recv ^ val)) &
1908
+ ((VALUE)0x01 << ((sizeof(VALUE) * CHAR_BIT) - 1))) {
1909
+ val = rb_big_plus(rb_int2big(FIX2LONG(recv)),
1910
+ rb_int2big(FIX2LONG(obj)));
1911
+ }
1912
+ #else
1913
+ long a, b, c;
1914
+ a = FIX2LONG(recv);
1915
+ b = FIX2LONG(obj);
1916
+ c = a + b;
1917
+ if (FIXABLE(c)) {
1918
+ val = LONG2FIX(c);
1919
+ }
1920
+ else {
1921
+ val = rb_big_plus(rb_int2big(a), rb_int2big(b));
1922
+ }
1923
+ #endif
1924
+ }
1925
+ else if (FLONUM_2_P(recv, obj) &&
1926
+ BASIC_OP_UNREDEFINED_P(BOP_PLUS, FLOAT_REDEFINED_OP_FLAG)) {
1927
+ val = DBL2NUM(RFLOAT_VALUE(recv) + RFLOAT_VALUE(obj));
1928
+ }
1929
+ else if (!SPECIAL_CONST_P(recv) && !SPECIAL_CONST_P(obj)) {
1930
+ if (RBASIC_CLASS(recv) == rb_cFloat && RBASIC_CLASS(obj) == rb_cFloat &&
1931
+ BASIC_OP_UNREDEFINED_P(BOP_PLUS, FLOAT_REDEFINED_OP_FLAG)) {
1932
+ val = DBL2NUM(RFLOAT_VALUE(recv) + RFLOAT_VALUE(obj));
1933
+ }
1934
+ else if (RBASIC_CLASS(recv) == rb_cString && RBASIC_CLASS(obj) == rb_cString &&
1935
+ BASIC_OP_UNREDEFINED_P(BOP_PLUS, STRING_REDEFINED_OP_FLAG)) {
1936
+ val = rb_str_plus(recv, obj);
1937
+ }
1938
+ else if (RBASIC_CLASS(recv) == rb_cArray &&
1939
+ BASIC_OP_UNREDEFINED_P(BOP_PLUS, ARRAY_REDEFINED_OP_FLAG)) {
1940
+ val = rb_ary_plus(recv, obj);
1941
+ }
1942
+ else {
1943
+ goto INSN_LABEL(normal_dispatch);
1944
+ }
1945
+ }
1946
+ else {
1947
+ INSN_LABEL(normal_dispatch):
1948
+ PUSH(recv);
1949
+ PUSH(obj);
1950
+ CALL_SIMPLE_METHOD(recv);
1951
+ }
1952
+
1953
+ #line 1954 "vm.inc"
1954
+ CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
1955
+ PUSH(val);
1956
+ #undef CURRENT_INSN_opt_plus
1957
+ #undef INSN_IS_SC
1958
+ #undef INSN_LABEL
1959
+ #undef LABEL_IS_SC
1960
+ END_INSN(opt_plus);}}}
1961
+ INSN_ENTRY(opt_minus){
1962
+ {
1963
+ VALUE val;
1964
+ CALL_CACHE cc = (CALL_CACHE)GET_OPERAND(2);
1965
+ CALL_INFO ci = (CALL_INFO)GET_OPERAND(1);
1966
+ VALUE recv = TOPN(1);
1967
+ VALUE obj = TOPN(0);
1968
+ DEBUG_ENTER_INSN("opt_minus");
1969
+ ADD_PC(1+2);
1970
+ PREFETCH(GET_PC());
1971
+ POPN(2);
1972
+ #define CURRENT_INSN_opt_minus 1
1973
+ #define INSN_IS_SC() 0
1974
+ #define INSN_LABEL(lab) LABEL_opt_minus_##lab
1975
+ #define LABEL_IS_SC(lab) LABEL_##lab##_##t
1976
+ COLLECT_USAGE_INSN(BIN(opt_minus));
1977
+ COLLECT_USAGE_OPERAND(BIN(opt_minus), 0, ci);
1978
+ COLLECT_USAGE_OPERAND(BIN(opt_minus), 1, cc);
1979
+ {
1980
+ #line 1349 "insns.def"
1981
+ if (FIXNUM_2_P(recv, obj) &&
1982
+ BASIC_OP_UNREDEFINED_P(BOP_MINUS, FIXNUM_REDEFINED_OP_FLAG)) {
1983
+ long a, b, c;
1984
+
1985
+ a = FIX2LONG(recv);
1986
+ b = FIX2LONG(obj);
1987
+ c = a - b;
1988
+
1989
+ if (FIXABLE(c)) {
1990
+ val = LONG2FIX(c);
1991
+ }
1992
+ else {
1993
+ val = rb_big_minus(rb_int2big(a), rb_int2big(b));
1994
+ }
1995
+ }
1996
+ else if (FLONUM_2_P(recv, obj) &&
1997
+ BASIC_OP_UNREDEFINED_P(BOP_MINUS, FLOAT_REDEFINED_OP_FLAG)) {
1998
+ val = DBL2NUM(RFLOAT_VALUE(recv) - RFLOAT_VALUE(obj));
1999
+ }
2000
+ else if (!SPECIAL_CONST_P(recv) && !SPECIAL_CONST_P(obj)) {
2001
+ if (RBASIC_CLASS(recv) == rb_cFloat && RBASIC_CLASS(obj) == rb_cFloat &&
2002
+ BASIC_OP_UNREDEFINED_P(BOP_MINUS, FLOAT_REDEFINED_OP_FLAG)) {
2003
+ val = DBL2NUM(RFLOAT_VALUE(recv) - RFLOAT_VALUE(obj));
2004
+ }
2005
+ else {
2006
+ goto INSN_LABEL(normal_dispatch);
2007
+ }
2008
+ }
2009
+ else {
2010
+ /* other */
2011
+ INSN_LABEL(normal_dispatch):
2012
+ PUSH(recv);
2013
+ PUSH(obj);
2014
+ CALL_SIMPLE_METHOD(recv);
2015
+ }
2016
+
2017
+ #line 2018 "vm.inc"
2018
+ CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
2019
+ PUSH(val);
2020
+ #undef CURRENT_INSN_opt_minus
2021
+ #undef INSN_IS_SC
2022
+ #undef INSN_LABEL
2023
+ #undef LABEL_IS_SC
2024
+ END_INSN(opt_minus);}}}
2025
+ INSN_ENTRY(opt_mult){
2026
+ {
2027
+ VALUE val;
2028
+ CALL_CACHE cc = (CALL_CACHE)GET_OPERAND(2);
2029
+ CALL_INFO ci = (CALL_INFO)GET_OPERAND(1);
2030
+ VALUE recv = TOPN(1);
2031
+ VALUE obj = TOPN(0);
2032
+ DEBUG_ENTER_INSN("opt_mult");
2033
+ ADD_PC(1+2);
2034
+ PREFETCH(GET_PC());
2035
+ POPN(2);
2036
+ #define CURRENT_INSN_opt_mult 1
2037
+ #define INSN_IS_SC() 0
2038
+ #define INSN_LABEL(lab) LABEL_opt_mult_##lab
2039
+ #define LABEL_IS_SC(lab) LABEL_##lab##_##t
2040
+ COLLECT_USAGE_INSN(BIN(opt_mult));
2041
+ COLLECT_USAGE_OPERAND(BIN(opt_mult), 0, ci);
2042
+ COLLECT_USAGE_OPERAND(BIN(opt_mult), 1, cc);
2043
+ {
2044
+ #line 1397 "insns.def"
2045
+ if (FIXNUM_2_P(recv, obj) &&
2046
+ BASIC_OP_UNREDEFINED_P(BOP_MULT, FIXNUM_REDEFINED_OP_FLAG)) {
2047
+ long a, b;
2048
+
2049
+ a = FIX2LONG(recv);
2050
+ if (a == 0) {
2051
+ val = recv;
2052
+ }
2053
+ else {
2054
+ b = FIX2LONG(obj);
2055
+ if (MUL_OVERFLOW_FIXNUM_P(a, b)) {
2056
+ val = rb_big_mul(rb_int2big(a), rb_int2big(b));
2057
+ }
2058
+ else {
2059
+ val = LONG2FIX(a * b);
2060
+ }
2061
+ }
2062
+ }
2063
+ else if (FLONUM_2_P(recv, obj) &&
2064
+ BASIC_OP_UNREDEFINED_P(BOP_MULT, FLOAT_REDEFINED_OP_FLAG)) {
2065
+ val = DBL2NUM(RFLOAT_VALUE(recv) * RFLOAT_VALUE(obj));
2066
+ }
2067
+ else if (!SPECIAL_CONST_P(recv) && !SPECIAL_CONST_P(obj)) {
2068
+ if (RBASIC_CLASS(recv) == rb_cFloat && RBASIC_CLASS(obj) == rb_cFloat &&
2069
+ BASIC_OP_UNREDEFINED_P(BOP_MULT, FLOAT_REDEFINED_OP_FLAG)) {
2070
+ val = DBL2NUM(RFLOAT_VALUE(recv) * RFLOAT_VALUE(obj));
2071
+ }
2072
+ else {
2073
+ goto INSN_LABEL(normal_dispatch);
2074
+ }
2075
+ }
2076
+ else {
2077
+ INSN_LABEL(normal_dispatch):
2078
+ PUSH(recv);
2079
+ PUSH(obj);
2080
+ CALL_SIMPLE_METHOD(recv);
2081
+ }
2082
+
2083
+ #line 2084 "vm.inc"
2084
+ CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
2085
+ PUSH(val);
2086
+ #undef CURRENT_INSN_opt_mult
2087
+ #undef INSN_IS_SC
2088
+ #undef INSN_LABEL
2089
+ #undef LABEL_IS_SC
2090
+ END_INSN(opt_mult);}}}
2091
+ INSN_ENTRY(opt_div){
2092
+ {
2093
+ VALUE val;
2094
+ CALL_CACHE cc = (CALL_CACHE)GET_OPERAND(2);
2095
+ CALL_INFO ci = (CALL_INFO)GET_OPERAND(1);
2096
+ VALUE recv = TOPN(1);
2097
+ VALUE obj = TOPN(0);
2098
+ DEBUG_ENTER_INSN("opt_div");
2099
+ ADD_PC(1+2);
2100
+ PREFETCH(GET_PC());
2101
+ POPN(2);
2102
+ #define CURRENT_INSN_opt_div 1
2103
+ #define INSN_IS_SC() 0
2104
+ #define INSN_LABEL(lab) LABEL_opt_div_##lab
2105
+ #define LABEL_IS_SC(lab) LABEL_##lab##_##t
2106
+ COLLECT_USAGE_INSN(BIN(opt_div));
2107
+ COLLECT_USAGE_OPERAND(BIN(opt_div), 0, ci);
2108
+ COLLECT_USAGE_OPERAND(BIN(opt_div), 1, cc);
2109
+ {
2110
+ #line 1447 "insns.def"
2111
+ if (FIXNUM_2_P(recv, obj) &&
2112
+ BASIC_OP_UNREDEFINED_P(BOP_DIV, FIXNUM_REDEFINED_OP_FLAG)) {
2113
+ long x, y, div;
2114
+
2115
+ x = FIX2LONG(recv);
2116
+ y = FIX2LONG(obj);
2117
+ {
2118
+ /* copied from numeric.c#fixdivmod */
2119
+ long mod;
2120
+ if (y == 0)
2121
+ goto INSN_LABEL(normal_dispatch);
2122
+ if (y < 0) {
2123
+ if (x < 0)
2124
+ div = -x / -y;
2125
+ else
2126
+ div = -(x / -y);
2127
+ }
2128
+ else {
2129
+ if (x < 0)
2130
+ div = -(-x / y);
2131
+ else
2132
+ div = x / y;
2133
+ }
2134
+ mod = x - div * y;
2135
+ if ((mod < 0 && y > 0) || (mod > 0 && y < 0)) {
2136
+ mod += y;
2137
+ div -= 1;
2138
+ }
2139
+ }
2140
+ val = LONG2NUM(div);
2141
+ }
2142
+ else if (FLONUM_2_P(recv, obj) &&
2143
+ BASIC_OP_UNREDEFINED_P(BOP_DIV, FLOAT_REDEFINED_OP_FLAG)) {
2144
+ val = DBL2NUM(RFLOAT_VALUE(recv) / RFLOAT_VALUE(obj));
2145
+ }
2146
+ else if (!SPECIAL_CONST_P(recv) && !SPECIAL_CONST_P(obj)) {
2147
+ if (RBASIC_CLASS(recv) == rb_cFloat && RBASIC_CLASS(obj) == rb_cFloat &&
2148
+ BASIC_OP_UNREDEFINED_P(BOP_DIV, FLOAT_REDEFINED_OP_FLAG)) {
2149
+ val = DBL2NUM(RFLOAT_VALUE(recv) / RFLOAT_VALUE(obj));
2150
+ }
2151
+ else {
2152
+ goto INSN_LABEL(normal_dispatch);
2153
+ }
2154
+ }
2155
+ else {
2156
+ INSN_LABEL(normal_dispatch):
2157
+ PUSH(recv);
2158
+ PUSH(obj);
2159
+ CALL_SIMPLE_METHOD(recv);
2160
+ }
2161
+
2162
+ #line 2163 "vm.inc"
2163
+ CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
2164
+ PUSH(val);
2165
+ #undef CURRENT_INSN_opt_div
2166
+ #undef INSN_IS_SC
2167
+ #undef INSN_LABEL
2168
+ #undef LABEL_IS_SC
2169
+ END_INSN(opt_div);}}}
2170
+ INSN_ENTRY(opt_mod){
2171
+ {
2172
+ VALUE val;
2173
+ CALL_CACHE cc = (CALL_CACHE)GET_OPERAND(2);
2174
+ CALL_INFO ci = (CALL_INFO)GET_OPERAND(1);
2175
+ VALUE recv = TOPN(1);
2176
+ VALUE obj = TOPN(0);
2177
+ DEBUG_ENTER_INSN("opt_mod");
2178
+ ADD_PC(1+2);
2179
+ PREFETCH(GET_PC());
2180
+ POPN(2);
2181
+ #define CURRENT_INSN_opt_mod 1
2182
+ #define INSN_IS_SC() 0
2183
+ #define INSN_LABEL(lab) LABEL_opt_mod_##lab
2184
+ #define LABEL_IS_SC(lab) LABEL_##lab##_##t
2185
+ COLLECT_USAGE_INSN(BIN(opt_mod));
2186
+ COLLECT_USAGE_OPERAND(BIN(opt_mod), 0, ci);
2187
+ COLLECT_USAGE_OPERAND(BIN(opt_mod), 1, cc);
2188
+ {
2189
+ #line 1510 "insns.def"
2190
+ if (FIXNUM_2_P(recv, obj) &&
2191
+ BASIC_OP_UNREDEFINED_P(BOP_MOD, FIXNUM_REDEFINED_OP_FLAG )) {
2192
+ long x, y;
2193
+
2194
+ x = FIX2LONG(recv);
2195
+ y = FIX2LONG(obj);
2196
+ if (x > 0 && y > 0) {
2197
+ val = LONG2FIX(x % y);
2198
+ }
2199
+ else {
2200
+ /* copied from numeric.c#fixdivmod */
2201
+ long div, mod;
2202
+
2203
+ if (y == 0)
2204
+ rb_num_zerodiv();
2205
+ if (y < 0) {
2206
+ if (x < 0)
2207
+ div = -x / -y;
2208
+ else
2209
+ div = -(x / -y);
2210
+ }
2211
+ else {
2212
+ if (x < 0)
2213
+ div = -(-x / y);
2214
+ else
2215
+ div = x / y;
2216
+ }
2217
+ mod = x - div * y;
2218
+ if ((mod < 0 && y > 0) || (mod > 0 && y < 0)) {
2219
+ mod += y;
2220
+ div -= 1;
2221
+ }
2222
+ val = LONG2FIX(mod);
2223
+ }
2224
+ }
2225
+ else if (FLONUM_2_P(recv, obj) &&
2226
+ BASIC_OP_UNREDEFINED_P(BOP_MOD, FLOAT_REDEFINED_OP_FLAG)) {
2227
+ val = DBL2NUM(ruby_float_mod(RFLOAT_VALUE(recv), RFLOAT_VALUE(obj)));
2228
+ }
2229
+ else if (!SPECIAL_CONST_P(recv) && !SPECIAL_CONST_P(obj)) {
2230
+ if (RBASIC_CLASS(recv) == rb_cFloat && RBASIC_CLASS(obj) == rb_cFloat &&
2231
+ BASIC_OP_UNREDEFINED_P(BOP_MOD, FLOAT_REDEFINED_OP_FLAG)) {
2232
+ val = DBL2NUM(ruby_float_mod(RFLOAT_VALUE(recv), RFLOAT_VALUE(obj)));
2233
+ }
2234
+ else {
2235
+ goto INSN_LABEL(normal_dispatch);
2236
+ }
2237
+ }
2238
+ else {
2239
+ INSN_LABEL(normal_dispatch):
2240
+ PUSH(recv);
2241
+ PUSH(obj);
2242
+ CALL_SIMPLE_METHOD(recv);
2243
+ }
2244
+
2245
+ #line 2246 "vm.inc"
2246
+ CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
2247
+ PUSH(val);
2248
+ #undef CURRENT_INSN_opt_mod
2249
+ #undef INSN_IS_SC
2250
+ #undef INSN_LABEL
2251
+ #undef LABEL_IS_SC
2252
+ END_INSN(opt_mod);}}}
2253
+ INSN_ENTRY(opt_eq){
2254
+ {
2255
+ VALUE val;
2256
+ CALL_CACHE cc = (CALL_CACHE)GET_OPERAND(2);
2257
+ CALL_INFO ci = (CALL_INFO)GET_OPERAND(1);
2258
+ VALUE recv = TOPN(1);
2259
+ VALUE obj = TOPN(0);
2260
+ DEBUG_ENTER_INSN("opt_eq");
2261
+ ADD_PC(1+2);
2262
+ PREFETCH(GET_PC());
2263
+ POPN(2);
2264
+ #define CURRENT_INSN_opt_eq 1
2265
+ #define INSN_IS_SC() 0
2266
+ #define INSN_LABEL(lab) LABEL_opt_eq_##lab
2267
+ #define LABEL_IS_SC(lab) LABEL_##lab##_##t
2268
+ COLLECT_USAGE_INSN(BIN(opt_eq));
2269
+ COLLECT_USAGE_OPERAND(BIN(opt_eq), 0, ci);
2270
+ COLLECT_USAGE_OPERAND(BIN(opt_eq), 1, cc);
2271
+ {
2272
+ #line 1577 "insns.def"
2273
+ val = opt_eq_func(recv, obj, ci, cc);
2274
+
2275
+ if (val == Qundef) {
2276
+ /* other */
2277
+ PUSH(recv);
2278
+ PUSH(obj);
2279
+ CALL_SIMPLE_METHOD(recv);
2280
+ }
2281
+
2282
+ #line 2283 "vm.inc"
2283
+ CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
2284
+ PUSH(val);
2285
+ #undef CURRENT_INSN_opt_eq
2286
+ #undef INSN_IS_SC
2287
+ #undef INSN_LABEL
2288
+ #undef LABEL_IS_SC
2289
+ END_INSN(opt_eq);}}}
2290
+ INSN_ENTRY(opt_neq){
2291
+ {
2292
+ VALUE val;
2293
+ CALL_CACHE cc_eq = (CALL_CACHE)GET_OPERAND(4);
2294
+ CALL_INFO ci_eq = (CALL_INFO)GET_OPERAND(3);
2295
+ CALL_CACHE cc = (CALL_CACHE)GET_OPERAND(2);
2296
+ CALL_INFO ci = (CALL_INFO)GET_OPERAND(1);
2297
+ VALUE recv = TOPN(1);
2298
+ VALUE obj = TOPN(0);
2299
+ DEBUG_ENTER_INSN("opt_neq");
2300
+ ADD_PC(1+4);
2301
+ PREFETCH(GET_PC());
2302
+ POPN(2);
2303
+ #define CURRENT_INSN_opt_neq 1
2304
+ #define INSN_IS_SC() 0
2305
+ #define INSN_LABEL(lab) LABEL_opt_neq_##lab
2306
+ #define LABEL_IS_SC(lab) LABEL_##lab##_##t
2307
+ COLLECT_USAGE_INSN(BIN(opt_neq));
2308
+ COLLECT_USAGE_OPERAND(BIN(opt_neq), 0, ci);
2309
+ COLLECT_USAGE_OPERAND(BIN(opt_neq), 1, cc);
2310
+ COLLECT_USAGE_OPERAND(BIN(opt_neq), 2, ci_eq);
2311
+ COLLECT_USAGE_OPERAND(BIN(opt_neq), 3, cc_eq);
2312
+ {
2313
+ #line 1598 "insns.def"
2314
+ extern VALUE rb_obj_not_equal(VALUE obj1, VALUE obj2);
2315
+ vm_search_method(ci, cc, recv);
2316
+
2317
+ val = Qundef;
2318
+
2319
+ if (check_cfunc(cc->me, rb_obj_not_equal)) {
2320
+ val = opt_eq_func(recv, obj, ci_eq, cc_eq);
2321
+
2322
+ if (val != Qundef) {
2323
+ val = RTEST(val) ? Qfalse : Qtrue;
2324
+ }
2325
+ }
2326
+
2327
+ if (val == Qundef) {
2328
+ /* other */
2329
+ PUSH(recv);
2330
+ PUSH(obj);
2331
+ CALL_SIMPLE_METHOD(recv);
2332
+ }
2333
+
2334
+ #line 2335 "vm.inc"
2335
+ CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
2336
+ PUSH(val);
2337
+ #undef CURRENT_INSN_opt_neq
2338
+ #undef INSN_IS_SC
2339
+ #undef INSN_LABEL
2340
+ #undef LABEL_IS_SC
2341
+ END_INSN(opt_neq);}}}
2342
+ INSN_ENTRY(opt_lt){
2343
+ {
2344
+ VALUE val;
2345
+ CALL_CACHE cc = (CALL_CACHE)GET_OPERAND(2);
2346
+ CALL_INFO ci = (CALL_INFO)GET_OPERAND(1);
2347
+ VALUE recv = TOPN(1);
2348
+ VALUE obj = TOPN(0);
2349
+ DEBUG_ENTER_INSN("opt_lt");
2350
+ ADD_PC(1+2);
2351
+ PREFETCH(GET_PC());
2352
+ POPN(2);
2353
+ #define CURRENT_INSN_opt_lt 1
2354
+ #define INSN_IS_SC() 0
2355
+ #define INSN_LABEL(lab) LABEL_opt_lt_##lab
2356
+ #define LABEL_IS_SC(lab) LABEL_##lab##_##t
2357
+ COLLECT_USAGE_INSN(BIN(opt_lt));
2358
+ COLLECT_USAGE_OPERAND(BIN(opt_lt), 0, ci);
2359
+ COLLECT_USAGE_OPERAND(BIN(opt_lt), 1, cc);
2360
+ {
2361
+ #line 1630 "insns.def"
2362
+ if (FIXNUM_2_P(recv, obj) &&
2363
+ BASIC_OP_UNREDEFINED_P(BOP_LT, FIXNUM_REDEFINED_OP_FLAG)) {
2364
+ SIGNED_VALUE a = recv, b = obj;
2365
+
2366
+ if (a < b) {
2367
+ val = Qtrue;
2368
+ }
2369
+ else {
2370
+ val = Qfalse;
2371
+ }
2372
+ }
2373
+ else if (FLONUM_2_P(recv, obj) &&
2374
+ BASIC_OP_UNREDEFINED_P(BOP_LT, FLOAT_REDEFINED_OP_FLAG)) {
2375
+ /* flonum is not NaN */
2376
+ val = RFLOAT_VALUE(recv) < RFLOAT_VALUE(obj) ? Qtrue : Qfalse;
2377
+ }
2378
+ else if (!SPECIAL_CONST_P(recv) && !SPECIAL_CONST_P(obj)) {
2379
+ if (RBASIC_CLASS(recv) == rb_cFloat && RBASIC_CLASS(obj) == rb_cFloat &&
2380
+ BASIC_OP_UNREDEFINED_P(BOP_LT, FLOAT_REDEFINED_OP_FLAG)) {
2381
+ val = double_cmp_lt(RFLOAT_VALUE(recv), RFLOAT_VALUE(obj));
2382
+ }
2383
+ else {
2384
+ goto INSN_LABEL(normal_dispatch);
2385
+ }
2386
+ }
2387
+ else {
2388
+ INSN_LABEL(normal_dispatch):
2389
+ PUSH(recv);
2390
+ PUSH(obj);
2391
+ CALL_SIMPLE_METHOD(recv);
2392
+ }
2393
+
2394
+ #line 2395 "vm.inc"
2395
+ CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
2396
+ PUSH(val);
2397
+ #undef CURRENT_INSN_opt_lt
2398
+ #undef INSN_IS_SC
2399
+ #undef INSN_LABEL
2400
+ #undef LABEL_IS_SC
2401
+ END_INSN(opt_lt);}}}
2402
+ INSN_ENTRY(opt_le){
2403
+ {
2404
+ VALUE val;
2405
+ CALL_CACHE cc = (CALL_CACHE)GET_OPERAND(2);
2406
+ CALL_INFO ci = (CALL_INFO)GET_OPERAND(1);
2407
+ VALUE recv = TOPN(1);
2408
+ VALUE obj = TOPN(0);
2409
+ DEBUG_ENTER_INSN("opt_le");
2410
+ ADD_PC(1+2);
2411
+ PREFETCH(GET_PC());
2412
+ POPN(2);
2413
+ #define CURRENT_INSN_opt_le 1
2414
+ #define INSN_IS_SC() 0
2415
+ #define INSN_LABEL(lab) LABEL_opt_le_##lab
2416
+ #define LABEL_IS_SC(lab) LABEL_##lab##_##t
2417
+ COLLECT_USAGE_INSN(BIN(opt_le));
2418
+ COLLECT_USAGE_OPERAND(BIN(opt_le), 0, ci);
2419
+ COLLECT_USAGE_OPERAND(BIN(opt_le), 1, cc);
2420
+ {
2421
+ #line 1674 "insns.def"
2422
+ if (FIXNUM_2_P(recv, obj) &&
2423
+ BASIC_OP_UNREDEFINED_P(BOP_LE, FIXNUM_REDEFINED_OP_FLAG)) {
2424
+ SIGNED_VALUE a = recv, b = obj;
2425
+
2426
+ if (a <= b) {
2427
+ val = Qtrue;
2428
+ }
2429
+ else {
2430
+ val = Qfalse;
2431
+ }
2432
+ }
2433
+ else if (FLONUM_2_P(recv, obj) &&
2434
+ BASIC_OP_UNREDEFINED_P(BOP_LE, FLOAT_REDEFINED_OP_FLAG)) {
2435
+ /* flonum is not NaN */
2436
+ val = RFLOAT_VALUE(recv) <= RFLOAT_VALUE(obj) ? Qtrue : Qfalse;
2437
+ }
2438
+ else {
2439
+ /* other */
2440
+ PUSH(recv);
2441
+ PUSH(obj);
2442
+ CALL_SIMPLE_METHOD(recv);
2443
+ }
2444
+
2445
+ #line 2446 "vm.inc"
2446
+ CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
2447
+ PUSH(val);
2448
+ #undef CURRENT_INSN_opt_le
2449
+ #undef INSN_IS_SC
2450
+ #undef INSN_LABEL
2451
+ #undef LABEL_IS_SC
2452
+ END_INSN(opt_le);}}}
2453
+ INSN_ENTRY(opt_gt){
2454
+ {
2455
+ VALUE val;
2456
+ CALL_CACHE cc = (CALL_CACHE)GET_OPERAND(2);
2457
+ CALL_INFO ci = (CALL_INFO)GET_OPERAND(1);
2458
+ VALUE recv = TOPN(1);
2459
+ VALUE obj = TOPN(0);
2460
+ DEBUG_ENTER_INSN("opt_gt");
2461
+ ADD_PC(1+2);
2462
+ PREFETCH(GET_PC());
2463
+ POPN(2);
2464
+ #define CURRENT_INSN_opt_gt 1
2465
+ #define INSN_IS_SC() 0
2466
+ #define INSN_LABEL(lab) LABEL_opt_gt_##lab
2467
+ #define LABEL_IS_SC(lab) LABEL_##lab##_##t
2468
+ COLLECT_USAGE_INSN(BIN(opt_gt));
2469
+ COLLECT_USAGE_OPERAND(BIN(opt_gt), 0, ci);
2470
+ COLLECT_USAGE_OPERAND(BIN(opt_gt), 1, cc);
2471
+ {
2472
+ #line 1709 "insns.def"
2473
+ if (FIXNUM_2_P(recv, obj) &&
2474
+ BASIC_OP_UNREDEFINED_P(BOP_GT, FIXNUM_REDEFINED_OP_FLAG)) {
2475
+ SIGNED_VALUE a = recv, b = obj;
2476
+
2477
+ if (a > b) {
2478
+ val = Qtrue;
2479
+ }
2480
+ else {
2481
+ val = Qfalse;
2482
+ }
2483
+ }
2484
+ else if (FLONUM_2_P(recv, obj) &&
2485
+ BASIC_OP_UNREDEFINED_P(BOP_GT, FLOAT_REDEFINED_OP_FLAG)) {
2486
+ /* flonum is not NaN */
2487
+ val = RFLOAT_VALUE(recv) > RFLOAT_VALUE(obj) ? Qtrue : Qfalse;
2488
+ }
2489
+ else if (!SPECIAL_CONST_P(recv) && !SPECIAL_CONST_P(obj)) {
2490
+ if (RBASIC_CLASS(recv) == rb_cFloat && RBASIC_CLASS(obj) == rb_cFloat &&
2491
+ BASIC_OP_UNREDEFINED_P(BOP_GT, FLOAT_REDEFINED_OP_FLAG)) {
2492
+ val = double_cmp_gt(RFLOAT_VALUE(recv), RFLOAT_VALUE(obj));
2493
+ }
2494
+ else {
2495
+ goto INSN_LABEL(normal_dispatch);
2496
+ }
2497
+ }
2498
+ else {
2499
+ INSN_LABEL(normal_dispatch):
2500
+ PUSH(recv);
2501
+ PUSH(obj);
2502
+ CALL_SIMPLE_METHOD(recv);
2503
+ }
2504
+
2505
+ #line 2506 "vm.inc"
2506
+ CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
2507
+ PUSH(val);
2508
+ #undef CURRENT_INSN_opt_gt
2509
+ #undef INSN_IS_SC
2510
+ #undef INSN_LABEL
2511
+ #undef LABEL_IS_SC
2512
+ END_INSN(opt_gt);}}}
2513
+ INSN_ENTRY(opt_ge){
2514
+ {
2515
+ VALUE val;
2516
+ CALL_CACHE cc = (CALL_CACHE)GET_OPERAND(2);
2517
+ CALL_INFO ci = (CALL_INFO)GET_OPERAND(1);
2518
+ VALUE recv = TOPN(1);
2519
+ VALUE obj = TOPN(0);
2520
+ DEBUG_ENTER_INSN("opt_ge");
2521
+ ADD_PC(1+2);
2522
+ PREFETCH(GET_PC());
2523
+ POPN(2);
2524
+ #define CURRENT_INSN_opt_ge 1
2525
+ #define INSN_IS_SC() 0
2526
+ #define INSN_LABEL(lab) LABEL_opt_ge_##lab
2527
+ #define LABEL_IS_SC(lab) LABEL_##lab##_##t
2528
+ COLLECT_USAGE_INSN(BIN(opt_ge));
2529
+ COLLECT_USAGE_OPERAND(BIN(opt_ge), 0, ci);
2530
+ COLLECT_USAGE_OPERAND(BIN(opt_ge), 1, cc);
2531
+ {
2532
+ #line 1753 "insns.def"
2533
+ if (FIXNUM_2_P(recv, obj) &&
2534
+ BASIC_OP_UNREDEFINED_P(BOP_GE, FIXNUM_REDEFINED_OP_FLAG)) {
2535
+ SIGNED_VALUE a = recv, b = obj;
2536
+
2537
+ if (a >= b) {
2538
+ val = Qtrue;
2539
+ }
2540
+ else {
2541
+ val = Qfalse;
2542
+ }
2543
+ }
2544
+ else if (FLONUM_2_P(recv, obj) &&
2545
+ BASIC_OP_UNREDEFINED_P(BOP_GE, FLOAT_REDEFINED_OP_FLAG)) {
2546
+ /* flonum is not NaN */
2547
+ val = RFLOAT_VALUE(recv) >= RFLOAT_VALUE(obj) ? Qtrue : Qfalse;
2548
+ }
2549
+ else {
2550
+ PUSH(recv);
2551
+ PUSH(obj);
2552
+ CALL_SIMPLE_METHOD(recv);
2553
+ }
2554
+
2555
+ #line 2556 "vm.inc"
2556
+ CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
2557
+ PUSH(val);
2558
+ #undef CURRENT_INSN_opt_ge
2559
+ #undef INSN_IS_SC
2560
+ #undef INSN_LABEL
2561
+ #undef LABEL_IS_SC
2562
+ END_INSN(opt_ge);}}}
2563
+ INSN_ENTRY(opt_ltlt){
2564
+ {
2565
+ VALUE val;
2566
+ CALL_CACHE cc = (CALL_CACHE)GET_OPERAND(2);
2567
+ CALL_INFO ci = (CALL_INFO)GET_OPERAND(1);
2568
+ VALUE recv = TOPN(1);
2569
+ VALUE obj = TOPN(0);
2570
+ DEBUG_ENTER_INSN("opt_ltlt");
2571
+ ADD_PC(1+2);
2572
+ PREFETCH(GET_PC());
2573
+ POPN(2);
2574
+ #define CURRENT_INSN_opt_ltlt 1
2575
+ #define INSN_IS_SC() 0
2576
+ #define INSN_LABEL(lab) LABEL_opt_ltlt_##lab
2577
+ #define LABEL_IS_SC(lab) LABEL_##lab##_##t
2578
+ COLLECT_USAGE_INSN(BIN(opt_ltlt));
2579
+ COLLECT_USAGE_OPERAND(BIN(opt_ltlt), 0, ci);
2580
+ COLLECT_USAGE_OPERAND(BIN(opt_ltlt), 1, cc);
2581
+ {
2582
+ #line 1787 "insns.def"
2583
+ if (!SPECIAL_CONST_P(recv)) {
2584
+ if (RBASIC_CLASS(recv) == rb_cString &&
2585
+ BASIC_OP_UNREDEFINED_P(BOP_LTLT, STRING_REDEFINED_OP_FLAG)) {
2586
+ val = rb_str_concat(recv, obj);
2587
+ }
2588
+ else if (RBASIC_CLASS(recv) == rb_cArray &&
2589
+ BASIC_OP_UNREDEFINED_P(BOP_LTLT, ARRAY_REDEFINED_OP_FLAG)) {
2590
+ val = rb_ary_push(recv, obj);
2591
+ }
2592
+ else {
2593
+ goto INSN_LABEL(normal_dispatch);
2594
+ }
2595
+ }
2596
+ else {
2597
+ INSN_LABEL(normal_dispatch):
2598
+ PUSH(recv);
2599
+ PUSH(obj);
2600
+ CALL_SIMPLE_METHOD(recv);
2601
+ }
2602
+
2603
+ #line 2604 "vm.inc"
2604
+ CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
2605
+ PUSH(val);
2606
+ #undef CURRENT_INSN_opt_ltlt
2607
+ #undef INSN_IS_SC
2608
+ #undef INSN_LABEL
2609
+ #undef LABEL_IS_SC
2610
+ END_INSN(opt_ltlt);}}}
2611
+ INSN_ENTRY(opt_aref){
2612
+ {
2613
+ VALUE val;
2614
+ CALL_CACHE cc = (CALL_CACHE)GET_OPERAND(2);
2615
+ CALL_INFO ci = (CALL_INFO)GET_OPERAND(1);
2616
+ VALUE recv = TOPN(1);
2617
+ VALUE obj = TOPN(0);
2618
+ DEBUG_ENTER_INSN("opt_aref");
2619
+ ADD_PC(1+2);
2620
+ PREFETCH(GET_PC());
2621
+ POPN(2);
2622
+ #define CURRENT_INSN_opt_aref 1
2623
+ #define INSN_IS_SC() 0
2624
+ #define INSN_LABEL(lab) LABEL_opt_aref_##lab
2625
+ #define LABEL_IS_SC(lab) LABEL_##lab##_##t
2626
+ COLLECT_USAGE_INSN(BIN(opt_aref));
2627
+ COLLECT_USAGE_OPERAND(BIN(opt_aref), 0, ci);
2628
+ COLLECT_USAGE_OPERAND(BIN(opt_aref), 1, cc);
2629
+ {
2630
+ #line 1819 "insns.def"
2631
+ if (!SPECIAL_CONST_P(recv)) {
2632
+ if (RBASIC_CLASS(recv) == rb_cArray && BASIC_OP_UNREDEFINED_P(BOP_AREF, ARRAY_REDEFINED_OP_FLAG) && FIXNUM_P(obj)) {
2633
+ val = rb_ary_entry(recv, FIX2LONG(obj));
2634
+ }
2635
+ else if (RBASIC_CLASS(recv) == rb_cHash && BASIC_OP_UNREDEFINED_P(BOP_AREF, HASH_REDEFINED_OP_FLAG)) {
2636
+ val = rb_hash_aref(recv, obj);
2637
+ }
2638
+ else {
2639
+ goto INSN_LABEL(normal_dispatch);
2640
+ }
2641
+ }
2642
+ else {
2643
+ INSN_LABEL(normal_dispatch):
2644
+ PUSH(recv);
2645
+ PUSH(obj);
2646
+ CALL_SIMPLE_METHOD(recv);
2647
+ }
2648
+
2649
+ #line 2650 "vm.inc"
2650
+ CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
2651
+ PUSH(val);
2652
+ #undef CURRENT_INSN_opt_aref
2653
+ #undef INSN_IS_SC
2654
+ #undef INSN_LABEL
2655
+ #undef LABEL_IS_SC
2656
+ END_INSN(opt_aref);}}}
2657
+ INSN_ENTRY(opt_aset){
2658
+ {
2659
+ VALUE val;
2660
+ CALL_CACHE cc = (CALL_CACHE)GET_OPERAND(2);
2661
+ CALL_INFO ci = (CALL_INFO)GET_OPERAND(1);
2662
+ VALUE recv = TOPN(2);
2663
+ VALUE obj = TOPN(1);
2664
+ VALUE set = TOPN(0);
2665
+ DEBUG_ENTER_INSN("opt_aset");
2666
+ ADD_PC(1+2);
2667
+ PREFETCH(GET_PC());
2668
+ POPN(3);
2669
+ #define CURRENT_INSN_opt_aset 1
2670
+ #define INSN_IS_SC() 0
2671
+ #define INSN_LABEL(lab) LABEL_opt_aset_##lab
2672
+ #define LABEL_IS_SC(lab) LABEL_##lab##_##t
2673
+ COLLECT_USAGE_INSN(BIN(opt_aset));
2674
+ COLLECT_USAGE_OPERAND(BIN(opt_aset), 0, ci);
2675
+ COLLECT_USAGE_OPERAND(BIN(opt_aset), 1, cc);
2676
+ {
2677
+ #line 1849 "insns.def"
2678
+ if (!SPECIAL_CONST_P(recv)) {
2679
+ if (RBASIC_CLASS(recv) == rb_cArray && BASIC_OP_UNREDEFINED_P(BOP_ASET, ARRAY_REDEFINED_OP_FLAG) && FIXNUM_P(obj)) {
2680
+ rb_ary_store(recv, FIX2LONG(obj), set);
2681
+ val = set;
2682
+ }
2683
+ else if (RBASIC_CLASS(recv) == rb_cHash && BASIC_OP_UNREDEFINED_P(BOP_ASET, HASH_REDEFINED_OP_FLAG)) {
2684
+ rb_hash_aset(recv, obj, set);
2685
+ val = set;
2686
+ }
2687
+ else {
2688
+ goto INSN_LABEL(normal_dispatch);
2689
+ }
2690
+ }
2691
+ else {
2692
+ INSN_LABEL(normal_dispatch):
2693
+ PUSH(recv);
2694
+ PUSH(obj);
2695
+ PUSH(set);
2696
+ CALL_SIMPLE_METHOD(recv);
2697
+ }
2698
+
2699
+ #line 2700 "vm.inc"
2700
+ CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
2701
+ PUSH(val);
2702
+ #undef CURRENT_INSN_opt_aset
2703
+ #undef INSN_IS_SC
2704
+ #undef INSN_LABEL
2705
+ #undef LABEL_IS_SC
2706
+ END_INSN(opt_aset);}}}
2707
+ INSN_ENTRY(opt_aset_with){
2708
+ {
2709
+ VALUE key = (VALUE)GET_OPERAND(3);
2710
+ CALL_CACHE cc = (CALL_CACHE)GET_OPERAND(2);
2711
+ CALL_INFO ci = (CALL_INFO)GET_OPERAND(1);
2712
+ VALUE recv = TOPN(1);
2713
+ VALUE val = TOPN(0);
2714
+ DEBUG_ENTER_INSN("opt_aset_with");
2715
+ ADD_PC(1+3);
2716
+ PREFETCH(GET_PC());
2717
+ POPN(2);
2718
+ #define CURRENT_INSN_opt_aset_with 1
2719
+ #define INSN_IS_SC() 0
2720
+ #define INSN_LABEL(lab) LABEL_opt_aset_with_##lab
2721
+ #define LABEL_IS_SC(lab) LABEL_##lab##_##t
2722
+ COLLECT_USAGE_INSN(BIN(opt_aset_with));
2723
+ COLLECT_USAGE_OPERAND(BIN(opt_aset_with), 0, ci);
2724
+ COLLECT_USAGE_OPERAND(BIN(opt_aset_with), 1, cc);
2725
+ COLLECT_USAGE_OPERAND(BIN(opt_aset_with), 2, key);
2726
+ {
2727
+ #line 1882 "insns.def"
2728
+ if (!SPECIAL_CONST_P(recv) && RBASIC_CLASS(recv) == rb_cHash && BASIC_OP_UNREDEFINED_P(BOP_ASET, HASH_REDEFINED_OP_FLAG)) {
2729
+ rb_hash_aset(recv, key, val);
2730
+ }
2731
+ else {
2732
+ PUSH(recv);
2733
+ PUSH(rb_str_resurrect(key));
2734
+ PUSH(val);
2735
+ CALL_SIMPLE_METHOD(recv);
2736
+ }
2737
+
2738
+ #line 2739 "vm.inc"
2739
+ CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
2740
+ PUSH(val);
2741
+ #undef CURRENT_INSN_opt_aset_with
2742
+ #undef INSN_IS_SC
2743
+ #undef INSN_LABEL
2744
+ #undef LABEL_IS_SC
2745
+ END_INSN(opt_aset_with);}}}
2746
+ INSN_ENTRY(opt_aref_with){
2747
+ {
2748
+ VALUE val;
2749
+ VALUE key = (VALUE)GET_OPERAND(3);
2750
+ CALL_CACHE cc = (CALL_CACHE)GET_OPERAND(2);
2751
+ CALL_INFO ci = (CALL_INFO)GET_OPERAND(1);
2752
+ VALUE recv = TOPN(0);
2753
+ DEBUG_ENTER_INSN("opt_aref_with");
2754
+ ADD_PC(1+3);
2755
+ PREFETCH(GET_PC());
2756
+ POPN(1);
2757
+ #define CURRENT_INSN_opt_aref_with 1
2758
+ #define INSN_IS_SC() 0
2759
+ #define INSN_LABEL(lab) LABEL_opt_aref_with_##lab
2760
+ #define LABEL_IS_SC(lab) LABEL_##lab##_##t
2761
+ COLLECT_USAGE_INSN(BIN(opt_aref_with));
2762
+ COLLECT_USAGE_OPERAND(BIN(opt_aref_with), 0, ci);
2763
+ COLLECT_USAGE_OPERAND(BIN(opt_aref_with), 1, cc);
2764
+ COLLECT_USAGE_OPERAND(BIN(opt_aref_with), 2, key);
2765
+ {
2766
+ #line 1904 "insns.def"
2767
+ if (!SPECIAL_CONST_P(recv) && RBASIC_CLASS(recv) == rb_cHash && BASIC_OP_UNREDEFINED_P(BOP_AREF, HASH_REDEFINED_OP_FLAG)) {
2768
+ val = rb_hash_aref(recv, key);
2769
+ }
2770
+ else {
2771
+ PUSH(recv);
2772
+ PUSH(rb_str_resurrect(key));
2773
+ CALL_SIMPLE_METHOD(recv);
2774
+ }
2775
+
2776
+ #line 2777 "vm.inc"
2777
+ CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
2778
+ PUSH(val);
2779
+ #undef CURRENT_INSN_opt_aref_with
2780
+ #undef INSN_IS_SC
2781
+ #undef INSN_LABEL
2782
+ #undef LABEL_IS_SC
2783
+ END_INSN(opt_aref_with);}}}
2784
+ INSN_ENTRY(opt_length){
2785
+ {
2786
+ VALUE val;
2787
+ CALL_CACHE cc = (CALL_CACHE)GET_OPERAND(2);
2788
+ CALL_INFO ci = (CALL_INFO)GET_OPERAND(1);
2789
+ VALUE recv = TOPN(0);
2790
+ DEBUG_ENTER_INSN("opt_length");
2791
+ ADD_PC(1+2);
2792
+ PREFETCH(GET_PC());
2793
+ POPN(1);
2794
+ #define CURRENT_INSN_opt_length 1
2795
+ #define INSN_IS_SC() 0
2796
+ #define INSN_LABEL(lab) LABEL_opt_length_##lab
2797
+ #define LABEL_IS_SC(lab) LABEL_##lab##_##t
2798
+ COLLECT_USAGE_INSN(BIN(opt_length));
2799
+ COLLECT_USAGE_OPERAND(BIN(opt_length), 0, ci);
2800
+ COLLECT_USAGE_OPERAND(BIN(opt_length), 1, cc);
2801
+ {
2802
+ #line 1925 "insns.def"
2803
+ if (!SPECIAL_CONST_P(recv)) {
2804
+ if (RBASIC_CLASS(recv) == rb_cString &&
2805
+ BASIC_OP_UNREDEFINED_P(BOP_LENGTH, STRING_REDEFINED_OP_FLAG)) {
2806
+ val = rb_str_length(recv);
2807
+ }
2808
+ else if (RBASIC_CLASS(recv) == rb_cArray &&
2809
+ BASIC_OP_UNREDEFINED_P(BOP_LENGTH, ARRAY_REDEFINED_OP_FLAG)) {
2810
+ val = LONG2NUM(RARRAY_LEN(recv));
2811
+ }
2812
+ else if (RBASIC_CLASS(recv) == rb_cHash &&
2813
+ BASIC_OP_UNREDEFINED_P(BOP_LENGTH, HASH_REDEFINED_OP_FLAG)) {
2814
+ val = INT2FIX(RHASH_SIZE(recv));
2815
+ }
2816
+ else {
2817
+ goto INSN_LABEL(normal_dispatch);
2818
+ }
2819
+ }
2820
+ else {
2821
+ INSN_LABEL(normal_dispatch):
2822
+ PUSH(recv);
2823
+ CALL_SIMPLE_METHOD(recv);
2824
+ }
2825
+
2826
+ #line 2827 "vm.inc"
2827
+ CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
2828
+ PUSH(val);
2829
+ #undef CURRENT_INSN_opt_length
2830
+ #undef INSN_IS_SC
2831
+ #undef INSN_LABEL
2832
+ #undef LABEL_IS_SC
2833
+ END_INSN(opt_length);}}}
2834
+ INSN_ENTRY(opt_size){
2835
+ {
2836
+ VALUE val;
2837
+ CALL_CACHE cc = (CALL_CACHE)GET_OPERAND(2);
2838
+ CALL_INFO ci = (CALL_INFO)GET_OPERAND(1);
2839
+ VALUE recv = TOPN(0);
2840
+ DEBUG_ENTER_INSN("opt_size");
2841
+ ADD_PC(1+2);
2842
+ PREFETCH(GET_PC());
2843
+ POPN(1);
2844
+ #define CURRENT_INSN_opt_size 1
2845
+ #define INSN_IS_SC() 0
2846
+ #define INSN_LABEL(lab) LABEL_opt_size_##lab
2847
+ #define LABEL_IS_SC(lab) LABEL_##lab##_##t
2848
+ COLLECT_USAGE_INSN(BIN(opt_size));
2849
+ COLLECT_USAGE_OPERAND(BIN(opt_size), 0, ci);
2850
+ COLLECT_USAGE_OPERAND(BIN(opt_size), 1, cc);
2851
+ {
2852
+ #line 1960 "insns.def"
2853
+ if (!SPECIAL_CONST_P(recv)) {
2854
+ if (RBASIC_CLASS(recv) == rb_cString &&
2855
+ BASIC_OP_UNREDEFINED_P(BOP_SIZE, STRING_REDEFINED_OP_FLAG)) {
2856
+ val = rb_str_length(recv);
2857
+ }
2858
+ else if (RBASIC_CLASS(recv) == rb_cArray &&
2859
+ BASIC_OP_UNREDEFINED_P(BOP_SIZE, ARRAY_REDEFINED_OP_FLAG)) {
2860
+ val = LONG2NUM(RARRAY_LEN(recv));
2861
+ }
2862
+ else if (RBASIC_CLASS(recv) == rb_cHash &&
2863
+ BASIC_OP_UNREDEFINED_P(BOP_SIZE, HASH_REDEFINED_OP_FLAG)) {
2864
+ val = INT2FIX(RHASH_SIZE(recv));
2865
+ }
2866
+ else {
2867
+ goto INSN_LABEL(normal_dispatch);
2868
+ }
2869
+ }
2870
+ else {
2871
+ INSN_LABEL(normal_dispatch):
2872
+ PUSH(recv);
2873
+ CALL_SIMPLE_METHOD(recv);
2874
+ }
2875
+
2876
+ #line 2877 "vm.inc"
2877
+ CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
2878
+ PUSH(val);
2879
+ #undef CURRENT_INSN_opt_size
2880
+ #undef INSN_IS_SC
2881
+ #undef INSN_LABEL
2882
+ #undef LABEL_IS_SC
2883
+ END_INSN(opt_size);}}}
2884
+ INSN_ENTRY(opt_empty_p){
2885
+ {
2886
+ VALUE val;
2887
+ CALL_CACHE cc = (CALL_CACHE)GET_OPERAND(2);
2888
+ CALL_INFO ci = (CALL_INFO)GET_OPERAND(1);
2889
+ VALUE recv = TOPN(0);
2890
+ DEBUG_ENTER_INSN("opt_empty_p");
2891
+ ADD_PC(1+2);
2892
+ PREFETCH(GET_PC());
2893
+ POPN(1);
2894
+ #define CURRENT_INSN_opt_empty_p 1
2895
+ #define INSN_IS_SC() 0
2896
+ #define INSN_LABEL(lab) LABEL_opt_empty_p_##lab
2897
+ #define LABEL_IS_SC(lab) LABEL_##lab##_##t
2898
+ COLLECT_USAGE_INSN(BIN(opt_empty_p));
2899
+ COLLECT_USAGE_OPERAND(BIN(opt_empty_p), 0, ci);
2900
+ COLLECT_USAGE_OPERAND(BIN(opt_empty_p), 1, cc);
2901
+ {
2902
+ #line 1995 "insns.def"
2903
+ if (!SPECIAL_CONST_P(recv)) {
2904
+ if (RBASIC_CLASS(recv) == rb_cString &&
2905
+ BASIC_OP_UNREDEFINED_P(BOP_EMPTY_P, STRING_REDEFINED_OP_FLAG)) {
2906
+ if (RSTRING_LEN(recv) == 0) val = Qtrue;
2907
+ else val = Qfalse;
2908
+ }
2909
+ else if (RBASIC_CLASS(recv) == rb_cArray &&
2910
+ BASIC_OP_UNREDEFINED_P(BOP_EMPTY_P, ARRAY_REDEFINED_OP_FLAG)) {
2911
+ if (RARRAY_LEN(recv) == 0) val = Qtrue;
2912
+ else val = Qfalse;
2913
+ }
2914
+ else if (RBASIC_CLASS(recv) == rb_cHash &&
2915
+ BASIC_OP_UNREDEFINED_P(BOP_EMPTY_P, HASH_REDEFINED_OP_FLAG)) {
2916
+ if (RHASH_EMPTY_P(recv)) val = Qtrue;
2917
+ else val = Qfalse;
2918
+ }
2919
+ else {
2920
+ goto INSN_LABEL(normal_dispatch);
2921
+ }
2922
+ }
2923
+ else {
2924
+ INSN_LABEL(normal_dispatch):
2925
+ PUSH(recv);
2926
+ CALL_SIMPLE_METHOD(recv);
2927
+ }
2928
+
2929
+ #line 2930 "vm.inc"
2930
+ CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
2931
+ PUSH(val);
2932
+ #undef CURRENT_INSN_opt_empty_p
2933
+ #undef INSN_IS_SC
2934
+ #undef INSN_LABEL
2935
+ #undef LABEL_IS_SC
2936
+ END_INSN(opt_empty_p);}}}
2937
+ INSN_ENTRY(opt_succ){
2938
+ {
2939
+ VALUE val;
2940
+ CALL_CACHE cc = (CALL_CACHE)GET_OPERAND(2);
2941
+ CALL_INFO ci = (CALL_INFO)GET_OPERAND(1);
2942
+ VALUE recv = TOPN(0);
2943
+ DEBUG_ENTER_INSN("opt_succ");
2944
+ ADD_PC(1+2);
2945
+ PREFETCH(GET_PC());
2946
+ POPN(1);
2947
+ #define CURRENT_INSN_opt_succ 1
2948
+ #define INSN_IS_SC() 0
2949
+ #define INSN_LABEL(lab) LABEL_opt_succ_##lab
2950
+ #define LABEL_IS_SC(lab) LABEL_##lab##_##t
2951
+ COLLECT_USAGE_INSN(BIN(opt_succ));
2952
+ COLLECT_USAGE_OPERAND(BIN(opt_succ), 0, ci);
2953
+ COLLECT_USAGE_OPERAND(BIN(opt_succ), 1, cc);
2954
+ {
2955
+ #line 2033 "insns.def"
2956
+ if (SPECIAL_CONST_P(recv)) {
2957
+ if (FIXNUM_P(recv) &&
2958
+ BASIC_OP_UNREDEFINED_P(BOP_SUCC, FIXNUM_REDEFINED_OP_FLAG)) {
2959
+ const VALUE obj = INT2FIX(1);
2960
+ /* fixnum + INT2FIX(1) */
2961
+ val = (recv + (obj & (~1)));
2962
+ if ((~(recv ^ obj) & (recv ^ val)) & ((unsigned long)LONG_MAX + 1)) {
2963
+ val = rb_big_plus(rb_int2big(FIX2LONG(recv)),
2964
+ rb_int2big(FIX2LONG(obj)));
2965
+ }
2966
+ }
2967
+ else {
2968
+ goto INSN_LABEL(normal_dispatch);
2969
+ }
2970
+ }
2971
+ else {
2972
+ if (RBASIC_CLASS(recv) == rb_cString &&
2973
+ BASIC_OP_UNREDEFINED_P(BOP_SUCC, STRING_REDEFINED_OP_FLAG)) {
2974
+ val = rb_str_succ(recv);
2975
+ }
2976
+ else
2977
+ {
2978
+ goto INSN_LABEL(normal_dispatch);
2979
+ }
2980
+ }
2981
+ if (0) {
2982
+ INSN_LABEL(normal_dispatch):
2983
+ PUSH(recv);
2984
+ CALL_SIMPLE_METHOD(recv);
2985
+ }
2986
+
2987
+ #line 2988 "vm.inc"
2988
+ CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
2989
+ PUSH(val);
2990
+ #undef CURRENT_INSN_opt_succ
2991
+ #undef INSN_IS_SC
2992
+ #undef INSN_LABEL
2993
+ #undef LABEL_IS_SC
2994
+ END_INSN(opt_succ);}}}
2995
+ INSN_ENTRY(opt_not){
2996
+ {
2997
+ VALUE val;
2998
+ CALL_CACHE cc = (CALL_CACHE)GET_OPERAND(2);
2999
+ CALL_INFO ci = (CALL_INFO)GET_OPERAND(1);
3000
+ VALUE recv = TOPN(0);
3001
+ DEBUG_ENTER_INSN("opt_not");
3002
+ ADD_PC(1+2);
3003
+ PREFETCH(GET_PC());
3004
+ POPN(1);
3005
+ #define CURRENT_INSN_opt_not 1
3006
+ #define INSN_IS_SC() 0
3007
+ #define INSN_LABEL(lab) LABEL_opt_not_##lab
3008
+ #define LABEL_IS_SC(lab) LABEL_##lab##_##t
3009
+ COLLECT_USAGE_INSN(BIN(opt_not));
3010
+ COLLECT_USAGE_OPERAND(BIN(opt_not), 0, ci);
3011
+ COLLECT_USAGE_OPERAND(BIN(opt_not), 1, cc);
3012
+ {
3013
+ #line 2076 "insns.def"
3014
+ extern VALUE rb_obj_not(VALUE obj);
3015
+
3016
+ vm_search_method(ci, cc, recv);
3017
+
3018
+ if (check_cfunc(cc->me, rb_obj_not)) {
3019
+ val = RTEST(recv) ? Qfalse : Qtrue;
3020
+ }
3021
+ else {
3022
+ PUSH(recv);
3023
+ CALL_SIMPLE_METHOD(recv);
3024
+ }
3025
+
3026
+ #line 3027 "vm.inc"
3027
+ CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
3028
+ PUSH(val);
3029
+ #undef CURRENT_INSN_opt_not
3030
+ #undef INSN_IS_SC
3031
+ #undef INSN_LABEL
3032
+ #undef LABEL_IS_SC
3033
+ END_INSN(opt_not);}}}
3034
+ INSN_ENTRY(opt_regexpmatch1){
3035
+ {
3036
+ VALUE val;
3037
+ VALUE r = (VALUE)GET_OPERAND(1);
3038
+ VALUE obj = TOPN(0);
3039
+ DEBUG_ENTER_INSN("opt_regexpmatch1");
3040
+ ADD_PC(1+1);
3041
+ PREFETCH(GET_PC());
3042
+ POPN(1);
3043
+ #define CURRENT_INSN_opt_regexpmatch1 1
3044
+ #define INSN_IS_SC() 0
3045
+ #define INSN_LABEL(lab) LABEL_opt_regexpmatch1_##lab
3046
+ #define LABEL_IS_SC(lab) LABEL_##lab##_##t
3047
+ COLLECT_USAGE_INSN(BIN(opt_regexpmatch1));
3048
+ COLLECT_USAGE_OPERAND(BIN(opt_regexpmatch1), 0, r);
3049
+ {
3050
+ #line 2101 "insns.def"
3051
+ if (BASIC_OP_UNREDEFINED_P(BOP_MATCH, REGEXP_REDEFINED_OP_FLAG)) {
3052
+ val = rb_reg_match(r, obj);
3053
+ }
3054
+ else {
3055
+ val = rb_funcall(r, idEqTilde, 1, obj);
3056
+ }
3057
+
3058
+ #line 3059 "vm.inc"
3059
+ CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
3060
+ PUSH(val);
3061
+ #undef CURRENT_INSN_opt_regexpmatch1
3062
+ #undef INSN_IS_SC
3063
+ #undef INSN_LABEL
3064
+ #undef LABEL_IS_SC
3065
+ END_INSN(opt_regexpmatch1);}}}
3066
+ INSN_ENTRY(opt_regexpmatch2){
3067
+ {
3068
+ VALUE val;
3069
+ CALL_CACHE cc = (CALL_CACHE)GET_OPERAND(2);
3070
+ CALL_INFO ci = (CALL_INFO)GET_OPERAND(1);
3071
+ VALUE obj2 = TOPN(1);
3072
+ VALUE obj1 = TOPN(0);
3073
+ DEBUG_ENTER_INSN("opt_regexpmatch2");
3074
+ ADD_PC(1+2);
3075
+ PREFETCH(GET_PC());
3076
+ POPN(2);
3077
+ #define CURRENT_INSN_opt_regexpmatch2 1
3078
+ #define INSN_IS_SC() 0
3079
+ #define INSN_LABEL(lab) LABEL_opt_regexpmatch2_##lab
3080
+ #define LABEL_IS_SC(lab) LABEL_##lab##_##t
3081
+ COLLECT_USAGE_INSN(BIN(opt_regexpmatch2));
3082
+ COLLECT_USAGE_OPERAND(BIN(opt_regexpmatch2), 0, ci);
3083
+ COLLECT_USAGE_OPERAND(BIN(opt_regexpmatch2), 1, cc);
3084
+ {
3085
+ #line 2120 "insns.def"
3086
+ if (CLASS_OF(obj2) == rb_cString &&
3087
+ BASIC_OP_UNREDEFINED_P(BOP_MATCH, STRING_REDEFINED_OP_FLAG)) {
3088
+ val = rb_reg_match(obj1, obj2);
3089
+ }
3090
+ else {
3091
+ PUSH(obj2);
3092
+ PUSH(obj1);
3093
+ CALL_SIMPLE_METHOD(obj2);
3094
+ }
3095
+
3096
+ #line 3097 "vm.inc"
3097
+ CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
3098
+ PUSH(val);
3099
+ #undef CURRENT_INSN_opt_regexpmatch2
3100
+ #undef INSN_IS_SC
3101
+ #undef INSN_LABEL
3102
+ #undef LABEL_IS_SC
3103
+ END_INSN(opt_regexpmatch2);}}}
3104
+ INSN_ENTRY(opt_call_c_function){
3105
+ {
3106
+ rb_insn_func_t funcptr = (rb_insn_func_t)GET_OPERAND(1);
3107
+
3108
+ DEBUG_ENTER_INSN("opt_call_c_function");
3109
+ ADD_PC(1+1);
3110
+ PREFETCH(GET_PC());
3111
+ #define CURRENT_INSN_opt_call_c_function 1
3112
+ #define INSN_IS_SC() 0
3113
+ #define INSN_LABEL(lab) LABEL_opt_call_c_function_##lab
3114
+ #define LABEL_IS_SC(lab) LABEL_##lab##_##t
3115
+ COLLECT_USAGE_INSN(BIN(opt_call_c_function));
3116
+ COLLECT_USAGE_OPERAND(BIN(opt_call_c_function), 0, funcptr);
3117
+ {
3118
+ #line 2142 "insns.def"
3119
+ reg_cfp = (funcptr)(th, reg_cfp);
3120
+
3121
+ if (reg_cfp == 0) {
3122
+ VALUE err = th->errinfo;
3123
+ th->errinfo = Qnil;
3124
+ THROW_EXCEPTION(err);
3125
+ }
3126
+
3127
+ RESTORE_REGS();
3128
+ NEXT_INSN();
3129
+
3130
+ #line 3131 "vm.inc"
3131
+ #undef CURRENT_INSN_opt_call_c_function
3132
+ #undef INSN_IS_SC
3133
+ #undef INSN_LABEL
3134
+ #undef LABEL_IS_SC
3135
+ END_INSN(opt_call_c_function);}}}
3136
+ INSN_ENTRY(bitblt){
3137
+ {
3138
+ VALUE ret;
3139
+
3140
+
3141
+ DEBUG_ENTER_INSN("bitblt");
3142
+ ADD_PC(1+0);
3143
+ PREFETCH(GET_PC());
3144
+ #define CURRENT_INSN_bitblt 1
3145
+ #define INSN_IS_SC() 0
3146
+ #define INSN_LABEL(lab) LABEL_bitblt_##lab
3147
+ #define LABEL_IS_SC(lab) LABEL_##lab##_##t
3148
+ COLLECT_USAGE_INSN(BIN(bitblt));
3149
+ {
3150
+ #line 2165 "insns.def"
3151
+ ret = rb_str_new2("a bit of bacon, lettuce and tomato");
3152
+
3153
+ #line 3154 "vm.inc"
3154
+ CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
3155
+ PUSH(ret);
3156
+ #undef CURRENT_INSN_bitblt
3157
+ #undef INSN_IS_SC
3158
+ #undef INSN_LABEL
3159
+ #undef LABEL_IS_SC
3160
+ END_INSN(bitblt);}}}
3161
+ INSN_ENTRY(answer){
3162
+ {
3163
+ VALUE ret;
3164
+
3165
+
3166
+ DEBUG_ENTER_INSN("answer");
3167
+ ADD_PC(1+0);
3168
+ PREFETCH(GET_PC());
3169
+ #define CURRENT_INSN_answer 1
3170
+ #define INSN_IS_SC() 0
3171
+ #define INSN_LABEL(lab) LABEL_answer_##lab
3172
+ #define LABEL_IS_SC(lab) LABEL_##lab##_##t
3173
+ COLLECT_USAGE_INSN(BIN(answer));
3174
+ {
3175
+ #line 2179 "insns.def"
3176
+ ret = INT2FIX(42);
3177
+
3178
+ #line 3179 "vm.inc"
3179
+ CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
3180
+ PUSH(ret);
3181
+ #undef CURRENT_INSN_answer
3182
+ #undef INSN_IS_SC
3183
+ #undef INSN_LABEL
3184
+ #undef LABEL_IS_SC
3185
+ END_INSN(answer);}}}
3186
+ INSN_ENTRY(getlocal_OP__WC__0){
3187
+ {
3188
+ VALUE val;
3189
+ #define level 0
3190
+ lindex_t idx = (lindex_t)GET_OPERAND(1);
3191
+
3192
+ DEBUG_ENTER_INSN("getlocal_OP__WC__0");
3193
+ ADD_PC(1+1);
3194
+ PREFETCH(GET_PC());
3195
+ #define CURRENT_INSN_getlocal_OP__WC__0 1
3196
+ #define INSN_IS_SC() 0
3197
+ #define INSN_LABEL(lab) LABEL_getlocal_OP__WC__0_##lab
3198
+ #define LABEL_IS_SC(lab) LABEL_##lab##_##t
3199
+ COLLECT_USAGE_INSN(BIN(getlocal_OP__WC__0));
3200
+ COLLECT_USAGE_OPERAND(BIN(getlocal_OP__WC__0), 0, idx);
3201
+ {
3202
+ #line 60 "insns.def"
3203
+ int i, lev = (int)level;
3204
+ VALUE *ep = GET_EP();
3205
+
3206
+ /* optimized insns generated for level == (0|1) in defs/opt_operand.def */
3207
+ for (i = 0; i < lev; i++) {
3208
+ ep = GET_PREV_EP(ep);
3209
+ }
3210
+ val = *(ep - idx);
3211
+
3212
+ #line 3213 "vm.inc"
3213
+ CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
3214
+ PUSH(val);
3215
+ #undef level
3216
+ #undef CURRENT_INSN_getlocal_OP__WC__0
3217
+ #undef INSN_IS_SC
3218
+ #undef INSN_LABEL
3219
+ #undef LABEL_IS_SC
3220
+ END_INSN(getlocal_OP__WC__0);}}}
3221
+ INSN_ENTRY(getlocal_OP__WC__1){
3222
+ {
3223
+ VALUE val;
3224
+ #define level 1
3225
+ lindex_t idx = (lindex_t)GET_OPERAND(1);
3226
+
3227
+ DEBUG_ENTER_INSN("getlocal_OP__WC__1");
3228
+ ADD_PC(1+1);
3229
+ PREFETCH(GET_PC());
3230
+ #define CURRENT_INSN_getlocal_OP__WC__1 1
3231
+ #define INSN_IS_SC() 0
3232
+ #define INSN_LABEL(lab) LABEL_getlocal_OP__WC__1_##lab
3233
+ #define LABEL_IS_SC(lab) LABEL_##lab##_##t
3234
+ COLLECT_USAGE_INSN(BIN(getlocal_OP__WC__1));
3235
+ COLLECT_USAGE_OPERAND(BIN(getlocal_OP__WC__1), 0, idx);
3236
+ {
3237
+ #line 60 "insns.def"
3238
+ int i, lev = (int)level;
3239
+ VALUE *ep = GET_EP();
3240
+
3241
+ /* optimized insns generated for level == (0|1) in defs/opt_operand.def */
3242
+ for (i = 0; i < lev; i++) {
3243
+ ep = GET_PREV_EP(ep);
3244
+ }
3245
+ val = *(ep - idx);
3246
+
3247
+ #line 3248 "vm.inc"
3248
+ CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
3249
+ PUSH(val);
3250
+ #undef level
3251
+ #undef CURRENT_INSN_getlocal_OP__WC__1
3252
+ #undef INSN_IS_SC
3253
+ #undef INSN_LABEL
3254
+ #undef LABEL_IS_SC
3255
+ END_INSN(getlocal_OP__WC__1);}}}
3256
+ INSN_ENTRY(setlocal_OP__WC__0){
3257
+ {
3258
+ #define level 0
3259
+ lindex_t idx = (lindex_t)GET_OPERAND(1);
3260
+ VALUE val = TOPN(0);
3261
+ DEBUG_ENTER_INSN("setlocal_OP__WC__0");
3262
+ ADD_PC(1+1);
3263
+ PREFETCH(GET_PC());
3264
+ POPN(1);
3265
+ #define CURRENT_INSN_setlocal_OP__WC__0 1
3266
+ #define INSN_IS_SC() 0
3267
+ #define INSN_LABEL(lab) LABEL_setlocal_OP__WC__0_##lab
3268
+ #define LABEL_IS_SC(lab) LABEL_##lab##_##t
3269
+ COLLECT_USAGE_INSN(BIN(setlocal_OP__WC__0));
3270
+ COLLECT_USAGE_OPERAND(BIN(setlocal_OP__WC__0), 0, idx);
3271
+ {
3272
+ #line 83 "insns.def"
3273
+ int i, lev = (int)level;
3274
+ VALUE *ep = GET_EP();
3275
+
3276
+ /* optimized insns generated for level == (0|1) in defs/opt_operand.def */
3277
+ for (i = 0; i < lev; i++) {
3278
+ ep = GET_PREV_EP(ep);
3279
+ }
3280
+ *(ep - idx) = val;
3281
+
3282
+ #line 3283 "vm.inc"
3283
+ #undef level
3284
+ #undef CURRENT_INSN_setlocal_OP__WC__0
3285
+ #undef INSN_IS_SC
3286
+ #undef INSN_LABEL
3287
+ #undef LABEL_IS_SC
3288
+ END_INSN(setlocal_OP__WC__0);}}}
3289
+ INSN_ENTRY(setlocal_OP__WC__1){
3290
+ {
3291
+ #define level 1
3292
+ lindex_t idx = (lindex_t)GET_OPERAND(1);
3293
+ VALUE val = TOPN(0);
3294
+ DEBUG_ENTER_INSN("setlocal_OP__WC__1");
3295
+ ADD_PC(1+1);
3296
+ PREFETCH(GET_PC());
3297
+ POPN(1);
3298
+ #define CURRENT_INSN_setlocal_OP__WC__1 1
3299
+ #define INSN_IS_SC() 0
3300
+ #define INSN_LABEL(lab) LABEL_setlocal_OP__WC__1_##lab
3301
+ #define LABEL_IS_SC(lab) LABEL_##lab##_##t
3302
+ COLLECT_USAGE_INSN(BIN(setlocal_OP__WC__1));
3303
+ COLLECT_USAGE_OPERAND(BIN(setlocal_OP__WC__1), 0, idx);
3304
+ {
3305
+ #line 83 "insns.def"
3306
+ int i, lev = (int)level;
3307
+ VALUE *ep = GET_EP();
3308
+
3309
+ /* optimized insns generated for level == (0|1) in defs/opt_operand.def */
3310
+ for (i = 0; i < lev; i++) {
3311
+ ep = GET_PREV_EP(ep);
3312
+ }
3313
+ *(ep - idx) = val;
3314
+
3315
+ #line 3316 "vm.inc"
3316
+ #undef level
3317
+ #undef CURRENT_INSN_setlocal_OP__WC__1
3318
+ #undef INSN_IS_SC
3319
+ #undef INSN_LABEL
3320
+ #undef LABEL_IS_SC
3321
+ END_INSN(setlocal_OP__WC__1);}}}
3322
+ INSN_ENTRY(putobject_OP_INT2FIX_O_0_C_){
3323
+ {
3324
+ #define val INT2FIX(0)
3325
+
3326
+
3327
+ DEBUG_ENTER_INSN("putobject_OP_INT2FIX_O_0_C_");
3328
+ ADD_PC(1+0);
3329
+ PREFETCH(GET_PC());
3330
+ #define CURRENT_INSN_putobject_OP_INT2FIX_O_0_C_ 1
3331
+ #define INSN_IS_SC() 0
3332
+ #define INSN_LABEL(lab) LABEL_putobject_OP_INT2FIX_O_0_C__##lab
3333
+ #define LABEL_IS_SC(lab) LABEL_##lab##_##t
3334
+ COLLECT_USAGE_INSN(BIN(putobject_OP_INT2FIX_O_0_C_));
3335
+ {
3336
+ #line 297 "insns.def"
3337
+ /* */
3338
+
3339
+ #line 3340 "vm.inc"
3340
+ CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
3341
+ PUSH(val);
3342
+ #undef val
3343
+ #undef CURRENT_INSN_putobject_OP_INT2FIX_O_0_C_
3344
+ #undef INSN_IS_SC
3345
+ #undef INSN_LABEL
3346
+ #undef LABEL_IS_SC
3347
+ END_INSN(putobject_OP_INT2FIX_O_0_C_);}}}
3348
+ INSN_ENTRY(putobject_OP_INT2FIX_O_1_C_){
3349
+ {
3350
+ #define val INT2FIX(1)
3351
+
3352
+
3353
+ DEBUG_ENTER_INSN("putobject_OP_INT2FIX_O_1_C_");
3354
+ ADD_PC(1+0);
3355
+ PREFETCH(GET_PC());
3356
+ #define CURRENT_INSN_putobject_OP_INT2FIX_O_1_C_ 1
3357
+ #define INSN_IS_SC() 0
3358
+ #define INSN_LABEL(lab) LABEL_putobject_OP_INT2FIX_O_1_C__##lab
3359
+ #define LABEL_IS_SC(lab) LABEL_##lab##_##t
3360
+ COLLECT_USAGE_INSN(BIN(putobject_OP_INT2FIX_O_1_C_));
3361
+ {
3362
+ #line 297 "insns.def"
3363
+ /* */
3364
+
3365
+ #line 3366 "vm.inc"
3366
+ CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
3367
+ PUSH(val);
3368
+ #undef val
3369
+ #undef CURRENT_INSN_putobject_OP_INT2FIX_O_1_C_
3370
+ #undef INSN_IS_SC
3371
+ #undef INSN_LABEL
3372
+ #undef LABEL_IS_SC
3373
+ END_INSN(putobject_OP_INT2FIX_O_1_C_);}}}
3374
+