debase-ruby_core_source 0.9.8 → 0.9.9

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