debase-ruby_core_source 3.2.2 → 3.2.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (126) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +5 -0
  3. data/lib/debase/ruby_core_source/{ruby-3.3.0-preview2 → ruby-3.3.0-preview3}/addr2line.h +3 -1
  4. data/lib/debase/ruby_core_source/{ruby-3.3.0-preview2 → ruby-3.3.0-preview3}/insns_info.inc +60 -60
  5. data/lib/debase/ruby_core_source/{ruby-3.3.0-preview2 → ruby-3.3.0-preview3}/internal/array.h +8 -1
  6. data/lib/debase/ruby_core_source/{ruby-3.3.0-preview2 → ruby-3.3.0-preview3}/internal/bits.h +6 -6
  7. data/lib/debase/ruby_core_source/{ruby-3.3.0-preview2 → ruby-3.3.0-preview3}/internal/class.h +7 -3
  8. data/lib/debase/ruby_core_source/{ruby-3.3.0-preview2 → ruby-3.3.0-preview3}/internal/cmdlineopt.h +2 -0
  9. data/lib/debase/ruby_core_source/{ruby-3.3.0-preview2 → ruby-3.3.0-preview3}/internal/gc.h +1 -0
  10. data/lib/debase/ruby_core_source/{ruby-3.3.0-preview2 → ruby-3.3.0-preview3}/internal/hash.h +1 -0
  11. data/lib/debase/ruby_core_source/{ruby-3.3.0-preview2 → ruby-3.3.0-preview3}/internal/imemo.h +0 -1
  12. data/lib/debase/ruby_core_source/{ruby-3.3.0-preview2 → ruby-3.3.0-preview3}/internal/parse.h +7 -32
  13. data/lib/debase/ruby_core_source/{ruby-3.3.0-preview2 → ruby-3.3.0-preview3}/internal/thread.h +1 -0
  14. data/lib/debase/ruby_core_source/{ruby-3.3.0-preview2 → ruby-3.3.0-preview3}/internal/variable.h +1 -2
  15. data/lib/debase/ruby_core_source/{ruby-3.3.0-preview2 → ruby-3.3.0-preview3}/internal/vm.h +4 -2
  16. data/lib/debase/ruby_core_source/{ruby-3.3.0-preview2 → ruby-3.3.0-preview3}/method.h +7 -6
  17. data/lib/debase/ruby_core_source/{ruby-3.3.0-preview2 → ruby-3.3.0-preview3}/node.h +22 -19
  18. data/lib/debase/ruby_core_source/{ruby-3.3.0-preview2 → ruby-3.3.0-preview3}/node_name.inc +4 -2
  19. data/lib/debase/ruby_core_source/{ruby-3.3.0-preview2 → ruby-3.3.0-preview3}/parse.h +16 -5
  20. data/lib/debase/ruby_core_source/ruby-3.3.0-preview3/parser_node.h +32 -0
  21. data/lib/debase/ruby_core_source/ruby-3.3.0-preview3/prism_compile.h +18 -0
  22. data/lib/debase/ruby_core_source/{ruby-3.3.0-preview2 → ruby-3.3.0-preview3}/ractor_core.h +7 -1
  23. data/lib/debase/ruby_core_source/{ruby-3.3.0-preview2 → ruby-3.3.0-preview3}/regint.h +8 -0
  24. data/lib/debase/ruby_core_source/{ruby-3.3.0-preview2 → ruby-3.3.0-preview3}/regparse.h +2 -1
  25. data/lib/debase/ruby_core_source/ruby-3.3.0-preview3/revision.h +5 -0
  26. data/lib/debase/ruby_core_source/ruby-3.3.0-preview3/rubyparser.h +1403 -0
  27. data/lib/debase/ruby_core_source/{ruby-3.3.0-preview2 → ruby-3.3.0-preview3}/shape.h +32 -22
  28. data/lib/debase/ruby_core_source/{ruby-3.3.0-preview2 → ruby-3.3.0-preview3}/symbol.h +1 -2
  29. data/lib/debase/ruby_core_source/{ruby-3.3.0-preview2 → ruby-3.3.0-preview3}/thread_none.h +1 -0
  30. data/lib/debase/ruby_core_source/ruby-3.3.0-preview3/thread_pthread.h +166 -0
  31. data/lib/debase/ruby_core_source/{ruby-3.3.0-preview2 → ruby-3.3.0-preview3}/thread_win32.h +1 -1
  32. data/lib/debase/ruby_core_source/{ruby-3.3.0-preview2 → ruby-3.3.0-preview3}/variable.h +9 -2
  33. data/lib/debase/ruby_core_source/{ruby-3.3.0-preview2 → ruby-3.3.0-preview3}/version.h +7 -3
  34. data/lib/debase/ruby_core_source/{ruby-3.3.0-preview2 → ruby-3.3.0-preview3}/vm.inc +170 -183
  35. data/lib/debase/ruby_core_source/{ruby-3.3.0-preview2 → ruby-3.3.0-preview3}/vm_callinfo.h +4 -0
  36. data/lib/debase/ruby_core_source/{ruby-3.3.0-preview2 → ruby-3.3.0-preview3}/vm_core.h +64 -11
  37. data/lib/debase/ruby_core_source/{ruby-3.3.0-preview2 → ruby-3.3.0-preview3}/yjit.h +10 -8
  38. data/lib/debase/ruby_core_source/version.rb +1 -1
  39. metadata +120 -119
  40. data/lib/debase/ruby_core_source/ruby-3.3.0-preview2/parser_node.h +0 -133
  41. data/lib/debase/ruby_core_source/ruby-3.3.0-preview2/revision.h +0 -5
  42. data/lib/debase/ruby_core_source/ruby-3.3.0-preview2/rubyparser.h +0 -628
  43. data/lib/debase/ruby_core_source/ruby-3.3.0-preview2/thread_pthread.h +0 -126
  44. data/lib/debase/ruby_core_source/{ruby-3.3.0-preview2 → ruby-3.3.0-preview3}/builtin.h +0 -0
  45. data/lib/debase/ruby_core_source/{ruby-3.3.0-preview2 → ruby-3.3.0-preview3}/ccan/build_assert/build_assert.h +0 -0
  46. data/lib/debase/ruby_core_source/{ruby-3.3.0-preview2 → ruby-3.3.0-preview3}/ccan/check_type/check_type.h +0 -0
  47. data/lib/debase/ruby_core_source/{ruby-3.3.0-preview2 → ruby-3.3.0-preview3}/ccan/container_of/container_of.h +0 -0
  48. data/lib/debase/ruby_core_source/{ruby-3.3.0-preview2 → ruby-3.3.0-preview3}/ccan/list/list.h +0 -0
  49. data/lib/debase/ruby_core_source/{ruby-3.3.0-preview2 → ruby-3.3.0-preview3}/ccan/str/str.h +0 -0
  50. data/lib/debase/ruby_core_source/{ruby-3.3.0-preview2 → ruby-3.3.0-preview3}/constant.h +0 -0
  51. data/lib/debase/ruby_core_source/{ruby-3.3.0-preview2 → ruby-3.3.0-preview3}/darray.h +0 -0
  52. data/lib/debase/ruby_core_source/{ruby-3.3.0-preview2 → ruby-3.3.0-preview3}/debug_counter.h +0 -0
  53. data/lib/debase/ruby_core_source/{ruby-3.3.0-preview2 → ruby-3.3.0-preview3}/dln.h +0 -0
  54. data/lib/debase/ruby_core_source/{ruby-3.3.0-preview2 → ruby-3.3.0-preview3}/encindex.h +0 -0
  55. data/lib/debase/ruby_core_source/{ruby-3.3.0-preview2 → ruby-3.3.0-preview3}/eval_intern.h +0 -0
  56. data/lib/debase/ruby_core_source/{ruby-3.3.0-preview2 → ruby-3.3.0-preview3}/hrtime.h +0 -0
  57. data/lib/debase/ruby_core_source/{ruby-3.3.0-preview2 → ruby-3.3.0-preview3}/id.h +0 -0
  58. data/lib/debase/ruby_core_source/{ruby-3.3.0-preview2 → ruby-3.3.0-preview3}/id_table.h +0 -0
  59. data/lib/debase/ruby_core_source/{ruby-3.3.0-preview2 → ruby-3.3.0-preview3}/insns.inc +0 -0
  60. data/lib/debase/ruby_core_source/{ruby-3.3.0-preview2 → ruby-3.3.0-preview3}/internal/basic_operators.h +0 -0
  61. data/lib/debase/ruby_core_source/{ruby-3.3.0-preview2 → ruby-3.3.0-preview3}/internal/bignum.h +0 -0
  62. data/lib/debase/ruby_core_source/{ruby-3.3.0-preview2 → ruby-3.3.0-preview3}/internal/compar.h +0 -0
  63. data/lib/debase/ruby_core_source/{ruby-3.3.0-preview2 → ruby-3.3.0-preview3}/internal/compile.h +0 -0
  64. data/lib/debase/ruby_core_source/{ruby-3.3.0-preview2 → ruby-3.3.0-preview3}/internal/compilers.h +0 -0
  65. data/lib/debase/ruby_core_source/{ruby-3.3.0-preview2 → ruby-3.3.0-preview3}/internal/complex.h +0 -0
  66. data/lib/debase/ruby_core_source/{ruby-3.3.0-preview2 → ruby-3.3.0-preview3}/internal/cont.h +0 -0
  67. data/lib/debase/ruby_core_source/{ruby-3.3.0-preview2 → ruby-3.3.0-preview3}/internal/dir.h +0 -0
  68. data/lib/debase/ruby_core_source/{ruby-3.3.0-preview2 → ruby-3.3.0-preview3}/internal/enc.h +0 -0
  69. data/lib/debase/ruby_core_source/{ruby-3.3.0-preview2 → ruby-3.3.0-preview3}/internal/encoding.h +0 -0
  70. data/lib/debase/ruby_core_source/{ruby-3.3.0-preview2 → ruby-3.3.0-preview3}/internal/enum.h +0 -0
  71. data/lib/debase/ruby_core_source/{ruby-3.3.0-preview2 → ruby-3.3.0-preview3}/internal/enumerator.h +0 -0
  72. data/lib/debase/ruby_core_source/{ruby-3.3.0-preview2 → ruby-3.3.0-preview3}/internal/error.h +0 -0
  73. data/lib/debase/ruby_core_source/{ruby-3.3.0-preview2 → ruby-3.3.0-preview3}/internal/eval.h +0 -0
  74. data/lib/debase/ruby_core_source/{ruby-3.3.0-preview2 → ruby-3.3.0-preview3}/internal/file.h +0 -0
  75. data/lib/debase/ruby_core_source/{ruby-3.3.0-preview2 → ruby-3.3.0-preview3}/internal/fixnum.h +0 -0
  76. data/lib/debase/ruby_core_source/{ruby-3.3.0-preview2 → ruby-3.3.0-preview3}/internal/inits.h +0 -0
  77. data/lib/debase/ruby_core_source/{ruby-3.3.0-preview2 → ruby-3.3.0-preview3}/internal/io.h +0 -0
  78. data/lib/debase/ruby_core_source/{ruby-3.3.0-preview2 → ruby-3.3.0-preview3}/internal/load.h +0 -0
  79. data/lib/debase/ruby_core_source/{ruby-3.3.0-preview2 → ruby-3.3.0-preview3}/internal/loadpath.h +0 -0
  80. data/lib/debase/ruby_core_source/{ruby-3.3.0-preview2 → ruby-3.3.0-preview3}/internal/math.h +0 -0
  81. data/lib/debase/ruby_core_source/{ruby-3.3.0-preview2 → ruby-3.3.0-preview3}/internal/missing.h +0 -0
  82. data/lib/debase/ruby_core_source/{ruby-3.3.0-preview2 → ruby-3.3.0-preview3}/internal/numeric.h +0 -0
  83. data/lib/debase/ruby_core_source/{ruby-3.3.0-preview2 → ruby-3.3.0-preview3}/internal/object.h +0 -0
  84. data/lib/debase/ruby_core_source/{ruby-3.3.0-preview2 → ruby-3.3.0-preview3}/internal/proc.h +0 -0
  85. data/lib/debase/ruby_core_source/{ruby-3.3.0-preview2 → ruby-3.3.0-preview3}/internal/process.h +0 -0
  86. data/lib/debase/ruby_core_source/{ruby-3.3.0-preview2 → ruby-3.3.0-preview3}/internal/ractor.h +0 -0
  87. data/lib/debase/ruby_core_source/{ruby-3.3.0-preview2 → ruby-3.3.0-preview3}/internal/random.h +0 -0
  88. data/lib/debase/ruby_core_source/{ruby-3.3.0-preview2 → ruby-3.3.0-preview3}/internal/range.h +0 -0
  89. data/lib/debase/ruby_core_source/{ruby-3.3.0-preview2 → ruby-3.3.0-preview3}/internal/rational.h +0 -0
  90. data/lib/debase/ruby_core_source/{ruby-3.3.0-preview2 → ruby-3.3.0-preview3}/internal/re.h +0 -0
  91. data/lib/debase/ruby_core_source/{ruby-3.3.0-preview2 → ruby-3.3.0-preview3}/internal/ruby_parser.h +2 -2
  92. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview2 → ruby-3.3.0-preview3}/internal/sanitizers.h +0 -0
  93. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview2 → ruby-3.3.0-preview3}/internal/serial.h +0 -0
  94. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview2 → ruby-3.3.0-preview3}/internal/signal.h +0 -0
  95. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview2 → ruby-3.3.0-preview3}/internal/static_assert.h +0 -0
  96. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview2 → ruby-3.3.0-preview3}/internal/string.h +0 -0
  97. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview2 → ruby-3.3.0-preview3}/internal/struct.h +0 -0
  98. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview2 → ruby-3.3.0-preview3}/internal/symbol.h +0 -0
  99. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview2 → ruby-3.3.0-preview3}/internal/time.h +0 -0
  100. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview2 → ruby-3.3.0-preview3}/internal/transcode.h +0 -0
  101. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview2 → ruby-3.3.0-preview3}/internal/util.h +0 -0
  102. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview2 → ruby-3.3.0-preview3}/internal/warnings.h +0 -0
  103. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview2 → ruby-3.3.0-preview3}/internal.h +0 -0
  104. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview2 → ruby-3.3.0-preview3}/iseq.h +0 -0
  105. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview2 → ruby-3.3.0-preview3}/known_errors.inc +0 -0
  106. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview2 → ruby-3.3.0-preview3}/optinsn.inc +0 -0
  107. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview2 → ruby-3.3.0-preview3}/optunifs.inc +0 -0
  108. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview2 → ruby-3.3.0-preview3}/parser_bits.h +0 -0
  109. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview2 → ruby-3.3.0-preview3}/parser_st.h +0 -0
  110. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview2 → ruby-3.3.0-preview3}/parser_value.h +0 -0
  111. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview2 → ruby-3.3.0-preview3}/probes_helper.h +0 -0
  112. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview2 → ruby-3.3.0-preview3}/regenc.h +0 -0
  113. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview2 → ruby-3.3.0-preview3}/rjit.h +0 -0
  114. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview2 → ruby-3.3.0-preview3}/rjit_c.h +0 -0
  115. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview2 → ruby-3.3.0-preview3}/ruby_assert.h +0 -0
  116. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview2 → ruby-3.3.0-preview3}/ruby_atomic.h +0 -0
  117. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview2 → ruby-3.3.0-preview3}/siphash.h +0 -0
  118. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview2 → ruby-3.3.0-preview3}/timev.h +0 -0
  119. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview2 → ruby-3.3.0-preview3}/transcode_data.h +0 -0
  120. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview2 → ruby-3.3.0-preview3}/vm_call_iseq_optimized.inc +0 -0
  121. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview2 → ruby-3.3.0-preview3}/vm_debug.h +0 -0
  122. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview2 → ruby-3.3.0-preview3}/vm_exec.h +0 -0
  123. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview2 → ruby-3.3.0-preview3}/vm_insnhelper.h +0 -0
  124. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview2 → ruby-3.3.0-preview3}/vm_opts.h +0 -0
  125. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview2 → ruby-3.3.0-preview3}/vm_sync.h +0 -0
  126. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview2 → ruby-3.3.0-preview3}/vmtc.inc +0 -0
