debase-ruby_core_source 3.2.3 → 3.3.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (148) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +9 -0
  3. data/Rakefile +2 -1
  4. data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/ccan/list/list.h +4 -2
  5. data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/dln.h +1 -0
  6. data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/eval_intern.h +4 -2
  7. data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/insns.inc +2 -0
  8. data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/insns_info.inc +269 -187
  9. data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/internal/class.h +46 -0
  10. data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/internal/cont.h +3 -0
  11. data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/internal/encoding.h +3 -0
  12. data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/internal/error.h +3 -0
  13. data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/internal/gc.h +2 -0
  14. data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/internal/object.h +1 -0
  15. data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/internal/random.h +1 -0
  16. data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/internal/string.h +0 -1
  17. data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/internal/symbol.h +3 -0
  18. data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/internal/thread.h +3 -0
  19. data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/internal/transcode.h +3 -0
  20. data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/internal/variable.h +5 -3
  21. data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/internal/vm.h +5 -0
  22. data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/iseq.h +5 -1
  23. data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/method.h +0 -1
  24. data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/optunifs.inc +1 -1
  25. data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/parse.h +2 -2
  26. data/lib/debase/ruby_core_source/ruby-3.3.0-p0/prism/ast.h +4612 -0
  27. data/lib/debase/ruby_core_source/ruby-3.3.0-p0/prism/defines.h +94 -0
  28. data/lib/debase/ruby_core_source/ruby-3.3.0-p0/prism/diagnostic.h +297 -0
  29. data/lib/debase/ruby_core_source/ruby-3.3.0-p0/prism/encoding.h +248 -0
  30. data/lib/debase/ruby_core_source/ruby-3.3.0-p0/prism/extension.h +18 -0
  31. data/lib/debase/ruby_core_source/ruby-3.3.0-p0/prism/node.h +57 -0
  32. data/lib/debase/ruby_core_source/ruby-3.3.0-p0/prism/options.h +204 -0
  33. data/lib/debase/ruby_core_source/ruby-3.3.0-p0/prism/pack.h +152 -0
  34. data/lib/debase/ruby_core_source/ruby-3.3.0-p0/prism/parser.h +716 -0
  35. data/lib/debase/ruby_core_source/ruby-3.3.0-p0/prism/prettyprint.h +26 -0
  36. data/lib/debase/ruby_core_source/ruby-3.3.0-p0/prism/prism.h +272 -0
  37. data/lib/debase/ruby_core_source/ruby-3.3.0-p0/prism/regexp.h +33 -0
  38. data/lib/debase/ruby_core_source/ruby-3.3.0-p0/prism/util/pm_buffer.h +146 -0
  39. data/lib/debase/ruby_core_source/ruby-3.3.0-p0/prism/util/pm_char.h +205 -0
  40. data/lib/debase/ruby_core_source/ruby-3.3.0-p0/prism/util/pm_constant_pool.h +191 -0
  41. data/lib/debase/ruby_core_source/ruby-3.3.0-p0/prism/util/pm_list.h +97 -0
  42. data/lib/debase/ruby_core_source/ruby-3.3.0-p0/prism/util/pm_memchr.h +29 -0
  43. data/lib/debase/ruby_core_source/ruby-3.3.0-p0/prism/util/pm_newline_list.h +104 -0
  44. data/lib/debase/ruby_core_source/ruby-3.3.0-p0/prism/util/pm_state_stack.h +42 -0
  45. data/lib/debase/ruby_core_source/ruby-3.3.0-p0/prism/util/pm_string.h +150 -0
  46. data/lib/debase/ruby_core_source/ruby-3.3.0-p0/prism/util/pm_string_list.h +44 -0
  47. data/lib/debase/ruby_core_source/ruby-3.3.0-p0/prism/util/pm_strncasecmp.h +32 -0
  48. data/lib/debase/ruby_core_source/ruby-3.3.0-p0/prism/util/pm_strpbrk.h +43 -0
  49. data/lib/debase/ruby_core_source/ruby-3.3.0-p0/prism/version.h +29 -0
  50. data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/prism_compile.h +12 -1
  51. data/lib/debase/ruby_core_source/ruby-3.3.0-p0/revision.h +5 -0
  52. data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/rjit.h +6 -8
  53. data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/rjit_c.h +0 -1
  54. data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/rubyparser.h +1 -1
  55. data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/shape.h +2 -12
  56. data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/thread_pthread.h +1 -1
  57. data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/variable.h +2 -0
  58. data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/version.h +1 -1
  59. data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/vm.inc +189 -136
  60. data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/vm_callinfo.h +8 -1
  61. data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/vm_core.h +64 -5
  62. data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/vm_insnhelper.h +4 -14
  63. data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/vmtc.inc +2 -0
  64. data/lib/debase/ruby_core_source/version.rb +1 -1
  65. metadata +148 -124
  66. data/lib/debase/ruby_core_source/ruby-3.3.0-preview3/revision.h +0 -5
  67. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/addr2line.h +0 -0
  68. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/builtin.h +0 -0
  69. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/ccan/build_assert/build_assert.h +0 -0
  70. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/ccan/check_type/check_type.h +0 -0
  71. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/ccan/container_of/container_of.h +0 -0
  72. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/ccan/str/str.h +0 -0
  73. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/constant.h +0 -0
  74. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/darray.h +0 -0
  75. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/debug_counter.h +0 -0
  76. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/encindex.h +0 -0
  77. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/hrtime.h +0 -0
  78. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/id.h +0 -0
  79. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/id_table.h +0 -0
  80. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/internal/array.h +0 -0
  81. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/internal/basic_operators.h +0 -0
  82. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/internal/bignum.h +0 -0
  83. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/internal/bits.h +0 -0
  84. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/internal/cmdlineopt.h +0 -0
  85. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/internal/compar.h +0 -0
  86. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/internal/compile.h +0 -0
  87. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/internal/compilers.h +0 -0
  88. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/internal/complex.h +0 -0
  89. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/internal/dir.h +0 -0
  90. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/internal/enc.h +0 -0
  91. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/internal/enum.h +0 -0
  92. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/internal/enumerator.h +0 -0
  93. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/internal/eval.h +0 -0
  94. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/internal/file.h +0 -0
  95. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/internal/fixnum.h +0 -0
  96. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/internal/hash.h +0 -0
  97. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/internal/imemo.h +0 -0
  98. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/internal/inits.h +0 -0
  99. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/internal/io.h +0 -0
  100. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/internal/load.h +0 -0
  101. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/internal/loadpath.h +0 -0
  102. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/internal/math.h +0 -0
  103. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/internal/missing.h +0 -0
  104. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/internal/numeric.h +0 -0
  105. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/internal/parse.h +0 -0
  106. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/internal/proc.h +0 -0
  107. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/internal/process.h +0 -0
  108. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/internal/ractor.h +0 -0
  109. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/internal/range.h +0 -0
  110. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/internal/rational.h +0 -0
  111. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/internal/re.h +0 -0
  112. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/internal/ruby_parser.h +0 -0
  113. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/internal/sanitizers.h +0 -0
  114. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/internal/serial.h +0 -0
  115. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/internal/signal.h +0 -0
  116. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/internal/static_assert.h +0 -0
  117. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/internal/struct.h +0 -0
  118. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/internal/time.h +0 -0
  119. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/internal/util.h +0 -0
  120. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/internal/warnings.h +0 -0
  121. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/internal.h +0 -0
  122. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/known_errors.inc +0 -0
  123. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/node.h +0 -0
  124. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/node_name.inc +0 -0
  125. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/optinsn.inc +0 -0
  126. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/parser_bits.h +0 -0
  127. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/parser_node.h +0 -0
  128. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/parser_st.h +0 -0
  129. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/parser_value.h +0 -0
  130. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/probes_helper.h +0 -0
  131. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/ractor_core.h +0 -0
  132. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/regenc.h +0 -0
  133. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/regint.h +0 -0
  134. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/regparse.h +0 -0
  135. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/ruby_assert.h +0 -0
  136. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/ruby_atomic.h +0 -0
  137. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/siphash.h +0 -0
  138. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/symbol.h +0 -0
  139. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/thread_none.h +0 -0
  140. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/thread_win32.h +0 -0
  141. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/timev.h +0 -0
  142. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/transcode_data.h +0 -0
  143. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/vm_call_iseq_optimized.inc +0 -0
  144. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/vm_debug.h +0 -0
  145. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/vm_exec.h +0 -0
  146. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/vm_opts.h +0 -0
  147. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/vm_sync.h +0 -0
  148. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/yjit.h +0 -0
