debase-ruby_core_source 4.0.1 → 4.1.0.preview1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (200) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +4 -0
  3. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/addr2line.h +22 -0
  4. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/builtin.h +127 -0
  5. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/ccan/build_assert/build_assert.h +40 -0
  6. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/ccan/check_type/check_type.h +63 -0
  7. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/ccan/container_of/container_of.h +142 -0
  8. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/ccan/list/list.h +791 -0
  9. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/ccan/str/str.h +17 -0
  10. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/constant.h +53 -0
  11. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/darray.h +295 -0
  12. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/debug_counter.h +428 -0
  13. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/dln.h +33 -0
  14. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/encindex.h +70 -0
  15. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/eval_intern.h +356 -0
  16. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/hrtime.h +237 -0
  17. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/id.h +365 -0
  18. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/id_table.h +74 -0
  19. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/insns.inc +315 -0
  20. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/insns_info.inc +11637 -0
  21. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/internal/array.h +158 -0
  22. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/internal/basic_operators.h +67 -0
  23. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/internal/bignum.h +249 -0
  24. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/internal/bits.h +647 -0
  25. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/internal/box.h +103 -0
  26. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/internal/class.h +797 -0
  27. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/internal/cmdlineopt.h +64 -0
  28. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/internal/compar.h +30 -0
  29. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/internal/compile.h +34 -0
  30. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/internal/compilers.h +104 -0
  31. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/internal/complex.h +29 -0
  32. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/internal/concurrent_set.h +21 -0
  33. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/internal/cont.h +33 -0
  34. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/internal/coverage.h +51 -0
  35. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/internal/dir.h +16 -0
  36. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/internal/enc.h +19 -0
  37. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/internal/encoding.h +40 -0
  38. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/internal/enum.h +18 -0
  39. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/internal/enumerator.h +21 -0
  40. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/internal/error.h +287 -0
  41. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/internal/eval.h +43 -0
  42. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/internal/file.h +40 -0
  43. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/internal/fixnum.h +185 -0
  44. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/internal/gc.h +411 -0
  45. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/internal/hash.h +220 -0
  46. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/internal/imemo.h +302 -0
  47. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/internal/inits.h +54 -0
  48. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/internal/io.h +167 -0
  49. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/internal/io_buffer.h +36 -0
  50. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/internal/jit.h +23 -0
  51. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/internal/load.h +20 -0
  52. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/internal/loadpath.h +16 -0
  53. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/internal/marshal.h +17 -0
  54. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/internal/math.h +23 -0
  55. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/internal/missing.h +19 -0
  56. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/internal/numeric.h +326 -0
  57. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/internal/object.h +88 -0
  58. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/internal/objspace.h +24 -0
  59. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/internal/parse.h +131 -0
  60. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/internal/proc.h +34 -0
  61. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/internal/process.h +124 -0
  62. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/internal/ractor.h +9 -0
  63. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/internal/random.h +17 -0
  64. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/internal/range.h +46 -0
  65. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/internal/rational.h +92 -0
  66. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/internal/re.h +87 -0
  67. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/internal/ruby_parser.h +109 -0
  68. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/internal/sanitizers.h +346 -0
  69. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/internal/scheduler.h +7 -0
  70. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/internal/serial.h +23 -0
  71. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/internal/set.h +20 -0
  72. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/internal/set_table.h +77 -0
  73. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/internal/signal.h +25 -0
  74. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/internal/simd.h +18 -0
  75. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/internal/st.h +32 -0
  76. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/internal/static_assert.h +16 -0
  77. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/internal/string.h +240 -0
  78. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/internal/struct.h +120 -0
  79. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/internal/symbol.h +46 -0
  80. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/internal/thread.h +108 -0
  81. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/internal/time.h +34 -0
  82. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/internal/transcode.h +23 -0
  83. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/internal/util.h +27 -0
  84. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/internal/variable.h +81 -0
  85. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/internal/vm.h +144 -0
  86. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/internal/vm_map.h +95 -0
  87. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/internal/warnings.h +16 -0
  88. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/internal.h +106 -0
  89. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/iseq.h +439 -0
  90. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/known_errors.inc +1419 -0
  91. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/method.h +279 -0
  92. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/node.h +122 -0
  93. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/node_name.inc +224 -0
  94. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/optinsn.inc +128 -0
  95. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/optunifs.inc +41 -0
  96. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/parse.h +246 -0
  97. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/parser_bits.h +647 -0
  98. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/parser_node.h +32 -0
  99. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/parser_st.h +161 -0
  100. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/parser_value.h +116 -0
  101. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/prism/arena.h +37 -0
  102. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/prism/ast.h +10371 -0
  103. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/prism/buffer.h +52 -0
  104. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/prism/comments.h +43 -0
  105. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/prism/compiler/accel.h +19 -0
  106. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/prism/compiler/align.h +36 -0
  107. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/prism/compiler/assume.h +25 -0
  108. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/prism/compiler/exported.h +24 -0
  109. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/prism/compiler/fallthrough.h +22 -0
  110. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/prism/compiler/filesystem.h +32 -0
  111. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/prism/compiler/flex_array.h +19 -0
  112. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/prism/compiler/force_inline.h +21 -0
  113. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/prism/compiler/format.h +25 -0
  114. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/prism/compiler/inline.h +17 -0
  115. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/prism/compiler/nodiscard.h +22 -0
  116. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/prism/compiler/nonnull.h +18 -0
  117. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/prism/compiler/unused.h +18 -0
  118. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/prism/constant_pool.h +81 -0
  119. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/prism/diagnostic.h +93 -0
  120. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/prism/errors_format.h +53 -0
  121. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/prism/excludes.h +29 -0
  122. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/prism/extension.h +19 -0
  123. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/prism/integer.h +41 -0
  124. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/prism/internal/allocator.h +68 -0
  125. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/prism/internal/allocator_debug.h +88 -0
  126. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/prism/internal/arena.h +108 -0
  127. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/prism/internal/bit.h +42 -0
  128. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/prism/internal/buffer.h +91 -0
  129. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/prism/internal/char.h +139 -0
  130. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/prism/internal/comments.h +20 -0
  131. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/prism/internal/constant_pool.h +152 -0
  132. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/prism/internal/diagnostic.h +389 -0
  133. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/prism/internal/encoding.h +242 -0
  134. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/prism/internal/integer.h +68 -0
  135. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/prism/internal/isinf.h +16 -0
  136. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/prism/internal/line_offset_list.h +34 -0
  137. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/prism/internal/list.h +62 -0
  138. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/prism/internal/magic_comments.h +23 -0
  139. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/prism/internal/memchr.h +15 -0
  140. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/prism/internal/node.h +32 -0
  141. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/prism/internal/options.h +224 -0
  142. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/prism/internal/parser.h +971 -0
  143. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/prism/internal/regexp.h +42 -0
  144. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/prism/internal/serialize.h +39 -0
  145. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/prism/internal/source.h +72 -0
  146. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/prism/internal/static_literals.h +100 -0
  147. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/prism/internal/stringy.h +35 -0
  148. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/prism/internal/strncasecmp.h +18 -0
  149. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/prism/internal/strpbrk.h +33 -0
  150. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/prism/internal/tokens.h +11 -0
  151. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/prism/json.h +32 -0
  152. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/prism/line_offset_list.h +61 -0
  153. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/prism/magic_comments.h +35 -0
  154. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/prism/node.h +94 -0
  155. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/prism/options.h +335 -0
  156. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/prism/parser.h +348 -0
  157. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/prism/prettyprint.h +31 -0
  158. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/prism/prism.h +131 -0
  159. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/prism/serialize.h +115 -0
  160. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/prism/source.h +155 -0
  161. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/prism/stream.h +28 -0
  162. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/prism/string_query.h +63 -0
  163. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/prism/stringy.h +72 -0
  164. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/prism/version.h +38 -0
  165. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/prism_compile.h +204 -0
  166. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/prism_xallocator.h +6 -0
  167. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/probes_helper.h +42 -0
  168. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/ractor_core.h +421 -0
  169. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/regenc.h +261 -0
  170. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/regint.h +983 -0
  171. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/regparse.h +371 -0
  172. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/revision.h +5 -0
  173. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/ruby_assert.h +14 -0
  174. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/ruby_atomic.h +115 -0
  175. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/rubyparser.h +1389 -0
  176. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/shape.h +733 -0
  177. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/siphash.h +48 -0
  178. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/symbol.h +116 -0
  179. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/thread_none.h +25 -0
  180. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/thread_pthread.h +63 -0
  181. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/thread_sched.h +271 -0
  182. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/thread_win32.h +48 -0
  183. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/timev.h +58 -0
  184. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/transcode_data.h +138 -0
  185. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/variable.h +26 -0
  186. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/version.h +69 -0
  187. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/vm.inc +6457 -0
  188. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/vm_call_iseq_optimized.inc +244 -0
  189. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/vm_callinfo.h +688 -0
  190. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/vm_core.h +2509 -0
  191. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/vm_debug.h +124 -0
  192. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/vm_exec.h +202 -0
  193. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/vm_insnhelper.h +280 -0
  194. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/vm_opts.h +65 -0
  195. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/vm_sync.h +160 -0
  196. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/vmtc.inc +302 -0
  197. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/yjit.h +87 -0
  198. data/lib/debase/ruby_core_source/ruby-4.1.0-preview1/zjit.h +221 -0
  199. data/lib/debase/ruby_core_source/version.rb +1 -1
  200. metadata +2930 -2724
