debase-ruby_core_source 0.7.5 → 0.7.6

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