debase-ruby_core_source 0.10.6 → 0.10.11

Sign up to get free protection for your applications and to get access to all the features.
Files changed (172) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +17 -0
  3. data/README.md +1 -1
  4. data/Rakefile +6 -3
  5. data/debase-ruby_core_source.gemspec +2 -1
  6. data/lib/debase/ruby_core_source.rb +1 -1
  7. data/lib/debase/ruby_core_source/ruby-2.7.0-p0/addr2line.h +21 -0
  8. data/lib/debase/ruby_core_source/ruby-2.7.0-p0/builtin.h +78 -0
  9. data/lib/debase/ruby_core_source/ruby-2.7.0-p0/ccan/build_assert/build_assert.h +40 -0
  10. data/lib/debase/ruby_core_source/ruby-2.7.0-p0/ccan/check_type/check_type.h +63 -0
  11. data/lib/debase/ruby_core_source/ruby-2.7.0-p0/ccan/container_of/container_of.h +142 -0
  12. data/lib/debase/ruby_core_source/ruby-2.7.0-p0/ccan/list/list.h +788 -0
  13. data/lib/debase/ruby_core_source/ruby-2.7.0-p0/ccan/str/str.h +16 -0
  14. data/lib/debase/ruby_core_source/ruby-2.7.0-p0/constant.h +50 -0
  15. data/lib/debase/ruby_core_source/ruby-2.7.0-p0/debug_counter.h +390 -0
  16. data/lib/debase/ruby_core_source/ruby-2.7.0-p0/dln.h +51 -0
  17. data/lib/debase/ruby_core_source/ruby-2.7.0-p0/encindex.h +69 -0
  18. data/lib/debase/ruby_core_source/ruby-2.7.0-p0/eval_intern.h +312 -0
  19. data/lib/debase/ruby_core_source/ruby-2.7.0-p0/gc.h +131 -0
  20. data/lib/debase/ruby_core_source/ruby-2.7.0-p0/hrtime.h +168 -0
  21. data/lib/debase/ruby_core_source/ruby-2.7.0-p0/id.h +290 -0
  22. data/lib/debase/ruby_core_source/ruby-2.7.0-p0/id_table.h +34 -0
  23. data/lib/debase/ruby_core_source/ruby-2.7.0-p0/insns.inc +253 -0
  24. data/lib/debase/ruby_core_source/ruby-2.7.0-p0/insns_info.inc +9197 -0
  25. data/lib/debase/ruby_core_source/ruby-2.7.0-p0/internal.h +2697 -0
  26. data/lib/debase/ruby_core_source/ruby-2.7.0-p0/iseq.h +312 -0
  27. data/lib/debase/ruby_core_source/ruby-2.7.0-p0/known_errors.inc +791 -0
  28. data/lib/debase/ruby_core_source/ruby-2.7.0-p0/method.h +229 -0
  29. data/lib/debase/ruby_core_source/ruby-2.7.0-p0/mjit.h +177 -0
  30. data/lib/debase/ruby_core_source/ruby-2.7.0-p0/mjit_compile.inc +7779 -0
  31. data/lib/debase/ruby_core_source/ruby-2.7.0-p0/node.h +476 -0
  32. data/lib/debase/ruby_core_source/ruby-2.7.0-p0/node_name.inc +208 -0
  33. data/lib/debase/ruby_core_source/ruby-2.7.0-p0/opt_sc.inc +109 -0
  34. data/lib/debase/ruby_core_source/ruby-2.7.0-p0/optinsn.inc +128 -0
  35. data/lib/debase/ruby_core_source/ruby-2.7.0-p0/optunifs.inc +43 -0
  36. data/lib/debase/ruby_core_source/ruby-2.7.0-p0/parse.h +210 -0
  37. data/lib/debase/ruby_core_source/ruby-2.7.0-p0/probes_helper.h +42 -0
  38. data/lib/debase/ruby_core_source/ruby-2.7.0-p0/regenc.h +254 -0
  39. data/lib/debase/ruby_core_source/ruby-2.7.0-p0/regint.h +938 -0
  40. data/lib/debase/ruby_core_source/ruby-2.7.0-p0/regparse.h +370 -0
  41. data/lib/debase/ruby_core_source/ruby-2.7.0-p0/revision.h +2 -0
  42. data/lib/debase/ruby_core_source/ruby-2.7.0-p0/ruby_assert.h +15 -0
  43. data/lib/debase/ruby_core_source/ruby-2.7.0-p0/ruby_atomic.h +244 -0
  44. data/lib/debase/ruby_core_source/ruby-2.7.0-p0/siphash.h +48 -0
  45. data/lib/debase/ruby_core_source/ruby-2.7.0-p0/symbol.h +119 -0
  46. data/lib/debase/ruby_core_source/ruby-2.7.0-p0/thread_pthread.h +75 -0
  47. data/lib/debase/ruby_core_source/ruby-2.7.0-p0/thread_win32.h +36 -0
  48. data/lib/debase/ruby_core_source/ruby-2.7.0-p0/timev.h +56 -0
  49. data/lib/debase/ruby_core_source/ruby-2.7.0-p0/transcode_data.h +139 -0
  50. data/lib/debase/ruby_core_source/ruby-2.7.0-p0/transient_heap.h +62 -0
  51. data/lib/debase/ruby_core_source/ruby-2.7.0-p0/variable.h +9 -0
  52. data/lib/debase/ruby_core_source/ruby-2.7.0-p0/version.h +77 -0
  53. data/lib/debase/ruby_core_source/ruby-2.7.0-p0/vm.inc +5466 -0
  54. data/lib/debase/ruby_core_source/ruby-2.7.0-p0/vm_call_iseq_optimized.inc +237 -0
  55. data/lib/debase/ruby_core_source/ruby-2.7.0-p0/vm_core.h +1968 -0
  56. data/lib/debase/ruby_core_source/ruby-2.7.0-p0/vm_debug.h +34 -0
  57. data/lib/debase/ruby_core_source/ruby-2.7.0-p0/vm_exec.h +193 -0
  58. data/lib/debase/ruby_core_source/ruby-2.7.0-p0/vm_insnhelper.h +267 -0
  59. data/lib/debase/ruby_core_source/ruby-2.7.0-p0/vm_opts.h +72 -0
  60. data/lib/debase/ruby_core_source/ruby-2.7.0-p0/vmtc.inc +247 -0
  61. data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/addr2line.h +20 -0
  62. data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/builtin.h +83 -0
  63. data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/ccan/build_assert/build_assert.h +40 -0
  64. data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/ccan/check_type/check_type.h +63 -0
  65. data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/ccan/container_of/container_of.h +142 -0
  66. data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/ccan/list/list.h +788 -0
  67. data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/ccan/str/str.h +16 -0
  68. data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/constant.h +55 -0
  69. data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/debug_counter.h +423 -0
  70. data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/dln.h +36 -0
  71. data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/encindex.h +70 -0
  72. data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/eval_intern.h +312 -0
  73. data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/gc.h +140 -0
  74. data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/hrtime.h +168 -0
  75. data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/id.h +290 -0
  76. data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/id_table.h +36 -0
  77. data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/insns.inc +249 -0
  78. data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/insns_info.inc +8979 -0
  79. data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/internal.h +107 -0
  80. data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/internal/array.h +114 -0
  81. data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/internal/bignum.h +246 -0
  82. data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/internal/bits.h +566 -0
  83. data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/internal/class.h +168 -0
  84. data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/internal/compar.h +50 -0
  85. data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/internal/compile.h +32 -0
  86. data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/internal/compilers.h +108 -0
  87. data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/internal/complex.h +29 -0
  88. data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/internal/cont.h +25 -0
  89. data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/internal/dir.h +17 -0
  90. data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/internal/enc.h +20 -0
  91. data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/internal/encoding.h +28 -0
  92. data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/internal/enum.h +19 -0
  93. data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/internal/enumerator.h +22 -0
  94. data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/internal/error.h +131 -0
  95. data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/internal/eval.h +33 -0
  96. data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/internal/file.h +39 -0
  97. data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/internal/fixnum.h +185 -0
  98. data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/internal/gc.h +154 -0
  99. data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/internal/hash.h +240 -0
  100. data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/internal/imemo.h +243 -0
  101. data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/internal/inits.h +51 -0
  102. data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/internal/io.h +35 -0
  103. data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/internal/load.h +19 -0
  104. data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/internal/loadpath.h +17 -0
  105. data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/internal/math.h +24 -0
  106. data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/internal/missing.h +19 -0
  107. data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/internal/mjit.h +29 -0
  108. data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/internal/numeric.h +252 -0
  109. data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/internal/object.h +83 -0
  110. data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/internal/parse.h +23 -0
  111. data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/internal/proc.h +32 -0
  112. data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/internal/process.h +136 -0
  113. data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/internal/random.h +17 -0
  114. data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/internal/range.h +37 -0
  115. data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/internal/rational.h +69 -0
  116. data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/internal/re.h +29 -0
  117. data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/internal/sanitizers.h +191 -0
  118. data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/internal/scheduler.h +35 -0
  119. data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/internal/serial.h +24 -0
  120. data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/internal/signal.h +22 -0
  121. data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/internal/static_assert.h +17 -0
  122. data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/internal/string.h +135 -0
  123. data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/internal/struct.h +154 -0
  124. data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/internal/symbol.h +41 -0
  125. data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/internal/thread.h +60 -0
  126. data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/internal/time.h +35 -0
  127. data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/internal/transcode.h +21 -0
  128. data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/internal/util.h +31 -0
  129. data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/internal/variable.h +83 -0
  130. data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/internal/vm.h +135 -0
  131. data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/internal/warnings.h +17 -0
  132. data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/iseq.h +304 -0
  133. data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/known_errors.inc +791 -0
  134. data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/method.h +245 -0
  135. data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/mjit.h +197 -0
  136. data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/mjit_compile.inc +8082 -0
  137. data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/node.h +484 -0
  138. data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/node_name.inc +210 -0
  139. data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/opt_sc.inc +109 -0
  140. data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/optinsn.inc +128 -0
  141. data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/optunifs.inc +43 -0
  142. data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/parse.h +211 -0
  143. data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/probes_helper.h +44 -0
  144. data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/ractor.h +271 -0
  145. data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/ractor_pub.h +50 -0
  146. data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/regenc.h +254 -0
  147. data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/regint.h +938 -0
  148. data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/regparse.h +370 -0
  149. data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/revision.h +2 -0
  150. data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/ruby_assert.h +15 -0
  151. data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/ruby_atomic.h +236 -0
  152. data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/siphash.h +48 -0
  153. data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/symbol.h +119 -0
  154. data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/thread_pthread.h +106 -0
  155. data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/thread_win32.h +66 -0
  156. data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/timev.h +57 -0
  157. data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/transcode_data.h +138 -0
  158. data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/transient_heap.h +61 -0
  159. data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/variable.h +21 -0
  160. data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/version.h +89 -0
  161. data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/vm.inc +5360 -0
  162. data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/vm_call_iseq_optimized.inc +244 -0
  163. data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/vm_callinfo.h +457 -0
  164. data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/vm_core.h +1952 -0
  165. data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/vm_debug.h +116 -0
  166. data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/vm_exec.h +196 -0
  167. data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/vm_insnhelper.h +260 -0
  168. data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/vm_opts.h +73 -0
  169. data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/vm_sync.h +97 -0
  170. data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/vmtc.inc +243 -0
  171. data/lib/debase/ruby_core_source/version.rb +1 -1
  172. metadata +183 -5