@@ -22,47 +22,22 @@ struct rb_iseq_struct; /* in vm_core.h */
22
22
 
23
23
  /* structs for managing terminator of string literal and heredocment */
24
24
  typedef struct rb_strterm_literal_struct {
25
- union {
26
- VALUE dummy;
27
- long nest;
28
- } u0;
29
- union {
30
- VALUE dummy;
31
- long func; /* STR_FUNC_* (e.g., STR_FUNC_ESCAPE and STR_FUNC_EXPAND) */
32
- } u1;
33
- union {
34
- VALUE dummy;
35
- long paren; /* '(' of `%q(...)` */
36
- } u2;
37
- union {
38
- VALUE dummy;
39
- long term; /* ')' of `%q(...)` */
40
- } u3;
25
+ long nest;
26
+ int func; /* STR_FUNC_* (e.g., STR_FUNC_ESCAPE and STR_FUNC_EXPAND) */
27
+ int paren; /* '(' of `%q(...)` */
28
+ int term; /* ')' of `%q(...)` */
41
29
  } rb_strterm_literal_t;
42
30
 
43
- #define HERETERM_LENGTH_BITS ((SIZEOF_VALUE - 1) * CHAR_BIT - 1)
44
-
45
31
  typedef struct rb_strterm_heredoc_struct {
46
32
  VALUE lastline; /* the string of line that contains `<<"END"` */
47
33
  long offset; /* the column of END in `<<"END"` */
48
34
  int sourceline; /* lineno of the line that contains `<<"END"` */
49
- unsigned length /* the length of END in `<<"END"` */
50
- #if HERETERM_LENGTH_BITS < SIZEOF_INT * CHAR_BIT
51
- : HERETERM_LENGTH_BITS
52
- # define HERETERM_LENGTH_MAX ((1U << HERETERM_LENGTH_BITS) - 1)
53
- #else
54
- # define HERETERM_LENGTH_MAX UINT_MAX
55
- #endif
56
- ;
57
- #if HERETERM_LENGTH_BITS < SIZEOF_INT * CHAR_BIT
58
- unsigned quote: 1;
59
- unsigned func: 8;
60
- #else
35
+ unsigned length; /* the length of END in `<<"END"` */
61
36
  uint8_t quote;
62
37
  uint8_t func;
63
- #endif
64
38
  } rb_strterm_heredoc_t;
