debase-ruby_core_source 3.2.3 → 3.3.0

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 (123) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +5 -0
  3. data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/ccan/list/list.h +4 -2
  4. data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/dln.h +1 -0
  5. data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/eval_intern.h +4 -2
  6. data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/insns.inc +2 -0
  7. data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/insns_info.inc +269 -187
  8. data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/internal/class.h +46 -0
  9. data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/internal/cont.h +3 -0
  10. data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/internal/encoding.h +3 -0
  11. data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/internal/error.h +3 -0
  12. data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/internal/gc.h +2 -0
  13. data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/internal/object.h +1 -0
  14. data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/internal/random.h +1 -0
  15. data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/internal/string.h +0 -1
  16. data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/internal/symbol.h +3 -0
  17. data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/internal/thread.h +3 -0
  18. data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/internal/transcode.h +3 -0
  19. data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/internal/variable.h +5 -3
  20. data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/internal/vm.h +5 -0
  21. data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/iseq.h +5 -1
  22. data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/method.h +0 -1
  23. data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/optunifs.inc +1 -1
  24. data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/parse.h +2 -2
  25. data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/prism_compile.h +12 -1
  26. data/lib/debase/ruby_core_source/ruby-3.3.0-p0/revision.h +5 -0
  27. data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/rjit.h +6 -8
  28. data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/rjit_c.h +0 -1
  29. data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/rubyparser.h +1 -1
  30. data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/shape.h +2 -12
  31. data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/thread_pthread.h +1 -1
  32. data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/variable.h +2 -0
  33. data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/version.h +1 -1
  34. data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/vm.inc +189 -136
  35. data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/vm_callinfo.h +8 -1
  36. data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/vm_core.h +64 -5
  37. data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/vm_insnhelper.h +4 -14
  38. data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/vmtc.inc +2 -0
  39. data/lib/debase/ruby_core_source/version.rb +1 -1
  40. metadata +121 -121
  41. data/lib/debase/ruby_core_source/ruby-3.3.0-preview3/revision.h +0 -5
  42. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/addr2line.h +0 -0
  43. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/builtin.h +0 -0
  44. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/ccan/build_assert/build_assert.h +0 -0
  45. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/ccan/check_type/check_type.h +0 -0
  46. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/ccan/container_of/container_of.h +0 -0
  47. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/ccan/str/str.h +0 -0
  48. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/constant.h +0 -0
  49. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/darray.h +0 -0
  50. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/debug_counter.h +0 -0
  51. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/encindex.h +0 -0
  52. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/hrtime.h +0 -0
  53. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/id.h +0 -0
  54. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/id_table.h +0 -0
  55. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/internal/array.h +0 -0
  56. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/internal/basic_operators.h +0 -0
  57. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/internal/bignum.h +0 -0
  58. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/internal/bits.h +0 -0
  59. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/internal/cmdlineopt.h +0 -0
  60. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/internal/compar.h +0 -0
  61. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/internal/compile.h +0 -0
  62. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/internal/compilers.h +0 -0
  63. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/internal/complex.h +0 -0
  64. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/internal/dir.h +0 -0
  65. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/internal/enc.h +0 -0
  66. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/internal/enum.h +0 -0
  67. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/internal/enumerator.h +0 -0
  68. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/internal/eval.h +0 -0
  69. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/internal/file.h +0 -0
  70. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/internal/fixnum.h +0 -0
  71. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/internal/hash.h +0 -0
  72. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/internal/imemo.h +0 -0
  73. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/internal/inits.h +0 -0
  74. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/internal/io.h +0 -0
  75. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/internal/load.h +0 -0
  76. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/internal/loadpath.h +0 -0
  77. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/internal/math.h +0 -0
  78. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/internal/missing.h +0 -0
  79. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/internal/numeric.h +0 -0
  80. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/internal/parse.h +0 -0
  81. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/internal/proc.h +0 -0
  82. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/internal/process.h +0 -0
  83. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/internal/ractor.h +0 -0
  84. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/internal/range.h +0 -0
  85. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/internal/rational.h +0 -0
  86. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/internal/re.h +0 -0
  87. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/internal/ruby_parser.h +0 -0
  88. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/internal/sanitizers.h +0 -0
  89. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/internal/serial.h +0 -0
  90. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/internal/signal.h +0 -0
  91. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/internal/static_assert.h +0 -0
  92. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/internal/struct.h +0 -0
  93. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/internal/time.h +0 -0
  94. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/internal/util.h +0 -0
  95. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/internal/warnings.h +0 -0
  96. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/internal.h +0 -0
  97. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/known_errors.inc +0 -0
  98. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/node.h +0 -0
  99. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/node_name.inc +0 -0
  100. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/optinsn.inc +0 -0
  101. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/parser_bits.h +0 -0
  102. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/parser_node.h +0 -0
  103. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/parser_st.h +0 -0
  104. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/parser_value.h +0 -0
  105. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/probes_helper.h +0 -0
  106. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/ractor_core.h +0 -0
  107. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/regenc.h +0 -0
  108. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/regint.h +0 -0
  109. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/regparse.h +0 -0
  110. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/ruby_assert.h +0 -0
  111. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/ruby_atomic.h +0 -0
  112. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/siphash.h +0 -0
  113. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/symbol.h +0 -0
  114. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/thread_none.h +0 -0
  115. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/thread_win32.h +0 -0
  116. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/timev.h +0 -0
  117. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/transcode_data.h +0 -0
  118. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/vm_call_iseq_optimized.inc +0 -0
  119. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/vm_debug.h +0 -0
  120. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/vm_exec.h +0 -0
  121. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/vm_opts.h +0 -0
  122. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/vm_sync.h +0 -0
  123. /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;
