debase-ruby_core_source 3.2.0 → 3.2.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (118) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +1 -0
  3. data/CHANGELOG.md +5 -0
  4. data/lib/debase/ruby_core_source/ruby-3.3.0-preview1/addr2line.h +20 -0
  5. data/lib/debase/ruby_core_source/ruby-3.3.0-preview1/builtin.h +117 -0
  6. data/lib/debase/ruby_core_source/ruby-3.3.0-preview1/ccan/build_assert/build_assert.h +40 -0
  7. data/lib/debase/ruby_core_source/ruby-3.3.0-preview1/ccan/check_type/check_type.h +63 -0
  8. data/lib/debase/ruby_core_source/ruby-3.3.0-preview1/ccan/container_of/container_of.h +142 -0
  9. data/lib/debase/ruby_core_source/ruby-3.3.0-preview1/ccan/list/list.h +789 -0
  10. data/lib/debase/ruby_core_source/ruby-3.3.0-preview1/ccan/str/str.h +17 -0
  11. data/lib/debase/ruby_core_source/ruby-3.3.0-preview1/constant.h +53 -0
  12. data/lib/debase/ruby_core_source/ruby-3.3.0-preview1/darray.h +179 -0
  13. data/lib/debase/ruby_core_source/ruby-3.3.0-preview1/debug_counter.h +426 -0
  14. data/lib/debase/ruby_core_source/ruby-3.3.0-preview1/dln.h +31 -0
  15. data/lib/debase/ruby_core_source/ruby-3.3.0-preview1/encindex.h +70 -0
  16. data/lib/debase/ruby_core_source/ruby-3.3.0-preview1/eval_intern.h +339 -0
  17. data/lib/debase/ruby_core_source/ruby-3.3.0-preview1/hrtime.h +227 -0
  18. data/lib/debase/ruby_core_source/ruby-3.3.0-preview1/id.h +299 -0
  19. data/lib/debase/ruby_core_source/ruby-3.3.0-preview1/id_table.h +39 -0
  20. data/lib/debase/ruby_core_source/ruby-3.3.0-preview1/insns.inc +249 -0
  21. data/lib/debase/ruby_core_source/ruby-3.3.0-preview1/insns_info.inc +9159 -0
  22. data/lib/debase/ruby_core_source/ruby-3.3.0-preview1/internal/array.h +162 -0
  23. data/lib/debase/ruby_core_source/ruby-3.3.0-preview1/internal/basic_operators.h +63 -0
  24. data/lib/debase/ruby_core_source/ruby-3.3.0-preview1/internal/bignum.h +244 -0
  25. data/lib/debase/ruby_core_source/ruby-3.3.0-preview1/internal/bits.h +564 -0
  26. data/lib/debase/ruby_core_source/ruby-3.3.0-preview1/internal/class.h +221 -0
  27. data/lib/debase/ruby_core_source/ruby-3.3.0-preview1/internal/cmdlineopt.h +61 -0
  28. data/lib/debase/ruby_core_source/ruby-3.3.0-preview1/internal/compar.h +29 -0
  29. data/lib/debase/ruby_core_source/ruby-3.3.0-preview1/internal/compile.h +35 -0
  30. data/lib/debase/ruby_core_source/ruby-3.3.0-preview1/internal/compilers.h +107 -0
  31. data/lib/debase/ruby_core_source/ruby-3.3.0-preview1/internal/complex.h +29 -0
  32. data/lib/debase/ruby_core_source/ruby-3.3.0-preview1/internal/cont.h +32 -0
  33. data/lib/debase/ruby_core_source/ruby-3.3.0-preview1/internal/dir.h +16 -0
  34. data/lib/debase/ruby_core_source/ruby-3.3.0-preview1/internal/enc.h +19 -0
  35. data/lib/debase/ruby_core_source/ruby-3.3.0-preview1/internal/encoding.h +32 -0
  36. data/lib/debase/ruby_core_source/ruby-3.3.0-preview1/internal/enum.h +18 -0
  37. data/lib/debase/ruby_core_source/ruby-3.3.0-preview1/internal/enumerator.h +21 -0
  38. data/lib/debase/ruby_core_source/ruby-3.3.0-preview1/internal/error.h +191 -0
  39. data/lib/debase/ruby_core_source/ruby-3.3.0-preview1/internal/eval.h +32 -0
  40. data/lib/debase/ruby_core_source/ruby-3.3.0-preview1/internal/file.h +38 -0
  41. data/lib/debase/ruby_core_source/ruby-3.3.0-preview1/internal/fixnum.h +184 -0
  42. data/lib/debase/ruby_core_source/ruby-3.3.0-preview1/internal/gc.h +333 -0
  43. data/lib/debase/ruby_core_source/ruby-3.3.0-preview1/internal/hash.h +216 -0
  44. data/lib/debase/ruby_core_source/ruby-3.3.0-preview1/internal/imemo.h +241 -0
  45. data/lib/debase/ruby_core_source/ruby-3.3.0-preview1/internal/inits.h +50 -0
  46. data/lib/debase/ruby_core_source/ruby-3.3.0-preview1/internal/io.h +38 -0
  47. data/lib/debase/ruby_core_source/ruby-3.3.0-preview1/internal/load.h +18 -0
  48. data/lib/debase/ruby_core_source/ruby-3.3.0-preview1/internal/loadpath.h +16 -0
  49. data/lib/debase/ruby_core_source/ruby-3.3.0-preview1/internal/math.h +23 -0
  50. data/lib/debase/ruby_core_source/ruby-3.3.0-preview1/internal/missing.h +18 -0
  51. data/lib/debase/ruby_core_source/ruby-3.3.0-preview1/internal/numeric.h +273 -0
  52. data/lib/debase/ruby_core_source/ruby-3.3.0-preview1/internal/object.h +59 -0
  53. data/lib/debase/ruby_core_source/ruby-3.3.0-preview1/internal/parse.h +25 -0
  54. data/lib/debase/ruby_core_source/ruby-3.3.0-preview1/internal/proc.h +30 -0
  55. data/lib/debase/ruby_core_source/ruby-3.3.0-preview1/internal/process.h +138 -0
  56. data/lib/debase/ruby_core_source/ruby-3.3.0-preview1/internal/ractor.h +6 -0
  57. data/lib/debase/ruby_core_source/ruby-3.3.0-preview1/internal/random.h +16 -0
  58. data/lib/debase/ruby_core_source/ruby-3.3.0-preview1/internal/range.h +40 -0
  59. data/lib/debase/ruby_core_source/ruby-3.3.0-preview1/internal/rational.h +71 -0
  60. data/lib/debase/ruby_core_source/ruby-3.3.0-preview1/internal/re.h +28 -0
  61. data/lib/debase/ruby_core_source/ruby-3.3.0-preview1/internal/sanitizers.h +186 -0
  62. data/lib/debase/ruby_core_source/ruby-3.3.0-preview1/internal/serial.h +23 -0
  63. data/lib/debase/ruby_core_source/ruby-3.3.0-preview1/internal/signal.h +21 -0
  64. data/lib/debase/ruby_core_source/ruby-3.3.0-preview1/internal/static_assert.h +16 -0
  65. data/lib/debase/ruby_core_source/ruby-3.3.0-preview1/internal/string.h +145 -0
  66. data/lib/debase/ruby_core_source/ruby-3.3.0-preview1/internal/struct.h +152 -0
  67. data/lib/debase/ruby_core_source/ruby-3.3.0-preview1/internal/symbol.h +42 -0
  68. data/lib/debase/ruby_core_source/ruby-3.3.0-preview1/internal/thread.h +61 -0
  69. data/lib/debase/ruby_core_source/ruby-3.3.0-preview1/internal/time.h +34 -0
  70. data/lib/debase/ruby_core_source/ruby-3.3.0-preview1/internal/transcode.h +20 -0
  71. data/lib/debase/ruby_core_source/ruby-3.3.0-preview1/internal/util.h +27 -0
  72. data/lib/debase/ruby_core_source/ruby-3.3.0-preview1/internal/variable.h +88 -0
  73. data/lib/debase/ruby_core_source/ruby-3.3.0-preview1/internal/vm.h +124 -0
  74. data/lib/debase/ruby_core_source/ruby-3.3.0-preview1/internal/warnings.h +16 -0
  75. data/lib/debase/ruby_core_source/ruby-3.3.0-preview1/internal.h +112 -0
  76. data/lib/debase/ruby_core_source/ruby-3.3.0-preview1/iseq.h +334 -0
  77. data/lib/debase/ruby_core_source/ruby-3.3.0-preview1/known_errors.inc +791 -0
  78. data/lib/debase/ruby_core_source/ruby-3.3.0-preview1/method.h +254 -0
  79. data/lib/debase/ruby_core_source/ruby-3.3.0-preview1/node.h +514 -0
  80. data/lib/debase/ruby_core_source/ruby-3.3.0-preview1/node_name.inc +210 -0
  81. data/lib/debase/ruby_core_source/ruby-3.3.0-preview1/opt_sc.inc +109 -0
  82. data/lib/debase/ruby_core_source/ruby-3.3.0-preview1/optinsn.inc +128 -0
  83. data/lib/debase/ruby_core_source/ruby-3.3.0-preview1/optunifs.inc +43 -0
  84. data/lib/debase/ruby_core_source/ruby-3.3.0-preview1/parse.h +230 -0
  85. data/lib/debase/ruby_core_source/ruby-3.3.0-preview1/probes_helper.h +42 -0
  86. data/lib/debase/ruby_core_source/ruby-3.3.0-preview1/ractor_core.h +387 -0
  87. data/lib/debase/ruby_core_source/ruby-3.3.0-preview1/regenc.h +254 -0
  88. data/lib/debase/ruby_core_source/ruby-3.3.0-preview1/regint.h +996 -0
  89. data/lib/debase/ruby_core_source/ruby-3.3.0-preview1/regparse.h +370 -0
  90. data/lib/debase/ruby_core_source/ruby-3.3.0-preview1/revision.h +5 -0
  91. data/lib/debase/ruby_core_source/ruby-3.3.0-preview1/rjit.h +103 -0
  92. data/lib/debase/ruby_core_source/ruby-3.3.0-preview1/rjit_c.h +165 -0
  93. data/lib/debase/ruby_core_source/ruby-3.3.0-preview1/ruby_assert.h +14 -0
  94. data/lib/debase/ruby_core_source/ruby-3.3.0-preview1/ruby_atomic.h +23 -0
  95. data/lib/debase/ruby_core_source/ruby-3.3.0-preview1/shape.h +232 -0
  96. data/lib/debase/ruby_core_source/ruby-3.3.0-preview1/siphash.h +48 -0
  97. data/lib/debase/ruby_core_source/ruby-3.3.0-preview1/symbol.h +119 -0
  98. data/lib/debase/ruby_core_source/ruby-3.3.0-preview1/thread_none.h +20 -0
  99. data/lib/debase/ruby_core_source/ruby-3.3.0-preview1/thread_pthread.h +128 -0
  100. data/lib/debase/ruby_core_source/ruby-3.3.0-preview1/thread_win32.h +63 -0
  101. data/lib/debase/ruby_core_source/ruby-3.3.0-preview1/timev.h +58 -0
  102. data/lib/debase/ruby_core_source/ruby-3.3.0-preview1/transcode_data.h +138 -0
  103. data/lib/debase/ruby_core_source/ruby-3.3.0-preview1/transient_heap.h +65 -0
  104. data/lib/debase/ruby_core_source/ruby-3.3.0-preview1/variable.h +30 -0
  105. data/lib/debase/ruby_core_source/ruby-3.3.0-preview1/version.h +65 -0
  106. data/lib/debase/ruby_core_source/ruby-3.3.0-preview1/vm.inc +5497 -0
  107. data/lib/debase/ruby_core_source/ruby-3.3.0-preview1/vm_call_iseq_optimized.inc +244 -0
  108. data/lib/debase/ruby_core_source/ruby-3.3.0-preview1/vm_callinfo.h +574 -0
  109. data/lib/debase/ruby_core_source/ruby-3.3.0-preview1/vm_core.h +2107 -0
  110. data/lib/debase/ruby_core_source/ruby-3.3.0-preview1/vm_debug.h +122 -0
  111. data/lib/debase/ruby_core_source/ruby-3.3.0-preview1/vm_exec.h +198 -0
  112. data/lib/debase/ruby_core_source/ruby-3.3.0-preview1/vm_insnhelper.h +274 -0
  113. data/lib/debase/ruby_core_source/ruby-3.3.0-preview1/vm_opts.h +72 -0
  114. data/lib/debase/ruby_core_source/ruby-3.3.0-preview1/vm_sync.h +137 -0
  115. data/lib/debase/ruby_core_source/ruby-3.3.0-preview1/vmtc.inc +243 -0
  116. data/lib/debase/ruby_core_source/ruby-3.3.0-preview1/yjit.h +72 -0
  117. data/lib/debase/ruby_core_source/version.rb +1 -1
  118. metadata +116 -3