65
- STATIC_ASSERT(rb_strterm_heredoc_t, sizeof(rb_strterm_heredoc_t) <= 4 * SIZEOF_VALUE);
39
+
40
+ #define HERETERM_LENGTH_MAX UINT_MAX
66
41
 
67
42
  typedef struct rb_strterm_struct {
68
43
  VALUE flags;
@@ -50,6 +50,7 @@ void rb_mutex_allow_trap(VALUE self, int val);
50
50
  VALUE rb_uninterruptible(VALUE (*b_proc)(VALUE), VALUE data);
51
51
  VALUE rb_mutex_owned_p(VALUE self);
52
52
  VALUE rb_exec_recursive_outer_mid(VALUE (*f)(VALUE g, VALUE h, int r), VALUE g, VALUE h, ID mid);
53
+ void ruby_mn_threads_params(void);
53
54
 
54
55
  int rb_thread_wait_for_single_fd(int fd, int events, struct timeval * timeout);
55
56
 
@@ -48,6 +48,7 @@ VALUE rb_mod_set_temporary_name(VALUE, VALUE);
48
48
  struct gen_ivtbl;
49
49
  int rb_gen_ivtbl_get(VALUE obj, ID id, struct gen_ivtbl **ivtbl);
50
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);
51
52
 
52
53
  RUBY_SYMBOL_EXPORT_BEGIN
