debase-ruby_core_source 0.7.8 → 0.7.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (127) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +6 -0
  3. data/Rakefile +6 -3
  4. data/lib/debase/ruby_core_source/ruby-2.0.0-p645/addr2line.h +21 -0
  5. data/lib/debase/ruby_core_source/ruby-2.0.0-p645/constant.h +36 -0
  6. data/lib/debase/ruby_core_source/ruby-2.0.0-p645/dln.h +50 -0
  7. data/lib/debase/ruby_core_source/ruby-2.0.0-p645/encdb.h +169 -0
  8. data/lib/debase/ruby_core_source/ruby-2.0.0-p645/eval_intern.h +241 -0
  9. data/lib/debase/ruby_core_source/ruby-2.0.0-p645/gc.h +104 -0
  10. data/lib/debase/ruby_core_source/ruby-2.0.0-p645/id.h +135 -0
  11. data/lib/debase/ruby_core_source/ruby-2.0.0-p645/insns.inc +187 -0
  12. data/lib/debase/ruby_core_source/ruby-2.0.0-p645/insns_info.inc +724 -0
  13. data/lib/debase/ruby_core_source/ruby-2.0.0-p645/internal.h +395 -0
  14. data/lib/debase/ruby_core_source/ruby-2.0.0-p645/iseq.h +140 -0
  15. data/lib/debase/ruby_core_source/ruby-2.0.0-p645/known_errors.inc +731 -0
  16. data/lib/debase/ruby_core_source/ruby-2.0.0-p645/method.h +141 -0
  17. data/lib/debase/ruby_core_source/ruby-2.0.0-p645/node.h +541 -0
  18. data/lib/debase/ruby_core_source/ruby-2.0.0-p645/node_name.inc +212 -0
  19. data/lib/debase/ruby_core_source/ruby-2.0.0-p645/opt_sc.inc +702 -0
  20. data/lib/debase/ruby_core_source/ruby-2.0.0-p645/optinsn.inc +83 -0
  21. data/lib/debase/ruby_core_source/ruby-2.0.0-p645/optunifs.inc +120 -0
  22. data/lib/debase/ruby_core_source/ruby-2.0.0-p645/parse.h +181 -0
  23. data/lib/debase/ruby_core_source/ruby-2.0.0-p645/probes_helper.h +67 -0
  24. data/lib/debase/ruby_core_source/ruby-2.0.0-p645/regenc.h +227 -0
  25. data/lib/debase/ruby_core_source/ruby-2.0.0-p645/regint.h +915 -0
  26. data/lib/debase/ruby_core_source/ruby-2.0.0-p645/regparse.h +367 -0
  27. data/lib/debase/ruby_core_source/ruby-2.0.0-p645/revision.h +1 -0
  28. data/lib/debase/ruby_core_source/ruby-2.0.0-p645/ruby_atomic.h +170 -0
  29. data/lib/debase/ruby_core_source/ruby-2.0.0-p645/siphash.h +48 -0
  30. data/lib/debase/ruby_core_source/ruby-2.0.0-p645/thread_pthread.h +56 -0
  31. data/lib/debase/ruby_core_source/ruby-2.0.0-p645/thread_win32.h +45 -0
  32. data/lib/debase/ruby_core_source/ruby-2.0.0-p645/timev.h +21 -0
  33. data/lib/debase/ruby_core_source/ruby-2.0.0-p645/transcode_data.h +127 -0
  34. data/lib/debase/ruby_core_source/ruby-2.0.0-p645/transdb.h +193 -0
  35. data/lib/debase/ruby_core_source/ruby-2.0.0-p645/version.h +52 -0
  36. data/lib/debase/ruby_core_source/ruby-2.0.0-p645/vm.inc +3196 -0
  37. data/lib/debase/ruby_core_source/ruby-2.0.0-p645/vm_core.h +1020 -0
  38. data/lib/debase/ruby_core_source/ruby-2.0.0-p645/vm_debug.h +41 -0
  39. data/lib/debase/ruby_core_source/ruby-2.0.0-p645/vm_exec.h +173 -0
  40. data/lib/debase/ruby_core_source/ruby-2.0.0-p645/vm_insnhelper.h +274 -0
  41. data/lib/debase/ruby_core_source/ruby-2.0.0-p645/vm_opts.h +56 -0
  42. data/lib/debase/ruby_core_source/ruby-2.0.0-p645/vmtc.inc +101 -0
  43. data/lib/debase/ruby_core_source/ruby-2.1.6-p336/addr2line.h +21 -0
  44. data/lib/debase/ruby_core_source/ruby-2.1.6-p336/constant.h +36 -0
  45. data/lib/debase/ruby_core_source/ruby-2.1.6-p336/dln.h +51 -0
  46. data/lib/debase/ruby_core_source/ruby-2.1.6-p336/encdb.h +170 -0
  47. data/lib/debase/ruby_core_source/ruby-2.1.6-p336/eval_intern.h +270 -0
  48. data/lib/debase/ruby_core_source/ruby-2.1.6-p336/gc.h +101 -0
  49. data/lib/debase/ruby_core_source/ruby-2.1.6-p336/id.h +171 -0
  50. data/lib/debase/ruby_core_source/ruby-2.1.6-p336/insns.inc +189 -0
  51. data/lib/debase/ruby_core_source/ruby-2.1.6-p336/insns_info.inc +731 -0
  52. data/lib/debase/ruby_core_source/ruby-2.1.6-p336/internal.h +892 -0
  53. data/lib/debase/ruby_core_source/ruby-2.1.6-p336/iseq.h +136 -0
  54. data/lib/debase/ruby_core_source/ruby-2.1.6-p336/known_errors.inc +731 -0
  55. data/lib/debase/ruby_core_source/ruby-2.1.6-p336/method.h +145 -0
  56. data/lib/debase/ruby_core_source/ruby-2.1.6-p336/node.h +543 -0
  57. data/lib/debase/ruby_core_source/ruby-2.1.6-p336/node_name.inc +212 -0
  58. data/lib/debase/ruby_core_source/ruby-2.1.6-p336/opt_sc.inc +710 -0
  59. data/lib/debase/ruby_core_source/ruby-2.1.6-p336/optinsn.inc +83 -0
  60. data/lib/debase/ruby_core_source/ruby-2.1.6-p336/optunifs.inc +121 -0
  61. data/lib/debase/ruby_core_source/ruby-2.1.6-p336/parse.h +183 -0
  62. data/lib/debase/ruby_core_source/ruby-2.1.6-p336/probes_helper.h +67 -0
  63. data/lib/debase/ruby_core_source/ruby-2.1.6-p336/regenc.h +223 -0
  64. data/lib/debase/ruby_core_source/ruby-2.1.6-p336/regint.h +911 -0
  65. data/lib/debase/ruby_core_source/ruby-2.1.6-p336/regparse.h +363 -0
  66. data/lib/debase/ruby_core_source/ruby-2.1.6-p336/revision.h +1 -0
  67. data/lib/debase/ruby_core_source/ruby-2.1.6-p336/ruby_atomic.h +170 -0
  68. data/lib/debase/ruby_core_source/ruby-2.1.6-p336/siphash.h +48 -0
  69. data/lib/debase/ruby_core_source/ruby-2.1.6-p336/thread_native.h +23 -0
  70. data/lib/debase/ruby_core_source/ruby-2.1.6-p336/thread_pthread.h +56 -0
  71. data/lib/debase/ruby_core_source/ruby-2.1.6-p336/thread_win32.h +45 -0
  72. data/lib/debase/ruby_core_source/ruby-2.1.6-p336/timev.h +42 -0
  73. data/lib/debase/ruby_core_source/ruby-2.1.6-p336/transcode_data.h +123 -0
  74. data/lib/debase/ruby_core_source/ruby-2.1.6-p336/transdb.h +193 -0
  75. data/lib/debase/ruby_core_source/ruby-2.1.6-p336/version.h +52 -0
  76. data/lib/debase/ruby_core_source/ruby-2.1.6-p336/vm.inc +3243 -0
  77. data/lib/debase/ruby_core_source/ruby-2.1.6-p336/vm_core.h +1057 -0
  78. data/lib/debase/ruby_core_source/ruby-2.1.6-p336/vm_debug.h +37 -0
  79. data/lib/debase/ruby_core_source/ruby-2.1.6-p336/vm_exec.h +182 -0
  80. data/lib/debase/ruby_core_source/ruby-2.1.6-p336/vm_insnhelper.h +273 -0
  81. data/lib/debase/ruby_core_source/ruby-2.1.6-p336/vm_opts.h +56 -0
  82. data/lib/debase/ruby_core_source/ruby-2.1.6-p336/vmtc.inc +102 -0
  83. data/lib/debase/ruby_core_source/ruby-2.2.2-p95/addr2line.h +21 -0
  84. data/lib/debase/ruby_core_source/ruby-2.2.2-p95/ccan/build_assert/build_assert.h +40 -0
  85. data/lib/debase/ruby_core_source/ruby-2.2.2-p95/ccan/check_type/check_type.h +63 -0
  86. data/lib/debase/ruby_core_source/ruby-2.2.2-p95/ccan/container_of/container_of.h +142 -0
  87. data/lib/debase/ruby_core_source/ruby-2.2.2-p95/ccan/list/list.h +635 -0
  88. data/lib/debase/ruby_core_source/ruby-2.2.2-p95/ccan/str/str.h +16 -0
  89. data/lib/debase/ruby_core_source/ruby-2.2.2-p95/constant.h +43 -0
  90. data/lib/debase/ruby_core_source/ruby-2.2.2-p95/dln.h +51 -0
  91. data/lib/debase/ruby_core_source/ruby-2.2.2-p95/eval_intern.h +275 -0
  92. data/lib/debase/ruby_core_source/ruby-2.2.2-p95/gc.h +107 -0
  93. data/lib/debase/ruby_core_source/ruby-2.2.2-p95/id.h +210 -0
  94. data/lib/debase/ruby_core_source/ruby-2.2.2-p95/insns.inc +107 -0
  95. data/lib/debase/ruby_core_source/ruby-2.2.2-p95/insns_info.inc +752 -0
  96. data/lib/debase/ruby_core_source/ruby-2.2.2-p95/internal.h +1185 -0
  97. data/lib/debase/ruby_core_source/ruby-2.2.2-p95/iseq.h +158 -0
  98. data/lib/debase/ruby_core_source/ruby-2.2.2-p95/known_errors.inc +746 -0
  99. data/lib/debase/ruby_core_source/ruby-2.2.2-p95/method.h +144 -0
  100. data/lib/debase/ruby_core_source/ruby-2.2.2-p95/node.h +544 -0
  101. data/lib/debase/ruby_core_source/ruby-2.2.2-p95/node_name.inc +212 -0
  102. data/lib/debase/ruby_core_source/ruby-2.2.2-p95/opt_sc.inc +734 -0
  103. data/lib/debase/ruby_core_source/ruby-2.2.2-p95/optinsn.inc +83 -0
  104. data/lib/debase/ruby_core_source/ruby-2.2.2-p95/optunifs.inc +124 -0
  105. data/lib/debase/ruby_core_source/ruby-2.2.2-p95/parse.h +184 -0
  106. data/lib/debase/ruby_core_source/ruby-2.2.2-p95/probes_helper.h +67 -0
  107. data/lib/debase/ruby_core_source/ruby-2.2.2-p95/regenc.h +234 -0
  108. data/lib/debase/ruby_core_source/ruby-2.2.2-p95/regint.h +972 -0
  109. data/lib/debase/ruby_core_source/ruby-2.2.2-p95/regparse.h +363 -0
  110. data/lib/debase/ruby_core_source/ruby-2.2.2-p95/revision.h +1 -0
  111. data/lib/debase/ruby_core_source/ruby-2.2.2-p95/ruby_atomic.h +170 -0
  112. data/lib/debase/ruby_core_source/ruby-2.2.2-p95/siphash.h +48 -0
  113. data/lib/debase/ruby_core_source/ruby-2.2.2-p95/symbol.h +87 -0
  114. data/lib/debase/ruby_core_source/ruby-2.2.2-p95/thread_pthread.h +54 -0
  115. data/lib/debase/ruby_core_source/ruby-2.2.2-p95/thread_win32.h +36 -0
  116. data/lib/debase/ruby_core_source/ruby-2.2.2-p95/timev.h +42 -0
  117. data/lib/debase/ruby_core_source/ruby-2.2.2-p95/transcode_data.h +123 -0
  118. data/lib/debase/ruby_core_source/ruby-2.2.2-p95/version.h +52 -0
  119. data/lib/debase/ruby_core_source/ruby-2.2.2-p95/vm.inc +3353 -0
  120. data/lib/debase/ruby_core_source/ruby-2.2.2-p95/vm_core.h +1161 -0
  121. data/lib/debase/ruby_core_source/ruby-2.2.2-p95/vm_debug.h +37 -0
  122. data/lib/debase/ruby_core_source/ruby-2.2.2-p95/vm_exec.h +182 -0
  123. data/lib/debase/ruby_core_source/ruby-2.2.2-p95/vm_insnhelper.h +233 -0
  124. data/lib/debase/ruby_core_source/ruby-2.2.2-p95/vm_opts.h +56 -0
  125. data/lib/debase/ruby_core_source/ruby-2.2.2-p95/vmtc.inc +105 -0
  126. data/lib/debase/ruby_core_source/version.rb +1 -1
  127. metadata +124 -2