@@ -0,0 +1,302 @@
1
+ #ifndef INTERNAL_IMEMO_H /*-*-C-*-vi:se ft=c:*/
2
+ #define INTERNAL_IMEMO_H
3
+ /**
4
+ * @author Ruby developers <ruby-core@ruby-lang.org>
5
+ * @copyright This file is a part of the programming language Ruby.
6
+ * Permission is hereby granted, to either redistribute and/or
7
+ * modify this file, provided that the conditions mentioned in the
8
+ * file COPYING are met. Consult the file for details.
9
+ * @brief IMEMO: Internal memo object.
10
+ */
11
+ #include "ruby/internal/config.h"
12
+ #include <stddef.h> /* for size_t */
13
+ #include "id_table.h"
14
+ #include "internal/array.h" /* for rb_ary_hidden_new_fill */
15
+ #include "ruby/internal/stdbool.h" /* for bool */
16
+ #include "ruby/ruby.h" /* for rb_block_call_func_t */
17
+
18
+ struct rb_gc_mark_ctx; /* internal/gc.h */
19
+
20
+ #define IMEMO_MASK (FL_USER0 | FL_USER1 | FL_USER2 | FL_USER3 | FL_USER4)
21
+
22
+ /* FL_USER0 to FL_USER4 is for type */
23
+ #define IMEMO_FL_USHIFT (FL_USHIFT + 5)
24
+ #define IMEMO_FL_USER0 FL_USER5
25
+ #define IMEMO_FL_USER1 FL_USER6
26
+ #define IMEMO_FL_USER2 FL_USER7
27
+ #define IMEMO_FL_USER3 FL_USER8
28
+ #define IMEMO_FL_USER4 FL_USER9
29
+ #define IMEMO_FL_USER5 FL_USER10
30
+ #define IMEMO_FL_USER6 FL_USER11
31
+
32
+ enum imemo_type {
33
+ imemo_env = 0,
34
+ imemo_cref = 1, /*!< class reference */
35
+ imemo_svar = 2, /*!< special variable */
36
+ imemo_throw_data = 3,
37
+ imemo_ifunc = 4, /*!< iterator function */
38
+ imemo_memo = 5,
39
+ imemo_ment = 6,
40
+ imemo_iseq = 7,
41
+ imemo_tmpbuf = 8,
42
+ imemo_cvar_entry = 9,
43
+ imemo_callinfo = 10,
44
+ imemo_callcache = 11,
45
+ imemo_constcache = 12,
46
+ imemo_fields = 13,
47
+ imemo_subclasses = 14,
48
+ imemo_cdhash = 15,
49
+ };
50
+
51
+ /* CREF (Class REFerence) is defined in method.h */
52
+
53
+ /*! SVAR (Special VARiable) */
54
+ struct vm_svar {
55
+ VALUE flags;
56
+ const VALUE cref_or_me; /*!< class reference or rb_method_entry_t */
57
+ const VALUE lastline;
58
+ const VALUE backref;
59
+ const VALUE others;
60
+ };
61
+
62
+ /*! THROW_DATA */
63
+ struct vm_throw_data {
64
+ VALUE flags;
65
+ const VALUE throw_obj;
66
+ const struct rb_control_frame_struct *catch_frame;
67
+ int throw_state;
68
+ };
69
+
70
+ #define THROW_DATA_CONSUMED IMEMO_FL_USER0
71
+
72
+ /* IFUNC (Internal FUNCtion) */
73
+
74
+ struct vm_ifunc_argc {
75
+ #if SIZEOF_INT * 2 > SIZEOF_VALUE
76
+ signed int min: (SIZEOF_VALUE * CHAR_BIT) / 2;
77
+ signed int max: (SIZEOF_VALUE * CHAR_BIT) / 2;
78
+ #else
79
+ int min, max;
80
+ #endif
81
+ };
82
+
83
+ /*! IFUNC (Internal FUNCtion)
84
+ *
85
+ * Bookkeeping for converting a C function and some closed-over data into a
86
+ * block passable to methods. Like Ruby Proc, but not directly accessible at
87
+ * Ruby level since this is an imemo. See rb_block_call() and friends.
88
+ */
89
+ struct vm_ifunc {
90
+ VALUE flags;
91
+ VALUE *svar_lep;
92
+ rb_block_call_func_t func;
93
+ const void *data;
94
+ struct vm_ifunc_argc argc;
95
+ };
96
+ #define IFUNC_YIELD_OPTIMIZABLE IMEMO_FL_USER0
97
+
98
+ struct rb_imemo_tmpbuf_struct {
99
+ VALUE flags;
100
+ VALUE *ptr; /* malloc'ed buffer */
101
+ size_t size; /* buffer size in bytes */
102
+ bool marked; /* whether the buffer may contain object references */
103
+ };
104
+
105
+ struct rb_imemo_cdhash {
106
+ VALUE flags;
107
+ st_table tbl;
108
+ };
109
+
110
+ /* Set on imemo_memo when u3 holds a VALUE that GC must mark.
111
+ * When unset, u3 is a non-VALUE (cnt/ucnt/state). */
112
+ #define MEMO_U3_IS_VALUE IMEMO_FL_USER0
113
+
114
+ /*! MEMO
115
+ *
116
+ * @see imemo_type
117
+ * */
118
+ struct MEMO {
119
+ VALUE flags;
120
+ const VALUE v1;
121
+ const VALUE v2;
122
+ union {
123
+ rb_len_t cnt;
124
+ rb_ulen_t ucnt;
125
+ long state;
126
+ const VALUE value;
127
+ } u3;
128
+ };
129
+
130
+ #define IMEMO_NEW(T, type, v0) ((T *)rb_imemo_new((type), (v0), sizeof(T), false))
131
+ #define SHAREABLE_IMEMO_NEW(T, type, v0) ((T *)rb_imemo_new((type), (v0), sizeof(T), true))
132
+
133
+ /* ment is in method.h */
134
+
135
+ #define THROW_DATA_P(err) imemo_throw_data_p((VALUE)err)
136
+ #define MEMO_CAST(m) ((struct MEMO *)(m))
137
+ #define MEMO_FOR(type, value) ((type *)RARRAY_PTR(value))
138
+ #define NEW_MEMO_FOR(type, value) \
139
+ ((value) = rb_ary_hidden_new_fill(type_roomof(type, VALUE)), MEMO_FOR(type, value))
140
+ #define NEW_PARTIAL_MEMO_FOR(type, value, member) \
141
+ ((value) = rb_ary_hidden_new_fill(type_roomof(type, VALUE)), \
142
+ rb_ary_set_len((value), offsetof(type, member) / sizeof(VALUE)), \
143
+ MEMO_FOR(type, value))
144
+
145
+ #ifndef RUBY_RUBYPARSER_H
146
+ typedef struct rb_imemo_tmpbuf_struct rb_imemo_tmpbuf_t;
147
+ #endif
148
+ VALUE rb_imemo_new(enum imemo_type type, VALUE v0, size_t size, bool is_shareable);
149
+ struct MEMO *rb_imemo_memo_new(VALUE a, VALUE b, rb_len_t c);
150
+ struct MEMO *rb_imemo_memo_new_value(VALUE a, VALUE b, VALUE c);
151
+ struct vm_ifunc *rb_vm_ifunc_new(rb_block_call_func_t func, const void *data, int min_argc, int max_argc);
152
+ static inline enum imemo_type imemo_type(VALUE imemo);
153
+ static inline int imemo_type_p(VALUE imemo, enum imemo_type imemo_type);
154
+ static inline bool imemo_throw_data_p(VALUE imemo);
155
+ static inline struct vm_ifunc *rb_vm_ifunc_proc_new(rb_block_call_func_t func, const void *data);
156
+ static inline void *RB_IMEMO_TMPBUF_PTR(VALUE v);
157
+ static inline void MEMO_V1_SET(struct MEMO *m, VALUE v);
158
+ static inline void MEMO_V2_SET(struct MEMO *m, VALUE v);
159
+
160
+ size_t rb_imemo_memsize(VALUE obj);
161
+ void rb_imemo_mark_and_move(const struct rb_gc_mark_ctx *ctx, VALUE obj, bool reference_updating);
162
+ void rb_imemo_free(VALUE obj);
163
+
164
+ RUBY_SYMBOL_EXPORT_BEGIN
165
+ const char *rb_imemo_name(enum imemo_type type);
166
+ ID rb_imemo_callinfo_mid(VALUE obj);
167
+ struct rb_imemo_callcache_data {
168
+ VALUE klass;
169
+ ID called_id;
170
+ };
171
+ bool rb_imemo_callcache_get_data(VALUE obj, struct rb_imemo_callcache_data *data);
172
+ RUBY_SYMBOL_EXPORT_END
173
+
174
+ static inline enum imemo_type
175
+ imemo_type(VALUE imemo)
176
+ {
177
+ return (RBASIC(imemo)->flags & IMEMO_MASK) >> FL_USHIFT;
178
+ }
179
+
180
+ static inline int
181
+ imemo_type_p(VALUE imemo, enum imemo_type imemo_type)
182
+ {
183
+ if (LIKELY(!RB_SPECIAL_CONST_P(imemo))) {
184
+ /* fixed at compile time if imemo_type is given. */
185
+ const VALUE mask = IMEMO_MASK | RUBY_T_MASK;
186
+ const VALUE expected_type = (imemo_type << FL_USHIFT) | T_IMEMO;
187
+ /* fixed at runtime. */
188
+ return expected_type == (RBASIC(imemo)->flags & mask);
189
+ }
190
+ else {
191
+ return 0;
192
+ }
193
+ }
194
+
195
+ #define IMEMO_TYPE_P(v, t) imemo_type_p((VALUE)(v), t)
196
+
197
+ static inline bool
198
+ imemo_throw_data_p(VALUE imemo)
199
+ {
200
+ return RB_TYPE_P(imemo, T_IMEMO);
201
+ }
202
+
203
+ static inline struct vm_ifunc *
204
+ rb_vm_ifunc_proc_new(rb_block_call_func_t func, const void *data)
205
+ {
206
+ return rb_vm_ifunc_new(func, data, 0, UNLIMITED_ARGUMENTS);
207
+ }
208
+
209
+ static inline void *
210
+ RB_IMEMO_TMPBUF_PTR(VALUE v)
211
+ {
212
+ const struct rb_imemo_tmpbuf_struct *p = (const void *)v;
213
+ return p->ptr;
214
+ }
215
+
216
+ static inline VALUE
217
+ rb_imemo_tmpbuf_new_from_an_RString(VALUE str)
218
+ {
219
+ VALUE imemo;
220
+ size_t len;
221
+
222
+ StringValue(str);
223
+ len = RSTRING_LEN(str);
224
+ rb_alloc_tmp_buffer(&imemo, len, false);
225
+ memcpy(RB_IMEMO_TMPBUF_PTR(imemo), RSTRING_PTR(str), len);
226
+ return imemo;
227
+ }
228
+
229
+ static inline void
230
+ MEMO_V1_SET(struct MEMO *m, VALUE v)
231
+ {
232
+ RB_OBJ_WRITE(m, &m->v1, v);
233
+ }
234
+
235
+ static inline void
236
+ MEMO_V2_SET(struct MEMO *m, VALUE v)
237
+ {
238
+ RB_OBJ_WRITE(m, &m->v2, v);
239
+ }
240
+
241
+ VALUE rb_imemo_cdhash_new(size_t size, const struct st_hash_type *type);
242
+
243
+ static inline st_table *
244
+ rb_imemo_cdhash_tbl(VALUE obj)
245
+ {
246
+ RUBY_ASSERT(IMEMO_TYPE_P(obj, imemo_cdhash));
247
+ return &((struct rb_imemo_cdhash *)obj)->tbl;
248
+ }
249
+
250
+ struct rb_fields {
251
+ struct RBasic basic;
252
+ union {
253
+ struct {
254
+ VALUE fields[1];
255
+ } embed;
256
+ struct {
257
+ st_table table;
258
+ } complex;
259
+ } as;
260
+ };
261
+
262
+ // IMEMO/fields and T_OBJECT have exactly the same layout.
263
+ // This is useful for JIT and common codepaths.
264
+ STATIC_ASSERT(imemo_fields_embed_offset, offsetof(struct RObject, as.ary) == offsetof(struct rb_fields, as.embed.fields));
265
+
266
+ #define IMEMO_OBJ_FIELDS(fields) ((struct rb_fields *)fields)
267
+
268
+ #define IMEMO_SUBCLASSES_HEAP IMEMO_FL_USER0
269
+
270
+ struct rb_subclasses {
271
+ VALUE flags;
272
+ uint32_t count;
273
+ uint32_t capacity;
274
+ union {
275
+ VALUE *external;
276
+ VALUE embed[1];
277
+ } as;
278
+ };
279
+
280
+ static inline VALUE *
281
+ rb_imemo_subclasses_entries(VALUE v)
282
+ {
283
+ struct rb_subclasses *s = (struct rb_subclasses *)v;
284
+ return FL_TEST_RAW(v, IMEMO_SUBCLASSES_HEAP) ? s->as.external : s->as.embed;
285
+ }
286
+
287
+ VALUE rb_imemo_fields_new(VALUE owner, /* shape_id_t */ uint32_t shape_id, bool shareable);
288
+ VALUE rb_imemo_subclasses_new(uint32_t capacity);
289
+ VALUE rb_imemo_fields_new_complex(VALUE owner, /* shape_id_t */ uint32_t shape_id, size_t capa, bool shareable);
290
+ VALUE rb_imemo_fields_new_complex_empty(VALUE owner);
291
+ VALUE rb_imemo_fields_clone(VALUE fields_obj);
292
+ void rb_imemo_fields_clear(VALUE fields_obj);
293
+
294
+ static inline VALUE
295
+ rb_imemo_fields_owner(VALUE fields_obj)
296
+ {
297
+ RUBY_ASSERT(IMEMO_TYPE_P(fields_obj, imemo_fields));
298
+
299
+ return CLASS_OF(fields_obj);
300
+ }
301
+
302
+ #endif /* INTERNAL_IMEMO_H */
@@ -0,0 +1,54 @@
1
+ #ifndef INTERNAL_INITS_H /*-*-C-*-vi:se ft=c:*/
2
+ #define INTERNAL_INITS_H
3
+ /**
4
+ * @author Ruby developers <ruby-core@ruby-lang.org>
5
+ * @copyright This file is a part of the programming language Ruby.
6
+ * Permission is hereby granted, to either redistribute and/or
7
+ * modify this file, provided that the conditions mentioned in the
8
+ * file COPYING are met. Consult the file for details.
9
+ * @brief Internal header aggregating init functions.
10
+ */
11
+
12
+ /* box.c */
13
+ void Init_enable_box(void);
14
+ void Init_master_box(void);
15
+
16
+ /* class.c */
17
+ void Init_class_hierarchy(void);
18
+
19
+ /* dmyext.c */
20
+ void Init_enc(void);
21
+ void Init_ext(void);
22
+
23
+ /* file.c */
24
+ void Init_File(void);
25
+
26
+ /* localeinit.c */
27
+ int Init_enc_set_filesystem_encoding(void);
28
+
29
+ /* newline.c */
30
+ void Init_newline(void);
31
+
32
+ /* shape.c */
33
+ void Init_default_shapes(void);
34
+
35
+ /* vm.c */
36
+ void Init_BareVM(void);
37
+ void Init_vm_objects(void);
38
+
39
+ /* vm_backtrace.c */
40
+ void Init_vm_backtrace(void);
41
+
42
+ /* vm_eval.c */
43
+ void Init_vm_eval(void);
44
+
45
+ /* vm_insnhelper.c */
46
+ void Init_vm_stack_canary(void);
47
+
48
+ /* vm_method.c */
49
+ void Init_eval_method(void);
50
+
51
+ /* inits.c */
52
+ void rb_call_inits(void);
53
+
54
+ #endif /* INTERNAL_INITS_H */
@@ -0,0 +1,167 @@
1
+ #ifndef INTERNAL_IO_H /*-*-C-*-vi:se ft=c:*/
2
+ #define INTERNAL_IO_H
3
+ /**
4
+ * @author Ruby developers <ruby-core@ruby-lang.org>
5
+ * @copyright This file is a part of the programming language Ruby.
6
+ * Permission is hereby granted, to either redistribute and/or
7
+ * modify this file, provided that the conditions mentioned in the
8
+ * file COPYING are met. Consult the file for details.
9
+ * @brief Internal header for IO.
10
+ */
11
+ #include "ruby/ruby.h" /* for VALUE */
12
+
13
+ #define HAVE_RB_IO_T
14
+ struct rb_io;
15
+
16
+ #include "ruby/io.h" /* for rb_io_t */
17
+ #include "ccan/list/list.h"
18
+ #include "serial.h"
19
+
20
+ #define IO_WITHOUT_GVL(func, arg) rb_nogvl(func, arg, RUBY_UBF_IO, 0, RB_NOGVL_OFFLOAD_SAFE)
21
+ #define IO_WITHOUT_GVL_INT(func, arg) (int)(VALUE)IO_WITHOUT_GVL(func, arg)
22
+
23
+ // Represents an in-flight blocking operation:
24
+ struct rb_io_blocking_operation {
25
+ // The linked list data structure.
26
+ struct ccan_list_node list;
27
+
28
+ // The execution context of the blocking operation.
29
+ struct rb_execution_context_struct *ec;
30
+
31
+ // An operation-scoped target passed to the Fiber scheduler if interrupted.
32
+ VALUE scheduler_interrupt_target;
33
+ };
34
+
35
+ /** Ruby's IO, metadata and buffers. */
36
+ struct rb_io {
37
+
38
+ /** The IO's Ruby level counterpart. */
39
+ VALUE self;
40
+
41
+ /** stdio ptr for read/write, if available. */
42
+ FILE *stdio_file;
43
+
44
+ /** file descriptor. */
45
+ int fd;
46
+
47
+ /** mode flags: FMODE_XXXs */
48
+ enum rb_io_mode mode;
49
+
50
+ /** child's pid (for pipes) */
51
+ rb_pid_t pid;
52
+
53
+ /** number of lines read */
54
+ int lineno;
55
+
56
+ /** pathname for file */
57
+ VALUE pathv;
58
+
59
+ /** finalize proc */
60
+ void (*finalize)(struct rb_io*,int);
61
+
62
+ /** Write buffer. */
63
+ rb_io_buffer_t wbuf;
64
+
65
+ /**
66
+ * (Byte) read buffer. Note also that there is a field called
67
+ * ::rb_io_t::cbuf, which also concerns read IO.
68
+ */
69
+ rb_io_buffer_t rbuf;
70
+
71
+ /**
72
+ * Duplex IO object, if set.
73
+ *
74
+ * @see rb_io_set_write_io()
75
+ */
76
+ VALUE tied_io_for_writing;
77
+
78
+ struct rb_io_encoding encs; /**< Decomposed encoding flags. */
79
+
80
+ /** Encoding converter used when reading from this IO. */
81
+ rb_econv_t *readconv;
82
+
83
+ /**
84
+ * rb_io_ungetc() destination. This buffer is read before checking
85
+ * ::rb_io_t::rbuf
86
+ */
87
+ rb_io_buffer_t cbuf;
88
+
89
+ /** Encoding converter used when writing to this IO. */
90
+ rb_econv_t *writeconv;
91
+
92
+ /**
93
+ * This is, when set, an instance of ::rb_cString which holds the "common"
94
+ * encoding. Write conversion can convert strings twice... In case
95
+ * conversion from encoding X to encoding Y does not exist, Ruby finds an
96
+ * encoding Z that bridges the two, so that X to Z to Y conversion happens.
97
+ */
98
+ VALUE writeconv_asciicompat;
99
+
100
+ /** Whether ::rb_io_t::writeconv is already set up. */
101
+ int writeconv_initialized;
102
+
103
+ /**
104
+ * Value of ::rb_io_t::rb_io_enc_t::ecflags stored right before
105
+ * initialising ::rb_io_t::writeconv.
106
+ */
107
+ int writeconv_pre_ecflags;
108
+
109
+ /**
110
+ * Value of ::rb_io_t::rb_io_enc_t::ecopts stored right before initialising
111
+ * ::rb_io_t::writeconv.
112
+ */
113
+ VALUE writeconv_pre_ecopts;
114
+
115
+ /**
116
+ * This is a Ruby level mutex. It avoids multiple threads to write to an
117
+ * IO at once; helps for instance rb_io_puts() to ensure newlines right
118
+ * next to its arguments.
119
+ *
120
+ * This of course doesn't help inter-process IO interleaves, though.
121
+ */
122
+ VALUE write_lock;
123
+
124
+ /**
125
+ * The timeout associated with this IO when performing blocking operations.
126
+ */
127
+ VALUE timeout;
128
+
129
+ /**
130
+ * Threads that are performing a blocking operation without the GVL using
131
+ * this IO. On calling IO#close, these threads will be interrupted so that
132
+ * the operation can be cancelled.
133
+ */
134
+ struct ccan_list_head blocking_operations;
135
+ struct rb_execution_context_struct *closing_ec;
136
+ VALUE wakeup_mutex;
137
+
138
+ // The fork generation of the blocking operations list.
139
+ rb_serial_t fork_generation;
140
+ };
141
+
142
+ /* io.c */
143
+ void ruby_set_inplace_mode(const char *);
144
+ void rb_stdio_set_default_encoding(void);
145
+ VALUE rb_io_flush_raw(VALUE, int);
146
+ size_t rb_io_memsize(const rb_io_t *);
147
+ int rb_stderr_tty_p(void);
148
+ VALUE rb_io_popen(VALUE pname, VALUE pmode, VALUE env, VALUE opt);
149
+
150
+ VALUE rb_io_prep_stdin(void);
151
+ VALUE rb_io_prep_stdout(void);
152
+ VALUE rb_io_prep_stderr(void);
153
+
154
+ int rb_io_notify_close(struct rb_io *fptr);
155
+ bool rb_io_fptr_finalize_closed(struct rb_io *fptr);
156
+
157
+ RUBY_SYMBOL_EXPORT_BEGIN
158
+ /* io.c (export) */
159
+ void rb_maygvl_fd_fix_cloexec(int fd);
160
+ int rb_gc_for_fd(int err);
161
+ void rb_write_error_str(VALUE mesg);
162
+
163
+ VALUE rb_io_blocking_region_wait(struct rb_io *io, rb_blocking_function_t *function, void *argument, enum rb_io_event events);
164
+ VALUE rb_io_blocking_region(struct rb_io *io, rb_blocking_function_t *function, void *argument);
165
+ RUBY_SYMBOL_EXPORT_END
166
+
167
+ #endif /* INTERNAL_IO_H */
@@ -0,0 +1,36 @@
1
+ #pragma once
2
+
3
+ #include <ruby/ruby.h>
4
+ #include <ruby/io/buffer.h>
5
+
6
+ RUBY_SYMBOL_EXPORT_BEGIN
7
+
8
+ /**
9
+ * Wrap string_or_buffer as a read-only IO::Buffer view and invoke callback(buffer, argument).
10
+ *
11
+ * The resulting buffer's backing allocation is locked for the duration of the
12
+ * callback and automatically unlocked when the callback returns or raises.
13
+ *
14
+ * - IO::Buffer: locked and passed directly to the callback.
15
+ * - String: locked to prevent GC compaction from moving the backing memory,
16
+ * wrapped in a locked read-only IO::Buffer, callback called inside
17
+ * rb_ensure, buffer freed and string unlocked on exit.
18
+ * - Other: TypeError raised.
19
+ */
20
+ VALUE rb_io_buffer_for_reading(VALUE string_or_buffer, VALUE (*callback)(VALUE buffer, VALUE argument), VALUE argument);
21
+
22
+ /**
23
+ * Wrap string_or_buffer as a writable IO::Buffer view and invoke callback(buffer, argument).
24
+ *
25
+ * - Read-only IO::Buffer: ArgumentError raised.
26
+ * The resulting buffer's backing allocation is locked for the duration of the
27
+ * callback and automatically unlocked when the callback returns or raises.
28
+ *
29
+ * - IO::Buffer: locked and passed directly to the callback.
30
+ * - String: locked, wrapped in a writable IO::Buffer, callback called inside
31
+ * rb_ensure, buffer unlocked and freed, and string unlocked on exit.
32
+ * - Other: TypeError raised.
33
+ */
34
+ VALUE rb_io_buffer_for_writing(VALUE string_or_buffer, VALUE (*callback)(VALUE buffer, VALUE argument), VALUE argument);
35
+
36
+ RUBY_SYMBOL_EXPORT_END
@@ -0,0 +1,23 @@
1
+ #ifndef INTERNAL_JIT_H /*-*-C-*-vi:se ft=c:*/
2
+ #define INTERNAL_JIT_H
3
+
4
+ #include "iseq.h"
5
+
6
+ typedef void (*rb_iseq_callback)(const rb_iseq_t *, void *);
7
+
8
+ /* cont.c */
9
+ void rb_jit_cont_init(void);
10
+ void rb_jit_cont_each_iseq(rb_iseq_callback callback, void *data);
11
+ void rb_jit_cont_finish(void);
12
+
13
+ /* jit.c */
14
+ void rb_jit_for_each_iseq(rb_iseq_callback callback, void *data);
15
+ uint32_t rb_jit_get_page_size(void);
16
+ uint8_t *rb_jit_reserve_addr_space(uint32_t mem_size);
17
+
18
+ /* vm.c */
19
+ RUBY_SYMBOL_EXPORT_BEGIN
20
+ unsigned int rb_jit_call_threshold(void);
21
+ RUBY_SYMBOL_EXPORT_END
22
+
23
+ #endif /* INTERNAL_JIT_H */
@@ -0,0 +1,20 @@
1
+ #ifndef INTERNAL_LOAD_H /*-*-C-*-vi:se ft=c:*/
2
+ #define INTERNAL_LOAD_H
3
+ /**
4
+ * @author Ruby developers <ruby-core@ruby-lang.org>
5
+ * @copyright This file is a part of the programming language Ruby.
6
+ * Permission is hereby granted, to either redistribute and/or
7
+ * modify this file, provided that the conditions mentioned in the
8
+ * file COPYING are met. Consult the file for details.
9
+ * @brief Internal header for require.
10
+ */
11
+ #include "ruby/ruby.h" /* for VALUE */
12
+
13
+ /* load.c */
14
+ VALUE rb_get_expanded_load_path(rb_len_t *maxlen);
15
+ VALUE rb_load_entrypoint(VALUE fname, VALUE wrap);
16
+ VALUE rb_require_relative_entrypoint(VALUE fname);
17
+ int rb_require_internal(VALUE fname);
18
+ NORETURN(void rb_load_fail(VALUE, const char*));
19
+
20
+ #endif /* INTERNAL_LOAD_H */
@@ -0,0 +1,16 @@
1
+ #ifndef INTERNAL_LOADPATH_H /*-*-C-*-vi:se ft=c:*/
2
+ #define INTERNAL_LOADPATH_H
3
+ /**
4
+ * @author Ruby developers <ruby-core@ruby-lang.org>
5
+ * @copyright This file is a part of the programming language Ruby.
6
+ * Permission is hereby granted, to either redistribute and/or
7
+ * modify this file, provided that the conditions mentioned in the
8
+ * file COPYING are met. Consult the file for details.
9
+ * @brief Internal header for $LOAD_PATH.
10
+ */
11
+
12
+ /* loadpath.c */
13
+ extern const char ruby_exec_prefix[];
14
+ extern const char ruby_initial_load_paths[];
15
+
16
+ #endif /* INTERNAL_LOADPATH_H */
@@ -0,0 +1,17 @@
1
+ #ifndef INTERNAL_MARSHAL_H /*-*-C-*-vi:se ft=c:*/
2
+ #define INTERNAL_MARSHAL_H
3
+ /**
4
+ * @author Ruby developers <ruby-core@ruby-lang.org>
5
+ * @copyright This file is a part of the programming language Ruby.
6
+ * Permission is hereby granted, to either redistribute and/or
7
+ * modify this file, provided that the conditions mentioned in the
8
+ * file COPYING are met. Consult the file for details.
9
+ * @brief Internal header for Marshal.
10
+ */
11
+ #include "ruby/internal/stdbool.h" /* for bool */
12
+ #include "ruby/ruby.h" /* for VALUE */
13
+
14
+ /* marshal.c */
15
+ bool rb_marshal_compat_lookup(VALUE klass, VALUE (**dumper)(VALUE), VALUE (**loader)(VALUE, VALUE));
16
+
17
+ #endif /* INTERNAL_MARSHAL_H */
@@ -0,0 +1,23 @@
1
+ #ifndef INTERNAL_MATH_H /*-*-C-*-vi:se ft=c:*/
2
+ #define INTERNAL_MATH_H
3
+ /**
4
+ * @author Ruby developers <ruby-core@ruby-lang.org>
5
+ * @copyright This file is a part of the programming language Ruby.
6
+ * Permission is hereby granted, to either redistribute and/or
7
+ * modify this file, provided that the conditions mentioned in the
8
+ * file COPYING are met. Consult the file for details.
9
+ * @brief Internal header for Math.
10
+ */
11
+ #include "ruby/ruby.h" /* for VALUE */
12
+
13
+ /* math.c */
14
+ VALUE rb_math_atan2(VALUE, VALUE);
15
+ VALUE rb_math_cos(VALUE);
16
+ VALUE rb_math_cosh(VALUE);
17
+ VALUE rb_math_exp(VALUE);
18
+ VALUE rb_math_hypot(VALUE, VALUE);
19
+ VALUE rb_math_log(int argc, const VALUE *argv);
20
+ VALUE rb_math_sin(VALUE);
21
+ VALUE rb_math_sinh(VALUE);
22
+
23
+ #endif /* INTERNAL_MATH_H */
@@ -0,0 +1,19 @@
1
+ #ifndef INTERNAL_MISSING_H /*-*-C-*-vi:se ft=c:*/
2
+ #define INTERNAL_MISSING_H
3
+ /**
4
+ * @author Ruby developers <ruby-core@ruby-lang.org>
5
+ * @copyright This file is a part of the programming language Ruby.
6
+ * Permission is hereby granted, to either redistribute and/or
7
+ * modify this file, provided that the conditions mentioned in the
8
+ * file COPYING are met. Consult the file for details.
9
+ * @brief Internal header corresponding missing.
10
+ */
11
+ #include "ruby/internal/config.h" /* for HAVE_SETPROCTITLE */
12
+
13
+ /* missing/setproctitle.c */
14
+ #ifndef HAVE_SETPROCTITLE
15
+ extern void ruby_init_setproctitle(int argc, char *argv[]);
16
+ extern void ruby_free_proctitle(void);
17
+ #endif
18
+
19
+ #endif /* INTERNAL_MISSING_H */