53
54
  /* variable.c (export) */
@@ -63,9 +64,7 @@ VALUE rb_gvar_get(ID);
63
64
  VALUE rb_gvar_set(ID, VALUE);
64
65
  VALUE rb_gvar_defined(ID);
65
66
  void rb_const_warn_if_deprecated(const rb_const_entry_t *, VALUE, ID);
66
- rb_shape_t * rb_grow_iv_list(VALUE obj);
67
67
  void rb_ensure_iv_list_size(VALUE obj, uint32_t len, uint32_t newsize);
68
- struct gen_ivtbl *rb_ensure_generic_iv_list_size(VALUE obj, rb_shape_t *shape, uint32_t newsize);
69
68
  attr_index_t rb_obj_ivar_set(VALUE obj, ID id, VALUE val);
70
69
 
71
70
  #endif /* INTERNAL_VARIABLE_H */
@@ -58,6 +58,8 @@ VALUE rb_yield_refine_block(VALUE refinement, VALUE refinements);
58
58
  VALUE ruby_vm_special_exception_copy(VALUE);
59
59
  PUREFUNC(st_table *rb_vm_fstring_table(void));
60
60
 
61
+ void rb_lastline_set_up(VALUE val, unsigned int up);
62
+
61
63
  /* vm_eval.c */