@@ -0,0 +1,72 @@
1
+ /*-*-c-*-*/
2
+ /**********************************************************************
3
+
4
+ vm_opts.h - VM optimize option
5
+
6
+ $Author$
7
+
8
+ Copyright (C) 2004-2007 Koichi Sasada
9
+
10
+ **********************************************************************/
11
+
12
+
13
+ #ifndef RUBY_VM_OPTS_H
14
+ #define RUBY_VM_OPTS_H
15
+
16
+ /* Compile options.
17
+ * You can change these options at runtime by VM::CompileOption.
18
+ * Following definitions are default values.
19
+ */
20
+
21
+ #define OPT_TAILCALL_OPTIMIZATION 0
22
+ #define OPT_PEEPHOLE_OPTIMIZATION 1
23
+ #define OPT_SPECIALISED_INSTRUCTION 1
24
+ #define OPT_INLINE_CONST_CACHE 1
25
+ #define OPT_FROZEN_STRING_LITERAL 0
26
+ #define OPT_DEBUG_FROZEN_STRING_LITERAL 0
27
+
28
+ /* Build Options.
29
+ * You can't change these options at runtime.
30
+ */
31
+
32
+ /* C compiler dependent */
33
+
34
+ /*
35
+ * 0: direct (using labeled goto using GCC special)
36
+ * 1: token (switch/case)
37
+ * 2: call (function call for each insn dispatch)
38
+ */
39
+ #ifndef OPT_THREADED_CODE
40
+ #define OPT_THREADED_CODE 0
41
+ #endif
42
+
43
+ #define OPT_DIRECT_THREADED_CODE (OPT_THREADED_CODE == 0)
44
+ #define OPT_TOKEN_THREADED_CODE (OPT_THREADED_CODE == 1)
45
+ #define OPT_CALL_THREADED_CODE (OPT_THREADED_CODE == 2)
46
+
47
+ /* VM running option */
48
+ #define OPT_CHECKED_RUN 1
49
+ #define OPT_INLINE_METHOD_CACHE 1
50
+ #define OPT_GLOBAL_METHOD_CACHE 1
51
+ #define OPT_BLOCKINLINING 0
52
+
53
+ #ifndef OPT_IC_FOR_IVAR
54
+ #define OPT_IC_FOR_IVAR 1
55
+ #endif
56
+
57
+ /* architecture independent, affects generated code */
58
+ #define OPT_OPERANDS_UNIFICATION 1
59
+ #define OPT_INSTRUCTIONS_UNIFICATION 0
60
+ #define OPT_UNIFY_ALL_COMBINATION 0
61
+ #define OPT_STACK_CACHING 0
62
+
63
+ /* misc */
64
+ #ifndef OPT_SUPPORT_JOKE
65
+ #define OPT_SUPPORT_JOKE 0
66
+ #endif
67
+
68
+ #ifndef VM_COLLECT_USAGE_DETAILS
69
+ #define VM_COLLECT_USAGE_DETAILS 0
70
+ #endif
71
+
72
+ #endif /* RUBY_VM_OPTS_H */
@@ -0,0 +1,247 @@
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/vmtc.inc.erb"
35
+ or tool/insns2vm.rb
36
+ */
37
+
38
+ static const void *const insns_address_table[] = {
39
+ LABEL_PTR(nop),
40
+ LABEL_PTR(getlocal),
41
+ LABEL_PTR(setlocal),
42
+ LABEL_PTR(getblockparam),
43
+ LABEL_PTR(setblockparam),
44
+ LABEL_PTR(getblockparamproxy),
45
+ LABEL_PTR(getspecial),
46
+ LABEL_PTR(setspecial),
47
+ LABEL_PTR(getinstancevariable),
48
+ LABEL_PTR(setinstancevariable),
49
+ LABEL_PTR(getclassvariable),
50
+ LABEL_PTR(setclassvariable),
51
+ LABEL_PTR(getconstant),
52
+ LABEL_PTR(setconstant),
53
+ LABEL_PTR(getglobal),
54
+ LABEL_PTR(setglobal),
55
+ LABEL_PTR(putnil),
56
+ LABEL_PTR(putself),
57
+ LABEL_PTR(putobject),
58
+ LABEL_PTR(putspecialobject),
59
+ LABEL_PTR(putstring),
60
+ LABEL_PTR(concatstrings),
61
+ LABEL_PTR(tostring),
62
+ LABEL_PTR(freezestring),
63
+ LABEL_PTR(toregexp),
64
+ LABEL_PTR(intern),
65
+ LABEL_PTR(newarray),
66
+ LABEL_PTR(newarraykwsplat),
67
+ LABEL_PTR(duparray),
68
+ LABEL_PTR(duphash),
69
+ LABEL_PTR(expandarray),
70
+ LABEL_PTR(concatarray),
71
+ LABEL_PTR(splatarray),
72
+ LABEL_PTR(newhash),
73
+ LABEL_PTR(newrange),
74
+ LABEL_PTR(pop),
75
+ LABEL_PTR(dup),
76
+ LABEL_PTR(dupn),
77
+ LABEL_PTR(swap),
78
+ LABEL_PTR(reverse),
79
+ LABEL_PTR(topn),
80
+ LABEL_PTR(setn),
81
+ LABEL_PTR(adjuststack),
82
+ LABEL_PTR(defined),
83
+ LABEL_PTR(checkmatch),
84
+ LABEL_PTR(checkkeyword),
85
+ LABEL_PTR(checktype),
86
+ LABEL_PTR(defineclass),
87
+ LABEL_PTR(definemethod),
88
+ LABEL_PTR(definesmethod),
89
+ LABEL_PTR(send),
90
+ LABEL_PTR(opt_send_without_block),
91
+ LABEL_PTR(opt_str_freeze),
92
+ LABEL_PTR(opt_nil_p),
93
+ LABEL_PTR(opt_str_uminus),
94
+ LABEL_PTR(opt_newarray_max),
95
+ LABEL_PTR(opt_newarray_min),
96
+ LABEL_PTR(invokesuper),
97
+ LABEL_PTR(invokeblock),
98
+ LABEL_PTR(leave),
99
+ LABEL_PTR(throw),
100
+ LABEL_PTR(jump),
101
+ LABEL_PTR(branchif),
102
+ LABEL_PTR(branchunless),
103
+ LABEL_PTR(branchnil),
104
+ LABEL_PTR(opt_getinlinecache),
105
+ LABEL_PTR(opt_setinlinecache),
106
+ LABEL_PTR(once),
107
+ LABEL_PTR(opt_case_dispatch),
108
+ LABEL_PTR(opt_plus),
109
+ LABEL_PTR(opt_minus),
110
+ LABEL_PTR(opt_mult),
111
+ LABEL_PTR(opt_div),
112
+ LABEL_PTR(opt_mod),
113
+ LABEL_PTR(opt_eq),
114
+ LABEL_PTR(opt_neq),
115
+ LABEL_PTR(opt_lt),
116
+ LABEL_PTR(opt_le),
117
+ LABEL_PTR(opt_gt),
118
+ LABEL_PTR(opt_ge),
119
+ LABEL_PTR(opt_ltlt),
120
+ LABEL_PTR(opt_and),
121
+ LABEL_PTR(opt_or),
122
+ LABEL_PTR(opt_aref),
123
+ LABEL_PTR(opt_aset),
124
+ LABEL_PTR(opt_aset_with),
125
+ LABEL_PTR(opt_aref_with),
126
+ LABEL_PTR(opt_length),
127
+ LABEL_PTR(opt_size),
128
+ LABEL_PTR(opt_empty_p),
129
+ LABEL_PTR(opt_succ),
130
+ LABEL_PTR(opt_not),
131
+ LABEL_PTR(opt_regexpmatch2),
132
+ LABEL_PTR(opt_call_c_function),
133
+ LABEL_PTR(invokebuiltin),
134
+ LABEL_PTR(opt_invokebuiltin_delegate),
135
+ LABEL_PTR(opt_invokebuiltin_delegate_leave),
136
+ LABEL_PTR(getlocal_WC_0),
137
+ LABEL_PTR(getlocal_WC_1),
138
+ LABEL_PTR(setlocal_WC_0),
139
+ LABEL_PTR(setlocal_WC_1),
140
+ LABEL_PTR(putobject_INT2FIX_0_),
141
+ LABEL_PTR(putobject_INT2FIX_1_),
142
+ LABEL_PTR(trace_nop),
143
+ LABEL_PTR(trace_getlocal),
144
+ LABEL_PTR(trace_setlocal),
145
+ LABEL_PTR(trace_getblockparam),
146
+ LABEL_PTR(trace_setblockparam),
147
+ LABEL_PTR(trace_getblockparamproxy),
148
+ LABEL_PTR(trace_getspecial),
149
+ LABEL_PTR(trace_setspecial),
150
+ LABEL_PTR(trace_getinstancevariable),
151
+ LABEL_PTR(trace_setinstancevariable),
152
+ LABEL_PTR(trace_getclassvariable),
153
+ LABEL_PTR(trace_setclassvariable),
154
+ LABEL_PTR(trace_getconstant),
155
+ LABEL_PTR(trace_setconstant),
156
+ LABEL_PTR(trace_getglobal),
157
+ LABEL_PTR(trace_setglobal),
158
+ LABEL_PTR(trace_putnil),
159
+ LABEL_PTR(trace_putself),
160
+ LABEL_PTR(trace_putobject),
161
+ LABEL_PTR(trace_putspecialobject),
162
+ LABEL_PTR(trace_putstring),
163
+ LABEL_PTR(trace_concatstrings),
164
+ LABEL_PTR(trace_tostring),
165
+ LABEL_PTR(trace_freezestring),
166
+ LABEL_PTR(trace_toregexp),
167
+ LABEL_PTR(trace_intern),
168
+ LABEL_PTR(trace_newarray),
169
+ LABEL_PTR(trace_newarraykwsplat),
170
+ LABEL_PTR(trace_duparray),
171
+ LABEL_PTR(trace_duphash),
172
+ LABEL_PTR(trace_expandarray),
173
+ LABEL_PTR(trace_concatarray),
174
+ LABEL_PTR(trace_splatarray),
175
+ LABEL_PTR(trace_newhash),
176
+ LABEL_PTR(trace_newrange),
177
+ LABEL_PTR(trace_pop),
178
+ LABEL_PTR(trace_dup),
179
+ LABEL_PTR(trace_dupn),
180
+ LABEL_PTR(trace_swap),
181
+ LABEL_PTR(trace_reverse),
182
+ LABEL_PTR(trace_topn),
183
+ LABEL_PTR(trace_setn),
184
+ LABEL_PTR(trace_adjuststack),
185
+ LABEL_PTR(trace_defined),
186
+ LABEL_PTR(trace_checkmatch),
187
+ LABEL_PTR(trace_checkkeyword),
188
+ LABEL_PTR(trace_checktype),
189
+ LABEL_PTR(trace_defineclass),
190
+ LABEL_PTR(trace_definemethod),
191
+ LABEL_PTR(trace_definesmethod),
192
+ LABEL_PTR(trace_send),
193
+ LABEL_PTR(trace_opt_send_without_block),
194
+ LABEL_PTR(trace_opt_str_freeze),
195
+ LABEL_PTR(trace_opt_nil_p),
196
+ LABEL_PTR(trace_opt_str_uminus),
197
+ LABEL_PTR(trace_opt_newarray_max),
198
+ LABEL_PTR(trace_opt_newarray_min),
199
+ LABEL_PTR(trace_invokesuper),
200
+ LABEL_PTR(trace_invokeblock),
201
+ LABEL_PTR(trace_leave),
202
+ LABEL_PTR(trace_throw),
203
+ LABEL_PTR(trace_jump),
204
+ LABEL_PTR(trace_branchif),
205
+ LABEL_PTR(trace_branchunless),
206
+ LABEL_PTR(trace_branchnil),
207
+ LABEL_PTR(trace_opt_getinlinecache),
208
+ LABEL_PTR(trace_opt_setinlinecache),
209
+ LABEL_PTR(trace_once),
210
+ LABEL_PTR(trace_opt_case_dispatch),
211
+ LABEL_PTR(trace_opt_plus),
212
+ LABEL_PTR(trace_opt_minus),
213
+ LABEL_PTR(trace_opt_mult),
214
+ LABEL_PTR(trace_opt_div),
215
+ LABEL_PTR(trace_opt_mod),
216
+ LABEL_PTR(trace_opt_eq),
217
+ LABEL_PTR(trace_opt_neq),
218
+ LABEL_PTR(trace_opt_lt),
219
+ LABEL_PTR(trace_opt_le),
220
+ LABEL_PTR(trace_opt_gt),
221
+ LABEL_PTR(trace_opt_ge),
222
+ LABEL_PTR(trace_opt_ltlt),
223
+ LABEL_PTR(trace_opt_and),
224
+ LABEL_PTR(trace_opt_or),
225
+ LABEL_PTR(trace_opt_aref),
226
+ LABEL_PTR(trace_opt_aset),
227
+ LABEL_PTR(trace_opt_aset_with),
228
+ LABEL_PTR(trace_opt_aref_with),
229
+ LABEL_PTR(trace_opt_length),
230
+ LABEL_PTR(trace_opt_size),
231
+ LABEL_PTR(trace_opt_empty_p),
232
+ LABEL_PTR(trace_opt_succ),
233
+ LABEL_PTR(trace_opt_not),
234
+ LABEL_PTR(trace_opt_regexpmatch2),
235
+ LABEL_PTR(trace_opt_call_c_function),
236
+ LABEL_PTR(trace_invokebuiltin),
237
+ LABEL_PTR(trace_opt_invokebuiltin_delegate),
238
+ LABEL_PTR(trace_opt_invokebuiltin_delegate_leave),
239
+ LABEL_PTR(trace_getlocal_WC_0),
240
+ LABEL_PTR(trace_getlocal_WC_1),
241
+ LABEL_PTR(trace_setlocal_WC_0),
242
+ LABEL_PTR(trace_setlocal_WC_1),
243
+ LABEL_PTR(trace_putobject_INT2FIX_0_),
244
+ LABEL_PTR(trace_putobject_INT2FIX_1_),
245
+ };
246
+
247
+ ASSERT_VM_INSTRUCTION_SIZE(insns_address_table);
@@ -0,0 +1,20 @@
1
+ #ifndef RUBY_ADDR2LINE_H
2
+ #define RUBY_ADDR2LINE_H
3
+ /**********************************************************************
4
+
5
+ addr2line.h -
6
+
7
+ $Author$
8
+
9
+ Copyright (C) 2010 Shinichiro Hamaji
10
+
11
+ **********************************************************************/
12
+
13
+ #if (defined(USE_ELF) || defined(HAVE_MACH_O_LOADER_H))
14
+
15
+ void
16
+ rb_dump_backtrace_with_lines(int num_traces, void **traces);
17
+
18
+ #endif /* USE_ELF */
19
+
20
+ #endif /* RUBY_ADDR2LINE_H */
@@ -0,0 +1,83 @@
1
+ #ifndef BUILTIN_H_INCLUDED
2
+ #define BUILTIN_H_INCLUDED
3
+
4
+ // invoke
5
+
6
+ struct rb_builtin_function {
7
+ // for invocation
8
+ const void * const func_ptr;
9
+ const int argc;
10
+
11
+ // for load
12
+ const int index;
13
+ const char * const name;
14
+
15
+ // for jit
16
+ void (*compiler)(FILE *, long, unsigned, bool);
17
+ };
18
+
19
+ #define RB_BUILTIN_FUNCTION(_i, _name, _fname, _arity, _compiler) {\
20
+ .name = #_name, \
21
+ .func_ptr = (void *)_fname, \
22
+ .argc = _arity, \
23
+ .index = _i, \
24
+ .compiler = _compiler, \
25
+ }
26
+
27
+ void rb_load_with_builtin_functions(const char *feature_name, const struct rb_builtin_function *table);
28
+
29
+ #ifndef rb_execution_context_t
30
+ typedef struct rb_execution_context_struct rb_execution_context_t;
31
+ #define rb_execution_context_t rb_execution_context_t
32
+ #endif
33
+
34
+ /* The following code is generated by the following Ruby script:
35
+
36
+ 16.times{|i|
37
+ args = (i > 0 ? ', ' : '') + (0...i).map{"VALUE"}.join(', ')
38
+ puts "static inline void rb_builtin_function_check_arity#{i}(VALUE (*f)(rb_execution_context_t *ec, VALUE self#{args})){}"
39
+ }
40
+ */
41
+
42
+ static inline void rb_builtin_function_check_arity0(VALUE (*f)(rb_execution_context_t *ec, VALUE self)){}
43
+ static inline void rb_builtin_function_check_arity1(VALUE (*f)(rb_execution_context_t *ec, VALUE self, VALUE)){}
44
+ static inline void rb_builtin_function_check_arity2(VALUE (*f)(rb_execution_context_t *ec, VALUE self, VALUE, VALUE)){}
45
+ static inline void rb_builtin_function_check_arity3(VALUE (*f)(rb_execution_context_t *ec, VALUE self, VALUE, VALUE, VALUE)){}
46
+ static inline void rb_builtin_function_check_arity4(VALUE (*f)(rb_execution_context_t *ec, VALUE self, VALUE, VALUE, VALUE, VALUE)){}
47
+ static inline void rb_builtin_function_check_arity5(VALUE (*f)(rb_execution_context_t *ec, VALUE self, VALUE, VALUE, VALUE, VALUE, VALUE)){}
48
+ static inline void rb_builtin_function_check_arity6(VALUE (*f)(rb_execution_context_t *ec, VALUE self, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE)){}
49
+ static inline void rb_builtin_function_check_arity7(VALUE (*f)(rb_execution_context_t *ec, VALUE self, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE)){}
50
+ static inline void rb_builtin_function_check_arity8(VALUE (*f)(rb_execution_context_t *ec, VALUE self, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE)){}
51
+ static inline void rb_builtin_function_check_arity9(VALUE (*f)(rb_execution_context_t *ec, VALUE self, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE)){}
52
+ static inline void rb_builtin_function_check_arity10(VALUE (*f)(rb_execution_context_t *ec, VALUE self, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE)){}
53
+ static inline void rb_builtin_function_check_arity11(VALUE (*f)(rb_execution_context_t *ec, VALUE self, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE)){}
54
+ static inline void rb_builtin_function_check_arity12(VALUE (*f)(rb_execution_context_t *ec, VALUE self, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE)){}
55
+ static inline void rb_builtin_function_check_arity13(VALUE (*f)(rb_execution_context_t *ec, VALUE self, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE)){}
56
+ static inline void rb_builtin_function_check_arity14(VALUE (*f)(rb_execution_context_t *ec, VALUE self, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE)){}
57
+ static inline void rb_builtin_function_check_arity15(VALUE (*f)(rb_execution_context_t *ec, VALUE self, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE)){}
58
+
59
+ VALUE rb_vm_lvar_exposed(rb_execution_context_t *ec, int index);
60
+
61
+ // __builtin_inline!
62
+
63
+ PUREFUNC(static inline VALUE rb_vm_lvar(rb_execution_context_t *ec, int index));
64
+
65
+ static inline VALUE
66
+ rb_vm_lvar(rb_execution_context_t *ec, int index)
67
+ {
68
+ #if VM_CORE_H_EC_DEFINED
69
+ return ec->cfp->ep[index];
70
+ #else
71
+ return rb_vm_lvar_exposed(ec, index);
72
+ #endif
73
+ }
74
+
75
+ // dump/load
76
+
77
+ struct builtin_binary {
78
+ const char *feature; // feature name
79
+ const unsigned char *bin; // binary by ISeq#to_binary
80
+ size_t bin_size;
81
+ };
82
+
83
+ #endif // BUILTIN_H_INCLUDED
@@ -0,0 +1,40 @@
1
+ /* CC0 (Public domain) - see ccan/licenses/CC0 file for details */
2
+ #ifndef CCAN_BUILD_ASSERT_H
3
+ #define CCAN_BUILD_ASSERT_H
4
+
5
+ /**
6
+ * BUILD_ASSERT - assert a build-time dependency.
7
+ * @cond: the compile-time condition which must be true.
8
+ *
9
+ * Your compile will fail if the condition isn't true, or can't be evaluated
10
+ * by the compiler. This can only be used within a function.
11
+ *
12
+ * Example:
13
+ * #include <stddef.h>
14
+ * ...
15
+ * static char *foo_to_char(struct foo *foo)
16
+ * {
17
+ * // This code needs string to be at start of foo.
18
+ * BUILD_ASSERT(offsetof(struct foo, string) == 0);
19
+ * return (char *)foo;
20
+ * }
21
+ */
22
+ #define BUILD_ASSERT(cond) \
23
+ do { (void) sizeof(char [1 - 2*!(cond)]); } while(0)
24
+
25
+ /**
26
+ * BUILD_ASSERT_OR_ZERO - assert a build-time dependency, as an expression.
27
+ * @cond: the compile-time condition which must be true.
28
+ *
29
+ * Your compile will fail if the condition isn't true, or can't be evaluated
30
+ * by the compiler. This can be used in an expression: its value is "0".
31
+ *
32
+ * Example:
33
+ * #define foo_to_char(foo) \
34
+ * ((char *)(foo) \
35
+ * + BUILD_ASSERT_OR_ZERO(offsetof(struct foo, string) == 0))
36
+ */
37
+ #define BUILD_ASSERT_OR_ZERO(cond) \
38
+ (sizeof(char [1 - 2*!(cond)]) - 1)
39
+
40
+ #endif /* CCAN_BUILD_ASSERT_H */