datadog-ruby_core_source 3.5.4 → 3.5.6

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 (198) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +0 -2
  3. data/datadog-ruby_core_source.gemspec +1 -1
  4. data/lib/datadog/ruby_core_source/ruby-2.6.0-p0/ccan/build_assert/build_assert.h +40 -0
  5. data/lib/datadog/ruby_core_source/ruby-2.6.0-p0/ccan/check_type/check_type.h +63 -0
  6. data/lib/datadog/ruby_core_source/ruby-2.6.0-p0/ccan/container_of/container_of.h +142 -0
  7. data/lib/datadog/ruby_core_source/ruby-2.6.0-p0/ccan/list/list.h +788 -0
  8. data/lib/datadog/ruby_core_source/ruby-2.6.0-p0/ccan/str/str.h +16 -0
  9. data/lib/datadog/ruby_core_source/ruby-2.6.0-p0/id.h +252 -0
  10. data/lib/datadog/ruby_core_source/ruby-2.6.0-p0/internal.h +2465 -0
  11. data/lib/datadog/ruby_core_source/ruby-2.6.0-p0/iseq.h +304 -0
  12. data/lib/datadog/ruby_core_source/ruby-2.6.0-p0/method.h +229 -0
  13. data/lib/datadog/ruby_core_source/ruby-2.6.0-p0/node.h +449 -0
  14. data/lib/datadog/ruby_core_source/ruby-2.6.0-p0/ruby_assert.h +60 -0
  15. data/lib/datadog/ruby_core_source/ruby-2.6.0-p0/ruby_atomic.h +244 -0
  16. data/lib/datadog/ruby_core_source/ruby-2.6.0-p0/thread_pthread.h +75 -0
  17. data/lib/datadog/ruby_core_source/ruby-2.6.0-p0/thread_win32.h +36 -0
  18. data/lib/datadog/ruby_core_source/ruby-2.6.0-p0/vm_core.h +1902 -0
  19. data/lib/datadog/ruby_core_source/ruby-2.6.0-p0/vm_opts.h +70 -0
  20. data/lib/datadog/ruby_core_source/ruby-2.7.0-p0/ccan/build_assert/build_assert.h +40 -0
  21. data/lib/datadog/ruby_core_source/ruby-2.7.0-p0/ccan/check_type/check_type.h +63 -0
  22. data/lib/datadog/ruby_core_source/ruby-2.7.0-p0/ccan/container_of/container_of.h +142 -0
  23. data/lib/datadog/ruby_core_source/ruby-2.7.0-p0/ccan/list/list.h +788 -0
  24. data/lib/datadog/ruby_core_source/ruby-2.7.0-p0/ccan/str/str.h +16 -0
  25. data/lib/datadog/ruby_core_source/ruby-2.7.0-p0/id.h +290 -0
  26. data/lib/datadog/ruby_core_source/ruby-2.7.0-p0/internal.h +2697 -0
  27. data/lib/datadog/ruby_core_source/ruby-2.7.0-p0/iseq.h +312 -0
  28. data/lib/datadog/ruby_core_source/ruby-2.7.0-p0/method.h +229 -0
  29. data/lib/datadog/ruby_core_source/ruby-2.7.0-p0/node.h +476 -0
  30. data/lib/datadog/ruby_core_source/ruby-2.7.0-p0/ruby_assert.h +15 -0
  31. data/lib/datadog/ruby_core_source/ruby-2.7.0-p0/ruby_atomic.h +244 -0
  32. data/lib/datadog/ruby_core_source/ruby-2.7.0-p0/thread_pthread.h +75 -0
  33. data/lib/datadog/ruby_core_source/ruby-2.7.0-p0/thread_win32.h +36 -0
  34. data/lib/datadog/ruby_core_source/ruby-2.7.0-p0/vm_core.h +1968 -0
  35. data/lib/datadog/ruby_core_source/ruby-2.7.0-p0/vm_opts.h +72 -0
  36. data/lib/datadog/ruby_core_source/ruby-3.0.0-p0/ccan/build_assert/build_assert.h +40 -0
  37. data/lib/datadog/ruby_core_source/ruby-3.0.0-p0/ccan/check_type/check_type.h +63 -0
  38. data/lib/datadog/ruby_core_source/ruby-3.0.0-p0/ccan/container_of/container_of.h +142 -0
  39. data/lib/datadog/ruby_core_source/ruby-3.0.0-p0/ccan/list/list.h +788 -0
  40. data/lib/datadog/ruby_core_source/ruby-3.0.0-p0/ccan/str/str.h +16 -0
  41. data/lib/datadog/ruby_core_source/ruby-3.0.0-p0/id.h +290 -0
  42. data/lib/datadog/ruby_core_source/ruby-3.0.0-p0/id_table.h +36 -0
  43. data/lib/datadog/ruby_core_source/ruby-3.0.0-p0/internal/array.h +119 -0
  44. data/lib/datadog/ruby_core_source/ruby-3.0.0-p0/internal/class.h +174 -0
  45. data/lib/datadog/ruby_core_source/ruby-3.0.0-p0/internal/compilers.h +108 -0
  46. data/lib/datadog/ruby_core_source/ruby-3.0.0-p0/internal/gc.h +161 -0
  47. data/lib/datadog/ruby_core_source/ruby-3.0.0-p0/internal/imemo.h +243 -0
  48. data/lib/datadog/ruby_core_source/ruby-3.0.0-p0/internal/serial.h +24 -0
  49. data/lib/datadog/ruby_core_source/ruby-3.0.0-p0/internal/static_assert.h +17 -0
  50. data/lib/datadog/ruby_core_source/ruby-3.0.0-p0/internal/vm.h +136 -0
  51. data/lib/datadog/ruby_core_source/ruby-3.0.0-p0/internal/warnings.h +17 -0
  52. data/lib/datadog/ruby_core_source/ruby-3.0.0-p0/internal.h +107 -0
  53. data/lib/datadog/ruby_core_source/ruby-3.0.0-p0/iseq.h +305 -0
  54. data/lib/datadog/ruby_core_source/ruby-3.0.0-p0/method.h +245 -0
  55. data/lib/datadog/ruby_core_source/ruby-3.0.0-p0/node.h +484 -0
  56. data/lib/datadog/ruby_core_source/ruby-3.0.0-p0/ractor_core.h +343 -0
  57. data/lib/datadog/ruby_core_source/ruby-3.0.0-p0/ruby_assert.h +15 -0
  58. data/lib/datadog/ruby_core_source/ruby-3.0.0-p0/ruby_atomic.h +23 -0
  59. data/lib/datadog/ruby_core_source/ruby-3.0.0-p0/thread_pthread.h +115 -0
  60. data/lib/datadog/ruby_core_source/ruby-3.0.0-p0/thread_win32.h +61 -0
  61. data/lib/datadog/ruby_core_source/ruby-3.0.0-p0/vm_core.h +2023 -0
  62. data/lib/datadog/ruby_core_source/ruby-3.0.0-p0/vm_debug.h +116 -0
  63. data/lib/datadog/ruby_core_source/ruby-3.0.0-p0/vm_opts.h +73 -0
  64. data/lib/datadog/ruby_core_source/ruby-3.1.0-p0/ccan/build_assert/build_assert.h +40 -0
  65. data/lib/datadog/ruby_core_source/ruby-3.1.0-p0/ccan/check_type/check_type.h +63 -0
  66. data/lib/datadog/ruby_core_source/ruby-3.1.0-p0/ccan/container_of/container_of.h +142 -0
  67. data/lib/datadog/ruby_core_source/ruby-3.1.0-p0/ccan/list/list.h +788 -0
  68. data/lib/datadog/ruby_core_source/ruby-3.1.0-p0/ccan/str/str.h +16 -0
  69. data/lib/datadog/ruby_core_source/ruby-3.1.0-p0/darray.h +198 -0
  70. data/lib/datadog/ruby_core_source/ruby-3.1.0-p0/id.h +293 -0
  71. data/lib/datadog/ruby_core_source/ruby-3.1.0-p0/id_table.h +36 -0
  72. data/lib/datadog/ruby_core_source/ruby-3.1.0-p0/internal/array.h +113 -0
  73. data/lib/datadog/ruby_core_source/ruby-3.1.0-p0/internal/class.h +196 -0
  74. data/lib/datadog/ruby_core_source/ruby-3.1.0-p0/internal/compilers.h +107 -0
  75. data/lib/datadog/ruby_core_source/ruby-3.1.0-p0/internal/gc.h +186 -0
  76. data/lib/datadog/ruby_core_source/ruby-3.1.0-p0/internal/imemo.h +243 -0
  77. data/lib/datadog/ruby_core_source/ruby-3.1.0-p0/internal/serial.h +23 -0
  78. data/lib/datadog/ruby_core_source/ruby-3.1.0-p0/internal/static_assert.h +16 -0
  79. data/lib/datadog/ruby_core_source/ruby-3.1.0-p0/internal/vm.h +133 -0
  80. data/lib/datadog/ruby_core_source/ruby-3.1.0-p0/internal/warnings.h +16 -0
  81. data/lib/datadog/ruby_core_source/ruby-3.1.0-p0/internal.h +109 -0
  82. data/lib/datadog/ruby_core_source/ruby-3.1.0-p0/iseq.h +322 -0
  83. data/lib/datadog/ruby_core_source/ruby-3.1.0-p0/method.h +253 -0
  84. data/lib/datadog/ruby_core_source/ruby-3.1.0-p0/node.h +510 -0
  85. data/lib/datadog/ruby_core_source/ruby-3.1.0-p0/ractor_core.h +346 -0
  86. data/lib/datadog/ruby_core_source/ruby-3.1.0-p0/ruby_assert.h +14 -0
  87. data/lib/datadog/ruby_core_source/ruby-3.1.0-p0/ruby_atomic.h +23 -0
  88. data/lib/datadog/ruby_core_source/ruby-3.1.0-p0/thread_pthread.h +115 -0
  89. data/lib/datadog/ruby_core_source/ruby-3.1.0-p0/vm_core.h +2107 -0
  90. data/lib/datadog/ruby_core_source/ruby-3.1.0-p0/vm_debug.h +124 -0
  91. data/lib/datadog/ruby_core_source/ruby-3.1.0-p0/vm_opts.h +73 -0
  92. data/lib/datadog/ruby_core_source/ruby-3.2.0-p0/ccan/build_assert/build_assert.h +40 -0
  93. data/lib/datadog/ruby_core_source/ruby-3.2.0-p0/ccan/check_type/check_type.h +63 -0
  94. data/lib/datadog/ruby_core_source/ruby-3.2.0-p0/ccan/container_of/container_of.h +142 -0
  95. data/lib/datadog/ruby_core_source/ruby-3.2.0-p0/ccan/list/list.h +789 -0
  96. data/lib/datadog/ruby_core_source/ruby-3.2.0-p0/ccan/str/str.h +17 -0
  97. data/lib/datadog/ruby_core_source/ruby-3.2.0-p0/id.h +299 -0
  98. data/lib/datadog/ruby_core_source/ruby-3.2.0-p0/id_table.h +39 -0
  99. data/lib/datadog/ruby_core_source/ruby-3.2.0-p0/internal/array.h +163 -0
  100. data/lib/datadog/ruby_core_source/ruby-3.2.0-p0/internal/basic_operators.h +64 -0
  101. data/lib/datadog/ruby_core_source/ruby-3.2.0-p0/internal/class.h +182 -0
  102. data/lib/datadog/ruby_core_source/ruby-3.2.0-p0/internal/compilers.h +107 -0
  103. data/lib/datadog/ruby_core_source/ruby-3.2.0-p0/internal/gc.h +192 -0
  104. data/lib/datadog/ruby_core_source/ruby-3.2.0-p0/internal/imemo.h +242 -0
  105. data/lib/datadog/ruby_core_source/ruby-3.2.0-p0/internal/serial.h +23 -0
  106. data/lib/datadog/ruby_core_source/ruby-3.2.0-p0/internal/static_assert.h +16 -0
  107. data/lib/datadog/ruby_core_source/ruby-3.2.0-p0/internal/vm.h +134 -0
  108. data/lib/datadog/ruby_core_source/ruby-3.2.0-p0/internal/warnings.h +16 -0
  109. data/lib/datadog/ruby_core_source/ruby-3.2.0-p0/internal.h +113 -0
  110. data/lib/datadog/ruby_core_source/ruby-3.2.0-p0/iseq.h +329 -0
  111. data/lib/datadog/ruby_core_source/ruby-3.2.0-p0/method.h +254 -0
  112. data/lib/datadog/ruby_core_source/ruby-3.2.0-p0/node.h +514 -0
  113. data/lib/datadog/ruby_core_source/ruby-3.2.0-p0/ractor_core.h +342 -0
  114. data/lib/datadog/ruby_core_source/ruby-3.2.0-p0/ruby_assert.h +14 -0
  115. data/lib/datadog/ruby_core_source/ruby-3.2.0-p0/ruby_atomic.h +23 -0
  116. data/lib/datadog/ruby_core_source/ruby-3.2.0-p0/shape.h +232 -0
  117. data/lib/datadog/ruby_core_source/ruby-3.2.0-p0/thread_none.h +20 -0
  118. data/lib/datadog/ruby_core_source/ruby-3.2.0-p0/thread_pthread.h +133 -0
  119. data/lib/datadog/ruby_core_source/ruby-3.2.0-p0/vm_core.h +2106 -0
  120. data/lib/datadog/ruby_core_source/ruby-3.2.0-p0/vm_debug.h +122 -0
  121. data/lib/datadog/ruby_core_source/ruby-3.2.0-p0/vm_opts.h +73 -0
  122. data/lib/datadog/ruby_core_source/ruby-4.1.0-preview1/ccan/build_assert/build_assert.h +40 -0
  123. data/lib/datadog/ruby_core_source/ruby-4.1.0-preview1/ccan/check_type/check_type.h +63 -0
  124. data/lib/datadog/ruby_core_source/ruby-4.1.0-preview1/ccan/container_of/container_of.h +142 -0
  125. data/lib/datadog/ruby_core_source/ruby-4.1.0-preview1/ccan/list/list.h +791 -0
  126. data/lib/datadog/ruby_core_source/ruby-4.1.0-preview1/ccan/str/str.h +17 -0
  127. data/lib/datadog/ruby_core_source/ruby-4.1.0-preview1/constant.h +53 -0
  128. data/lib/datadog/ruby_core_source/ruby-4.1.0-preview1/debug_counter.h +428 -0
  129. data/lib/datadog/ruby_core_source/ruby-4.1.0-preview1/hrtime.h +237 -0
  130. data/lib/datadog/ruby_core_source/ruby-4.1.0-preview1/id.h +365 -0
  131. data/lib/datadog/ruby_core_source/ruby-4.1.0-preview1/id_table.h +74 -0
  132. data/lib/datadog/ruby_core_source/ruby-4.1.0-preview1/internal/array.h +158 -0
  133. data/lib/datadog/ruby_core_source/ruby-4.1.0-preview1/internal/basic_operators.h +67 -0
  134. data/lib/datadog/ruby_core_source/ruby-4.1.0-preview1/internal/bits.h +647 -0
  135. data/lib/datadog/ruby_core_source/ruby-4.1.0-preview1/internal/box.h +103 -0
  136. data/lib/datadog/ruby_core_source/ruby-4.1.0-preview1/internal/class.h +797 -0
  137. data/lib/datadog/ruby_core_source/ruby-4.1.0-preview1/internal/compilers.h +104 -0
  138. data/lib/datadog/ruby_core_source/ruby-4.1.0-preview1/internal/coverage.h +51 -0
  139. data/lib/datadog/ruby_core_source/ruby-4.1.0-preview1/internal/gc.h +411 -0
  140. data/lib/datadog/ruby_core_source/ruby-4.1.0-preview1/internal/imemo.h +302 -0
  141. data/lib/datadog/ruby_core_source/ruby-4.1.0-preview1/internal/sanitizers.h +346 -0
  142. data/lib/datadog/ruby_core_source/ruby-4.1.0-preview1/internal/serial.h +23 -0
  143. data/lib/datadog/ruby_core_source/ruby-4.1.0-preview1/internal/set_table.h +77 -0
  144. data/lib/datadog/ruby_core_source/ruby-4.1.0-preview1/internal/static_assert.h +16 -0
  145. data/lib/datadog/ruby_core_source/ruby-4.1.0-preview1/internal/time.h +34 -0
  146. data/lib/datadog/ruby_core_source/ruby-4.1.0-preview1/internal/variable.h +81 -0
  147. data/lib/datadog/ruby_core_source/ruby-4.1.0-preview1/internal/vm.h +144 -0
  148. data/lib/datadog/ruby_core_source/ruby-4.1.0-preview1/internal/warnings.h +16 -0
  149. data/lib/datadog/ruby_core_source/ruby-4.1.0-preview1/internal.h +106 -0
  150. data/lib/datadog/ruby_core_source/ruby-4.1.0-preview1/iseq.h +439 -0
  151. data/lib/datadog/ruby_core_source/ruby-4.1.0-preview1/method.h +279 -0
  152. data/lib/datadog/ruby_core_source/ruby-4.1.0-preview1/node.h +122 -0
  153. data/lib/datadog/ruby_core_source/ruby-4.1.0-preview1/parser_st.h +161 -0
  154. data/lib/datadog/ruby_core_source/ruby-4.1.0-preview1/parser_value.h +116 -0
  155. data/lib/datadog/ruby_core_source/ruby-4.1.0-preview1/prism/arena.h +37 -0
  156. data/lib/datadog/ruby_core_source/ruby-4.1.0-preview1/prism/ast.h +10371 -0
  157. data/lib/datadog/ruby_core_source/ruby-4.1.0-preview1/prism/buffer.h +52 -0
  158. data/lib/datadog/ruby_core_source/ruby-4.1.0-preview1/prism/comments.h +43 -0
  159. data/lib/datadog/ruby_core_source/ruby-4.1.0-preview1/prism/compiler/align.h +36 -0
  160. data/lib/datadog/ruby_core_source/ruby-4.1.0-preview1/prism/compiler/exported.h +24 -0
  161. data/lib/datadog/ruby_core_source/ruby-4.1.0-preview1/prism/compiler/filesystem.h +32 -0
  162. data/lib/datadog/ruby_core_source/ruby-4.1.0-preview1/prism/compiler/nodiscard.h +22 -0
  163. data/lib/datadog/ruby_core_source/ruby-4.1.0-preview1/prism/compiler/nonnull.h +18 -0
  164. data/lib/datadog/ruby_core_source/ruby-4.1.0-preview1/prism/constant_pool.h +81 -0
  165. data/lib/datadog/ruby_core_source/ruby-4.1.0-preview1/prism/diagnostic.h +93 -0
  166. data/lib/datadog/ruby_core_source/ruby-4.1.0-preview1/prism/errors_format.h +53 -0
  167. data/lib/datadog/ruby_core_source/ruby-4.1.0-preview1/prism/excludes.h +29 -0
  168. data/lib/datadog/ruby_core_source/ruby-4.1.0-preview1/prism/integer.h +41 -0
  169. data/lib/datadog/ruby_core_source/ruby-4.1.0-preview1/prism/json.h +32 -0
  170. data/lib/datadog/ruby_core_source/ruby-4.1.0-preview1/prism/line_offset_list.h +61 -0
  171. data/lib/datadog/ruby_core_source/ruby-4.1.0-preview1/prism/magic_comments.h +35 -0
  172. data/lib/datadog/ruby_core_source/ruby-4.1.0-preview1/prism/node.h +94 -0
  173. data/lib/datadog/ruby_core_source/ruby-4.1.0-preview1/prism/options.h +335 -0
  174. data/lib/datadog/ruby_core_source/ruby-4.1.0-preview1/prism/parser.h +348 -0
  175. data/lib/datadog/ruby_core_source/ruby-4.1.0-preview1/prism/prettyprint.h +31 -0
  176. data/lib/datadog/ruby_core_source/ruby-4.1.0-preview1/prism/prism.h +131 -0
  177. data/lib/datadog/ruby_core_source/ruby-4.1.0-preview1/prism/serialize.h +115 -0
  178. data/lib/datadog/ruby_core_source/ruby-4.1.0-preview1/prism/source.h +155 -0
  179. data/lib/datadog/ruby_core_source/ruby-4.1.0-preview1/prism/stream.h +28 -0
  180. data/lib/datadog/ruby_core_source/ruby-4.1.0-preview1/prism/string_query.h +63 -0
  181. data/lib/datadog/ruby_core_source/ruby-4.1.0-preview1/prism/stringy.h +72 -0
  182. data/lib/datadog/ruby_core_source/ruby-4.1.0-preview1/prism/version.h +38 -0
  183. data/lib/datadog/ruby_core_source/ruby-4.1.0-preview1/prism_compile.h +204 -0
  184. data/lib/datadog/ruby_core_source/ruby-4.1.0-preview1/ractor_core.h +421 -0
  185. data/lib/datadog/ruby_core_source/ruby-4.1.0-preview1/ruby_assert.h +14 -0
  186. data/lib/datadog/ruby_core_source/ruby-4.1.0-preview1/ruby_atomic.h +115 -0
  187. data/lib/datadog/ruby_core_source/ruby-4.1.0-preview1/rubyparser.h +1389 -0
  188. data/lib/datadog/ruby_core_source/ruby-4.1.0-preview1/shape.h +733 -0
  189. data/lib/datadog/ruby_core_source/ruby-4.1.0-preview1/thread_none.h +25 -0
  190. data/lib/datadog/ruby_core_source/ruby-4.1.0-preview1/thread_pthread.h +63 -0
  191. data/lib/datadog/ruby_core_source/ruby-4.1.0-preview1/thread_sched.h +271 -0
  192. data/lib/datadog/ruby_core_source/ruby-4.1.0-preview1/vm_core.h +2509 -0
  193. data/lib/datadog/ruby_core_source/ruby-4.1.0-preview1/vm_debug.h +124 -0
  194. data/lib/datadog/ruby_core_source/ruby-4.1.0-preview1/vm_opts.h +65 -0
  195. data/lib/datadog/ruby_core_source/ruby-4.1.0-preview1/vm_sync.h +160 -0
  196. data/lib/datadog/ruby_core_source/ruby-4.1.0-preview1/zjit.h +221 -0
  197. data/lib/datadog/ruby_core_source/version.rb +1 -1
  198. metadata +197 -4