@@ -19,6 +19,7 @@
19
19
  #include "shape.h"
20
20
  #include "ruby_assert.h"
21
21
  #include "vm_core.h"
22
+ #include "vm_sync.h"
22
23
  #include "method.h" /* for rb_cref_t */
23
24
 
24
25
  #ifdef RCLASS_SUPER
@@ -111,6 +112,51 @@ struct RClass_and_rb_classext_t {
111
112
  #define RCLASS_SUPERCLASSES_INCLUDE_SELF FL_USER2
112
113
  #define RICLASS_ORIGIN_SHARED_MTBL FL_USER3
113
114
 
115
+ static inline st_table *
116
+ RCLASS_IV_HASH(VALUE obj)
117
+ {
118
+ RUBY_ASSERT(RB_TYPE_P(obj, RUBY_T_CLASS) || RB_TYPE_P(obj, RUBY_T_MODULE));
119
+ RUBY_ASSERT(rb_shape_obj_too_complex(obj));
120
+ return (st_table *)RCLASS_IVPTR(obj);
121
+ }
122
+
123
+ static inline void
124
+ RCLASS_SET_IV_HASH(VALUE obj, const st_table *tbl)
125
+ {
126
+ RUBY_ASSERT(RB_TYPE_P(obj, RUBY_T_CLASS) || RB_TYPE_P(obj, RUBY_T_MODULE));
127
+ RUBY_ASSERT(rb_shape_obj_too_complex(obj));
128
+ RCLASS_IVPTR(obj) = (VALUE *)tbl;
129
+ }
130
+
131
+ static inline uint32_t
132
+ RCLASS_IV_COUNT(VALUE obj)
133
+ {
134
+ RUBY_ASSERT(RB_TYPE_P(obj, RUBY_T_CLASS) || RB_TYPE_P(obj, RUBY_T_MODULE));
135
+ if (rb_shape_obj_too_complex(obj)) {
136
+ uint32_t count;
137
+
138
+ // "Too complex" classes could have their IV hash mutated in
139
+ // parallel, so lets lock around getting the hash size.
140
+ RB_VM_LOCK_ENTER();
141
+ {
142
+ count = (uint32_t)rb_st_table_size(RCLASS_IV_HASH(obj));
143
+ }
144
+ RB_VM_LOCK_LEAVE();
145
+
146
+ return count;
147
+ }
148
+ else {
149
+ return rb_shape_get_shape_by_id(RCLASS_SHAPE_ID(obj))->next_iv_index;
150
+ }
151
+ }
152
+
153
+ static inline void
154
+ RCLASS_SET_M_TBL(VALUE klass, struct rb_id_table *table)
155
+ {
156
+ RUBY_ASSERT(!RB_OBJ_PROMOTED(klass));
157
+ RCLASS_M_TBL(klass) = table;
158
+ }
159
+
114
160
  /* class.c */
115
161
  void rb_class_subclass_add(VALUE super, VALUE klass);
116
162
  void rb_class_remove_from_super_subclasses(VALUE);
@@ -22,6 +22,9 @@ void rb_jit_cont_init(void);
22
22
  void rb_jit_cont_each_iseq(rb_iseq_callback callback, void *data);
23
23
  void rb_jit_cont_finish(void);
24
24
 
25
+ /* vm.c */
26
+ void rb_free_shared_fiber_pool(void);
27
+
25
28
  // Copy locals from the current execution to the specified fiber.
26
29
  VALUE rb_fiber_inherit_storage(struct rb_execution_context_struct *ec, struct rb_fiber_struct *fiber);
27
30
 
@@ -29,4 +29,7 @@ void rb_enc_set_base(const char *name, const char *orig);
29
29
  int rb_enc_set_dummy(int index);
30
30
  PUREFUNC(int rb_data_is_encoding(VALUE obj));
31
31
 
32
+ /* vm.c */
33
+ void rb_free_global_enc_table(void);
34
+
32
35
  #endif /* INTERNAL_ENCODING_H */
@@ -169,6 +169,9 @@ VALUE rb_syserr_new_path_in(const char *func_name, int n, VALUE path);
169
169
  #endif
170
170
  RUBY_SYMBOL_EXPORT_END
171
171
 
172
+ /* vm.c */
173
+ void rb_free_warning(void);
174
+
172
175
  static inline void
173
176
  rb_raise_cstr_i(VALUE etype, VALUE mesg)
174
177
  {
@@ -250,6 +250,8 @@ void rb_gc_mark_and_move(VALUE *ptr);
250
250
  void rb_gc_mark_weak(VALUE *ptr);
251
251
  void rb_gc_remove_weak(VALUE parent_obj, VALUE *ptr);
252
252
 
253
+ void rb_gc_ref_update_table_values_only(st_table *tbl);
254
+
253
255
  #define rb_gc_mark_and_move_ptr(ptr) do { \
254
256
  VALUE _obj = (VALUE)*(ptr); \
255
257
  rb_gc_mark_and_move(&_obj); \
@@ -11,6 +11,7 @@
11
11
  #include "ruby/ruby.h" /* for VALUE */
12
12
 
13
13
  /* object.c */
14
+ size_t rb_obj_embedded_size(uint32_t numiv);
14
15
  VALUE rb_class_search_ancestor(VALUE klass, VALUE super);
15
16
  NORETURN(void rb_undefined_alloc(VALUE klass));
16
17
  double rb_num_to_dbl(VALUE val);
@@ -12,5 +12,6 @@
12
12
 
13
13
  /* random.c */
14
14
  int ruby_fill_random_bytes(void *, size_t, int);
15
+ void rb_free_default_rand_key(void);
15
16
 
16
17
  #endif /* INTERNAL_RANDOM_H */
@@ -64,7 +64,6 @@ VALUE rb_str_upto_endless_each(VALUE, int (*each)(VALUE, VALUE), VALUE);
64
64
  void rb_str_make_embedded(VALUE);
65
65
  size_t rb_str_size_as_embedded(VALUE);
66
66
  bool rb_str_reembeddable_p(VALUE);
67
- void rb_str_update_shared_ary(VALUE str, VALUE old_root, VALUE new_root);
68
67
  RUBY_SYMBOL_EXPORT_END
69
68
 
70
69
  VALUE rb_fstring_new(const char *ptr, long len);
@@ -32,6 +32,9 @@ ID rb_make_temporary_id(size_t n);
32
32
  void rb_gc_free_dsymbol(VALUE);
33
33
  int rb_static_id_valid_p(ID id);
34
34
 
35
+ /* vm.c */
36
+ void rb_free_static_symid_str(void);
37
+
35
38
  #if __has_builtin(__builtin_constant_p)
36
39
  #define rb_sym_intern_ascii_cstr(ptr) \
37
40
  (__builtin_constant_p(ptr) ? \
@@ -63,11 +63,14 @@ int rb_notify_fd_close(int fd, struct rb_io_close_wait_list *busy);
63
63
  void rb_notify_fd_close_wait(struct rb_io_close_wait_list *busy);
64
64
 
65
65
  RUBY_SYMBOL_EXPORT_BEGIN
66
+
66
67
  /* Temporary. This API will be removed (renamed). */
67
68
  VALUE rb_thread_io_blocking_region(rb_blocking_function_t *func, void *data1, int fd);
69
+ VALUE rb_thread_io_blocking_call(rb_blocking_function_t *func, void *data1, int fd, int events);
68
70
 
69
71
  /* thread.c (export) */
70
72
  int ruby_thread_has_gvl_p(void); /* for ext/fiddle/closure.c */
73
+
71
74
  RUBY_SYMBOL_EXPORT_END
72
75
 
73
76
  int rb_threadptr_execute_interrupts(struct rb_thread_struct *th, int blocking_timing);
@@ -17,4 +17,7 @@
17
17
  extern VALUE rb_cEncodingConverter;
18
18
  size_t rb_econv_memsize(rb_econv_t *);
19
19
 
20
+ /* vm.c */
21
+ void rb_free_transcoder_table(void);
22
+
20
23
  #endif /* INTERNAL_TRANSCODE_H */
@@ -47,12 +47,14 @@ VALUE rb_mod_set_temporary_name(VALUE, VALUE);
47
47
 
48
48
  struct gen_ivtbl;
49
49
  int rb_gen_ivtbl_get(VALUE obj, ID id, struct gen_ivtbl **ivtbl);
50
- int rb_obj_evacuate_ivs_to_hash_table(ID key, VALUE val, st_data_t arg);
51
- void rb_evict_ivars_to_hash(VALUE obj, rb_shape_t * shape);
50
+ void rb_obj_copy_ivs_to_hash_table(VALUE obj, st_table *table);
51
+ void rb_obj_convert_to_too_complex(VALUE obj, st_table *table);
52
+ void rb_evict_ivars_to_hash(VALUE obj);
52
53
 
53
54
  RUBY_SYMBOL_EXPORT_BEGIN
54
55
  /* variable.c (export) */
55
- void rb_mark_and_update_generic_ivar(VALUE);
56
+ void rb_mark_generic_ivar(VALUE obj);
57
+ void rb_ref_update_generic_ivar(VALUE);
56
58
  void rb_mv_generic_ivar(VALUE src, VALUE dst);
57
59
  VALUE rb_const_missing(VALUE klass, VALUE name);
58
60
  int rb_class_ivar_set(VALUE klass, ID vid, VALUE value);
@@ -83,6 +83,11 @@ void rb_check_stack_overflow(void);
83
83
  extern uint64_t rb_vm_insns_count;
84
84
  #endif
85
85
 
86
+ extern bool rb_free_at_exit;
87
+
88
+ /* miniinit.c and builtin.c */
89
+ void rb_free_loaded_builtin_table(void);
90
+
86
91
  /* vm_insnhelper.c */
87
92
  VALUE rb_equal_opt(VALUE obj1, VALUE obj2);
88
93
  VALUE rb_eql_opt(VALUE obj1, VALUE obj2);
@@ -13,6 +13,7 @@
13
13
  #include "internal/gc.h"
14
14
  #include "shape.h"
15
15
  #include "vm_core.h"
16
+ #include "prism_compile.h"
16
17
 
17
18
  RUBY_EXTERN const int ruby_api_version[];
18
19
  #define ISEQ_MAJOR_VERSION ((unsigned int)ruby_api_version[0])
@@ -173,6 +174,7 @@ void rb_iseq_init_trace(rb_iseq_t *iseq);
173
174
  int rb_iseq_add_local_tracepoint_recursively(const rb_iseq_t *iseq, rb_event_flag_t turnon_events, VALUE tpval, unsigned int target_line, bool target_bmethod);
174
175
  int rb_iseq_remove_local_tracepoint_recursively(const rb_iseq_t *iseq, VALUE tpval);
175
176
  const rb_iseq_t *rb_iseq_load_iseq(VALUE fname);
177
+ rb_iseq_t * rb_iseq_new_main_prism(pm_string_t *input, pm_options_t *options, VALUE path);
176
178
 
177
179
  #if VM_INSN_INFO_TABLE_IMPL == 2
178
180
  unsigned int *rb_iseq_insns_info_decode_positions(const struct rb_iseq_constant_body *body);
@@ -189,7 +191,7 @@ VALUE *rb_iseq_original_iseq(const rb_iseq_t *iseq);
189
191
  void rb_iseq_build_from_ary(rb_iseq_t *iseq, VALUE misc,
190
192
  VALUE locals, VALUE args,
191
193
  VALUE exception, VALUE body);
192
- void rb_iseq_mark_and_move_insn_storage(struct iseq_compile_data_storage *arena);
194
+ void rb_iseq_mark_and_pin_insn_storage(struct iseq_compile_data_storage *arena);
193
195
 
194
196
  VALUE rb_iseq_load(VALUE data, VALUE parent, VALUE opt);
195
197
  VALUE rb_iseq_parameters(const rb_iseq_t *iseq, int is_proc);
@@ -329,6 +331,8 @@ VALUE rb_iseq_local_variables(const rb_iseq_t *iseq);
329
331
 
330
332
  attr_index_t rb_estimate_iv_count(VALUE klass, const rb_iseq_t * initialize_iseq);
331
333
 
334
+ void rb_free_encoded_insn_data(void);
335
+
332
336
  RUBY_SYMBOL_EXPORT_END
333
337
 
334
338
  #endif /* RUBY_ISEQ_H */
@@ -153,7 +153,6 @@ typedef struct rb_method_alias_struct {
153
153
 
154
154
  typedef struct rb_method_refined_struct {
155
155
  struct rb_method_entry_struct * orig_me;
156
- VALUE owner;
157
156
  } rb_method_refined_t;
158
157
 
159
158
  typedef struct rb_method_bmethod_struct {
@@ -38,6 +38,6 @@
38
38
 
39
39
  /* Let .bss section automatically initialize this variable */
40
40
  /* cf. Section 6.7.8 of ISO/IEC 9899:1999 */
41
- static const int *const *const unified_insns_data[202];
41
+ static const int *const *const unified_insns_data[204];
42
42
 
43
43
  ASSERT_VM_INSTRUCTION_SIZE(unified_insns_data);
@@ -1,4 +1,4 @@
1
- /* A Bison parser, made by Lrama 0.5.9. */
1
+ /* A Bison parser, made by Lrama 0.5.12. */
2
2
 
3
3
  /* Bison interface for Yacc-like parsers in C
4
4
 
@@ -190,7 +190,7 @@ extern int yydebug;
190
190
  #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
191
191
  union YYSTYPE
192
192
  {
193
- #line 1947 "parse.y"
193
+ #line 1963 "parse.y"
194
194
 
195
195
  VALUE val;
196
196
  NODE *node;