debase-ruby_core_source 0.10.15 → 0.10.16
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +28 -0
- data/debase-ruby_core_source.gemspec +1 -1
- data/lib/debase/ruby_core_source/{ruby-1.9.3-p550 → ruby-2.5.4-p155}/addr2line.h +1 -1
- data/lib/debase/ruby_core_source/ruby-2.5.4-p155/ccan/build_assert/build_assert.h +40 -0
- data/lib/debase/ruby_core_source/ruby-2.5.4-p155/ccan/check_type/check_type.h +63 -0
- data/lib/debase/ruby_core_source/ruby-2.5.4-p155/ccan/container_of/container_of.h +142 -0
- data/lib/debase/ruby_core_source/ruby-2.5.4-p155/ccan/list/list.h +773 -0
- data/lib/debase/ruby_core_source/ruby-2.5.4-p155/ccan/str/str.h +16 -0
- data/lib/debase/ruby_core_source/ruby-2.5.4-p155/constant.h +51 -0
- data/lib/debase/ruby_core_source/ruby-2.5.4-p155/debug_counter.h +109 -0
- data/lib/debase/ruby_core_source/{ruby-1.9.3-p550 → ruby-2.5.4-p155}/dln.h +10 -9
- data/lib/debase/ruby_core_source/ruby-2.5.4-p155/encindex.h +69 -0
- data/lib/debase/ruby_core_source/ruby-2.5.4-p155/eval_intern.h +334 -0
- data/lib/debase/ruby_core_source/{ruby-1.9.3-p550 → ruby-2.5.4-p155}/gc.h +27 -10
- data/lib/debase/ruby_core_source/ruby-2.5.4-p155/id.h +250 -0
- data/lib/debase/ruby_core_source/ruby-2.5.4-p155/id_table.h +31 -0
- data/lib/debase/ruby_core_source/ruby-2.5.4-p155/insns.inc +217 -0
- data/lib/debase/ruby_core_source/ruby-2.5.4-p155/insns_info.inc +1570 -0
- data/lib/debase/ruby_core_source/ruby-2.5.4-p155/internal.h +2036 -0
- data/lib/debase/ruby_core_source/ruby-2.5.4-p155/iseq.h +308 -0
- data/lib/debase/ruby_core_source/{ruby-1.9.3-p550 → ruby-2.5.4-p155}/known_errors.inc +16 -1
- data/lib/debase/ruby_core_source/ruby-2.5.4-p155/method.h +218 -0
- data/lib/debase/ruby_core_source/{ruby-1.9.3-p550 → ruby-2.5.4-p155}/node.h +115 -79
- data/lib/debase/ruby_core_source/{ruby-1.9.3-p550 → ruby-2.5.4-p155}/node_name.inc +12 -22
- data/lib/debase/ruby_core_source/ruby-2.5.4-p155/opt_sc.inc +1601 -0
- data/lib/debase/ruby_core_source/ruby-2.5.4-p155/optinsn.inc +103 -0
- data/lib/debase/ruby_core_source/{ruby-1.9.3-p550 → ruby-2.5.4-p155}/optunifs.inc +28 -83
- data/lib/debase/ruby_core_source/{ruby-1.9.3-p550 → ruby-2.5.4-p155}/parse.h +74 -60
- data/lib/debase/ruby_core_source/ruby-2.5.4-p155/probes_helper.h +43 -0
- data/lib/debase/ruby_core_source/ruby-2.5.4-p155/regenc.h +254 -0
- data/lib/debase/ruby_core_source/{ruby-1.9.3-p550 → ruby-2.5.4-p155}/regint.h +299 -211
- data/lib/debase/ruby_core_source/{ruby-1.9.3-p550 → ruby-2.5.4-p155}/regparse.h +45 -37
- data/lib/debase/ruby_core_source/ruby-2.5.4-p155/revision.h +1 -0
- data/lib/debase/ruby_core_source/ruby-2.5.4-p155/ruby_assert.h +54 -0
- data/lib/debase/ruby_core_source/{ruby-1.9.3-p550 → ruby-2.5.4-p155}/ruby_atomic.h +84 -26
- data/lib/debase/ruby_core_source/{ruby-1.9.3-p550 → ruby-2.5.4-p155}/siphash.h +1 -1
- data/lib/debase/ruby_core_source/ruby-2.5.4-p155/symbol.h +108 -0
- data/lib/debase/ruby_core_source/{ruby-1.9.3-p550 → ruby-2.5.4-p155}/thread_pthread.h +14 -11
- data/lib/debase/ruby_core_source/{ruby-1.9.3-p550 → ruby-2.5.4-p155}/thread_win32.h +2 -6
- data/lib/debase/ruby_core_source/ruby-2.5.4-p155/timev.h +42 -0
- data/lib/debase/ruby_core_source/{ruby-1.9.3-p550 → ruby-2.5.4-p155}/transcode_data.h +34 -12
- data/lib/debase/ruby_core_source/ruby-2.5.4-p155/version.h +73 -0
- data/lib/debase/ruby_core_source/ruby-2.5.4-p155/vm.inc +3667 -0
- data/lib/debase/ruby_core_source/ruby-2.5.4-p155/vm_call_iseq_optimized.inc +213 -0
- data/lib/debase/ruby_core_source/ruby-2.5.4-p155/vm_core.h +1768 -0
- data/lib/debase/ruby_core_source/{ruby-1.9.3-p550/debug.h → ruby-2.5.4-p155/vm_debug.h} +4 -8
- data/lib/debase/ruby_core_source/{ruby-1.9.3-p550 → ruby-2.5.4-p155}/vm_exec.h +38 -30
- data/lib/debase/ruby_core_source/ruby-2.5.4-p155/vm_insnhelper.h +255 -0
- data/lib/debase/ruby_core_source/{ruby-1.9.3-p550 → ruby-2.5.4-p155}/vm_opts.h +14 -9
- data/lib/debase/ruby_core_source/ruby-2.5.4-p155/vmtc.inc +214 -0
- data/lib/debase/ruby_core_source/version.rb +1 -1
- metadata +52 -42
- data/lib/debase/ruby_core_source/ruby-1.9.3-p550/constant.h +0 -34
- data/lib/debase/ruby_core_source/ruby-1.9.3-p550/encdb.h +0 -167
- data/lib/debase/ruby_core_source/ruby-1.9.3-p550/eval_intern.h +0 -234
- data/lib/debase/ruby_core_source/ruby-1.9.3-p550/id.h +0 -177
- data/lib/debase/ruby_core_source/ruby-1.9.3-p550/insns.inc +0 -179
- data/lib/debase/ruby_core_source/ruby-1.9.3-p550/insns_info.inc +0 -695
- data/lib/debase/ruby_core_source/ruby-1.9.3-p550/internal.h +0 -242
- data/lib/debase/ruby_core_source/ruby-1.9.3-p550/iseq.h +0 -126
- data/lib/debase/ruby_core_source/ruby-1.9.3-p550/method.h +0 -105
- data/lib/debase/ruby_core_source/ruby-1.9.3-p550/opt_sc.inc +0 -670
- data/lib/debase/ruby_core_source/ruby-1.9.3-p550/optinsn.inc +0 -30
- data/lib/debase/ruby_core_source/ruby-1.9.3-p550/regenc.h +0 -219
- data/lib/debase/ruby_core_source/ruby-1.9.3-p550/revision.h +0 -1
- data/lib/debase/ruby_core_source/ruby-1.9.3-p550/timev.h +0 -21
- data/lib/debase/ruby_core_source/ruby-1.9.3-p550/transdb.h +0 -189
- data/lib/debase/ruby_core_source/ruby-1.9.3-p550/version.h +0 -52
- data/lib/debase/ruby_core_source/ruby-1.9.3-p550/vm.inc +0 -3054
- data/lib/debase/ruby_core_source/ruby-1.9.3-p550/vm_core.h +0 -763
- data/lib/debase/ruby_core_source/ruby-1.9.3-p550/vm_insnhelper.h +0 -220
- data/lib/debase/ruby_core_source/ruby-1.9.3-p550/vmtc.inc +0 -97
@@ -0,0 +1,1570 @@
|
|
1
|
+
/** -*-c-*-
|
2
|
+
This file contains instruction information for yarv instruction sequence.
|
3
|
+
|
4
|
+
----
|
5
|
+
This file is auto generated by insns2vm.rb
|
6
|
+
DO NOT TOUCH!
|
7
|
+
|
8
|
+
If you want to fix something, you must edit 'template/insns_info.inc.tmpl'
|
9
|
+
or tool/insns2vm.rb
|
10
|
+
*/
|
11
|
+
|
12
|
+
#define TS_OFFSET 'O'
|
13
|
+
#define TS_NUM 'N'
|
14
|
+
#define TS_LINDEX 'L'
|
15
|
+
#define TS_VALUE 'V'
|
16
|
+
#define TS_ID 'I'
|
17
|
+
#define TS_GENTRY 'G'
|
18
|
+
#define TS_IC 'K'
|
19
|
+
#define TS_CALLINFO 'C'
|
20
|
+
#define TS_CALLCACHE 'E'
|
21
|
+
#define TS_CDHASH 'H'
|
22
|
+
#define TS_ISEQ 'S'
|
23
|
+
#define TS_VARIABLE '.'
|
24
|
+
#define TS_FUNCPTR 'F'
|
25
|
+
|
26
|
+
static const unsigned short insn_name_info_offset[] = {
|
27
|
+
0,
|
28
|
+
4,
|
29
|
+
13,
|
30
|
+
22,
|
31
|
+
36,
|
32
|
+
50,
|
33
|
+
61,
|
34
|
+
72,
|
35
|
+
92,
|
36
|
+
112,
|
37
|
+
129,
|
38
|
+
146,
|
39
|
+
158,
|
40
|
+
170,
|
41
|
+
180,
|
42
|
+
190,
|
43
|
+
197,
|
44
|
+
205,
|
45
|
+
215,
|
46
|
+
232,
|
47
|
+
240,
|
48
|
+
250,
|
49
|
+
264,
|
50
|
+
273,
|
51
|
+
286,
|
52
|
+
295,
|
53
|
+
302,
|
54
|
+
311,
|
55
|
+
320,
|
56
|
+
332,
|
57
|
+
344,
|
58
|
+
355,
|
59
|
+
363,
|
60
|
+
372,
|
61
|
+
376,
|
62
|
+
380,
|
63
|
+
385,
|
64
|
+
390,
|
65
|
+
398,
|
66
|
+
404,
|
67
|
+
409,
|
68
|
+
414,
|
69
|
+
426,
|
70
|
+
434,
|
71
|
+
445,
|
72
|
+
458,
|
73
|
+
472,
|
74
|
+
484,
|
75
|
+
489,
|
76
|
+
504,
|
77
|
+
519,
|
78
|
+
536,
|
79
|
+
553,
|
80
|
+
576,
|
81
|
+
588,
|
82
|
+
600,
|
83
|
+
606,
|
84
|
+
612,
|
85
|
+
617,
|
86
|
+
626,
|
87
|
+
639,
|
88
|
+
649,
|
89
|
+
662,
|
90
|
+
677,
|
91
|
+
692,
|
92
|
+
697,
|
93
|
+
715,
|
94
|
+
724,
|
95
|
+
734,
|
96
|
+
743,
|
97
|
+
751,
|
98
|
+
759,
|
99
|
+
766,
|
100
|
+
774,
|
101
|
+
781,
|
102
|
+
788,
|
103
|
+
795,
|
104
|
+
802,
|
105
|
+
811,
|
106
|
+
820,
|
107
|
+
829,
|
108
|
+
843,
|
109
|
+
857,
|
110
|
+
868,
|
111
|
+
877,
|
112
|
+
889,
|
113
|
+
898,
|
114
|
+
906,
|
115
|
+
923,
|
116
|
+
940,
|
117
|
+
960,
|
118
|
+
967,
|
119
|
+
974,
|
120
|
+
993,
|
121
|
+
1012,
|
122
|
+
1031,
|
123
|
+
1050,
|
124
|
+
1078,
|
125
|
+
1106,
|
126
|
+
1116,
|
127
|
+
1131,
|
128
|
+
1146,
|
129
|
+
1166,
|
130
|
+
1186,
|
131
|
+
1203,
|
132
|
+
1220,
|
133
|
+
1246,
|
134
|
+
1272,
|
135
|
+
1295,
|
136
|
+
1318,
|
137
|
+
1336,
|
138
|
+
1354,
|
139
|
+
1370,
|
140
|
+
1386,
|
141
|
+
1399,
|
142
|
+
1413,
|
143
|
+
1429,
|
144
|
+
1452,
|
145
|
+
1466,
|
146
|
+
1482,
|
147
|
+
1502,
|
148
|
+
1517,
|
149
|
+
1536,
|
150
|
+
1551,
|
151
|
+
1564,
|
152
|
+
1579,
|
153
|
+
1594,
|
154
|
+
1612,
|
155
|
+
1630,
|
156
|
+
1647,
|
157
|
+
1661,
|
158
|
+
1676,
|
159
|
+
1686,
|
160
|
+
1696,
|
161
|
+
1707,
|
162
|
+
1718,
|
163
|
+
1732,
|
164
|
+
1744,
|
165
|
+
1755,
|
166
|
+
1766,
|
167
|
+
1784,
|
168
|
+
1798,
|
169
|
+
1815,
|
170
|
+
1834,
|
171
|
+
1854,
|
172
|
+
1872,
|
173
|
+
1883,
|
174
|
+
1904,
|
175
|
+
1925,
|
176
|
+
1948,
|
177
|
+
1971,
|
178
|
+
2000,
|
179
|
+
2018,
|
180
|
+
2036,
|
181
|
+
2048,
|
182
|
+
2060,
|
183
|
+
2071,
|
184
|
+
2086,
|
185
|
+
2105,
|
186
|
+
2121,
|
187
|
+
2140,
|
188
|
+
2161,
|
189
|
+
2182,
|
190
|
+
2193,
|
191
|
+
2217,
|
192
|
+
2232,
|
193
|
+
2248,
|
194
|
+
2263,
|
195
|
+
2277,
|
196
|
+
2291,
|
197
|
+
2304,
|
198
|
+
2318,
|
199
|
+
2331,
|
200
|
+
2344,
|
201
|
+
2357,
|
202
|
+
2370,
|
203
|
+
2385,
|
204
|
+
2400,
|
205
|
+
2415,
|
206
|
+
2435,
|
207
|
+
2455,
|
208
|
+
2472,
|
209
|
+
2487,
|
210
|
+
2505,
|
211
|
+
2520,
|
212
|
+
2534,
|
213
|
+
2557,
|
214
|
+
2580,
|
215
|
+
2606,
|
216
|
+
2619,
|
217
|
+
2632,
|
218
|
+
2657,
|
219
|
+
2682,
|
220
|
+
2707,
|
221
|
+
2732,
|
222
|
+
2766,
|
223
|
+
};
|
224
|
+
|
225
|
+
ASSERT_VM_INSTRUCTION_SIZE(insn_name_info_offset);
|
226
|
+
|
227
|
+
static const char insn_name_info_base[2800] = ""
|
228
|
+
"nop\0"
|
229
|
+
"getlocal\0"
|
230
|
+
"setlocal\0"
|
231
|
+
"getblockparam\0"
|
232
|
+
"setblockparam\0"
|
233
|
+
"getspecial\0"
|
234
|
+
"setspecial\0"
|
235
|
+
"getinstancevariable\0"
|
236
|
+
"setinstancevariable\0"
|
237
|
+
"getclassvariable\0"
|
238
|
+
"setclassvariable\0"
|
239
|
+
"getconstant\0"
|
240
|
+
"setconstant\0"
|
241
|
+
"getglobal\0"
|
242
|
+
"setglobal\0"
|
243
|
+
"putnil\0"
|
244
|
+
"putself\0"
|
245
|
+
"putobject\0"
|
246
|
+
"putspecialobject\0"
|
247
|
+
"putiseq\0"
|
248
|
+
"putstring\0"
|
249
|
+
"concatstrings\0"
|
250
|
+
"tostring\0"
|
251
|
+
"freezestring\0"
|
252
|
+
"toregexp\0"
|
253
|
+
"intern\0"
|
254
|
+
"newarray\0"
|
255
|
+
"duparray\0"
|
256
|
+
"expandarray\0"
|
257
|
+
"concatarray\0"
|
258
|
+
"splatarray\0"
|
259
|
+
"newhash\0"
|
260
|
+
"newrange\0"
|
261
|
+
"pop\0"
|
262
|
+
"dup\0"
|
263
|
+
"dupn\0"
|
264
|
+
"swap\0"
|
265
|
+
"reverse\0"
|
266
|
+
"reput\0"
|
267
|
+
"topn\0"
|
268
|
+
"setn\0"
|
269
|
+
"adjuststack\0"
|
270
|
+
"defined\0"
|
271
|
+
"checkmatch\0"
|
272
|
+
"checkkeyword\0"
|
273
|
+
"tracecoverage\0"
|
274
|
+
"defineclass\0"
|
275
|
+
"send\0"
|
276
|
+
"opt_str_freeze\0"
|
277
|
+
"opt_str_uminus\0"
|
278
|
+
"opt_newarray_max\0"
|
279
|
+
"opt_newarray_min\0"
|
280
|
+
"opt_send_without_block\0"
|
281
|
+
"invokesuper\0"
|
282
|
+
"invokeblock\0"
|
283
|
+
"leave\0"
|
284
|
+
"throw\0"
|
285
|
+
"jump\0"
|
286
|
+
"branchif\0"
|
287
|
+
"branchunless\0"
|
288
|
+
"branchnil\0"
|
289
|
+
"branchiftype\0"
|
290
|
+
"getinlinecache\0"
|
291
|
+
"setinlinecache\0"
|
292
|
+
"once\0"
|
293
|
+
"opt_case_dispatch\0"
|
294
|
+
"opt_plus\0"
|
295
|
+
"opt_minus\0"
|
296
|
+
"opt_mult\0"
|
297
|
+
"opt_div\0"
|
298
|
+
"opt_mod\0"
|
299
|
+
"opt_eq\0"
|
300
|
+
"opt_neq\0"
|
301
|
+
"opt_lt\0"
|
302
|
+
"opt_le\0"
|
303
|
+
"opt_gt\0"
|
304
|
+
"opt_ge\0"
|
305
|
+
"opt_ltlt\0"
|
306
|
+
"opt_aref\0"
|
307
|
+
"opt_aset\0"
|
308
|
+
"opt_aset_with\0"
|
309
|
+
"opt_aref_with\0"
|
310
|
+
"opt_length\0"
|
311
|
+
"opt_size\0"
|
312
|
+
"opt_empty_p\0"
|
313
|
+
"opt_succ\0"
|
314
|
+
"opt_not\0"
|
315
|
+
"opt_regexpmatch1\0"
|
316
|
+
"opt_regexpmatch2\0"
|
317
|
+
"opt_call_c_function\0"
|
318
|
+
"bitblt\0"
|
319
|
+
"answer\0"
|
320
|
+
"getlocal_OP__WC__0\0"
|
321
|
+
"getlocal_OP__WC__1\0"
|
322
|
+
"setlocal_OP__WC__0\0"
|
323
|
+
"setlocal_OP__WC__1\0"
|
324
|
+
"putobject_OP_INT2FIX_O_0_C_\0"
|
325
|
+
"putobject_OP_INT2FIX_O_1_C_\0"
|
326
|
+
"trace_nop\0"
|
327
|
+
"trace_getlocal\0"
|
328
|
+
"trace_setlocal\0"
|
329
|
+
"trace_getblockparam\0"
|
330
|
+
"trace_setblockparam\0"
|
331
|
+
"trace_getspecial\0"
|
332
|
+
"trace_setspecial\0"
|
333
|
+
"trace_getinstancevariable\0"
|
334
|
+
"trace_setinstancevariable\0"
|
335
|
+
"trace_getclassvariable\0"
|
336
|
+
"trace_setclassvariable\0"
|
337
|
+
"trace_getconstant\0"
|
338
|
+
"trace_setconstant\0"
|
339
|
+
"trace_getglobal\0"
|
340
|
+
"trace_setglobal\0"
|
341
|
+
"trace_putnil\0"
|
342
|
+
"trace_putself\0"
|
343
|
+
"trace_putobject\0"
|
344
|
+
"trace_putspecialobject\0"
|
345
|
+
"trace_putiseq\0"
|
346
|
+
"trace_putstring\0"
|
347
|
+
"trace_concatstrings\0"
|
348
|
+
"trace_tostring\0"
|
349
|
+
"trace_freezestring\0"
|
350
|
+
"trace_toregexp\0"
|
351
|
+
"trace_intern\0"
|
352
|
+
"trace_newarray\0"
|
353
|
+
"trace_duparray\0"
|
354
|
+
"trace_expandarray\0"
|
355
|
+
"trace_concatarray\0"
|
356
|
+
"trace_splatarray\0"
|
357
|
+
"trace_newhash\0"
|
358
|
+
"trace_newrange\0"
|
359
|
+
"trace_pop\0"
|
360
|
+
"trace_dup\0"
|
361
|
+
"trace_dupn\0"
|
362
|
+
"trace_swap\0"
|
363
|
+
"trace_reverse\0"
|
364
|
+
"trace_reput\0"
|
365
|
+
"trace_topn\0"
|
366
|
+
"trace_setn\0"
|
367
|
+
"trace_adjuststack\0"
|
368
|
+
"trace_defined\0"
|
369
|
+
"trace_checkmatch\0"
|
370
|
+
"trace_checkkeyword\0"
|
371
|
+
"trace_tracecoverage\0"
|
372
|
+
"trace_defineclass\0"
|
373
|
+
"trace_send\0"
|
374
|
+
"trace_opt_str_freeze\0"
|
375
|
+
"trace_opt_str_uminus\0"
|
376
|
+
"trace_opt_newarray_max\0"
|
377
|
+
"trace_opt_newarray_min\0"
|
378
|
+
"trace_opt_send_without_block\0"
|
379
|
+
"trace_invokesuper\0"
|
380
|
+
"trace_invokeblock\0"
|
381
|
+
"trace_leave\0"
|
382
|
+
"trace_throw\0"
|
383
|
+
"trace_jump\0"
|
384
|
+
"trace_branchif\0"
|
385
|
+
"trace_branchunless\0"
|
386
|
+
"trace_branchnil\0"
|
387
|
+
"trace_branchiftype\0"
|
388
|
+
"trace_getinlinecache\0"
|
389
|
+
"trace_setinlinecache\0"
|
390
|
+
"trace_once\0"
|
391
|
+
"trace_opt_case_dispatch\0"
|
392
|
+
"trace_opt_plus\0"
|
393
|
+
"trace_opt_minus\0"
|
394
|
+
"trace_opt_mult\0"
|
395
|
+
"trace_opt_div\0"
|
396
|
+
"trace_opt_mod\0"
|
397
|
+
"trace_opt_eq\0"
|
398
|
+
"trace_opt_neq\0"
|
399
|
+
"trace_opt_lt\0"
|
400
|
+
"trace_opt_le\0"
|
401
|
+
"trace_opt_gt\0"
|
402
|
+
"trace_opt_ge\0"
|
403
|
+
"trace_opt_ltlt\0"
|
404
|
+
"trace_opt_aref\0"
|
405
|
+
"trace_opt_aset\0"
|
406
|
+
"trace_opt_aset_with\0"
|
407
|
+
"trace_opt_aref_with\0"
|
408
|
+
"trace_opt_length\0"
|
409
|
+
"trace_opt_size\0"
|
410
|
+
"trace_opt_empty_p\0"
|
411
|
+
"trace_opt_succ\0"
|
412
|
+
"trace_opt_not\0"
|
413
|
+
"trace_opt_regexpmatch1\0"
|
414
|
+
"trace_opt_regexpmatch2\0"
|
415
|
+
"trace_opt_call_c_function\0"
|
416
|
+
"trace_bitblt\0"
|
417
|
+
"trace_answer\0"
|
418
|
+
"trace_getlocal_OP__WC__0\0"
|
419
|
+
"trace_getlocal_OP__WC__1\0"
|
420
|
+
"trace_setlocal_OP__WC__0\0"
|
421
|
+
"trace_setlocal_OP__WC__1\0"
|
422
|
+
"trace_putobject_OP_INT2FIX_O_0_C_\0"
|
423
|
+
"trace_putobject_OP_INT2FIX_O_1_C_\0"
|
424
|
+
;
|
425
|
+
|
426
|
+
#define insn_name_info insn_name_info_base+insn_name_info_offset
|
427
|
+
|
428
|
+
static const char insn_operand_info[][8] = {
|
429
|
+
"\1""",
|
430
|
+
"\3""LN",
|
431
|
+
"\3""LN",
|
432
|
+
"\3""LN",
|
433
|
+
"\3""LN",
|
434
|
+
"\3""NN",
|
435
|
+
"\2""N",
|
436
|
+
"\3""IK",
|
437
|
+
"\3""IK",
|
438
|
+
"\2""I",
|
439
|
+
"\2""I",
|
440
|
+
"\2""I",
|
441
|
+
"\2""I",
|
442
|
+
"\2""G",
|
443
|
+
"\2""G",
|
444
|
+
"\1""",
|
445
|
+
"\1""",
|
446
|
+
"\2""V",
|
447
|
+
"\2""N",
|
448
|
+
"\2""S",
|
449
|
+
"\2""V",
|
450
|
+
"\2""N",
|
451
|
+
"\1""",
|
452
|
+
"\2""V",
|
453
|
+
"\3""NN",
|
454
|
+
"\1""",
|
455
|
+
"\2""N",
|
456
|
+
"\2""V",
|
457
|
+
"\3""NN",
|
458
|
+
"\1""",
|
459
|
+
"\2""V",
|
460
|
+
"\2""N",
|
461
|
+
"\2""N",
|
462
|
+
"\1""",
|
463
|
+
"\1""",
|
464
|
+
"\2""N",
|
465
|
+
"\1""",
|
466
|
+
"\2""N",
|
467
|
+
"\1""",
|
468
|
+
"\2""N",
|
469
|
+
"\2""N",
|
470
|
+
"\2""N",
|
471
|
+
"\4""NVV",
|
472
|
+
"\2""N",
|
473
|
+
"\3""LL",
|
474
|
+
"\3""NV",
|
475
|
+
"\4""ISN",
|
476
|
+
"\4""CES",
|
477
|
+
"\2""V",
|
478
|
+
"\2""V",
|
479
|
+
"\2""N",
|
480
|
+
"\2""N",
|
481
|
+
"\3""CE",
|
482
|
+
"\4""CES",
|
483
|
+
"\2""C",
|
484
|
+
"\1""",
|
485
|
+
"\2""N",
|
486
|
+
"\2""O",
|
487
|
+
"\2""O",
|
488
|
+
"\2""O",
|
489
|
+
"\2""O",
|
490
|
+
"\3""NO",
|
491
|
+
"\3""OK",
|
492
|
+
"\2""K",
|
493
|
+
"\3""SK",
|
494
|
+
"\3""HO",
|
495
|
+
"\3""CE",
|
496
|
+
"\3""CE",
|
497
|
+
"\3""CE",
|
498
|
+
"\3""CE",
|
499
|
+
"\3""CE",
|
500
|
+
"\3""CE",
|
501
|
+
"\5""CECE",
|
502
|
+
"\3""CE",
|
503
|
+
"\3""CE",
|
504
|
+
"\3""CE",
|
505
|
+
"\3""CE",
|
506
|
+
"\3""CE",
|
507
|
+
"\3""CE",
|
508
|
+
"\3""CE",
|
509
|
+
"\4""CEV",
|
510
|
+
"\4""CEV",
|
511
|
+
"\3""CE",
|
512
|
+
"\3""CE",
|
513
|
+
"\3""CE",
|
514
|
+
"\3""CE",
|
515
|
+
"\3""CE",
|
516
|
+
"\2""V",
|
517
|
+
"\3""CE",
|
518
|
+
"\2""F",
|
519
|
+
"\1""",
|
520
|
+
"\1""",
|
521
|
+
"\2""L",
|
522
|
+
"\2""L",
|
523
|
+
"\2""L",
|
524
|
+
"\2""L",
|
525
|
+
"\1""",
|
526
|
+
"\1""",
|
527
|
+
"\1""",
|
528
|
+
"\3""LN",
|
529
|
+
"\3""LN",
|
530
|
+
"\3""LN",
|
531
|
+
"\3""LN",
|
532
|
+
"\3""NN",
|
533
|
+
"\2""N",
|
534
|
+
"\3""IK",
|
535
|
+
"\3""IK",
|
536
|
+
"\2""I",
|
537
|
+
"\2""I",
|
538
|
+
"\2""I",
|
539
|
+
"\2""I",
|
540
|
+
"\2""G",
|
541
|
+
"\2""G",
|
542
|
+
"\1""",
|
543
|
+
"\1""",
|
544
|
+
"\2""V",
|
545
|
+
"\2""N",
|
546
|
+
"\2""S",
|
547
|
+
"\2""V",
|
548
|
+
"\2""N",
|
549
|
+
"\1""",
|
550
|
+
"\2""V",
|
551
|
+
"\3""NN",
|
552
|
+
"\1""",
|
553
|
+
"\2""N",
|
554
|
+
"\2""V",
|
555
|
+
"\3""NN",
|
556
|
+
"\1""",
|
557
|
+
"\2""V",
|
558
|
+
"\2""N",
|
559
|
+
"\2""N",
|
560
|
+
"\1""",
|
561
|
+
"\1""",
|
562
|
+
"\2""N",
|
563
|
+
"\1""",
|
564
|
+
"\2""N",
|
565
|
+
"\1""",
|
566
|
+
"\2""N",
|
567
|
+
"\2""N",
|
568
|
+
"\2""N",
|
569
|
+
"\4""NVV",
|
570
|
+
"\2""N",
|
571
|
+
"\3""LL",
|
572
|
+
"\3""NV",
|
573
|
+
"\4""ISN",
|
574
|
+
"\4""CES",
|
575
|
+
"\2""V",
|
576
|
+
"\2""V",
|
577
|
+
"\2""N",
|
578
|
+
"\2""N",
|
579
|
+
"\3""CE",
|
580
|
+
"\4""CES",
|
581
|
+
"\2""C",
|
582
|
+
"\1""",
|
583
|
+
"\2""N",
|
584
|
+
"\2""O",
|
585
|
+
"\2""O",
|
586
|
+
"\2""O",
|
587
|
+
"\2""O",
|
588
|
+
"\3""NO",
|
589
|
+
"\3""OK",
|
590
|
+
"\2""K",
|
591
|
+
"\3""SK",
|
592
|
+
"\3""HO",
|
593
|
+
"\3""CE",
|
594
|
+
"\3""CE",
|
595
|
+
"\3""CE",
|
596
|
+
"\3""CE",
|
597
|
+
"\3""CE",
|
598
|
+
"\3""CE",
|
599
|
+
"\5""CECE",
|
600
|
+
"\3""CE",
|
601
|
+
"\3""CE",
|
602
|
+
"\3""CE",
|
603
|
+
"\3""CE",
|
604
|
+
"\3""CE",
|
605
|
+
"\3""CE",
|
606
|
+
"\3""CE",
|
607
|
+
"\4""CEV",
|
608
|
+
"\4""CEV",
|
609
|
+
"\3""CE",
|
610
|
+
"\3""CE",
|
611
|
+
"\3""CE",
|
612
|
+
"\3""CE",
|
613
|
+
"\3""CE",
|
614
|
+
"\2""V",
|
615
|
+
"\3""CE",
|
616
|
+
"\2""F",
|
617
|
+
"\1""",
|
618
|
+
"\1""",
|
619
|
+
"\2""L",
|
620
|
+
"\2""L",
|
621
|
+
"\2""L",
|
622
|
+
"\2""L",
|
623
|
+
"\1""",
|
624
|
+
"\1""",
|
625
|
+
};
|
626
|
+
|
627
|
+
ASSERT_VM_INSTRUCTION_SIZE(insn_operand_info);
|
628
|
+
|
629
|
+
#ifdef USE_INSN_RET_NUM
|
630
|
+
static const unsigned short insn_stack_push_num_info[] = {
|
631
|
+
0,
|
632
|
+
1,
|
633
|
+
0,
|
634
|
+
1,
|
635
|
+
0,
|
636
|
+
1,
|
637
|
+
0,
|
638
|
+
1,
|
639
|
+
0,
|
640
|
+
1,
|
641
|
+
0,
|
642
|
+
1,
|
643
|
+
0,
|
644
|
+
1,
|
645
|
+
0,
|
646
|
+
1,
|
647
|
+
1,
|
648
|
+
1,
|
649
|
+
1,
|
650
|
+
1,
|
651
|
+
1,
|
652
|
+
1,
|
653
|
+
1,
|
654
|
+
1,
|
655
|
+
1,
|
656
|
+
1,
|
657
|
+
1,
|
658
|
+
1,
|
659
|
+
1,
|
660
|
+
1,
|
661
|
+
1,
|
662
|
+
1,
|
663
|
+
1,
|
664
|
+
0,
|
665
|
+
2,
|
666
|
+
1,
|
667
|
+
2,
|
668
|
+
1,
|
669
|
+
1,
|
670
|
+
1,
|
671
|
+
1,
|
672
|
+
1,
|
673
|
+
1,
|
674
|
+
1,
|
675
|
+
1,
|
676
|
+
0,
|
677
|
+
1,
|
678
|
+
1,
|
679
|
+
1,
|
680
|
+
1,
|
681
|
+
1,
|
682
|
+
1,
|
683
|
+
1,
|
684
|
+
1,
|
685
|
+
1,
|
686
|
+
1,
|
687
|
+
1,
|
688
|
+
0,
|
689
|
+
0,
|
690
|
+
0,
|
691
|
+
0,
|
692
|
+
0,
|
693
|
+
1,
|
694
|
+
1,
|
695
|
+
1,
|
696
|
+
0,
|
697
|
+
1,
|
698
|
+
1,
|
699
|
+
1,
|
700
|
+
1,
|
701
|
+
1,
|
702
|
+
1,
|
703
|
+
1,
|
704
|
+
1,
|
705
|
+
1,
|
706
|
+
1,
|
707
|
+
1,
|
708
|
+
1,
|
709
|
+
1,
|
710
|
+
1,
|
711
|
+
1,
|
712
|
+
1,
|
713
|
+
1,
|
714
|
+
1,
|
715
|
+
1,
|
716
|
+
1,
|
717
|
+
1,
|
718
|
+
1,
|
719
|
+
1,
|
720
|
+
0,
|
721
|
+
1,
|
722
|
+
1,
|
723
|
+
1,
|
724
|
+
1,
|
725
|
+
0,
|
726
|
+
0,
|
727
|
+
1,
|
728
|
+
1,
|
729
|
+
0,
|
730
|
+
1,
|
731
|
+
0,
|
732
|
+
1,
|
733
|
+
0,
|
734
|
+
1,
|
735
|
+
0,
|
736
|
+
1,
|
737
|
+
0,
|
738
|
+
1,
|
739
|
+
0,
|
740
|
+
1,
|
741
|
+
0,
|
742
|
+
1,
|
743
|
+
0,
|
744
|
+
1,
|
745
|
+
1,
|
746
|
+
1,
|
747
|
+
1,
|
748
|
+
1,
|
749
|
+
1,
|
750
|
+
1,
|
751
|
+
1,
|
752
|
+
1,
|
753
|
+
1,
|
754
|
+
1,
|
755
|
+
1,
|
756
|
+
1,
|
757
|
+
1,
|
758
|
+
1,
|
759
|
+
1,
|
760
|
+
1,
|
761
|
+
1,
|
762
|
+
0,
|
763
|
+
2,
|
764
|
+
1,
|
765
|
+
2,
|
766
|
+
1,
|
767
|
+
1,
|
768
|
+
1,
|
769
|
+
1,
|
770
|
+
1,
|
771
|
+
1,
|
772
|
+
1,
|
773
|
+
1,
|
774
|
+
0,
|
775
|
+
1,
|
776
|
+
1,
|
777
|
+
1,
|
778
|
+
1,
|
779
|
+
1,
|
780
|
+
1,
|
781
|
+
1,
|
782
|
+
1,
|
783
|
+
1,
|
784
|
+
1,
|
785
|
+
1,
|
786
|
+
0,
|
787
|
+
0,
|
788
|
+
0,
|
789
|
+
0,
|
790
|
+
0,
|
791
|
+
1,
|
792
|
+
1,
|
793
|
+
1,
|
794
|
+
0,
|
795
|
+
1,
|
796
|
+
1,
|
797
|
+
1,
|
798
|
+
1,
|
799
|
+
1,
|
800
|
+
1,
|
801
|
+
1,
|
802
|
+
1,
|
803
|
+
1,
|
804
|
+
1,
|
805
|
+
1,
|
806
|
+
1,
|
807
|
+
1,
|
808
|
+
1,
|
809
|
+
1,
|
810
|
+
1,
|
811
|
+
1,
|
812
|
+
1,
|
813
|
+
1,
|
814
|
+
1,
|
815
|
+
1,
|
816
|
+
1,
|
817
|
+
1,
|
818
|
+
0,
|
819
|
+
1,
|
820
|
+
1,
|
821
|
+
1,
|
822
|
+
1,
|
823
|
+
0,
|
824
|
+
0,
|
825
|
+
1,
|
826
|
+
1,
|
827
|
+
};
|
828
|
+
|
829
|
+
ASSERT_VM_INSTRUCTION_SIZE(insn_stack_push_num_info);
|
830
|
+
#endif
|
831
|
+
|
832
|
+
#ifdef USE_INSN_STACK_INCREASE
|
833
|
+
static int
|
834
|
+
insn_stack_increase(int depth, int insn, VALUE *opes)
|
835
|
+
{
|
836
|
+
switch (insn) {
|
837
|
+
case BIN(nop): {
|
838
|
+
return depth + 0;
|
839
|
+
}
|
840
|
+
case BIN(getlocal): {
|
841
|
+
return depth + 1;
|
842
|
+
}
|
843
|
+
case BIN(setlocal): {
|
844
|
+
return depth + -1;
|
845
|
+
}
|
846
|
+
case BIN(getblockparam): {
|
847
|
+
return depth + 1;
|
848
|
+
}
|
849
|
+
case BIN(setblockparam): {
|
850
|
+
return depth + -1;
|
851
|
+
}
|
852
|
+
case BIN(getspecial): {
|
853
|
+
return depth + 1;
|
854
|
+
}
|
855
|
+
case BIN(setspecial): {
|
856
|
+
return depth + -1;
|
857
|
+
}
|
858
|
+
case BIN(getinstancevariable): {
|
859
|
+
return depth + 1;
|
860
|
+
}
|
861
|
+
case BIN(setinstancevariable): {
|
862
|
+
return depth + -1;
|
863
|
+
}
|
864
|
+
case BIN(getclassvariable): {
|
865
|
+
return depth + 1;
|
866
|
+
}
|
867
|
+
case BIN(setclassvariable): {
|
868
|
+
return depth + -1;
|
869
|
+
}
|
870
|
+
case BIN(getconstant): {
|
871
|
+
return depth + 0;
|
872
|
+
}
|
873
|
+
case BIN(setconstant): {
|
874
|
+
return depth + -2;
|
875
|
+
}
|
876
|
+
case BIN(getglobal): {
|
877
|
+
return depth + 1;
|
878
|
+
}
|
879
|
+
case BIN(setglobal): {
|
880
|
+
return depth + -1;
|
881
|
+
}
|
882
|
+
case BIN(putnil): {
|
883
|
+
return depth + 1;
|
884
|
+
}
|
885
|
+
case BIN(putself): {
|
886
|
+
return depth + 1;
|
887
|
+
}
|
888
|
+
case BIN(putobject): {
|
889
|
+
return depth + 1;
|
890
|
+
}
|
891
|
+
case BIN(putspecialobject): {
|
892
|
+
return depth + 1;
|
893
|
+
}
|
894
|
+
case BIN(putiseq): {
|
895
|
+
return depth + 1;
|
896
|
+
}
|
897
|
+
case BIN(putstring): {
|
898
|
+
return depth + 1;
|
899
|
+
}
|
900
|
+
case BIN(concatstrings): {
|
901
|
+
int inc = 0;
|
902
|
+
int num = FIX2INT(opes[0]);
|
903
|
+
inc += 1 - num;;
|
904
|
+
return depth + inc;
|
905
|
+
}
|
906
|
+
case BIN(tostring): {
|
907
|
+
return depth + -1;
|
908
|
+
}
|
909
|
+
case BIN(freezestring): {
|
910
|
+
return depth + 0;
|
911
|
+
}
|
912
|
+
case BIN(toregexp): {
|
913
|
+
int inc = 0;
|
914
|
+
int cnt = FIX2INT(opes[1]);
|
915
|
+
inc += 1 - cnt;;
|
916
|
+
return depth + inc;
|
917
|
+
}
|
918
|
+
case BIN(intern): {
|
919
|
+
return depth + 0;
|
920
|
+
}
|
921
|
+
case BIN(newarray): {
|
922
|
+
int inc = 0;
|
923
|
+
int num = FIX2INT(opes[0]);
|
924
|
+
inc += 1 - num;;
|
925
|
+
return depth + inc;
|
926
|
+
}
|
927
|
+
case BIN(duparray): {
|
928
|
+
return depth + 1;
|
929
|
+
}
|
930
|
+
case BIN(expandarray): {
|
931
|
+
int inc = 0;
|
932
|
+
int num = FIX2INT(opes[0]);
|
933
|
+
int flag = FIX2INT(opes[1]);
|
934
|
+
inc += num - 1 + (flag & 1 ? 1 : 0);;
|
935
|
+
return depth + inc;
|
936
|
+
}
|
937
|
+
case BIN(concatarray): {
|
938
|
+
return depth + -1;
|
939
|
+
}
|
940
|
+
case BIN(splatarray): {
|
941
|
+
return depth + 0;
|
942
|
+
}
|
943
|
+
case BIN(newhash): {
|
944
|
+
int inc = 0;
|
945
|
+
int num = FIX2INT(opes[0]);
|
946
|
+
inc += 1 - num;;
|
947
|
+
return depth + inc;
|
948
|
+
}
|
949
|
+
case BIN(newrange): {
|
950
|
+
return depth + -1;
|
951
|
+
}
|
952
|
+
case BIN(pop): {
|
953
|
+
return depth + -1;
|
954
|
+
}
|
955
|
+
case BIN(dup): {
|
956
|
+
return depth + 1;
|
957
|
+
}
|
958
|
+
case BIN(dupn): {
|
959
|
+
int inc = 0;
|
960
|
+
int n = FIX2INT(opes[0]);
|
961
|
+
inc += n;;
|
962
|
+
return depth + inc;
|
963
|
+
}
|
964
|
+
case BIN(swap): {
|
965
|
+
return depth + 0;
|
966
|
+
}
|
967
|
+
case BIN(reverse): {
|
968
|
+
int inc = 0;
|
969
|
+
inc += 0;;
|
970
|
+
return depth + inc;
|
971
|
+
}
|
972
|
+
case BIN(reput): {
|
973
|
+
int inc = 0;
|
974
|
+
inc += 0;;
|
975
|
+
return depth + inc;
|
976
|
+
}
|
977
|
+
case BIN(topn): {
|
978
|
+
int inc = 0;
|
979
|
+
inc += 1;;
|
980
|
+
return depth + inc;
|
981
|
+
}
|
982
|
+
case BIN(setn): {
|
983
|
+
int inc = 0;
|
984
|
+
inc += 0;
|
985
|
+
return depth + inc;
|
986
|
+
}
|
987
|
+
case BIN(adjuststack): {
|
988
|
+
int inc = 0;
|
989
|
+
int n = FIX2INT(opes[0]);
|
990
|
+
inc -= n;
|
991
|
+
return depth + inc;
|
992
|
+
}
|
993
|
+
case BIN(defined): {
|
994
|
+
return depth + 0;
|
995
|
+
}
|
996
|
+
case BIN(checkmatch): {
|
997
|
+
return depth + -1;
|
998
|
+
}
|
999
|
+
case BIN(checkkeyword): {
|
1000
|
+
return depth + 1;
|
1001
|
+
}
|
1002
|
+
case BIN(tracecoverage): {
|
1003
|
+
return depth + 0;
|
1004
|
+
}
|
1005
|
+
case BIN(defineclass): {
|
1006
|
+
return depth + -1;
|
1007
|
+
}
|
1008
|
+
case BIN(send): {
|
1009
|
+
int inc = 0;
|
1010
|
+
CALL_INFO ci = (CALL_INFO)(opes[0]);
|
1011
|
+
inc += - (int)(ci->orig_argc + ((ci->flag & VM_CALL_ARGS_BLOCKARG) ? 1 : 0));;
|
1012
|
+
return depth + inc;
|
1013
|
+
}
|
1014
|
+
case BIN(opt_str_freeze): {
|
1015
|
+
return depth + 1;
|
1016
|
+
}
|
1017
|
+
case BIN(opt_str_uminus): {
|
1018
|
+
return depth + 1;
|
1019
|
+
}
|
1020
|
+
case BIN(opt_newarray_max): {
|
1021
|
+
int inc = 0;
|
1022
|
+
int num = FIX2INT(opes[0]);
|
1023
|
+
inc += 1 - num;;
|
1024
|
+
return depth + inc;
|
1025
|
+
}
|
1026
|
+
case BIN(opt_newarray_min): {
|
1027
|
+
int inc = 0;
|
1028
|
+
int num = FIX2INT(opes[0]);
|
1029
|
+
inc += 1 - num;;
|
1030
|
+
return depth + inc;
|
1031
|
+
}
|
1032
|
+
case BIN(opt_send_without_block): {
|
1033
|
+
int inc = 0;
|
1034
|
+
CALL_INFO ci = (CALL_INFO)(opes[0]);
|
1035
|
+
inc += -ci->orig_argc;;
|
1036
|
+
return depth + inc;
|
1037
|
+
}
|
1038
|
+
case BIN(invokesuper): {
|
1039
|
+
int inc = 0;
|
1040
|
+
CALL_INFO ci = (CALL_INFO)(opes[0]);
|
1041
|
+
inc += - (int)(ci->orig_argc + ((ci->flag & VM_CALL_ARGS_BLOCKARG) ? 1 : 0));;
|
1042
|
+
return depth + inc;
|
1043
|
+
}
|
1044
|
+
case BIN(invokeblock): {
|
1045
|
+
int inc = 0;
|
1046
|
+
CALL_INFO ci = (CALL_INFO)(opes[0]);
|
1047
|
+
inc += 1 - ci->orig_argc;;
|
1048
|
+
return depth + inc;
|
1049
|
+
}
|
1050
|
+
case BIN(leave): {
|
1051
|
+
return depth + 0;
|
1052
|
+
}
|
1053
|
+
case BIN(throw): {
|
1054
|
+
return depth + 0;
|
1055
|
+
}
|
1056
|
+
case BIN(jump): {
|
1057
|
+
return depth + 0;
|
1058
|
+
}
|
1059
|
+
case BIN(branchif): {
|
1060
|
+
return depth + -1;
|
1061
|
+
}
|
1062
|
+
case BIN(branchunless): {
|
1063
|
+
return depth + -1;
|
1064
|
+
}
|
1065
|
+
case BIN(branchnil): {
|
1066
|
+
return depth + -1;
|
1067
|
+
}
|
1068
|
+
case BIN(branchiftype): {
|
1069
|
+
return depth + -1;
|
1070
|
+
}
|
1071
|
+
case BIN(getinlinecache): {
|
1072
|
+
return depth + 1;
|
1073
|
+
}
|
1074
|
+
case BIN(setinlinecache): {
|
1075
|
+
return depth + 0;
|
1076
|
+
}
|
1077
|
+
case BIN(once): {
|
1078
|
+
return depth + 1;
|
1079
|
+
}
|
1080
|
+
case BIN(opt_case_dispatch): {
|
1081
|
+
int inc = 0;
|
1082
|
+
inc += -1;;
|
1083
|
+
return depth + inc;
|
1084
|
+
}
|
1085
|
+
case BIN(opt_plus): {
|
1086
|
+
return depth + -1;
|
1087
|
+
}
|
1088
|
+
case BIN(opt_minus): {
|
1089
|
+
return depth + -1;
|
1090
|
+
}
|
1091
|
+
case BIN(opt_mult): {
|
1092
|
+
return depth + -1;
|
1093
|
+
}
|
1094
|
+
case BIN(opt_div): {
|
1095
|
+
return depth + -1;
|
1096
|
+
}
|
1097
|
+
case BIN(opt_mod): {
|
1098
|
+
return depth + -1;
|
1099
|
+
}
|
1100
|
+
case BIN(opt_eq): {
|
1101
|
+
return depth + -1;
|
1102
|
+
}
|
1103
|
+
case BIN(opt_neq): {
|
1104
|
+
return depth + -1;
|
1105
|
+
}
|
1106
|
+
case BIN(opt_lt): {
|
1107
|
+
return depth + -1;
|
1108
|
+
}
|
1109
|
+
case BIN(opt_le): {
|
1110
|
+
return depth + -1;
|
1111
|
+
}
|
1112
|
+
case BIN(opt_gt): {
|
1113
|
+
return depth + -1;
|
1114
|
+
}
|
1115
|
+
case BIN(opt_ge): {
|
1116
|
+
return depth + -1;
|
1117
|
+
}
|
1118
|
+
case BIN(opt_ltlt): {
|
1119
|
+
return depth + -1;
|
1120
|
+
}
|
1121
|
+
case BIN(opt_aref): {
|
1122
|
+
return depth + -1;
|
1123
|
+
}
|
1124
|
+
case BIN(opt_aset): {
|
1125
|
+
return depth + -2;
|
1126
|
+
}
|
1127
|
+
case BIN(opt_aset_with): {
|
1128
|
+
return depth + -1;
|
1129
|
+
}
|
1130
|
+
case BIN(opt_aref_with): {
|
1131
|
+
return depth + 0;
|
1132
|
+
}
|
1133
|
+
case BIN(opt_length): {
|
1134
|
+
return depth + 0;
|
1135
|
+
}
|
1136
|
+
case BIN(opt_size): {
|
1137
|
+
return depth + 0;
|
1138
|
+
}
|
1139
|
+
case BIN(opt_empty_p): {
|
1140
|
+
return depth + 0;
|
1141
|
+
}
|
1142
|
+
case BIN(opt_succ): {
|
1143
|
+
return depth + 0;
|
1144
|
+
}
|
1145
|
+
case BIN(opt_not): {
|
1146
|
+
return depth + 0;
|
1147
|
+
}
|
1148
|
+
case BIN(opt_regexpmatch1): {
|
1149
|
+
return depth + 0;
|
1150
|
+
}
|
1151
|
+
case BIN(opt_regexpmatch2): {
|
1152
|
+
return depth + -1;
|
1153
|
+
}
|
1154
|
+
case BIN(opt_call_c_function): {
|
1155
|
+
return depth + 0;
|
1156
|
+
}
|
1157
|
+
case BIN(bitblt): {
|
1158
|
+
return depth + 1;
|
1159
|
+
}
|
1160
|
+
case BIN(answer): {
|
1161
|
+
return depth + 1;
|
1162
|
+
}
|
1163
|
+
case BIN(getlocal_OP__WC__0): {
|
1164
|
+
return depth + 1;
|
1165
|
+
}
|
1166
|
+
case BIN(getlocal_OP__WC__1): {
|
1167
|
+
return depth + 1;
|
1168
|
+
}
|
1169
|
+
case BIN(setlocal_OP__WC__0): {
|
1170
|
+
return depth + -1;
|
1171
|
+
}
|
1172
|
+
case BIN(setlocal_OP__WC__1): {
|
1173
|
+
return depth + -1;
|
1174
|
+
}
|
1175
|
+
case BIN(putobject_OP_INT2FIX_O_0_C_): {
|
1176
|
+
return depth + 1;
|
1177
|
+
}
|
1178
|
+
case BIN(putobject_OP_INT2FIX_O_1_C_): {
|
1179
|
+
return depth + 1;
|
1180
|
+
}
|
1181
|
+
case BIN(trace_nop): {
|
1182
|
+
return depth + 0;
|
1183
|
+
}
|
1184
|
+
case BIN(trace_getlocal): {
|
1185
|
+
return depth + 1;
|
1186
|
+
}
|
1187
|
+
case BIN(trace_setlocal): {
|
1188
|
+
return depth + -1;
|
1189
|
+
}
|
1190
|
+
case BIN(trace_getblockparam): {
|
1191
|
+
return depth + 1;
|
1192
|
+
}
|
1193
|
+
case BIN(trace_setblockparam): {
|
1194
|
+
return depth + -1;
|
1195
|
+
}
|
1196
|
+
case BIN(trace_getspecial): {
|
1197
|
+
return depth + 1;
|
1198
|
+
}
|
1199
|
+
case BIN(trace_setspecial): {
|
1200
|
+
return depth + -1;
|
1201
|
+
}
|
1202
|
+
case BIN(trace_getinstancevariable): {
|
1203
|
+
return depth + 1;
|
1204
|
+
}
|
1205
|
+
case BIN(trace_setinstancevariable): {
|
1206
|
+
return depth + -1;
|
1207
|
+
}
|
1208
|
+
case BIN(trace_getclassvariable): {
|
1209
|
+
return depth + 1;
|
1210
|
+
}
|
1211
|
+
case BIN(trace_setclassvariable): {
|
1212
|
+
return depth + -1;
|
1213
|
+
}
|
1214
|
+
case BIN(trace_getconstant): {
|
1215
|
+
return depth + 0;
|
1216
|
+
}
|
1217
|
+
case BIN(trace_setconstant): {
|
1218
|
+
return depth + -2;
|
1219
|
+
}
|
1220
|
+
case BIN(trace_getglobal): {
|
1221
|
+
return depth + 1;
|
1222
|
+
}
|
1223
|
+
case BIN(trace_setglobal): {
|
1224
|
+
return depth + -1;
|
1225
|
+
}
|
1226
|
+
case BIN(trace_putnil): {
|
1227
|
+
return depth + 1;
|
1228
|
+
}
|
1229
|
+
case BIN(trace_putself): {
|
1230
|
+
return depth + 1;
|
1231
|
+
}
|
1232
|
+
case BIN(trace_putobject): {
|
1233
|
+
return depth + 1;
|
1234
|
+
}
|
1235
|
+
case BIN(trace_putspecialobject): {
|
1236
|
+
return depth + 1;
|
1237
|
+
}
|
1238
|
+
case BIN(trace_putiseq): {
|
1239
|
+
return depth + 1;
|
1240
|
+
}
|
1241
|
+
case BIN(trace_putstring): {
|
1242
|
+
return depth + 1;
|
1243
|
+
}
|
1244
|
+
case BIN(trace_concatstrings): {
|
1245
|
+
int inc = 0;
|
1246
|
+
int num = FIX2INT(opes[0]);
|
1247
|
+
inc += 1 - num;;
|
1248
|
+
return depth + inc;
|
1249
|
+
}
|
1250
|
+
case BIN(trace_tostring): {
|
1251
|
+
return depth + -1;
|
1252
|
+
}
|
1253
|
+
case BIN(trace_freezestring): {
|
1254
|
+
return depth + 0;
|
1255
|
+
}
|
1256
|
+
case BIN(trace_toregexp): {
|
1257
|
+
int inc = 0;
|
1258
|
+
int cnt = FIX2INT(opes[1]);
|
1259
|
+
inc += 1 - cnt;;
|
1260
|
+
return depth + inc;
|
1261
|
+
}
|
1262
|
+
case BIN(trace_intern): {
|
1263
|
+
return depth + 0;
|
1264
|
+
}
|
1265
|
+
case BIN(trace_newarray): {
|
1266
|
+
int inc = 0;
|
1267
|
+
int num = FIX2INT(opes[0]);
|
1268
|
+
inc += 1 - num;;
|
1269
|
+
return depth + inc;
|
1270
|
+
}
|
1271
|
+
case BIN(trace_duparray): {
|
1272
|
+
return depth + 1;
|
1273
|
+
}
|
1274
|
+
case BIN(trace_expandarray): {
|
1275
|
+
int inc = 0;
|
1276
|
+
int num = FIX2INT(opes[0]);
|
1277
|
+
int flag = FIX2INT(opes[1]);
|
1278
|
+
inc += num - 1 + (flag & 1 ? 1 : 0);;
|
1279
|
+
return depth + inc;
|
1280
|
+
}
|
1281
|
+
case BIN(trace_concatarray): {
|
1282
|
+
return depth + -1;
|
1283
|
+
}
|
1284
|
+
case BIN(trace_splatarray): {
|
1285
|
+
return depth + 0;
|
1286
|
+
}
|
1287
|
+
case BIN(trace_newhash): {
|
1288
|
+
int inc = 0;
|
1289
|
+
int num = FIX2INT(opes[0]);
|
1290
|
+
inc += 1 - num;;
|
1291
|
+
return depth + inc;
|
1292
|
+
}
|
1293
|
+
case BIN(trace_newrange): {
|
1294
|
+
return depth + -1;
|
1295
|
+
}
|
1296
|
+
case BIN(trace_pop): {
|
1297
|
+
return depth + -1;
|
1298
|
+
}
|
1299
|
+
case BIN(trace_dup): {
|
1300
|
+
return depth + 1;
|
1301
|
+
}
|
1302
|
+
case BIN(trace_dupn): {
|
1303
|
+
int inc = 0;
|
1304
|
+
int n = FIX2INT(opes[0]);
|
1305
|
+
inc += n;;
|
1306
|
+
return depth + inc;
|
1307
|
+
}
|
1308
|
+
case BIN(trace_swap): {
|
1309
|
+
return depth + 0;
|
1310
|
+
}
|
1311
|
+
case BIN(trace_reverse): {
|
1312
|
+
int inc = 0;
|
1313
|
+
inc += 0;;
|
1314
|
+
return depth + inc;
|
1315
|
+
}
|
1316
|
+
case BIN(trace_reput): {
|
1317
|
+
int inc = 0;
|
1318
|
+
inc += 0;;
|
1319
|
+
return depth + inc;
|
1320
|
+
}
|
1321
|
+
case BIN(trace_topn): {
|
1322
|
+
int inc = 0;
|
1323
|
+
inc += 1;;
|
1324
|
+
return depth + inc;
|
1325
|
+
}
|
1326
|
+
case BIN(trace_setn): {
|
1327
|
+
int inc = 0;
|
1328
|
+
inc += 0;
|
1329
|
+
return depth + inc;
|
1330
|
+
}
|
1331
|
+
case BIN(trace_adjuststack): {
|
1332
|
+
int inc = 0;
|
1333
|
+
int n = FIX2INT(opes[0]);
|
1334
|
+
inc -= n;
|
1335
|
+
return depth + inc;
|
1336
|
+
}
|
1337
|
+
case BIN(trace_defined): {
|
1338
|
+
return depth + 0;
|
1339
|
+
}
|
1340
|
+
case BIN(trace_checkmatch): {
|
1341
|
+
return depth + -1;
|
1342
|
+
}
|
1343
|
+
case BIN(trace_checkkeyword): {
|
1344
|
+
return depth + 1;
|
1345
|
+
}
|
1346
|
+
case BIN(trace_tracecoverage): {
|
1347
|
+
return depth + 0;
|
1348
|
+
}
|
1349
|
+
case BIN(trace_defineclass): {
|
1350
|
+
return depth + -1;
|
1351
|
+
}
|
1352
|
+
case BIN(trace_send): {
|
1353
|
+
int inc = 0;
|
1354
|
+
CALL_INFO ci = (CALL_INFO)(opes[0]);
|
1355
|
+
inc += - (int)(ci->orig_argc + ((ci->flag & VM_CALL_ARGS_BLOCKARG) ? 1 : 0));;
|
1356
|
+
return depth + inc;
|
1357
|
+
}
|
1358
|
+
case BIN(trace_opt_str_freeze): {
|
1359
|
+
return depth + 1;
|
1360
|
+
}
|
1361
|
+
case BIN(trace_opt_str_uminus): {
|
1362
|
+
return depth + 1;
|
1363
|
+
}
|
1364
|
+
case BIN(trace_opt_newarray_max): {
|
1365
|
+
int inc = 0;
|
1366
|
+
int num = FIX2INT(opes[0]);
|
1367
|
+
inc += 1 - num;;
|
1368
|
+
return depth + inc;
|
1369
|
+
}
|
1370
|
+
case BIN(trace_opt_newarray_min): {
|
1371
|
+
int inc = 0;
|
1372
|
+
int num = FIX2INT(opes[0]);
|
1373
|
+
inc += 1 - num;;
|
1374
|
+
return depth + inc;
|
1375
|
+
}
|
1376
|
+
case BIN(trace_opt_send_without_block): {
|
1377
|
+
int inc = 0;
|
1378
|
+
CALL_INFO ci = (CALL_INFO)(opes[0]);
|
1379
|
+
inc += -ci->orig_argc;;
|
1380
|
+
return depth + inc;
|
1381
|
+
}
|
1382
|
+
case BIN(trace_invokesuper): {
|
1383
|
+
int inc = 0;
|
1384
|
+
CALL_INFO ci = (CALL_INFO)(opes[0]);
|
1385
|
+
inc += - (int)(ci->orig_argc + ((ci->flag & VM_CALL_ARGS_BLOCKARG) ? 1 : 0));;
|
1386
|
+
return depth + inc;
|
1387
|
+
}
|
1388
|
+
case BIN(trace_invokeblock): {
|
1389
|
+
int inc = 0;
|
1390
|
+
CALL_INFO ci = (CALL_INFO)(opes[0]);
|
1391
|
+
inc += 1 - ci->orig_argc;;
|
1392
|
+
return depth + inc;
|
1393
|
+
}
|
1394
|
+
case BIN(trace_leave): {
|
1395
|
+
return depth + 0;
|
1396
|
+
}
|
1397
|
+
case BIN(trace_throw): {
|
1398
|
+
return depth + 0;
|
1399
|
+
}
|
1400
|
+
case BIN(trace_jump): {
|
1401
|
+
return depth + 0;
|
1402
|
+
}
|
1403
|
+
case BIN(trace_branchif): {
|
1404
|
+
return depth + -1;
|
1405
|
+
}
|
1406
|
+
case BIN(trace_branchunless): {
|
1407
|
+
return depth + -1;
|
1408
|
+
}
|
1409
|
+
case BIN(trace_branchnil): {
|
1410
|
+
return depth + -1;
|
1411
|
+
}
|
1412
|
+
case BIN(trace_branchiftype): {
|
1413
|
+
return depth + -1;
|
1414
|
+
}
|
1415
|
+
case BIN(trace_getinlinecache): {
|
1416
|
+
return depth + 1;
|
1417
|
+
}
|
1418
|
+
case BIN(trace_setinlinecache): {
|
1419
|
+
return depth + 0;
|
1420
|
+
}
|
1421
|
+
case BIN(trace_once): {
|
1422
|
+
return depth + 1;
|
1423
|
+
}
|
1424
|
+
case BIN(trace_opt_case_dispatch): {
|
1425
|
+
int inc = 0;
|
1426
|
+
inc += -1;;
|
1427
|
+
return depth + inc;
|
1428
|
+
}
|
1429
|
+
case BIN(trace_opt_plus): {
|
1430
|
+
return depth + -1;
|
1431
|
+
}
|
1432
|
+
case BIN(trace_opt_minus): {
|
1433
|
+
return depth + -1;
|
1434
|
+
}
|
1435
|
+
case BIN(trace_opt_mult): {
|
1436
|
+
return depth + -1;
|
1437
|
+
}
|
1438
|
+
case BIN(trace_opt_div): {
|
1439
|
+
return depth + -1;
|
1440
|
+
}
|
1441
|
+
case BIN(trace_opt_mod): {
|
1442
|
+
return depth + -1;
|
1443
|
+
}
|
1444
|
+
case BIN(trace_opt_eq): {
|
1445
|
+
return depth + -1;
|
1446
|
+
}
|
1447
|
+
case BIN(trace_opt_neq): {
|
1448
|
+
return depth + -1;
|
1449
|
+
}
|
1450
|
+
case BIN(trace_opt_lt): {
|
1451
|
+
return depth + -1;
|
1452
|
+
}
|
1453
|
+
case BIN(trace_opt_le): {
|
1454
|
+
return depth + -1;
|
1455
|
+
}
|
1456
|
+
case BIN(trace_opt_gt): {
|
1457
|
+
return depth + -1;
|
1458
|
+
}
|
1459
|
+
case BIN(trace_opt_ge): {
|
1460
|
+
return depth + -1;
|
1461
|
+
}
|
1462
|
+
case BIN(trace_opt_ltlt): {
|
1463
|
+
return depth + -1;
|
1464
|
+
}
|
1465
|
+
case BIN(trace_opt_aref): {
|
1466
|
+
return depth + -1;
|
1467
|
+
}
|
1468
|
+
case BIN(trace_opt_aset): {
|
1469
|
+
return depth + -2;
|
1470
|
+
}
|
1471
|
+
case BIN(trace_opt_aset_with): {
|
1472
|
+
return depth + -1;
|
1473
|
+
}
|
1474
|
+
case BIN(trace_opt_aref_with): {
|
1475
|
+
return depth + 0;
|
1476
|
+
}
|
1477
|
+
case BIN(trace_opt_length): {
|
1478
|
+
return depth + 0;
|
1479
|
+
}
|
1480
|
+
case BIN(trace_opt_size): {
|
1481
|
+
return depth + 0;
|
1482
|
+
}
|
1483
|
+
case BIN(trace_opt_empty_p): {
|
1484
|
+
return depth + 0;
|
1485
|
+
}
|
1486
|
+
case BIN(trace_opt_succ): {
|
1487
|
+
return depth + 0;
|
1488
|
+
}
|
1489
|
+
case BIN(trace_opt_not): {
|
1490
|
+
return depth + 0;
|
1491
|
+
}
|
1492
|
+
case BIN(trace_opt_regexpmatch1): {
|
1493
|
+
return depth + 0;
|
1494
|
+
}
|
1495
|
+
case BIN(trace_opt_regexpmatch2): {
|
1496
|
+
return depth + -1;
|
1497
|
+
}
|
1498
|
+
case BIN(trace_opt_call_c_function): {
|
1499
|
+
return depth + 0;
|
1500
|
+
}
|
1501
|
+
case BIN(trace_bitblt): {
|
1502
|
+
return depth + 1;
|
1503
|
+
}
|
1504
|
+
case BIN(trace_answer): {
|
1505
|
+
return depth + 1;
|
1506
|
+
}
|
1507
|
+
case BIN(trace_getlocal_OP__WC__0): {
|
1508
|
+
return depth + 1;
|
1509
|
+
}
|
1510
|
+
case BIN(trace_getlocal_OP__WC__1): {
|
1511
|
+
return depth + 1;
|
1512
|
+
}
|
1513
|
+
case BIN(trace_setlocal_OP__WC__0): {
|
1514
|
+
return depth + -1;
|
1515
|
+
}
|
1516
|
+
case BIN(trace_setlocal_OP__WC__1): {
|
1517
|
+
return depth + -1;
|
1518
|
+
}
|
1519
|
+
case BIN(trace_putobject_OP_INT2FIX_O_0_C_): {
|
1520
|
+
return depth + 1;
|
1521
|
+
}
|
1522
|
+
case BIN(trace_putobject_OP_INT2FIX_O_1_C_): {
|
1523
|
+
return depth + 1;
|
1524
|
+
}
|
1525
|
+
default:
|
1526
|
+
rb_bug("insn_sp_increase: unreachable");
|
1527
|
+
}
|
1528
|
+
return 0;
|
1529
|
+
}
|
1530
|
+
#endif
|
1531
|
+
|
1532
|
+
/* some utilities */
|
1533
|
+
|
1534
|
+
static int
|
1535
|
+
insn_len(VALUE insn)
|
1536
|
+
{
|
1537
|
+
return (unsigned char)insn_operand_info[(int)insn][0];
|
1538
|
+
}
|
1539
|
+
|
1540
|
+
static const char *
|
1541
|
+
insn_name(VALUE insn)
|
1542
|
+
{
|
1543
|
+
return insn_name_info[(int)insn];
|
1544
|
+
}
|
1545
|
+
|
1546
|
+
static const char *
|
1547
|
+
insn_op_types(VALUE insn)
|
1548
|
+
{
|
1549
|
+
return insn_operand_info[(int)insn]+1;
|
1550
|
+
}
|
1551
|
+
|
1552
|
+
static int
|
1553
|
+
insn_op_type(VALUE insn, long pos)
|
1554
|
+
{
|
1555
|
+
int len = insn_len(insn) - 1;
|
1556
|
+
if (pos < len) {
|
1557
|
+
return insn_operand_info[(int)insn][pos+1];
|
1558
|
+
}
|
1559
|
+
else{
|
1560
|
+
return 0;
|
1561
|
+
}
|
1562
|
+
}
|
1563
|
+
|
1564
|
+
#ifdef USE_INSN_RET_NUM
|
1565
|
+
static int
|
1566
|
+
insn_ret_num(VALUE insn)
|
1567
|
+
{
|
1568
|
+
return insn_stack_push_num_info[(int)insn];
|
1569
|
+
}
|
1570
|
+
#endif
|