@@ -0,0 +1,77 @@
1
+ #ifndef INTERNAL_SET_TABLE_H
2
+ #define INTERNAL_SET_TABLE_H
3
+
4
+ #include "ruby/st.h"
5
+
6
+ struct set_table_entry;
7
+
8
+ typedef struct set_table_entry set_table_entry;
9
+
10
+ struct set_table {
11
+ /* Cached features of the table -- see st.c for more details. */
12
+ unsigned char entry_power, bin_power, size_ind;
13
+ /* How many times the table was rebuilt. */
14
+ unsigned char rebuilds_num;
15
+
16
+ /* Start index of entries in array entries. */
17
+ unsigned int entries_start;
18
+ const struct st_hash_type *type;
19
+ /* Number of entries currently in the table. */
20
+ st_index_t num_entries;
21
+
22
+ /* bound index of entries in array entries.
23
+ entries_starts and entries_bound are in interval
24
+ [0,allocated_entries]. */
25
+ st_index_t entries_bound;
26
+
27
+ /**
28
+ * Array of size 2^entry_power.
29
+ * Followed by st_index_t *bins, Array of bins used for access by keys.
30
+ */
31
+ set_table_entry *entries;
32
+ };
33
+
34
+ typedef struct set_table set_table;
35
+
36
+ typedef int set_foreach_callback_func(st_data_t, st_data_t);
37
+ typedef int set_foreach_check_callback_func(st_data_t, st_data_t, int);
38
+ typedef int set_update_callback_func(st_data_t *key, st_data_t arg, int existing);
39
+
40
+ #define set_table_size rb_set_table_size
41
+ size_t rb_set_table_size(const struct set_table *tbl);
42
+ #define set_init_table_with_size rb_set_init_table_with_size
43
+ set_table *rb_set_init_table_with_size(set_table *tab, const struct st_hash_type *, st_index_t);
44
+ #define set_init_numtable rb_set_init_numtable
45
+ set_table *rb_set_init_numtable(void);
46
+ #define set_init_numtable_with_size rb_set_init_numtable_with_size
47
+ set_table *rb_set_init_numtable_with_size(st_index_t size);
48
+ #define set_init_embedded_numtable_with_size rb_set_init_embedded_numtable_with_size
49
+ set_table *rb_set_init_embedded_numtable_with_size(struct set_table *tbl, st_index_t size);
50
+ #define set_table_delete rb_set_table_delete
51
+ int rb_set_table_delete(set_table *, st_data_t *); /* returns 0:notfound 1:deleted */
52
+ #define set_insert rb_set_insert
53
+ int rb_set_insert(set_table *, st_data_t);
54
+ #define set_table_lookup rb_set_table_lookup
55
+ int rb_set_table_lookup(set_table *, st_data_t);
56
+ #define set_foreach_with_replace rb_set_foreach_with_replace
57
+ int rb_set_foreach_with_replace(set_table *tab, set_foreach_check_callback_func *func, set_update_callback_func *replace, st_data_t arg);
58
+ #define set_table_foreach rb_set_table_foreach
59
+ int rb_set_table_foreach(set_table *, set_foreach_callback_func *, st_data_t);
60
+ #define set_foreach_check rb_set_foreach_check
61
+ int rb_set_foreach_check(set_table *, set_foreach_check_callback_func *, st_data_t, st_data_t);
62
+ #define set_keys rb_set_keys
63
+ st_index_t rb_set_keys(set_table *table, st_data_t *keys, st_index_t size);
64
+ #define set_free_table rb_set_free_table
65
+ void rb_set_free_table(set_table *);
66
+ #define set_free_embedded_table rb_set_free_embedded_table
67
+ void set_free_embedded_table(set_table *tab);
68
+ #define set_table_clear rb_set_table_clear
69
+ void rb_set_table_clear(set_table *);
70
+ #define set_copy rb_set_copy
71
+ set_table *rb_set_copy(set_table *new_table, set_table *old_table);
72
+ #define set_memsize rb_set_memsize
73
+ PUREFUNC(size_t rb_set_memsize(const set_table *));
74
+ #define set_compact_table rb_set_compact_table
75
+ void set_compact_table(set_table *tab);
76
+
77
+ #endif
@@ -0,0 +1,16 @@
1
+ #ifndef INTERNAL_STATIC_ASSERT_H /*-*-C-*-vi:se ft=c:*/
2
+ #define INTERNAL_STATIC_ASSERT_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 C11 shim for _Static_assert.
10
+ */
11
+ #include "ruby/internal/static_assert.h"
12
+ #ifndef STATIC_ASSERT
13
+ # define STATIC_ASSERT RBIMPL_STATIC_ASSERT
14
+ #endif
15
+
16
+ #endif /* INTERNAL_STATIC_ASSERT_H */
@@ -0,0 +1,34 @@
1
+ #ifndef INTERNAL_TIME_H /*-*-C-*-vi:se ft=c:*/
2
+ #define INTERNAL_TIME_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 Time.
10
+ */
11
+ #include "ruby/internal/config.h" /* for SIGNEDNESS_OF_TIME_T */
12
+ #include "internal/bits.h" /* for SIGNED_INTEGER_MAX */
13
+ #include "ruby/ruby.h" /* for VALUE */
14
+
15
+ #if SIGNEDNESS_OF_TIME_T < 0 /* signed */
16
+ # define TIMET_MAX SIGNED_INTEGER_MAX(time_t)
17
+ # define TIMET_MIN SIGNED_INTEGER_MIN(time_t)
18
+ #elif SIGNEDNESS_OF_TIME_T > 0 /* unsigned */
19
+ # define TIMET_MAX UNSIGNED_INTEGER_MAX(time_t)
20
+ # define TIMET_MIN ((time_t)0)
21
+ #endif
22
+
23
+ struct timeval; /* <- in <sys/time.h> or <winsock2.h> */
24
+
25
+ /* time.c */
26
+ struct timeval rb_time_timeval(VALUE);
27
+
28
+ RUBY_SYMBOL_EXPORT_BEGIN
29
+ /* time.c (export) */
30
+ RUBY_SYMBOL_EXPORT_END
31
+
32
+ void ruby_reset_timezone(const char *);
33
+
34
+ #endif /* INTERNAL_TIME_H */
@@ -0,0 +1,81 @@
1
+ #ifndef INTERNAL_VARIABLE_H /*-*-C-*-vi:se ft=c:*/
2
+ #define INTERNAL_VARIABLE_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 variables.
10
+ */
11
+ #include "ruby/internal/config.h"
12
+ #include <stddef.h> /* for size_t */
13
+ #include "constant.h" /* for rb_const_entry_t */
14
+ #include "ruby/internal/stdbool.h" /* for bool */
15
+ #include "ruby/ruby.h" /* for VALUE */
16
+ #include "shape.h" /* for shape_id_t */
17
+
18
+ /* variable.c */
19
+ void rb_gc_mark_global_tbl(void);
20
+ void rb_gc_update_global_tbl(void);
21
+ VALUE rb_search_class_path(VALUE);
22
+ VALUE rb_attr_delete(VALUE, ID);
23
+ void rb_autoload_str(VALUE mod, ID id, VALUE file);
24
+ VALUE rb_autoload_at_p(VALUE, ID, int);
25
+ NORETURN(VALUE rb_mod_const_missing(VALUE,VALUE));
26
+ rb_gvar_getter_t *rb_gvar_getter_function_of(ID);
27
+ rb_gvar_setter_t *rb_gvar_setter_function_of(ID);
28
+ void rb_gvar_readonly_setter(VALUE v, ID id, VALUE *_);
29
+ void rb_gvar_ractor_local(const char *name);
30
+ void rb_gvar_box_ready(const char *name);
31
+ void rb_gvar_box_dynamic(const char *name);
32
+
33
+ /**
34
+ * Sets the name of a module.
35
+ *
36
+ * Non-permanently named classes can have a temporary name assigned (or
37
+ * cleared). In that case the name will be used for `#inspect` and `#to_s`, and
38
+ * nested classes/modules will be named with the temporary name as a prefix.
39
+ *
40
+ * After the module is assigned to a constant, the temporary name will be
41
+ * discarded, and the name will be computed based on the nesting.
42
+ *
43
+ * @param[in] mod An instance of ::rb_cModule.
44
+ * @param[in] name An instance of ::rb_cString.
45
+ * @retval mod
46
+ */
47
+ VALUE rb_mod_set_temporary_name(VALUE, VALUE);
48
+
49
+ void rb_obj_replace_fields(VALUE obj, VALUE fields_obj);
50
+ VALUE rb_obj_complex_fields_build(VALUE obj);
51
+ VALUE rb_obj_field_get(VALUE obj, shape_id_t target_shape_id);
52
+ void rb_ivar_set_internal(VALUE obj, ID id, VALUE val);
53
+ void rb_check_ivar_modifiable(VALUE obj);
54
+ void rb_ivar_foreach_buffered(VALUE obj, int (*func)(ID name, VALUE val, st_data_t arg), st_data_t arg);
55
+ attr_index_t rb_ivar_set_index(VALUE obj, ID id, VALUE val);
56
+ attr_index_t rb_obj_field_set(VALUE obj, shape_id_t target_shape_id, ID field_name, VALUE val);
57
+ VALUE rb_ivar_get_at(VALUE obj, attr_index_t index, ID id);
58
+ VALUE rb_ivar_get_at_no_ractor_check(VALUE obj, attr_index_t index);
59
+ void rb_generic_fields_lock_atfork(void);
60
+ void rb_imemo_fields_record_shrefs(VALUE fields_obj);
61
+
62
+ /* Call cb(tbl, arg) for the single global generic_fields table. Used by the global GC's weak
63
+ * pass and by compaction's reference update (gc.c). */
64
+ void rb_generic_fields_tables_foreach(void (*cb)(struct st_table *tbl, void *arg), void *arg);
65
+ void rb_generic_fields_shared_table_foreach(void (*cb)(struct st_table *tbl, void *arg), void *arg);
66
+
67
+ RUBY_SYMBOL_EXPORT_BEGIN
68
+ /* variable.c (export) */
69
+ void rb_mark_generic_ivar(VALUE obj);
70
+ VALUE rb_const_missing(VALUE klass, VALUE name);
71
+ bool rb_class_ivar_set(VALUE klass, ID vid, VALUE value);
72
+ void rb_fields_tbl_copy(VALUE dst, VALUE src);
73
+ RUBY_SYMBOL_EXPORT_END
74
+
75
+ VALUE rb_ivar_lookup(VALUE obj, ID id, VALUE undef);
76
+ VALUE rb_gvar_get(ID);
77
+ VALUE rb_gvar_set(ID, VALUE);
78
+ VALUE rb_gvar_defined(ID);
79
+ void rb_const_warn_if_deprecated(const rb_const_entry_t *, VALUE, ID);
80
+
81
+ #endif /* INTERNAL_VARIABLE_H */
@@ -0,0 +1,144 @@
1
+ #ifndef INTERNAL_VM_H /*-*-C-*-vi:se ft=c:*/
2
+ #define INTERNAL_VM_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 RubyVM.
10
+ */
11
+ #include "ruby/internal/stdbool.h" /* for bool */
12
+ #include "internal/serial.h" /* for rb_serial_t */
13
+ #include "internal/static_assert.h" /* for STATIC_ASSERT */
14
+ #include "ruby/ruby.h" /* for ID */
15
+ #include "ruby/st.h" /* for st_table */
16
+
17
+ #ifdef rb_funcallv
18
+ # undef rb_funcallv
19
+ #endif
20
+
21
+ #ifdef rb_method_basic_definition_p
22
+ # undef rb_method_basic_definition_p
23
+ #endif
24
+
25
+ struct rb_callable_method_entry_struct; /* in method.h */
26
+ struct rb_method_definition_struct; /* in method.h */
27
+ struct rb_cref_struct; /* in method.h */
28
+ struct rb_execution_context_struct; /* in vm_core.h */
29
+ struct rb_control_frame_struct; /* in vm_core.h */
30
+ struct rb_callinfo; /* in vm_core.h */
31
+
32
+ enum method_missing_reason {
33
+ MISSING_NOENTRY = 0x00,
34
+ MISSING_PRIVATE = 0x01,
35
+ MISSING_PROTECTED = 0x02,
36
+ MISSING_FCALL = 0x04,
37
+ MISSING_VCALL = 0x08,
38
+ MISSING_SUPER = 0x10,
39
+ MISSING_MISSING = 0x20,
40
+ MISSING_NONE = 0x40
41
+ };
42
+
43
+ /* vm_insnhelper.h */
44
+ VALUE rb_vm_push_frame_fname(struct rb_execution_context_struct *ec, VALUE fname);
45
+
46
+ /* vm.c */
47
+ VALUE rb_obj_is_thread(VALUE obj);
48
+ void rb_vm_mark(void *ptr);
49
+ void rb_vm_register_global_object(VALUE obj);
50
+ void rb_vm_each_stack_value(void *ptr, void (*cb)(VALUE, void*), void *ctx);
51
+ PUREFUNC(VALUE rb_vm_top_self(void));
52
+ const void **rb_vm_get_insns_address_table(void);
53
+ VALUE rb_source_location(int *pline);
54
+ const char *rb_source_location_cstr(int *pline);
55
+ void rb_vm_pop_cfunc_frame(void);
56
+ void rb_vm_check_redefinition_by_prepend(VALUE klass);
57
+ int rb_vm_check_optimizable_mid(VALUE mid);
58
+ VALUE rb_yield_refine_block(VALUE refinement, VALUE refinements);
59
+ struct rb_cref_struct *rb_vm_cref_dup(const struct rb_cref_struct *cref);
60
+ VALUE ruby_vm_special_exception_copy(VALUE);
61
+
62
+ void rb_lastline_set_up(VALUE val, unsigned int up);
63
+
64
+ /* vm_eval.c */
65
+ VALUE rb_current_realfilepath(void);
66
+ VALUE rb_current_filepath(void);
67
+ VALUE rb_check_block_call(VALUE, ID, int, const VALUE *, rb_block_call_func_t, VALUE);
68
+ typedef void rb_check_funcall_hook(int, VALUE, ID, int, const VALUE *, VALUE);
69
+ VALUE rb_check_funcall_with_hook_kw(VALUE recv, ID mid, int argc, const VALUE *argv,
70
+ rb_check_funcall_hook *hook, VALUE arg, int kw_splat);
71
+ const char *rb_type_str(enum ruby_value_type type);
72
+ VALUE rb_check_funcall_default(VALUE, ID, int, const VALUE *, VALUE);
73
+ VALUE rb_check_funcall_basic_kw(VALUE, ID, VALUE, int, const VALUE*, int);
74
+ VALUE rb_yield_1(VALUE val);
75
+ VALUE rb_ec_yield(struct rb_execution_context_struct *ec, VALUE val);
76
+ VALUE rb_yield_force_blockarg(VALUE values);
77
+ VALUE rb_lambda_call(VALUE obj, ID mid, int argc, const VALUE *argv,
78
+ rb_block_call_func_t bl_proc, int min_argc, int max_argc,
79
+ VALUE data2);
80
+ void rb_check_stack_overflow(void);
81
+ #define RB_BLOCK_NO_USE_PACKED_ARGS 2
82
+ VALUE rb_block_call2(VALUE obj, ID mid, int argc, const VALUE *argv, rb_block_call_func_t bl_proc, VALUE data2, long flags);
83
+ struct vm_ifunc *rb_current_ifunc(void);
84
+ VALUE rb_gccct_clear_table(void);
85
+ VALUE rb_funcallv_uncached(VALUE recv, ID mid, int argc, const VALUE *argv);
86
+ VALUE rb_eval_cmd_call_kw(VALUE cmd, int argc, const VALUE *argv, int kw_splat);
87
+
88
+ #if USE_YJIT || USE_ZJIT
89
+ /* vm_exec.c */
90
+ extern uint64_t rb_vm_insn_count;
91
+ #endif
92
+
93
+ extern bool rb_free_at_exit;
94
+
95
+ /* miniinit.c and builtin.c */
96
+ void rb_free_loaded_builtin_table(void);
97
+
98
+ /* vm_insnhelper.c */
99
+ VALUE rb_equal_opt(VALUE obj1, VALUE obj2);
100
+ VALUE rb_eql_opt(VALUE obj1, VALUE obj2);
101
+
102
+ struct rb_iseq_struct;
103
+ const struct rb_callcache *rb_vm_search_method_slowpath(const struct rb_callinfo *ci, VALUE klass);
104
+
105
+ /* vm_method.c */
106
+ int rb_ec_obj_respond_to(struct rb_execution_context_struct *ec, VALUE obj, ID id, int priv);
107
+
108
+ /* vm_dump.c */
109
+ void rb_print_backtrace(FILE *);
110
+
111
+ /* vm_backtrace.c */
112
+ VALUE rb_vm_thread_backtrace(int argc, const VALUE *argv, VALUE thval);
113
+ VALUE rb_vm_thread_backtrace_locations(int argc, const VALUE *argv, VALUE thval);
114
+ VALUE rb_vm_backtrace(int argc, const VALUE * argv, struct rb_execution_context_struct * ec);
115
+ VALUE rb_vm_backtrace_locations(int argc, const VALUE * argv, struct rb_execution_context_struct * ec);
116
+ VALUE rb_make_backtrace(void);
117
+ void rb_backtrace_print_as_bugreport(FILE*);
118
+ int rb_backtrace_p(VALUE obj);
119
+ VALUE rb_backtrace_dup(VALUE btobj);
120
+ void *rb_backtrace_blob_dump(VALUE btobj, int *size_out);
121
+ VALUE rb_backtrace_blob_load(const void *blob, int size);
122
+ void rb_backtrace_blob_mark(const void *blob, int size);
123
+ VALUE rb_backtrace_to_str_ary(VALUE obj);
124
+ VALUE rb_backtrace_to_location_ary(VALUE obj);
125
+ VALUE rb_location_ary_to_backtrace(VALUE ary);
126
+ void rb_backtrace_each(VALUE (*iter)(VALUE recv, VALUE str), VALUE output);
127
+ int rb_frame_info_p(VALUE obj);
128
+ int rb_get_node_id_from_frame_info(VALUE obj);
129
+ const struct rb_iseq_struct *rb_get_iseq_from_frame_info(VALUE obj);
130
+
131
+ VALUE rb_ec_backtrace_object(const struct rb_execution_context_struct *ec);
132
+
133
+ #define RUBY_DTRACE_CREATE_HOOK(name, arg) \
134
+ RUBY_DTRACE_HOOK(name##_CREATE, arg)
135
+ #define RUBY_DTRACE_HOOK(name, arg) \
136
+ do { \
137
+ if (UNLIKELY(RUBY_DTRACE_##name##_ENABLED())) { \
138
+ int dtrace_line; \
139
+ const char *dtrace_file = rb_source_location_cstr(&dtrace_line); \
140
+ if (!dtrace_file) dtrace_file = ""; \
141
+ RUBY_DTRACE_##name(arg, dtrace_file, dtrace_line); \
142
+ } \
143
+ } while (0)
144
+ #endif /* INTERNAL_VM_H */
@@ -0,0 +1,16 @@
1
+ #ifndef INTERNAL_WARNINGS_H /*-*-C-*-vi:se ft=c:*/
2
+ #define INTERNAL_WARNINGS_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 to suppress / mandate warnings.
10
+ */
11
+ #include "ruby/internal/warning_push.h"
12
+ #define COMPILER_WARNING_PUSH RBIMPL_WARNING_PUSH()
13
+ #define COMPILER_WARNING_POP RBIMPL_WARNING_POP()
14
+ #define COMPILER_WARNING_ERROR(flag) RBIMPL_WARNING_ERROR(flag)
15
+ #define COMPILER_WARNING_IGNORED(flag) RBIMPL_WARNING_IGNORED(flag)
16
+ #endif /* INTERNAL_WARNINGS_H */
@@ -0,0 +1,106 @@
1
+ #ifndef RUBY_INTERNAL_H /*-*-C-*-vi:se ft=c:*/
2
+ #define RUBY_INTERNAL_H 1
3
+ /**
4
+ * @author $Author$
5
+ * @date Tue May 17 11:42:20 JST 2011
6
+ * @copyright Copyright (C) 2011 Yukihiro Matsumoto
7
+ * @copyright This file is a part of the programming language Ruby.
8
+ * Permission is hereby granted, to either redistribute and/or
9
+ * modify this file, provided that the conditions mentioned in the
10
+ * file COPYING are met. Consult the file for details.
11
+ */
12
+ #include "ruby/internal/config.h"
13
+
14
+ #ifdef __cplusplus
15
+ # error not for C++
16
+ #endif
17
+
18
+ #define LIKELY(x) RB_LIKELY(x)
19
+ #define UNLIKELY(x) RB_UNLIKELY(x)
20
+
21
+ #define numberof(array) ((int)(sizeof(array) / sizeof((array)[0])))
22
+ #define roomof(x, y) (((x) + (y) - 1) / (y))
23
+ #define type_roomof(x, y) roomof(sizeof(x), sizeof(y))
24
+
25
+ /* Prevent compiler from reordering access */
26
+ #define ACCESS_ONCE(type,x) (*((volatile type *)&(x)))
27
+
28
+ #define UNDEF_P RB_UNDEF_P
29
+ #define NIL_OR_UNDEF_P RB_NIL_OR_UNDEF_P
30
+
31
+ #include "ruby/ruby.h"
32
+
33
+ /* Following macros were formerly defined in this header but moved to somewhere
34
+ * else. In order to detect them we undef here. */
35
+
36
+ /* internal/array.h */
37
+ #undef RARRAY_AREF
38
+
39
+ /* internal/class.h */
40
+ #undef RClass
41
+ #undef RCLASS_SUPER
42
+
43
+ /* internal/hash.h */
44
+ #undef RHASH_IFNONE
45
+ #undef RHASH_SIZE
46
+ #undef RHASH_TBL
47
+ #undef RHASH_EMPTY_P
48
+
49
+ /* internal/struct.h */
50
+ #undef RSTRUCT_LEN
51
+ #undef RSTRUCT_PTR
52
+ #undef RSTRUCT_SET
53
+ #undef RSTRUCT_GET
54
+
55
+ /* Also, we keep the following macros here. They are expected to be
56
+ * overridden in each headers. */
57
+
58
+ /* internal/array.h */
59
+ #define rb_ary_new_from_args(...) rb_nonexistent_symbol(__VA_ARGS__)
60
+
61
+ /* internal/string.h */
62
+ #define rb_fstring_cstr(...) rb_nonexistent_symbol(__VA_ARGS__)
63
+
64
+ /* internal/symbol.h */
65
+ #define rb_sym_intern_ascii_cstr(...) rb_nonexistent_symbol(__VA_ARGS__)
66
+
67
+ #ifdef _WIN32
68
+ /* win32/win32.c */
69
+ void rb_w32_init_long_paths(void);
70
+ #endif
71
+
72
+
73
+ /* MRI debug support */
74
+
75
+ /* gc.c */
76
+ void rb_obj_info_dump(VALUE obj);
77
+ void rb_obj_info_dump_loc(VALUE obj, const char *file, int line, const char *func);
78
+
79
+ /* debug.c */
80
+
81
+ RUBY_SYMBOL_EXPORT_BEGIN
82
+ void ruby_debug_breakpoint(void);
83
+ PRINTF_ARGS(void ruby_debug_printf(const char*, ...), 1, 2);
84
+ RUBY_SYMBOL_EXPORT_END
85
+
86
+ // show obj data structure without any side-effect
87
+ #define rp(obj) rb_obj_info_dump_loc((VALUE)(obj), __FILE__, __LINE__, RUBY_FUNCTION_NAME_STRING)
88
+
89
+ // same as rp, but add message header
90
+ #define rp_m(msg, obj) do { \
91
+ fputs((msg), stderr); \
92
+ rb_obj_info_dump((VALUE)(obj)); \
93
+ } while (0)
94
+
95
+ // `ruby_debug_breakpoint()` does nothing,
96
+ // but breakpoint is set in run.gdb, so `make gdb` can stop here.
97
+ #define bp() ruby_debug_breakpoint()
98
+
99
+ #define RBOOL(v) ((v) ? Qtrue : Qfalse)
100
+ #define RB_BIGNUM_TYPE_P(x) RB_TYPE_P((x), T_BIGNUM)
101
+
102
+ #ifndef __MINGW32__
103
+ #undef memcpy
104
+ #define memcpy ruby_nonempty_memcpy
105
+ #endif
106
+ #endif /* RUBY_INTERNAL_H */