62
64
  VALUE rb_current_realfilepath(void);
63
65
  VALUE rb_check_block_call(VALUE, ID, int, const VALUE *, rb_block_call_func_t, VALUE);
@@ -95,7 +97,7 @@ int rb_ec_obj_respond_to(struct rb_execution_context_struct *ec, VALUE obj, ID i
95
97
  void rb_clear_constant_cache(void);
96
98
 
97
99
  /* vm_dump.c */
98
- void rb_print_backtrace(void);
100
+ void rb_print_backtrace(FILE *);
99
101
 
100
102
  /* vm_backtrace.c */
101
103
  VALUE rb_vm_thread_backtrace(int argc, const VALUE *argv, VALUE thval);
@@ -103,7 +105,7 @@ VALUE rb_vm_thread_backtrace_locations(int argc, const VALUE *argv, VALUE thval)
103
105
  VALUE rb_vm_backtrace(int argc, const VALUE * argv, struct rb_execution_context_struct * ec);
104
106
  VALUE rb_vm_backtrace_locations(int argc, const VALUE * argv, struct rb_execution_context_struct * ec);
105
107
  VALUE rb_make_backtrace(void);
106
- void rb_backtrace_print_as_bugreport(void);
108
+ void rb_backtrace_print_as_bugreport(FILE*);
107
109
  int rb_backtrace_p(VALUE obj);
108
110
  VALUE rb_backtrace_to_str_ary(VALUE obj);
109
111
  VALUE rb_backtrace_to_location_ary(VALUE obj);
@@ -101,8 +101,9 @@ static inline void
101
101
  METHOD_ENTRY_FLAGS_COPY(rb_method_entry_t *dst, const rb_method_entry_t *src)
102
102
  {
103
103
  dst->flags =
104
- (dst->flags & ~(IMEMO_FL_USER0|IMEMO_FL_USER1|IMEMO_FL_USER2)) |
105
- (src->flags & (IMEMO_FL_USER0|IMEMO_FL_USER1|IMEMO_FL_USER2));
104
+ (dst->flags & ~(IMEMO_FL_USER0|IMEMO_FL_USER1|IMEMO_FL_USER2
105
+ |IMEMO_FL_USER3)) |
106
+ (src->flags & (IMEMO_FL_USER0|IMEMO_FL_USER1|IMEMO_FL_USER2|IMEMO_FL_USER3));
106
107
  }
107
108
 
108
109
  typedef enum {
@@ -178,9 +179,9 @@ typedef struct rb_method_optimized {
178
179
  struct rb_method_definition_struct {
179
180
  BITFIELD(rb_method_type_t, type, VM_METHOD_TYPE_MINIMUM_BITS);
180
181
  unsigned int iseq_overload: 1;
181
- int alias_count : 27;
182
- int complemented_count : 28;
183
182
  unsigned int no_redef_warning: 1;
183
+ unsigned int aliased : 1;
184
+ int reference_count : 28;
184
185
 
185
186
  union {
186
187
  rb_method_iseq_t iseq;
@@ -199,7 +200,7 @@ struct rb_method_definition_struct {
199
200
  struct rb_id_table;
200
201
 
201
202
  typedef struct rb_method_definition_struct rb_method_definition_t;
202
- STATIC_ASSERT(sizeof_method_def, offsetof(rb_method_definition_t, body)==8);
203
+ STATIC_ASSERT(sizeof_method_def, offsetof(rb_method_definition_t, body) <= 8);
203
204
 
204
205
  #define UNDEFINED_METHOD_ENTRY_P(me) (!(me) || !(me)->def || (me)->def->type == VM_METHOD_TYPE_UNDEF)
205
206
  #define UNDEFINED_REFINED_METHOD_P(def) \
@@ -213,7 +214,7 @@ void rb_add_method_optimized(VALUE klass, ID mid, enum method_optimized_type, un
213
214
  void rb_add_refined_method_entry(VALUE refined_class, ID mid);
214
215
 
215
216
  rb_method_entry_t *rb_method_entry_set(VALUE klass, ID mid, const rb_method_entry_t *, rb_method_visibility_t noex);
216
- rb_method_entry_t *rb_method_entry_create(ID called_id, VALUE klass, rb_method_visibility_t visi, const rb_method_definition_t *def);
217
+ rb_method_entry_t *rb_method_entry_create(ID called_id, VALUE klass, rb_method_visibility_t visi, rb_method_definition_t *def);
217
218
 
218
219
  const rb_method_entry_t *rb_method_entry_at(VALUE obj, ID id);
219
220
 
@@ -19,12 +19,14 @@ typedef void (*bug_report_func)(const char *fmt, ...);
19
19
 
20
20
  typedef struct node_buffer_elem_struct {
21
21
  struct node_buffer_elem_struct *next;
22
- long len;
23
- NODE buf[FLEX_ARY_LEN];
22
+ long len; /* Length of nodes */
23
+ size_t allocated; /* Total memory size of allocated buf */
24
+ size_t used; /* Current usage of buf */
25
+ NODE **nodes; /* Array of node pointers */
26
+ NODE *buf[FLEX_ARY_LEN];
24
27
  } node_buffer_elem_t;
25
28
 
26
29
  typedef struct {
27
- long idx, len;
28
30
  node_buffer_elem_t *head;
29
31
  node_buffer_elem_t *last;
30
32
  } node_buffer_list_t;
@@ -50,7 +52,7 @@ RUBY_SYMBOL_EXPORT_BEGIN
50
52
  #ifdef UNIVERSAL_PARSER
51
53
  rb_ast_t *rb_ast_new(rb_parser_config_t *config);
52
54
  #else
53
- rb_ast_t *rb_ast_new();
55
+ rb_ast_t *rb_ast_new(void);
54
56
  #endif
55
57
  size_t rb_ast_memsize(const rb_ast_t*);
56
58
  void rb_ast_dispose(rb_ast_t*);
@@ -59,14 +61,15 @@ VALUE rb_ast_tokens(rb_ast_t *ast);
59
61
  void rb_ast_node_type_change(NODE *n, enum node_type type);
60
62
  #endif
61
63
  const char *ruby_node_name(int node);
62
- void rb_node_init(NODE *n, enum node_type type, VALUE a0, VALUE a1, VALUE a2);
64
+ void rb_node_init(NODE *n, enum node_type type);
63
65
 
64
66
  void rb_ast_mark(rb_ast_t*);
65
67
  void rb_ast_update_references(rb_ast_t*);
66
68
  void rb_ast_free(rb_ast_t*);
67
69
  void rb_ast_add_mark_object(rb_ast_t*, VALUE);
70
+ void rb_ast_delete_mark_object(rb_ast_t*, VALUE);
68
71
  void rb_ast_set_tokens(rb_ast_t*, VALUE);
69
- NODE *rb_ast_newnode(rb_ast_t*, enum node_type type);
72
+ NODE *rb_ast_newnode(rb_ast_t*, enum node_type type, size_t size, size_t alignment);
70
73
  void rb_ast_delete_node(rb_ast_t*, NODE *n);
71
74
  rb_ast_id_table_t *rb_ast_new_local_table(rb_ast_t*, int);
72
75
  rb_ast_id_table_t *rb_ast_resize_latest_local_table(rb_ast_t*, int);
@@ -94,27 +97,27 @@ RUBY_SYMBOL_EXPORT_END
94
97
 
95
98
 
96
99
  #define NODE_SPECIAL_REQUIRED_KEYWORD ((NODE *)-1)
97
- #define NODE_REQUIRED_KEYWORD_P(node) ((node)->nd_value == NODE_SPECIAL_REQUIRED_KEYWORD)
100
+ #define NODE_REQUIRED_KEYWORD_P(node) ((node) == NODE_SPECIAL_REQUIRED_KEYWORD)
98
101
  #define NODE_SPECIAL_NO_NAME_REST ((NODE *)-1)
99
102
  #define NODE_NAMED_REST_P(node) ((node) != NODE_SPECIAL_NO_NAME_REST)
100
103
  #define NODE_SPECIAL_EXCESSIVE_COMMA ((ID)1)
101
104
  #define NODE_SPECIAL_NO_REST_KEYWORD ((NODE *)-1)
102
105
 
103
- #define nd_first_column(n) ((int)((n)->nd_loc.beg_pos.column))
104
- #define nd_set_first_column(n, v) ((n)->nd_loc.beg_pos.column = (v))
105
- #define nd_first_lineno(n) ((int)((n)->nd_loc.beg_pos.lineno))
106
- #define nd_set_first_lineno(n, v) ((n)->nd_loc.beg_pos.lineno = (v))
107
- #define nd_first_loc(n) ((n)->nd_loc.beg_pos)
106
+ #define nd_first_column(n) ((int)(RNODE(n)->nd_loc.beg_pos.column))
107
+ #define nd_set_first_column(n, v) (RNODE(n)->nd_loc.beg_pos.column = (v))
108
+ #define nd_first_lineno(n) ((int)(RNODE(n)->nd_loc.beg_pos.lineno))
109
+ #define nd_set_first_lineno(n, v) (RNODE(n)->nd_loc.beg_pos.lineno = (v))
110
+ #define nd_first_loc(n) (RNODE(n)->nd_loc.beg_pos)
108
111
  #define nd_set_first_loc(n, v) (nd_first_loc(n) = (v))
109
112
 
110
- #define nd_last_column(n) ((int)((n)->nd_loc.end_pos.column))
111
- #define nd_set_last_column(n, v) ((n)->nd_loc.end_pos.column = (v))
112
- #define nd_last_lineno(n) ((int)((n)->nd_loc.end_pos.lineno))
113
- #define nd_set_last_lineno(n, v) ((n)->nd_loc.end_pos.lineno = (v))
114
- #define nd_last_loc(n) ((n)->nd_loc.end_pos)
113
+ #define nd_last_column(n) ((int)(RNODE(n)->nd_loc.end_pos.column))
114
+ #define nd_set_last_column(n, v) (RNODE(n)->nd_loc.end_pos.column = (v))
115
+ #define nd_last_lineno(n) ((int)(RNODE(n)->nd_loc.end_pos.lineno))
116
+ #define nd_set_last_lineno(n, v) (RNODE(n)->nd_loc.end_pos.lineno = (v))
117
+ #define nd_last_loc(n) (RNODE(n)->nd_loc.end_pos)
115
118
  #define nd_set_last_loc(n, v) (nd_last_loc(n) = (v))
116
- #define nd_node_id(n) ((n)->node_id)
117
- #define nd_set_node_id(n,id) ((n)->node_id = (id))
119
+ #define nd_node_id(n) (RNODE(n)->node_id)
120
+ #define nd_set_node_id(n,id) (RNODE(n)->node_id = (id))
118
121
 
119
122
  static inline bool
120
123
  nd_type_p(const NODE *n, enum node_type t)
@@ -88,8 +88,6 @@
88
88
  return "NODE_LIST";
89
89
  case NODE_ZLIST:
90
90
  return "NODE_ZLIST";
91
- case NODE_VALUES:
92
- return "NODE_VALUES";
93
91
  case NODE_HASH:
94
92
  return "NODE_HASH";
95
93
  case NODE_RETURN:
@@ -208,3 +206,7 @@
208
206
  return "NODE_FNDPTN";
209
207
  case NODE_ERROR:
210
208
  return "NODE_ERROR";
209
+ case NODE_RIPPER:
210
+ return "NODE_RIPPER";
211
+ case NODE_RIPPER_VALUES:
212
+ return "NODE_RIPPER_VALUES";
@@ -1,4 +1,4 @@
1
- /* A Bison parser, made by Lrama 0.5.6. */
1
+ /* A Bison parser, made by Lrama 0.5.9. */
2
2
 
3
3
  /* Bison interface for Yacc-like parsers in C
4
4
 
@@ -34,17 +34,17 @@
34
34
  /* DO NOT RELY ON FEATURES THAT ARE NOT DOCUMENTED in the manual,
35
35
  especially those whose name start with YY_ or yy_. They are
36
36
  private implementation details that can be changed or removed. */
37
-
38
37
  #ifndef YY_YY_PARSE_H_INCLUDED
39
38
  # define YY_YY_PARSE_H_INCLUDED
40
39
  /* Debug traces. */
41
40
  #ifndef YYDEBUG
42
41
  # define YYDEBUG 0
43
42
  #endif
44
- #if YYDEBUG
43
+ #if YYDEBUG && !defined(yydebug)
45
44
  extern int yydebug;
46
45
  #endif
47
46
 
47
+
48
48
  /* Token kinds. */
49
49
  #ifndef YYTOKENTYPE
50
50
  # define YYTOKENTYPE
@@ -190,10 +190,19 @@ extern int yydebug;
190
190
  #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
191
191
  union YYSTYPE
192
192
  {
193
- #line 1507 "parse.y"
193
+ #line 1947 "parse.y"
194
194
 
195
195
  VALUE val;
196
196
  NODE *node;
197
+ rb_node_fcall_t *node_fcall;
198
+ rb_node_args_t *node_args;
199
+ rb_node_args_aux_t *node_args_aux;
200
+ rb_node_opt_arg_t *node_opt_arg;
201
+ rb_node_kw_arg_t *node_kw_arg;
202
+ rb_node_block_pass_t *node_block_pass;
203
+ rb_node_masgn_t *node_masgn;
204
+ rb_node_def_temp_t *node_def_temp;
205
+ rb_node_exits_t *node_exits;
197
206
  ID id;
198
207
  int num;
199
208
  st_table *tbl;
@@ -201,7 +210,7 @@ union YYSTYPE
201
210
  struct rb_strterm_struct *strterm;
202
211
  struct lex_context ctxt;
203
212
 
204
- #line 205 "parse.h"
213
+ #line 214 "parse.h"
205
214
 
206
215
  };
207
216
  typedef union YYSTYPE YYSTYPE;
@@ -229,4 +238,6 @@ struct YYLTYPE
229
238
  int yyparse (struct parser_params *p);
230
239
 
231
240
 
241
+
232
242
  #endif /* !YY_YY_PARSE_H_INCLUDED */
243
+
@@ -0,0 +1,32 @@
1
+ #ifndef RUBY_PARSER_NODE_H
2
+ #define RUBY_PARSER_NODE_H 1
3
+ /*
4
+ * This is a header file used by only "parse.y"
5
+ */
6
+ #include "rubyparser.h"
7
+ #include "internal/compilers.h"
8
+
9
+ #if defined(__cplusplus)
10
+ extern "C" {
11
+ #if 0
12
+ } /* satisfy cc-mode */
13
+ #endif
14
+ #endif
15
+
16
+ static inline rb_code_location_t
17
+ code_loc_gen(const rb_code_location_t *loc1, const rb_code_location_t *loc2)
18
+ {
19
+ rb_code_location_t loc;
20
+ loc.beg_pos = loc1->beg_pos;
21
+ loc.end_pos = loc2->end_pos;
22
+ return loc;
23
+ }
24
+
25
+ #if defined(__cplusplus)
26
+ #if 0
27
+ { /* satisfy cc-mode */
28
+ #endif
29
+ } /* extern "C" { */
30
+ #endif
31
+
32
+ #endif /* RUBY_PARSER_NODE_H */
@@ -0,0 +1,18 @@
1
+ #include "prism/prism.h"
2
+
3
+ // ScopeNodes are helper nodes, and will never be part of the AST. We manually
4
+ // declare them here to avoid generating them.
5
+ typedef struct pm_scope_node {
6
+ pm_node_t base;
7
+ struct pm_scope_node *previous;
8
+ pm_node_t *ast_node;
9
+ struct pm_parameters_node *parameters;
10
+ pm_node_t *body;
11
+ pm_constant_id_list_t locals;
12
+ pm_parser_t *parser;
13
+
14
+ ID *constants;
15
+ st_table *index_lookup_table;
16
+ } pm_scope_node_t;
17
+
18
+ void pm_scope_node_init(const pm_node_t *node, pm_scope_node_t *scope, pm_scope_node_t *previous, pm_parser_t *parser);
@@ -103,7 +103,6 @@ struct rb_ractor_sync {
103
103
  #if RACTOR_CHECK_MODE > 0
104
104
  VALUE locked_by;
105
105
  #endif
106
- rb_nativethread_cond_t cond;
107
106
 
108
107
  bool incoming_port_closed;
109
108
  bool outgoing_port_closed;
@@ -120,7 +119,12 @@ struct rb_ractor_sync {
120
119
  struct ractor_wait {
121
120
  enum rb_ractor_wait_status status;
122
121
  enum rb_ractor_wakeup_status wakeup_status;
122
+ rb_thread_t *waiting_thread;
123
123
  } wait;
124
+
125
+ #ifndef RUBY_THREAD_PTHREAD_H
126
+ rb_nativethread_cond_t cond;
127
+ #endif
124
128
  };
125
129
 
126
130
  // created
@@ -310,11 +314,13 @@ static inline void
310
314
  rb_ractor_set_current_ec_(rb_ractor_t *cr, rb_execution_context_t *ec, const char *file, int line)
311
315
  {
312
316
  #ifdef RB_THREAD_LOCAL_SPECIFIER
317
+
313
318
  # ifdef __APPLE__
314
319
  rb_current_ec_set(ec);
315
320
  # else
316
321
  ruby_current_ec = ec;
317
322
  # endif
323
+
318
324
  #else
319
325
  native_tls_set(ruby_current_ec_key, ec);
320
326
  #endif
@@ -873,6 +873,12 @@ typedef struct _OnigStackType {
873
873
  UChar *abs_pstr; /* absent start position */
874
874
  const UChar *end_pstr; /* end position */
875
875
  } absent_pos;
876
+ #ifdef USE_MATCH_CACHE
877
+ struct {
878
+ long index; /* index of the match cache buffer */
879
+ uint8_t mask; /* bit-mask for the match cache buffer */
880
+ } match_cache_point;
881
+ #endif
876
882
  } u;
877
883
  } OnigStackType;
878
884
 
@@ -883,6 +889,8 @@ typedef struct {
883
889
  int outer_repeat_mem;
884
890
  long num_cache_points_at_outer_repeat;
885
891
  long num_cache_points_in_outer_repeat;
892
+ int lookaround_nesting;
893
+ UChar *match_addr;
886
894
  } OnigCacheOpcode;
887
895
  #endif
888
896
 
@@ -339,7 +339,7 @@ typedef struct {
339
339
  extern int onig_renumber_name_table(regex_t* reg, GroupNumRemap* map);
340
340
  #endif
341
341
 
342
- extern int onig_strncmp(const UChar* s1, const UChar* s2, int n);
342
+ extern int onig_strncmp(const UChar* s1, const UChar* s2, size_t n);
343
343
  extern void onig_strcpy(UChar* dest, const UChar* src, const UChar* end);
344
344
  extern void onig_scan_env_set_error_string(ScanEnv* env, int ecode, UChar* arg, UChar* arg_end);
345
345
  extern int onig_scan_unsigned_number(UChar** src, const UChar* end, OnigEncoding enc);
@@ -356,6 +356,7 @@ extern Node* onig_node_list_add(Node* list, Node* x);
356
356
  extern Node* onig_node_new_alt(Node* left, Node* right);
357
357
  extern void onig_node_str_clear(Node* node);
358
358
  extern int onig_names_free(regex_t* reg);
359
+ extern int onig_names_copy(regex_t* reg, regex_t* oreg);
359
360
  extern int onig_parse_make_tree(Node** root, const UChar* pattern, const UChar* end, regex_t* reg, ScanEnv* env);
360
361
  extern int onig_free_shared_cclass_table(void);
361
362
 
@@ -0,0 +1,5 @@
1
+ #define RUBY_REVISION "60e19a0b5f"
2
+ #define RUBY_FULL_REVISION "60e19a0b5fc9c067ee88751192dc56da618f5060"
3
+ #define RUBY_RELEASE_YEAR 2023
4
+ #define RUBY_RELEASE_MONTH 11
5
+ #define RUBY_RELEASE_DAY 12