debase-ruby_core_source 0.6.0 → 0.7.1

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