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