@@ -6,13 +6,24 @@ typedef struct pm_scope_node {
6
6
  pm_node_t base;
7
7
  struct pm_scope_node *previous;
8
8
  pm_node_t *ast_node;
9
- struct pm_parameters_node *parameters;
9
+ pm_node_t *parameters;
10
10
  pm_node_t *body;
11
11
  pm_constant_id_list_t locals;
12
12
  pm_parser_t *parser;
13
13
 
14
+ // The size of the local table
15
+ // on the iseq which includes
16
+ // locals and hidden variables
17
+ int local_table_for_iseq_size;
18
+
14
19
  ID *constants;
15
20
  st_table *index_lookup_table;
21
+
22
+ // Some locals are defined at higher scopes than they are used. We can use
23
+ // this offset to control which parent scopes local table we should be
24
+ // referencing from the current scope.
25
+ unsigned int local_depth_offset;
16
26
  } pm_scope_node_t;
17
27
 
18
28
  void pm_scope_node_init(const pm_node_t *node, pm_scope_node_t *scope, pm_scope_node_t *previous, pm_parser_t *parser);
29
+ bool *rb_ruby_prism_ptr(void);
@@ -0,0 +1,5 @@
1
+ #define RUBY_REVISION "5124f9ac75"
2
+ #define RUBY_FULL_REVISION "5124f9ac7513eb590c37717337c430cb93caa151"
3
+ #define RUBY_RELEASE_YEAR 2023
4
+ #define RUBY_RELEASE_MONTH 12
5
+ #define RUBY_RELEASE_DAY 25
@@ -14,10 +14,6 @@
14
14
 
15
15
  # if USE_RJIT
16
16
 
17
- #ifndef RJIT_STATS
18
- # define RJIT_STATS RUBY_DEBUG
19
- #endif
20
-
21
17
  #include "ruby.h"
22
18
  #include "vm_core.h"
23
19
 
@@ -26,20 +22,22 @@ struct rb_rjit_options {
26
22
  // Converted from "rjit" feature flag to tell the enablement
27
23
  // information to ruby_show_version().
28
24
  bool on;
29
- // Number of calls to trigger JIT compilation.
30
- unsigned int call_threshold;
31
25
  // Size of executable memory block in MiB
32
26
  unsigned int exec_mem_size;
27
+ // Number of calls to trigger JIT compilation
28
+ unsigned int call_threshold;
33
29
  // Collect RJIT statistics
34
30
  bool stats;
31
+ // Do not start RJIT until RJIT.enable is called
32
+ bool disable;
33
+ // Allow TracePoint during JIT compilation
34
+ bool trace;
35
35
  // Trace side exit locations
36
36
  bool trace_exits;
37
37
  // Enable disasm of all JIT code
38
38
  bool dump_disasm;
39
39
  // Verify context objects
40
40
  bool verify_ctx;
41
- // [experimental] Do not start RJIT until RJIT.resume is called.
42
- bool pause;
43
41
  };
44
42
 
45
43
  RUBY_SYMBOL_EXPORT_BEGIN
@@ -17,7 +17,6 @@ extern uint8_t *rb_rjit_mem_block;
17
17
 
18
18
  #define RJIT_RUNTIME_COUNTERS(...) struct rb_rjit_runtime_counters { size_t __VA_ARGS__; };