@@ -0,0 +1,109 @@
1
+ /* -*- C -*- */
2
+
3
+ /* This is an auto-generated file and is a part of the programming language
4
+ * Ruby. The person who created a program to generate this file (``I''
5
+ * hereafter) would like to refrain from defining licensing of this generated
6
+ * source code.
7
+ *
8
+ * This file consists of many small parts of codes copyrighted by each author,
9
+ * not only the ``I'' person. Those original authors agree with some
10
+ * open-source license. I believe that the license we agree is the condition
11
+ * mentioned in the file COPYING. It states "4. You may modify and include
12
+ * the part of the software into any other software ...". But the problem is,
13
+ * the license never makes it clear if such modified parts still remain in the
14
+ * same license, or not. The fact that we agree with the source code's
15
+ * licensing terms does not automatically define that of generated ones. This
16
+ * is the reason why this file is under an unclear situation. All what I know
17
+ * is that above provision guarantees this file to exist.
18
+ *
19
+ * Please let me hesitate to declare something about this nuanced contract. I
20
+ * am not in the position to take over other authors' license to merge into my
21
+ * one. Changing them to (say) GPLv3 is not doable by myself. Perhaps someday
22
+ * it might turn out to be okay to say this file is under a license. I wish
23
+ * the situation would become more clear in the future. */
24
+
25
+ /*******************************************************************/
26
+ /*******************************************************************/
27
+ /*******************************************************************/
28
+ /**
29
+ This file is for threaded code.
30
+
31
+ ----
32
+ This file is auto generated by insns2vm.rb
33
+ DO NOT TOUCH!
34
+
35
+ If you want to fix something, you must edit "tool/ruby_vm/views/opt_sc.inc.erb"
36
+ or tool/insns2vm.rb
37
+ */
38
+
39
+ #define SC_STATE_SIZE 6
40
+
41
+ #define SCS_XX 1
42
+ #define SCS_AX 2
43
+ #define SCS_BX 3
44
+ #define SCS_AB 4
45
+ #define SCS_BA 5
46
+
47
+ #define SC_ERROR 0xffffffff
48
+
49
+ static const VALUE sc_insn_info[][SC_STATE_SIZE] = {
50
+ #define NO_SC { SC_ERROR, SC_ERROR, SC_ERROR, SC_ERROR, SC_ERROR, SC_ERROR }
51
+ NO_SC, NO_SC, NO_SC, NO_SC, NO_SC, NO_SC, NO_SC, NO_SC,
52
+ NO_SC, NO_SC, NO_SC, NO_SC, NO_SC, NO_SC, NO_SC, NO_SC,
53
+ NO_SC, NO_SC, NO_SC, NO_SC, NO_SC, NO_SC, NO_SC, NO_SC,
54
+ NO_SC, NO_SC, NO_SC, NO_SC, NO_SC, NO_SC, NO_SC, NO_SC,
55
+ NO_SC, NO_SC, NO_SC, NO_SC, NO_SC, NO_SC, NO_SC, NO_SC,
56
+ NO_SC, NO_SC, NO_SC, NO_SC, NO_SC, NO_SC, NO_SC, NO_SC,
57
+ NO_SC, NO_SC, NO_SC, NO_SC, NO_SC, NO_SC, NO_SC, NO_SC,
58
+ NO_SC, NO_SC, NO_SC, NO_SC, NO_SC, NO_SC, NO_SC, NO_SC,
59
+ NO_SC, NO_SC, NO_SC, NO_SC, NO_SC, NO_SC, NO_SC, NO_SC,
60
+ NO_SC, NO_SC, NO_SC, NO_SC, NO_SC, NO_SC, NO_SC, NO_SC,
61
+ NO_SC, NO_SC, NO_SC, NO_SC, NO_SC, NO_SC, NO_SC, NO_SC,
62
+ NO_SC, NO_SC, NO_SC, NO_SC, NO_SC, NO_SC, NO_SC, NO_SC,
63
+ NO_SC, NO_SC, NO_SC, NO_SC, NO_SC, NO_SC, NO_SC, NO_SC,
64
+ NO_SC, NO_SC, NO_SC, NO_SC, NO_SC, NO_SC, NO_SC, NO_SC,
65
+ NO_SC, NO_SC, NO_SC, NO_SC, NO_SC, NO_SC, NO_SC, NO_SC,
66
+ NO_SC, NO_SC, NO_SC, NO_SC, NO_SC, NO_SC, NO_SC, NO_SC,
67
+ NO_SC, NO_SC, NO_SC, NO_SC, NO_SC, NO_SC, NO_SC, NO_SC,
68
+ NO_SC, NO_SC, NO_SC, NO_SC, NO_SC, NO_SC, NO_SC, NO_SC,
69
+ NO_SC, NO_SC, NO_SC, NO_SC, NO_SC, NO_SC, NO_SC, NO_SC,
70
+ NO_SC, NO_SC, NO_SC, NO_SC, NO_SC, NO_SC, NO_SC, NO_SC,
71
+ NO_SC, NO_SC, NO_SC, NO_SC, NO_SC, NO_SC, NO_SC, NO_SC,
72
+ NO_SC, NO_SC, NO_SC, NO_SC, NO_SC, NO_SC, NO_SC, NO_SC,
73
+ NO_SC, NO_SC, NO_SC, NO_SC, NO_SC, NO_SC, NO_SC, NO_SC,
74
+ NO_SC, NO_SC, NO_SC, NO_SC, NO_SC, NO_SC, NO_SC, NO_SC,
75
+ NO_SC, NO_SC, NO_SC, NO_SC, NO_SC, NO_SC, NO_SC, NO_SC,
76
+ NO_SC, NO_SC,
77
+ #undef NO_SC
78
+ };
79
+
80
+ static const VALUE sc_insn_next[] = {
81
+ SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX,
82
+ SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX,
83
+ SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX,
84
+ SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX,
85
+ SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX,
86
+ SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX,
87
+ SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX,
88
+ SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX,
89
+ SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX,
90
+ SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX,
91
+ SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX,
92
+ SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX,
93
+ SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX,
94
+ SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX,
95
+ SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX,
96
+ SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX,
97
+ SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX,
98
+ SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX,
99
+ SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX,
100
+ SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX,
101
+ SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX,
102
+ SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX,
103
+ SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX,
104
+ SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX,
105
+ SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX,
106
+ SCS_XX, SCS_XX,
107
+ };
108
+
109
+ ASSERT_VM_INSTRUCTION_SIZE(sc_insn_next);
@@ -0,0 +1,128 @@
1
+ /* -*- C -*- */
2
+
3
+ /* This is an auto-generated file and is a part of the programming language
4
+ * Ruby. The person who created a program to generate this file (``I''
5
+ * hereafter) would like to refrain from defining licensing of this generated
6
+ * source code.
7
+ *
8
+ * This file consists of many small parts of codes copyrighted by each author,
9
+ * not only the ``I'' person. Those original authors agree with some
10
+ * open-source license. I believe that the license we agree is the condition
11
+ * mentioned in the file COPYING. It states "4. You may modify and include
12
+ * the part of the software into any other software ...". But the problem is,
13
+ * the license never makes it clear if such modified parts still remain in the
14
+ * same license, or not. The fact that we agree with the source code's
15
+ * licensing terms does not automatically define that of generated ones. This
16
+ * is the reason why this file is under an unclear situation. All what I know
17
+ * is that above provision guarantees this file to exist.
18
+ *
19
+ * Please let me hesitate to declare something about this nuanced contract. I
20
+ * am not in the position to take over other authors' license to merge into my
21
+ * one. Changing them to (say) GPLv3 is not doable by myself. Perhaps someday
22
+ * it might turn out to be okay to say this file is under a license. I wish
23
+ * the situation would become more clear in the future. */
24
+ /*******************************************************************/
25
+ /*******************************************************************/
26
+ /*******************************************************************/
27
+ /**
28
+ This file is for threaded code.
29
+
30
+ ----
31
+ This file is auto generated by insns2vm.rb
32
+ DO NOT TOUCH!
33
+
34
+ If you want to fix something, you must edit "tool/ruby_vm/views/optinsn.inc.erb"
35
+ or tool/insns2vm.rb
36
+ */
37
+
38
+ static INSN *
39
+ insn_operands_unification(INSN *iobj)
40
+ {
41
+ #ifdef OPT_OPERANDS_UNIFICATION
42
+ VALUE *op = iobj->operands;
43
+
44
+ switch (iobj->insn_id) {
45
+ default:
46
+ /* do nothing */;
47
+ break;
48
+
49
+ case BIN(getlocal):
50
+
51
+ /* getlocal_WC_0(idx)()(val) */
52
+ if ( op[1] == LONG2NUM(0) ) {
53
+ iobj->insn_id = BIN(getlocal_WC_0);
54
+ iobj->operand_size = 1;
55
+ break;
56
+ }
57
+
58
+ /* getlocal_WC_1(idx)()(val) */
59
+ if ( op[1] == LONG2NUM(1) ) {
60
+ iobj->insn_id = BIN(getlocal_WC_1);
61
+ iobj->operand_size = 1;
62
+ break;
63
+ }
64
+
65
+ break;
66
+ case BIN(setlocal):
67
+
68
+ /* setlocal_WC_0(idx)(val)() */
69
+ if ( op[1] == LONG2NUM(0) ) {
70
+ iobj->insn_id = BIN(setlocal_WC_0);
71
+ iobj->operand_size = 1;
72
+ break;
73
+ }
74
+
75
+ /* setlocal_WC_1(idx)(val)() */
76
+ if ( op[1] == LONG2NUM(1) ) {
77
+ iobj->insn_id = BIN(setlocal_WC_1);
78
+ iobj->operand_size = 1;
79
+ break;
80
+ }
81
+
82
+ break;
83
+ case BIN(putobject):
84
+
85
+ /* putobject_INT2FIX_0_()()(val) */
86
+ if ( op[0] == INT2FIX(0) ) {
87
+ iobj->insn_id = BIN(putobject_INT2FIX_0_);
88
+ iobj->operand_size = 0;
89
+ break;
90
+ }
91
+
92
+ /* putobject_INT2FIX_1_()()(val) */
93
+ if ( op[0] == INT2FIX(1) ) {
94
+ iobj->insn_id = BIN(putobject_INT2FIX_1_);
95
+ iobj->operand_size = 0;
96
+ break;
97
+ }
98
+
99
+ break;
100
+ }
101
+ #endif
102
+ return iobj;
103
+ }
104
+
105
+ int
106
+ rb_insn_unified_local_var_level(VALUE insn)
107
+ {
108
+ #ifdef OPT_OPERANDS_UNIFICATION
109
+ /* optimize rule */
110
+ switch (insn) {
111
+ default:
112
+ return -1; /* do nothing */;
113
+ case BIN(getlocal_WC_0):
114
+ return 0;
115
+ case BIN(getlocal_WC_1):
116
+ return 1;
117
+ case BIN(setlocal_WC_0):
118
+ return 0;
119
+ case BIN(setlocal_WC_1):
120
+ return 1;
121
+ case BIN(putobject_INT2FIX_0_):
122
+ return INT2FIX(0);
123
+ case BIN(putobject_INT2FIX_1_):
124
+ return INT2FIX(1);
125
+ }
126
+ #endif
127
+ return -1;
128
+ }
@@ -0,0 +1,43 @@
1
+ /* -*- C -*- */
2
+
3
+ /* This is an auto-generated file and is a part of the programming language
4
+ * Ruby. The person who created a program to generate this file (``I''
5
+ * hereafter) would like to refrain from defining licensing of this generated
6
+ * source code.
7
+ *
8
+ * This file consists of many small parts of codes copyrighted by each author,
9
+ * not only the ``I'' person. Those original authors agree with some
10
+ * open-source license. I believe that the license we agree is the condition
11
+ * mentioned in the file COPYING. It states "4. You may modify and include
12
+ * the part of the software into any other software ...". But the problem is,
13
+ * the license never makes it clear if such modified parts still remain in the
14
+ * same license, or not. The fact that we agree with the source code's
15
+ * licensing terms does not automatically define that of generated ones. This
16
+ * is the reason why this file is under an unclear situation. All what I know
17
+ * is that above provision guarantees this file to exist.
18
+ *
19
+ * Please let me hesitate to declare something about this nuanced contract. I
20
+ * am not in the position to take over other authors' license to merge into my
21
+ * one. Changing them to (say) GPLv3 is not doable by myself. Perhaps someday
22
+ * it might turn out to be okay to say this file is under a license. I wish
23
+ * the situation would become more clear in the future. */
24
+
25
+ /*******************************************************************/
26
+ /*******************************************************************/
27
+ /*******************************************************************/
28
+ /**
29
+ This file is for threaded code.
30
+
31
+ ----
32
+ This file is auto generated by insns2vm.rb
33
+ DO NOT TOUCH!
34
+
35
+ If you want to fix something, you must edit "tool/ruby_vm/views/optunifs.inc.erb"
36
+ or tool/insns2vm.rb
37
+ */
38
+
39
+ /* Let .bss section automatically initialize this variable */
40
+ /* cf. Section 6.7.8 of ISO/IEC 9899:1999 */
41
+ static const int *const *const unified_insns_data[202];
42
+
43
+ ASSERT_VM_INSTRUCTION_SIZE(unified_insns_data);
@@ -0,0 +1,230 @@
1
+ /* A Bison parser, made by GNU Bison 3.8.2. */
2
+
3
+ /* Bison interface for Yacc-like parsers in C
4
+
5
+ Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2021 Free Software Foundation,
6
+ Inc.
7
+
8
+ This program is free software: you can redistribute it and/or modify
9
+ it under the terms of the GNU General Public License as published by
10
+ the Free Software Foundation, either version 3 of the License, or
11
+ (at your option) any later version.
12
+
13
+ This program is distributed in the hope that it will be useful,
14
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
15
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
+ GNU General Public License for more details.
17
+
18
+ You should have received a copy of the GNU General Public License
19
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
20
+
21
+ /* As a special exception, you may create a larger work that contains
22
+ part or all of the Bison parser skeleton and distribute that work
23
+ under terms of your choice, so long as that work isn't itself a
24
+ parser generator using the skeleton or a modified version thereof
25
+ as a parser skeleton. Alternatively, if you modify or redistribute
26
+ the parser skeleton itself, you may (at your option) remove this
27
+ special exception, which will cause the skeleton and the resulting
28
+ Bison output files to be licensed under the GNU General Public
29
+ License without this special exception.
30
+
31
+ This special exception was added by the Free Software Foundation in
32
+ version 2.2 of Bison. */
33
+
34
+ /* DO NOT RELY ON FEATURES THAT ARE NOT DOCUMENTED in the manual,
35
+ especially those whose name start with YY_ or yy_. They are
36
+ private implementation details that can be changed or removed. */
37
+
38
+ #ifndef YY_YY__Y_TAB_H_INCLUDED
39
+ # define YY_YY__Y_TAB_H_INCLUDED
40
+ /* Debug traces. */
41
+ #ifndef YYDEBUG
42
+ # define YYDEBUG 0
43
+ #endif
44
+ #if YYDEBUG
45
+ extern int yydebug;
46
+ #endif
47
+
48
+ /* Token kinds. */
49
+ #ifndef YYTOKENTYPE
50
+ # define YYTOKENTYPE
51
+ enum yytokentype
52
+ {
53
+ YYEMPTY = -2,
54
+ END_OF_INPUT = 0, /* "end-of-input" */
55
+ YYerror = 256, /* error */
56
+ YYUNDEF = 257, /* "invalid token" */
57
+ keyword_class = 258, /* "`class'" */
58
+ keyword_module = 259, /* "`module'" */
59
+ keyword_def = 260, /* "`def'" */
60
+ keyword_undef = 261, /* "`undef'" */
61
+ keyword_begin = 262, /* "`begin'" */
62
+ keyword_rescue = 263, /* "`rescue'" */
63
+ keyword_ensure = 264, /* "`ensure'" */
64
+ keyword_end = 265, /* "`end'" */
65
+ keyword_if = 266, /* "`if'" */
66
+ keyword_unless = 267, /* "`unless'" */
67
+ keyword_then = 268, /* "`then'" */
68
+ keyword_elsif = 269, /* "`elsif'" */
69
+ keyword_else = 270, /* "`else'" */
70
+ keyword_case = 271, /* "`case'" */
71
+ keyword_when = 272, /* "`when'" */
72
+ keyword_while = 273, /* "`while'" */
73
+ keyword_until = 274, /* "`until'" */
74
+ keyword_for = 275, /* "`for'" */
75
+ keyword_break = 276, /* "`break'" */
76
+ keyword_next = 277, /* "`next'" */
77
+ keyword_redo = 278, /* "`redo'" */
78
+ keyword_retry = 279, /* "`retry'" */
79
+ keyword_in = 280, /* "`in'" */
80
+ keyword_do = 281, /* "`do'" */
81
+ keyword_do_cond = 282, /* "`do' for condition" */
82
+ keyword_do_block = 283, /* "`do' for block" */
83
+ keyword_do_LAMBDA = 284, /* "`do' for lambda" */
84
+ keyword_return = 285, /* "`return'" */
85
+ keyword_yield = 286, /* "`yield'" */
86
+ keyword_super = 287, /* "`super'" */
87
+ keyword_self = 288, /* "`self'" */
88
+ keyword_nil = 289, /* "`nil'" */
89
+ keyword_true = 290, /* "`true'" */
90
+ keyword_false = 291, /* "`false'" */
91
+ keyword_and = 292, /* "`and'" */
92
+ keyword_or = 293, /* "`or'" */
93
+ keyword_not = 294, /* "`not'" */
94
+ modifier_if = 295, /* "`if' modifier" */
95
+ modifier_unless = 296, /* "`unless' modifier" */
96
+ modifier_while = 297, /* "`while' modifier" */
97
+ modifier_until = 298, /* "`until' modifier" */
98
+ modifier_rescue = 299, /* "`rescue' modifier" */
99
+ keyword_alias = 300, /* "`alias'" */
100
+ keyword_defined = 301, /* "`defined?'" */
101
+ keyword_BEGIN = 302, /* "`BEGIN'" */
102
+ keyword_END = 303, /* "`END'" */
103
+ keyword__LINE__ = 304, /* "`__LINE__'" */
104
+ keyword__FILE__ = 305, /* "`__FILE__'" */
105
+ keyword__ENCODING__ = 306, /* "`__ENCODING__'" */
106
+ tIDENTIFIER = 307, /* "local variable or method" */
107
+ tFID = 308, /* "method" */
108
+ tGVAR = 309, /* "global variable" */
109
+ tIVAR = 310, /* "instance variable" */
110
+ tCONSTANT = 311, /* "constant" */
111
+ tCVAR = 312, /* "class variable" */
112
+ tLABEL = 313, /* "label" */
113
+ tINTEGER = 314, /* "integer literal" */
114
+ tFLOAT = 315, /* "float literal" */
115
+ tRATIONAL = 316, /* "rational literal" */
116
+ tIMAGINARY = 317, /* "imaginary literal" */
117
+ tCHAR = 318, /* "char literal" */
118
+ tNTH_REF = 319, /* "numbered reference" */
119
+ tBACK_REF = 320, /* "back reference" */
120
+ tSTRING_CONTENT = 321, /* "literal content" */
121
+ tREGEXP_END = 322, /* tREGEXP_END */
122
+ tDUMNY_END = 323, /* "dummy end" */
123
+ tSP = 324, /* "escaped space" */
124
+ tUPLUS = 132, /* "unary+" */
125
+ tUMINUS = 133, /* "unary-" */
126
+ tPOW = 134, /* "**" */
127
+ tCMP = 135, /* "<=>" */
128
+ tEQ = 140, /* "==" */
129
+ tEQQ = 141, /* "===" */
130
+ tNEQ = 142, /* "!=" */
131
+ tGEQ = 139, /* ">=" */
132
+ tLEQ = 138, /* "<=" */
133
+ tANDOP = 148, /* "&&" */
134
+ tOROP = 149, /* "||" */
135
+ tMATCH = 143, /* "=~" */
136
+ tNMATCH = 144, /* "!~" */
137
+ tDOT2 = 128, /* ".." */
138
+ tDOT3 = 129, /* "..." */
139
+ tBDOT2 = 130, /* "(.." */
140
+ tBDOT3 = 131, /* "(..." */
141
+ tAREF = 145, /* "[]" */
142
+ tASET = 146, /* "[]=" */
143
+ tLSHFT = 136, /* "<<" */
144
+ tRSHFT = 137, /* ">>" */
145
+ tANDDOT = 150, /* "&." */
146
+ tCOLON2 = 147, /* "::" */
147
+ tCOLON3 = 325, /* ":: at EXPR_BEG" */
148
+ tOP_ASGN = 326, /* "operator-assignment" */
149
+ tASSOC = 327, /* "=>" */
150
+ tLPAREN = 328, /* "(" */
151
+ tLPAREN_ARG = 329, /* "( arg" */
152
+ tRPAREN = 330, /* ")" */
153
+ tLBRACK = 331, /* "[" */
154
+ tLBRACE = 332, /* "{" */
155
+ tLBRACE_ARG = 333, /* "{ arg" */
156
+ tSTAR = 334, /* "*" */
157
+ tDSTAR = 335, /* "**arg" */
158
+ tAMPER = 336, /* "&" */
159
+ tLAMBDA = 337, /* "->" */
160
+ tSYMBEG = 338, /* "symbol literal" */
161
+ tSTRING_BEG = 339, /* "string literal" */
162
+ tXSTRING_BEG = 340, /* "backtick literal" */
163
+ tREGEXP_BEG = 341, /* "regexp literal" */
164
+ tWORDS_BEG = 342, /* "word list" */
165
+ tQWORDS_BEG = 343, /* "verbatim word list" */
166
+ tSYMBOLS_BEG = 344, /* "symbol list" */
167
+ tQSYMBOLS_BEG = 345, /* "verbatim symbol list" */
168
+ tSTRING_END = 346, /* "terminator" */
169
+ tSTRING_DEND = 347, /* "'}'" */
170
+ tSTRING_DBEG = 348, /* tSTRING_DBEG */
171
+ tSTRING_DVAR = 349, /* tSTRING_DVAR */
172
+ tLAMBEG = 350, /* tLAMBEG */
173
+ tLABEL_END = 351, /* tLABEL_END */
174
+ tIGNORED_NL = 352, /* tIGNORED_NL */
175
+ tCOMMENT = 353, /* tCOMMENT */
176
+ tEMBDOC_BEG = 354, /* tEMBDOC_BEG */
177
+ tEMBDOC = 355, /* tEMBDOC */
178
+ tEMBDOC_END = 356, /* tEMBDOC_END */
179
+ tHEREDOC_BEG = 357, /* tHEREDOC_BEG */
180
+ tHEREDOC_END = 358, /* tHEREDOC_END */
181
+ k__END__ = 359, /* k__END__ */
182
+ tLOWEST = 360, /* tLOWEST */
183
+ tUMINUS_NUM = 361, /* tUMINUS_NUM */
184
+ tLAST_TOKEN = 362 /* tLAST_TOKEN */
185
+ };
186
+ typedef enum yytokentype yytoken_kind_t;
187
+ #endif
188
+
189
+ /* Value type. */
190
+ #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
191
+ union YYSTYPE
192
+ {
193
+
194
+ VALUE val;
195
+ NODE *node;
196
+ ID id;
197
+ int num;
198
+ st_table *tbl;
199
+ const struct vtable *vars;
200
+ struct rb_strterm_struct *strterm;
201
+ struct lex_context ctxt;
202
+
203
+
204
+ };
205
+ typedef union YYSTYPE YYSTYPE;
206
+ # define YYSTYPE_IS_TRIVIAL 1
207
+ # define YYSTYPE_IS_DECLARED 1
208
+ #endif
209
+
210
+ /* Location type. */
211
+ #if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED
212
+ typedef struct YYLTYPE YYLTYPE;
213
+ struct YYLTYPE
214
+ {
215
+ int first_line;
216
+ int first_column;
217
+ int last_line;
218
+ int last_column;
219
+ };
220
+ # define YYLTYPE_IS_DECLARED 1
221
+ # define YYLTYPE_IS_TRIVIAL 1
222
+ #endif
223
+
224
+
225
+
226
+
227
+ int yyparse (struct parser_params *p);
228
+
229
+
230
+ #endif /* !YY_YY__Y_TAB_H_INCLUDED */
@@ -0,0 +1,42 @@
1
+ #ifndef RUBY_PROBES_HELPER_H
2
+ #define RUBY_PROBES_HELPER_H
3
+
4
+ #include "ruby/ruby.h"
5
+
6
+ struct ruby_dtrace_method_hook_args {
7
+ const char *classname;
8
+ const char *methodname;
9
+ const char *filename;
10
+ int line_no;
11
+ volatile VALUE klass;
12
+ volatile VALUE name;
13
+ };
14
+
15
+ NOINLINE(int rb_dtrace_setup(rb_execution_context_t *, VALUE, ID, struct ruby_dtrace_method_hook_args *));
16
+
17
+ #define RUBY_DTRACE_METHOD_HOOK(name, ec, klazz, id) \
18
+ do { \
19
+ if (UNLIKELY(RUBY_DTRACE_##name##_ENABLED())) { \
20
+ struct ruby_dtrace_method_hook_args args; \
21
+ if (rb_dtrace_setup(ec, klazz, id, &args)) { \
22
+ RUBY_DTRACE_##name(args.classname, \
23
+ args.methodname, \
24
+ args.filename, \
25
+ args.line_no); \
26
+ } \
27
+ } \
28
+ } while (0)
29
+
30
+ #define RUBY_DTRACE_METHOD_ENTRY_HOOK(ec, klass, id) \
31
+ RUBY_DTRACE_METHOD_HOOK(METHOD_ENTRY, ec, klass, id)
32
+
33
+ #define RUBY_DTRACE_METHOD_RETURN_HOOK(ec, klass, id) \
34
+ RUBY_DTRACE_METHOD_HOOK(METHOD_RETURN, ec, klass, id)
35
+
36
+ #define RUBY_DTRACE_CMETHOD_ENTRY_HOOK(ec, klass, id) \
37
+ RUBY_DTRACE_METHOD_HOOK(CMETHOD_ENTRY, ec, klass, id)
38
+
39
+ #define RUBY_DTRACE_CMETHOD_RETURN_HOOK(ec, klass, id) \
40
+ RUBY_DTRACE_METHOD_HOOK(CMETHOD_RETURN, ec, klass, id)
41
+
42
+ #endif /* RUBY_PROBES_HELPER_H */