@@ -0,0 +1,731 @@
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 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_CDHASH 'H'
21
+ #define TS_ISEQ 'S'
22
+ #define TS_VARIABLE '.'
23
+ #define TS_FUNCPTR 'F'
24
+
25
+ static const char *const insn_name_info[] = {
26
+ "nop",
27
+ "getlocal",
28
+ "setlocal",
29
+ "getspecial",
30
+ "setspecial",
31
+ "getinstancevariable",
32
+ "setinstancevariable",
33
+ "getclassvariable",
34
+ "setclassvariable",
35
+ "getconstant",
36
+ "setconstant",
37
+ "getglobal",
38
+ "setglobal",
39
+ "putnil",
40
+ "putself",
41
+ "putobject",
42
+ "putspecialobject",
43
+ "putiseq",
44
+ "putstring",
45
+ "concatstrings",
46
+ "tostring",
47
+ "toregexp",
48
+ "newarray",
49
+ "duparray",
50
+ "expandarray",
51
+ "concatarray",
52
+ "splatarray",
53
+ "newhash",
54
+ "newrange",
55
+ "pop",
56
+ "dup",
57
+ "dupn",
58
+ "swap",
59
+ "reput",
60
+ "topn",
61
+ "setn",
62
+ "adjuststack",
63
+ "defined",
64
+ "checkmatch",
65
+ "trace",
66
+ "defineclass",
67
+ "send",
68
+ "opt_str_freeze",
69
+ "opt_send_simple",
70
+ "invokesuper",
71
+ "invokeblock",
72
+ "leave",
73
+ "throw",
74
+ "jump",
75
+ "branchif",
76
+ "branchunless",
77
+ "getinlinecache",
78
+ "setinlinecache",
79
+ "once",
80
+ "opt_case_dispatch",
81
+ "opt_plus",
82
+ "opt_minus",
83
+ "opt_mult",
84
+ "opt_div",
85
+ "opt_mod",
86
+ "opt_eq",
87
+ "opt_neq",
88
+ "opt_lt",
89
+ "opt_le",
90
+ "opt_gt",
91
+ "opt_ge",
92
+ "opt_ltlt",
93
+ "opt_aref",
94
+ "opt_aset",
95
+ "opt_length",
96
+ "opt_size",
97
+ "opt_empty_p",
98
+ "opt_succ",
99
+ "opt_not",
100
+ "opt_regexpmatch1",
101
+ "opt_regexpmatch2",
102
+ "opt_call_c_function",
103
+ "bitblt",
104
+ "answer",
105
+ "getlocal_OP__WC__0",
106
+ "getlocal_OP__WC__1",
107
+ "setlocal_OP__WC__0",
108
+ "setlocal_OP__WC__1",
109
+ "putobject_OP_INT2FIX_O_0_C_",
110
+ "putobject_OP_INT2FIX_O_1_C_",
111
+
112
+ };
113
+
114
+ static const char *const insn_operand_info[] = {
115
+ "",
116
+ "LN",
117
+ "LN",
118
+ "NN",
119
+ "N",
120
+ "IK",
121
+ "IK",
122
+ "I",
123
+ "I",
124
+ "I",
125
+ "I",
126
+ "G",
127
+ "G",
128
+ "",
129
+ "",
130
+ "V",
131
+ "N",
132
+ "S",
133
+ "V",
134
+ "N",
135
+ "",
136
+ "NN",
137
+ "N",
138
+ "V",
139
+ "NN",
140
+ "",
141
+ "V",
142
+ "N",
143
+ "N",
144
+ "",
145
+ "",
146
+ "N",
147
+ "",
148
+ "",
149
+ "N",
150
+ "N",
151
+ "N",
152
+ "NVV",
153
+ "N",
154
+ "N",
155
+ "ISN",
156
+ "C",
157
+ "V",
158
+ "C",
159
+ "C",
160
+ "C",
161
+ "",
162
+ "N",
163
+ "O",
164
+ "O",
165
+ "O",
166
+ "OK",
167
+ "K",
168
+ "SK",
169
+ "HO",
170
+ "C",
171
+ "C",
172
+ "C",
173
+ "C",
174
+ "C",
175
+ "C",
176
+ "CC",
177
+ "C",
178
+ "C",
179
+ "C",
180
+ "C",
181
+ "C",
182
+ "C",
183
+ "C",
184
+ "C",
185
+ "C",
186
+ "C",
187
+ "C",
188
+ "C",
189
+ "V",
190
+ "C",
191
+ "F",
192
+ "",
193
+ "",
194
+ "L",
195
+ "L",
196
+ "L",
197
+ "L",
198
+ "",
199
+ "",
200
+
201
+ };
202
+
203
+ static const int insn_len_info[] = {
204
+ 1,
205
+ 3,
206
+ 3,
207
+ 3,
208
+ 2,
209
+ 3,
210
+ 3,
211
+ 2,
212
+ 2,
213
+ 2,
214
+ 2,
215
+ 2,
216
+ 2,
217
+ 1,
218
+ 1,
219
+ 2,
220
+ 2,
221
+ 2,
222
+ 2,
223
+ 2,
224
+ 1,
225
+ 3,
226
+ 2,
227
+ 2,
228
+ 3,
229
+ 1,
230
+ 2,
231
+ 2,
232
+ 2,
233
+ 1,
234
+ 1,
235
+ 2,
236
+ 1,
237
+ 1,
238
+ 2,
239
+ 2,
240
+ 2,
241
+ 4,
242
+ 2,
243
+ 2,
244
+ 4,
245
+ 2,
246
+ 2,
247
+ 2,
248
+ 2,
249
+ 2,
250
+ 1,
251
+ 2,
252
+ 2,
253
+ 2,
254
+ 2,
255
+ 3,
256
+ 2,
257
+ 3,
258
+ 3,
259
+ 2,
260
+ 2,
261
+ 2,
262
+ 2,
263
+ 2,
264
+ 2,
265
+ 3,
266
+ 2,
267
+ 2,
268
+ 2,
269
+ 2,
270
+ 2,
271
+ 2,
272
+ 2,
273
+ 2,
274
+ 2,
275
+ 2,
276
+ 2,
277
+ 2,
278
+ 2,
279
+ 2,
280
+ 2,
281
+ 1,
282
+ 1,
283
+ 2,
284
+ 2,
285
+ 2,
286
+ 2,
287
+ 1,
288
+ 1,
289
+
290
+ };
291
+
292
+ #ifdef USE_INSN_RET_NUM
293
+ static const int insn_stack_push_num_info[] = {
294
+ 0,
295
+ 1,
296
+ 0,
297
+ 1,
298
+ 0,
299
+ 1,
300
+ 0,
301
+ 1,
302
+ 0,
303
+ 1,
304
+ 0,
305
+ 1,
306
+ 0,
307
+ 1,
308
+ 1,
309
+ 1,
310
+ 1,
311
+ 1,
312
+ 1,
313
+ 1,
314
+ 1,
315
+ 1,
316
+ 1,
317
+ 1,
318
+ 1,
319
+ 1,
320
+ 1,
321
+ 1,
322
+ 1,
323
+ 0,
324
+ 2,
325
+ 1,
326
+ 2,
327
+ 1,
328
+ 1,
329
+ 1,
330
+ 1,
331
+ 1,
332
+ 1,
333
+ 0,
334
+ 1,
335
+ 1,
336
+ 1,
337
+ 1,
338
+ 1,
339
+ 1,
340
+ 1,
341
+ 1,
342
+ 0,
343
+ 0,
344
+ 0,
345
+ 1,
346
+ 1,
347
+ 1,
348
+ 0,
349
+ 1,
350
+ 1,
351
+ 1,
352
+ 1,
353
+ 1,
354
+ 1,
355
+ 1,
356
+ 1,
357
+ 1,
358
+ 1,
359
+ 1,
360
+ 1,
361
+ 1,
362
+ 1,
363
+ 1,
364
+ 1,
365
+ 1,
366
+ 1,
367
+ 1,
368
+ 1,
369
+ 1,
370
+ 0,
371
+ 1,
372
+ 1,
373
+ 1,
374
+ 1,
375
+ 0,
376
+ 0,
377
+ 1,
378
+ 1,
379
+
380
+ };
381
+ #endif
382
+
383
+ #ifdef USE_INSN_STACK_INCREASE
384
+ static int
385
+ insn_stack_increase(int depth, int insn, VALUE *opes)
386
+ {
387
+ switch(insn){
388
+ case BIN(nop):{
389
+ return depth + 0;
390
+ }
391
+ case BIN(getlocal):{
392
+ return depth + 1;
393
+ }
394
+ case BIN(setlocal):{
395
+ return depth + -1;
396
+ }
397
+ case BIN(getspecial):{
398
+ return depth + 1;
399
+ }
400
+ case BIN(setspecial):{
401
+ return depth + -1;
402
+ }
403
+ case BIN(getinstancevariable):{
404
+ return depth + 1;
405
+ }
406
+ case BIN(setinstancevariable):{
407
+ return depth + -1;
408
+ }
409
+ case BIN(getclassvariable):{
410
+ return depth + 1;
411
+ }
412
+ case BIN(setclassvariable):{
413
+ return depth + -1;
414
+ }
415
+ case BIN(getconstant):{
416
+ return depth + 0;
417
+ }
418
+ case BIN(setconstant):{
419
+ return depth + -2;
420
+ }
421
+ case BIN(getglobal):{
422
+ return depth + 1;
423
+ }
424
+ case BIN(setglobal):{
425
+ return depth + -1;
426
+ }
427
+ case BIN(putnil):{
428
+ return depth + 1;
429
+ }
430
+ case BIN(putself):{
431
+ return depth + 1;
432
+ }
433
+ case BIN(putobject):{
434
+ return depth + 1;
435
+ }
436
+ case BIN(putspecialobject):{
437
+ return depth + 1;
438
+ }
439
+ case BIN(putiseq):{
440
+ return depth + 1;
441
+ }
442
+ case BIN(putstring):{
443
+ return depth + 1;
444
+ }
445
+ case BIN(concatstrings):{
446
+ int inc = 0;
447
+ int num = FIX2INT(opes[0]);
448
+ inc += 1 - num;;
449
+ return depth + inc;
450
+ }
451
+ case BIN(tostring):{
452
+ return depth + 0;
453
+ }
454
+ case BIN(toregexp):{
455
+ int inc = 0;
456
+ int cnt = FIX2INT(opes[1]);
457
+ inc += 1 - cnt;;
458
+ return depth + inc;
459
+ }
460
+ case BIN(newarray):{
461
+ int inc = 0;
462
+ int num = FIX2INT(opes[0]);
463
+ inc += 1 - num;;
464
+ return depth + inc;
465
+ }
466
+ case BIN(duparray):{
467
+ return depth + 1;
468
+ }
469
+ case BIN(expandarray):{
470
+ int inc = 0;
471
+ int num = FIX2INT(opes[0]);
472
+ int flag = FIX2INT(opes[1]);
473
+ inc += num - 1 + (flag & 1 ? 1 : 0);;
474
+ return depth + inc;
475
+ }
476
+ case BIN(concatarray):{
477
+ return depth + -1;
478
+ }
479
+ case BIN(splatarray):{
480
+ return depth + 0;
481
+ }
482
+ case BIN(newhash):{
483
+ int inc = 0;
484
+ int num = FIX2INT(opes[0]);
485
+ inc += 1 - num;;
486
+ return depth + inc;
487
+ }
488
+ case BIN(newrange):{
489
+ return depth + -1;
490
+ }
491
+ case BIN(pop):{
492
+ return depth + -1;
493
+ }
494
+ case BIN(dup):{
495
+ return depth + 1;
496
+ }
497
+ case BIN(dupn):{
498
+ int inc = 0;
499
+ int n = FIX2INT(opes[0]);
500
+ inc += n;;
501
+ return depth + inc;
502
+ }
503
+ case BIN(swap):{
504
+ return depth + 0;
505
+ }
506
+ case BIN(reput):{
507
+ int inc = 0;
508
+ inc += 0;;
509
+ return depth + inc;
510
+ }
511
+ case BIN(topn):{
512
+ int inc = 0;
513
+ inc += 1;;
514
+ return depth + inc;
515
+ }
516
+ case BIN(setn):{
517
+ int inc = 0;
518
+ inc += 0;
519
+ return depth + inc;
520
+ }
521
+ case BIN(adjuststack):{
522
+ int inc = 0;
523
+ int n = FIX2INT(opes[0]);
524
+ inc -= n;
525
+ return depth + inc;
526
+ }
527
+ case BIN(defined):{
528
+ return depth + 0;
529
+ }
530
+ case BIN(checkmatch):{
531
+ return depth + -1;
532
+ }
533
+ case BIN(trace):{
534
+ return depth + 0;
535
+ }
536
+ case BIN(defineclass):{
537
+ return depth + -1;
538
+ }
539
+ case BIN(send):{
540
+ int inc = 0;
541
+ CALL_INFO ci = (CALL_INFO)(opes[0]);
542
+ inc += - (int)(ci->orig_argc + ((ci->flag & VM_CALL_ARGS_BLOCKARG) ? 1 : 0));;
543
+ return depth + inc;
544
+ }
545
+ case BIN(opt_str_freeze):{
546
+ return depth + 1;
547
+ }
548
+ case BIN(opt_send_simple):{
549
+ int inc = 0;
550
+ CALL_INFO ci = (CALL_INFO)(opes[0]);
551
+ inc += -ci->orig_argc;;
552
+ return depth + inc;
553
+ }
554
+ case BIN(invokesuper):{
555
+ int inc = 0;
556
+ CALL_INFO ci = (CALL_INFO)(opes[0]);
557
+ inc += - (int)(ci->orig_argc + ((ci->flag & VM_CALL_ARGS_BLOCKARG) ? 1 : 0));;
558
+ return depth + inc;
559
+ }
560
+ case BIN(invokeblock):{
561
+ int inc = 0;
562
+ CALL_INFO ci = (CALL_INFO)(opes[0]);
563
+ inc += 1 - ci->orig_argc;;
564
+ return depth + inc;
565
+ }
566
+ case BIN(leave):{
567
+ return depth + 0;
568
+ }
569
+ case BIN(throw):{
570
+ return depth + 0;
571
+ }
572
+ case BIN(jump):{
573
+ return depth + 0;
574
+ }
575
+ case BIN(branchif):{
576
+ return depth + -1;
577
+ }
578
+ case BIN(branchunless):{
579
+ return depth + -1;
580
+ }
581
+ case BIN(getinlinecache):{
582
+ return depth + 1;
583
+ }
584
+ case BIN(setinlinecache):{
585
+ return depth + 0;
586
+ }
587
+ case BIN(once):{
588
+ return depth + 1;
589
+ }
590
+ case BIN(opt_case_dispatch):{
591
+ int inc = 0;
592
+ inc += -1;;
593
+ return depth + inc;
594
+ }
595
+ case BIN(opt_plus):{
596
+ return depth + -1;
597
+ }
598
+ case BIN(opt_minus):{
599
+ return depth + -1;
600
+ }
601
+ case BIN(opt_mult):{
602
+ return depth + -1;
603
+ }
604
+ case BIN(opt_div):{
605
+ return depth + -1;
606
+ }
607
+ case BIN(opt_mod):{
608
+ return depth + -1;
609
+ }
610
+ case BIN(opt_eq):{
611
+ return depth + -1;
612
+ }
613
+ case BIN(opt_neq):{
614
+ return depth + -1;
615
+ }
616
+ case BIN(opt_lt):{
617
+ return depth + -1;
618
+ }
619
+ case BIN(opt_le):{
620
+ return depth + -1;
621
+ }
622
+ case BIN(opt_gt):{
623
+ return depth + -1;
624
+ }
625
+ case BIN(opt_ge):{
626
+ return depth + -1;
627
+ }
628
+ case BIN(opt_ltlt):{
629
+ return depth + -1;
630
+ }
631
+ case BIN(opt_aref):{
632
+ return depth + -1;
633
+ }
634
+ case BIN(opt_aset):{
635
+ return depth + -2;
636
+ }
637
+ case BIN(opt_length):{
638
+ return depth + 0;
639
+ }
640
+ case BIN(opt_size):{
641
+ return depth + 0;
642
+ }
643
+ case BIN(opt_empty_p):{
644
+ return depth + 0;
645
+ }
646
+ case BIN(opt_succ):{
647
+ return depth + 0;
648
+ }
649
+ case BIN(opt_not):{
650
+ return depth + 0;
651
+ }
652
+ case BIN(opt_regexpmatch1):{
653
+ return depth + 0;
654
+ }
655
+ case BIN(opt_regexpmatch2):{
656
+ return depth + -1;
657
+ }
658
+ case BIN(opt_call_c_function):{
659
+ return depth + 0;
660
+ }
661
+ case BIN(bitblt):{
662
+ return depth + 1;
663
+ }
664
+ case BIN(answer):{
665
+ return depth + 1;
666
+ }
667
+ case BIN(getlocal_OP__WC__0):{
668
+ return depth + 1;
669
+ }
670
+ case BIN(getlocal_OP__WC__1):{
671
+ return depth + 1;
672
+ }
673
+ case BIN(setlocal_OP__WC__0):{
674
+ return depth + -1;
675
+ }
676
+ case BIN(setlocal_OP__WC__1):{
677
+ return depth + -1;
678
+ }
679
+ case BIN(putobject_OP_INT2FIX_O_0_C_):{
680
+ return depth + 1;
681
+ }
682
+ case BIN(putobject_OP_INT2FIX_O_1_C_):{
683
+ return depth + 1;
684
+ }
685
+
686
+ default:
687
+ rb_bug("insn_sp_increase: unreachable");
688
+ }
689
+ return 0;
690
+ }
691
+ #endif
692
+
693
+ /* some utilities */
694
+
695
+ static int
696
+ insn_len(VALUE insn)
697
+ {
698
+ return insn_len_info[(int)insn];
699
+ }
700
+
701
+ static const char *
702
+ insn_name(VALUE insn)
703
+ {
704
+ return insn_name_info[(int)insn];
705
+ }
706
+
707
+ static const char *
708
+ insn_op_types(VALUE insn)
709
+ {
710
+ return insn_operand_info[(int)insn];
711
+ }
712
+
713
+ static int
714
+ insn_op_type(VALUE insn, long pos)
715
+ {
716
+ int len = insn_len(insn) - 1;
717
+ if(pos < len){
718
+ return insn_operand_info[(int)insn][pos];
719
+ }
720
+ else{
721
+ return 0;
722
+ }
723
+ }
724
+
725
+ #ifdef USE_INSN_RET_NUM
726
+ static int
727
+ insn_ret_num(VALUE insn)
728
+ {
729
+ return insn_stack_push_num_info[(int)insn];
730
+ }
731
+ #endif