19
19
  RJIT_RUNTIME_COUNTERS(
20
- vm_insns_count,
21
20
  rjit_insns_count,
22
21
 
23
22
  send_args_splat_kw_splat,
@@ -276,7 +276,7 @@ typedef struct RNode_FOR_MASGN {
276
276
  struct RNode *nd_var;
277
277
  } rb_node_for_masgn_t;
278
278
 
279
- /* RNode_BREAK, RNode_NEXT and RNode_RETURN should be same structure */
279
+ /* RNode_BREAK, RNode_NEXT and RNode_REDO should be same structure */
280
280
  typedef struct RNode_BREAK {
281
281
  NODE node;
282
282
 
@@ -9,7 +9,6 @@
9
9
  #define SHAPE_IN_BASIC_FLAGS 1
10
10
  typedef uint32_t attr_index_t;
11
11
  typedef uint32_t shape_id_t;
12
- typedef uint32_t redblack_id_t;
13
12
  # define SHAPE_ID_NUM_BITS 32
14
13
 
15
14
  #else
@@ -18,11 +17,12 @@ typedef uint32_t redblack_id_t;
18
17
  #define SHAPE_IN_BASIC_FLAGS 0
19
18
  typedef uint16_t attr_index_t;
20
19
  typedef uint16_t shape_id_t;
21
- typedef uint16_t redblack_id_t;
22
20
  # define SHAPE_ID_NUM_BITS 16
23
21
 
24
22
  #endif
25
23
 
24
+ typedef uint32_t redblack_id_t;
25
+
26
26
  #define MAX_IVARS (attr_index_t)(-1)
27
27
 
28
28
  # define SHAPE_MASK (((uintptr_t)1 << SHAPE_ID_NUM_BITS) - 1)
@@ -64,7 +64,6 @@ enum shape_type {
64
64
  SHAPE_ROOT,
65
65
  SHAPE_IVAR,
66
66
  SHAPE_FROZEN,
67
- SHAPE_CAPACITY_CHANGE,
68
67
  SHAPE_T_OBJECT,
69
68
  SHAPE_OBJ_TOO_COMPLEX,
70
69
  };
@@ -214,20 +213,11 @@ RBASIC_IV_COUNT(VALUE obj)
214
213
  return rb_shape_get_shape_by_id(rb_shape_get_shape_id(obj))->next_iv_index;
215
214
  }
216
215
 
217
- static inline uint32_t
218
- RCLASS_IV_COUNT(VALUE obj)
219
- {
220
- RUBY_ASSERT(RB_TYPE_P(obj, RUBY_T_CLASS) || RB_TYPE_P(obj, RUBY_T_MODULE));
221
- uint32_t ivc = rb_shape_get_shape_by_id(RCLASS_SHAPE_ID(obj))->next_iv_index;
222
- return ivc;
223
- }
224
-
225
216
  rb_shape_t *rb_shape_traverse_from_new_root(rb_shape_t *initial_shape, rb_shape_t *orig_shape);
226
217
 
227
218
  bool rb_shape_set_shape_id(VALUE obj, shape_id_t shape_id);
228
219
 
229
220
  VALUE rb_obj_debug_shape(VALUE self, VALUE obj);
230
- void rb_shape_set_too_complex(VALUE obj);
231
221
 
232
222
  // For ext/objspace
233
223
  RUBY_SYMBOL_EXPORT_BEGIN
@@ -134,7 +134,7 @@ struct rb_thread_sched {
134
134
 
135
135
  # ifdef __APPLE__
136
136
  // on Darwin, TLS can not be accessed across .so
137
- struct rb_execution_context_struct *rb_current_ec(void);
137
+ NOINLINE(struct rb_execution_context_struct *rb_current_ec(void));
138
138
  # else
139
139
  RUBY_EXTERN RB_THREAD_LOCAL_SPECIFIER struct rb_execution_context_struct *ruby_current_ec;
140
140
 
@@ -33,5 +33,7 @@ int rb_ivar_generic_ivtbl_lookup(VALUE obj, struct gen_ivtbl **);
33
33
  shape_id_t rb_generic_shape_id(VALUE obj);
34
34
  #endif
35
35
 
36
+ void rb_free_rb_global_tbl(void);
37
+ void rb_free_generic_iv_tbl_(void);
36
38
 
37
39
  #endif /* RUBY_TOPLEVEL_VARIABLE_H */
@@ -11,7 +11,7 @@
11
11
  # define RUBY_VERSION_MINOR RUBY_API_VERSION_MINOR
12
12
  #define RUBY_VERSION_TEENY 0
13
13
  #define RUBY_RELEASE_DATE RUBY_RELEASE_YEAR_STR"-"RUBY_RELEASE_MONTH_STR"-"RUBY_RELEASE_DAY_STR
14
- #define RUBY_PATCHLEVEL -1
14
+ #define RUBY_PATCHLEVEL 0
15
15
 
16
16
  #include "ruby/version.h"
17
17
  #include "ruby/internal/abi.h"