debase-ruby_core_source 3.2.1 → 3.2.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (129) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +10 -0
  3. data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview3}/addr2line.h +3 -1
  4. data/lib/debase/ruby_core_source/ruby-3.3.0-preview3/darray.h +246 -0
  5. data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview3}/debug_counter.h +7 -10
  6. data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview3}/eval_intern.h +3 -1
  7. data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview3}/id.h +44 -0
  8. data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview3}/insns_info.inc +128 -154
  9. data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview3}/internal/array.h +9 -20
  10. data/lib/debase/ruby_core_source/ruby-3.3.0-preview3/internal/bits.h +568 -0
  11. data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview3}/internal/class.h +11 -2
  12. data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview3}/internal/cmdlineopt.h +5 -1
  13. data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview3}/internal/compile.h +0 -1
  14. data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview3}/internal/error.h +24 -2
  15. data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview3}/internal/gc.h +29 -0
  16. data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview3}/internal/hash.h +19 -44
  17. data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview3}/internal/imemo.h +0 -1
  18. data/lib/debase/ruby_core_source/ruby-3.3.0-preview3/internal/io.h +137 -0
  19. data/lib/debase/ruby_core_source/ruby-3.3.0-preview3/internal/parse.h +108 -0
  20. data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview3}/internal/process.h +0 -14
  21. data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview3}/internal/range.h +2 -2
  22. data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview3}/internal/re.h +1 -1
  23. data/lib/debase/ruby_core_source/ruby-3.3.0-preview3/internal/ruby_parser.h +69 -0
  24. data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview3}/internal/signal.h +4 -0
  25. data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview3}/internal/string.h +15 -0
  26. data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview3}/internal/struct.h +9 -34
  27. data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview3}/internal/thread.h +14 -0
  28. data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview3}/internal/variable.h +17 -35
  29. data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview3}/internal/vm.h +9 -2
  30. data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview3}/iseq.h +4 -4
  31. data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview3}/method.h +8 -7
  32. data/lib/debase/ruby_core_source/ruby-3.3.0-preview3/node.h +128 -0
  33. data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview3}/node_name.inc +4 -2
  34. data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview3}/parse.h +19 -6
  35. data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1/internal/bits.h → ruby-3.3.0-preview3/parser_bits.h} +4 -4
  36. data/lib/debase/ruby_core_source/ruby-3.3.0-preview3/parser_node.h +32 -0
  37. data/lib/debase/ruby_core_source/ruby-3.3.0-preview3/parser_st.h +162 -0
  38. data/lib/debase/ruby_core_source/ruby-3.3.0-preview3/parser_value.h +106 -0
  39. data/lib/debase/ruby_core_source/ruby-3.3.0-preview3/prism_compile.h +18 -0
  40. data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview3}/ractor_core.h +10 -4
  41. data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview3}/regint.h +8 -0
  42. data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview3}/regparse.h +2 -1
  43. data/lib/debase/ruby_core_source/ruby-3.3.0-preview3/revision.h +5 -0
  44. data/lib/debase/ruby_core_source/ruby-3.3.0-preview3/rubyparser.h +1403 -0
  45. data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview3}/shape.h +32 -22
  46. data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview3}/symbol.h +2 -3
  47. data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview3}/thread_none.h +1 -0
  48. data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview3}/thread_pthread.h +66 -28
  49. data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview3}/thread_win32.h +1 -6
  50. data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview3}/variable.h +9 -2
  51. data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview3}/version.h +7 -3
  52. data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview3}/vm.inc +383 -497
  53. data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview3}/vm_callinfo.h +54 -16
  54. data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview3}/vm_core.h +92 -57
  55. data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview3}/vm_exec.h +11 -10
  56. data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview3}/vm_insnhelper.h +20 -23
  57. data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview3}/vm_opts.h +0 -5
  58. data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview3}/yjit.h +12 -12
  59. data/lib/debase/ruby_core_source/version.rb +1 -1
  60. metadata +120 -115
  61. data/lib/debase/ruby_core_source/ruby-3.3.0-preview1/darray.h +0 -179
  62. data/lib/debase/ruby_core_source/ruby-3.3.0-preview1/internal/io.h +0 -38
  63. data/lib/debase/ruby_core_source/ruby-3.3.0-preview1/internal/parse.h +0 -25
  64. data/lib/debase/ruby_core_source/ruby-3.3.0-preview1/node.h +0 -514
  65. data/lib/debase/ruby_core_source/ruby-3.3.0-preview1/opt_sc.inc +0 -109
  66. data/lib/debase/ruby_core_source/ruby-3.3.0-preview1/revision.h +0 -5
  67. data/lib/debase/ruby_core_source/ruby-3.3.0-preview1/transient_heap.h +0 -65
  68. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview3}/builtin.h +0 -0
  69. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview3}/ccan/build_assert/build_assert.h +0 -0
  70. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview3}/ccan/check_type/check_type.h +0 -0
  71. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview3}/ccan/container_of/container_of.h +0 -0
  72. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview3}/ccan/list/list.h +0 -0
  73. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview3}/ccan/str/str.h +0 -0
  74. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview3}/constant.h +0 -0
  75. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview3}/dln.h +0 -0
  76. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview3}/encindex.h +0 -0
  77. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview3}/hrtime.h +0 -0
  78. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview3}/id_table.h +0 -0
  79. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview3}/insns.inc +0 -0
  80. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview3}/internal/basic_operators.h +0 -0
  81. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview3}/internal/bignum.h +0 -0
  82. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview3}/internal/compar.h +0 -0
  83. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview3}/internal/compilers.h +0 -0
  84. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview3}/internal/complex.h +0 -0
  85. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview3}/internal/cont.h +0 -0
  86. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview3}/internal/dir.h +0 -0
  87. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview3}/internal/enc.h +0 -0
  88. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview3}/internal/encoding.h +0 -0
  89. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview3}/internal/enum.h +0 -0
  90. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview3}/internal/enumerator.h +0 -0
  91. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview3}/internal/eval.h +0 -0
  92. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview3}/internal/file.h +0 -0
  93. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview3}/internal/fixnum.h +0 -0
  94. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview3}/internal/inits.h +0 -0
  95. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview3}/internal/load.h +0 -0
  96. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview3}/internal/loadpath.h +0 -0
  97. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview3}/internal/math.h +0 -0
  98. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview3}/internal/missing.h +0 -0
  99. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview3}/internal/numeric.h +0 -0
  100. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview3}/internal/object.h +0 -0
  101. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview3}/internal/proc.h +0 -0
  102. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview3}/internal/ractor.h +0 -0
  103. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview3}/internal/random.h +0 -0
  104. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview3}/internal/rational.h +0 -0
  105. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview3}/internal/sanitizers.h +0 -0
  106. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview3}/internal/serial.h +0 -0
  107. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview3}/internal/static_assert.h +0 -0
  108. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview3}/internal/symbol.h +0 -0
  109. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview3}/internal/time.h +0 -0
  110. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview3}/internal/transcode.h +0 -0
  111. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview3}/internal/util.h +0 -0
  112. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview3}/internal/warnings.h +0 -0
  113. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview3}/internal.h +0 -0
  114. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview3}/known_errors.inc +0 -0
  115. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview3}/optinsn.inc +0 -0
  116. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview3}/optunifs.inc +0 -0
  117. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview3}/probes_helper.h +0 -0
  118. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview3}/regenc.h +0 -0
  119. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview3}/rjit.h +0 -0
  120. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview3}/rjit_c.h +0 -0
  121. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview3}/ruby_assert.h +0 -0
  122. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview3}/ruby_atomic.h +0 -0
  123. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview3}/siphash.h +0 -0
  124. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview3}/timev.h +0 -0
  125. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview3}/transcode_data.h +0 -0
  126. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview3}/vm_call_iseq_optimized.inc +0 -0
  127. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview3}/vm_debug.h +0 -0
  128. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview3}/vm_sync.h +0 -0
  129. /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview3}/vmtc.inc +0 -0
@@ -0,0 +1,162 @@
1
+ /* This is a public domain general purpose hash table package
2
+ originally written by Peter Moore @ UCB.
3
+
4
+ The hash table data structures were redesigned and the package was
5
+ rewritten by Vladimir Makarov <vmakarov@redhat.com>. */
6
+
7
+ #ifndef RUBY_ST2_H
8
+ #define RUBY_ST2_H 1
9
+
10
+ #if defined(__cplusplus)
11
+ extern "C" {
12
+ #if 0
13
+ } /* satisfy cc-mode */
14
+ #endif
15
+ #endif
16
+
17
+ #include <stddef.h>
18
+ #include <stdint.h>
19
+ #include "ruby/config.h"
20
+ #include "ruby/backward/2/long_long.h"
21
+ #include "ruby/defines.h"
22
+
23
+ RUBY_SYMBOL_EXPORT_BEGIN
24
+
25
+ #if SIZEOF_LONG == SIZEOF_VOIDP
26
+ typedef unsigned long parser_st_data_t;
27
+ #elif SIZEOF_LONG_LONG == SIZEOF_VOIDP
28
+ typedef unsigned LONG_LONG parser_st_data_t;
29
+ #else
30
+ # error ---->> parser_st.c requires sizeof(void*) == sizeof(long) or sizeof(LONG_LONG) to be compiled. <<----
31
+ #endif
32
+ #define ST2_DATA_T_DEFINED
33
+
34
+ #ifndef CHAR_BIT
35
+ # ifdef HAVE_LIMITS_H
36
+ # include <limits.h>
37
+ # else
38
+ # define CHAR_BIT 8
39
+ # endif
40
+ #endif
41
+ #ifndef _
42
+ # define _(args) args
43
+ #endif
44
+ #ifndef ANYARGS
45
+ # ifdef __cplusplus
46
+ # define ANYARGS ...
47
+ # else
48
+ # define ANYARGS
49
+ # endif
50
+ #endif
51
+
52
+ typedef struct parser_st_table parser_st_table;
53
+
54
+ typedef parser_st_data_t parser_st_index_t;
55
+
56
+ /* Maximal value of unsigned integer type parser_st_index_t. */
57
+ #define MAX_ST2_INDEX_VAL (~(parser_st_index_t) 0)
58
+
59
+ typedef int parser_st_compare_func(parser_st_data_t, parser_st_data_t);
60
+ typedef parser_st_index_t parser_st_hash_func(parser_st_data_t);
61
+
62
+ typedef char st_check_for_sizeof_parser_st_index_t[SIZEOF_VOIDP == (int)sizeof(parser_st_index_t) ? 1 : -1];
63
+ #define SIZEOF_ST_INDEX_T SIZEOF_VOIDP
64
+
65
+ struct parser_st_hash_type {
66
+ int (*compare)(parser_st_data_t, parser_st_data_t); /* parser_st_compare_func* */
67
+ parser_st_index_t (*hash)(parser_st_data_t); /* parser_st_hash_func* */
68
+ };
69
+
70
+ #define ST_INDEX_BITS (SIZEOF_ST_INDEX_T * CHAR_BIT)
71
+
72
+ #if defined(HAVE_BUILTIN___BUILTIN_CHOOSE_EXPR) && defined(HAVE_BUILTIN___BUILTIN_TYPES_COMPATIBLE_P)
73
+ # define ST2_DATA_COMPATIBLE_P(type) \
74
+ __builtin_choose_expr(__builtin_types_compatible_p(type, parser_st_data_t), 1, 0)
75
+ #else
76
+ # define ST2_DATA_COMPATIBLE_P(type) 0
77
+ #endif
78
+
79
+ typedef struct parser_st_table_entry parser_st_table_entry;
80
+
81
+ struct parser_st_table_entry; /* defined in parser_st.c */
82
+
83
+ struct parser_st_table {
84
+ /* Cached features of the table -- see st.c for more details. */
85
+ unsigned char entry_power, bin_power, size_ind;
86
+ /* How many times the table was rebuilt. */
87
+ unsigned int rebuilds_num;
88
+ const struct parser_st_hash_type *type;
89
+ /* Number of entries currently in the table. */
90
+ parser_st_index_t num_entries;
91
+ /* Array of bins used for access by keys. */
92
+ parser_st_index_t *bins;
93
+ /* Start and bound index of entries in array entries.
94
+ entries_starts and entries_bound are in interval
95
+ [0,allocated_entries]. */
96
+ parser_st_index_t entries_start, entries_bound;
97
+ /* Array of size 2^entry_power. */
98
+ parser_st_table_entry *entries;
99
+ };
100
+
101
+ #define parser_st_is_member(table,key) rb_parser_st_lookup((table),(key),(parser_st_data_t *)0)
102
+
103
+ enum parser_st_retval {ST2_CONTINUE, ST2_STOP, ST2_DELETE, ST2_CHECK, ST2_REPLACE};
104
+
105
+ size_t rb_parser_st_table_size(const struct parser_st_table *tbl);
106
+ parser_st_table *rb_parser_st_init_table(const struct parser_st_hash_type *);
107
+ parser_st_table *rb_parser_st_init_table_with_size(const struct parser_st_hash_type *, parser_st_index_t);
108
+ parser_st_table *rb_parser_st_init_existing_table_with_size(parser_st_table *, const struct parser_st_hash_type *, parser_st_index_t);
109
+ parser_st_table *rb_parser_st_init_numtable(void);
110
+ parser_st_table *rb_parser_st_init_numtable_with_size(parser_st_index_t);
111
+ parser_st_table *rb_parser_st_init_strtable(void);
112
+ parser_st_table *rb_parser_st_init_strtable_with_size(parser_st_index_t);
113
+ parser_st_table *rb_parser_st_init_strcasetable(void);
114
+ parser_st_table *rb_parser_st_init_strcasetable_with_size(parser_st_index_t);
115
+ int rb_parser_st_delete(parser_st_table *, parser_st_data_t *, parser_st_data_t *); /* returns 0:notfound 1:deleted */
116
+ int rb_parser_st_delete_safe(parser_st_table *, parser_st_data_t *, parser_st_data_t *, parser_st_data_t);
117
+ int rb_parser_st_shift(parser_st_table *, parser_st_data_t *, parser_st_data_t *); /* returns 0:notfound 1:deleted */
118
+ int rb_parser_st_insert(parser_st_table *, parser_st_data_t, parser_st_data_t);
119
+ int rb_parser_st_insert2(parser_st_table *, parser_st_data_t, parser_st_data_t, parser_st_data_t (*)(parser_st_data_t));
120
+ int rb_parser_st_lookup(parser_st_table *, parser_st_data_t, parser_st_data_t *);
121
+ int rb_parser_st_get_key(parser_st_table *, parser_st_data_t, parser_st_data_t *);
122
+ typedef int parser_st_update_callback_func(parser_st_data_t *key, parser_st_data_t *value, parser_st_data_t arg, int existing);
123
+ /* *key may be altered, but must equal to the old key, i.e., the
124
+ * results of hash() are same and compare() returns 0, otherwise the
125
+ * behavior is undefined */
126
+ int rb_parser_st_update(parser_st_table *table, parser_st_data_t key, parser_st_update_callback_func *func, parser_st_data_t arg);
127
+ typedef int parser_st_foreach_callback_func(parser_st_data_t, parser_st_data_t, parser_st_data_t);
128
+ typedef int parser_st_foreach_check_callback_func(parser_st_data_t, parser_st_data_t, parser_st_data_t, int);
129
+ int rb_parser_st_foreach_with_replace(parser_st_table *tab, parser_st_foreach_check_callback_func *func, parser_st_update_callback_func *replace, parser_st_data_t arg);
130
+ int rb_parser_st_foreach(parser_st_table *, parser_st_foreach_callback_func *, parser_st_data_t);
131
+ int rb_parser_st_foreach_check(parser_st_table *, parser_st_foreach_check_callback_func *, parser_st_data_t, parser_st_data_t);
132
+ parser_st_index_t rb_parser_st_keys(parser_st_table *table, parser_st_data_t *keys, parser_st_index_t size);
133
+ parser_st_index_t rb_parser_st_keys_check(parser_st_table *table, parser_st_data_t *keys, parser_st_index_t size, parser_st_data_t never);
134
+ parser_st_index_t rb_parser_st_values(parser_st_table *table, parser_st_data_t *values, parser_st_index_t size);
135
+ parser_st_index_t rb_parser_st_values_check(parser_st_table *table, parser_st_data_t *values, parser_st_index_t size, parser_st_data_t never);
136
+ void rb_parser_st_add_direct(parser_st_table *, parser_st_data_t, parser_st_data_t);
137
+ void rb_parser_st_free_table(parser_st_table *);
138
+ void rb_parser_st_cleanup_safe(parser_st_table *, parser_st_data_t);
139
+ void rb_parser_st_clear(parser_st_table *);
140
+ parser_st_table *rb_parser_st_replace(parser_st_table *, parser_st_table *);
141
+ parser_st_table *rb_parser_st_copy(parser_st_table *);
142
+ CONSTFUNC(int rb_parser_st_numcmp(parser_st_data_t, parser_st_data_t));
143
+ CONSTFUNC(parser_st_index_t rb_parser_st_numhash(parser_st_data_t));
144
+ PUREFUNC(int rb_parser_st_locale_insensitive_strcasecmp(const char *s1, const char *s2));
145
+ PUREFUNC(int rb_parser_st_locale_insensitive_strncasecmp(const char *s1, const char *s2, size_t n));
146
+ PUREFUNC(size_t rb_parser_st_memsize(const parser_st_table *));
147
+ PUREFUNC(parser_st_index_t rb_parser_st_hash(const void *ptr, size_t len, parser_st_index_t h));
148
+ CONSTFUNC(parser_st_index_t rb_parser_st_hash_uint32(parser_st_index_t h, uint32_t i));
149
+ CONSTFUNC(parser_st_index_t rb_parser_st_hash_uint(parser_st_index_t h, parser_st_index_t i));
150
+ CONSTFUNC(parser_st_index_t rb_parser_st_hash_end(parser_st_index_t h));
151
+ CONSTFUNC(parser_st_index_t rb_parser_st_hash_start(parser_st_index_t h));
152
+
153
+ RUBY_SYMBOL_EXPORT_END
154
+
155
+ #if defined(__cplusplus)
156
+ #if 0
157
+ { /* satisfy cc-mode */
158
+ #endif
159
+ } /* extern "C" { */
160
+ #endif
161
+
162
+ #endif /* RUBY_ST2_H */
@@ -0,0 +1,106 @@
1
+ #ifndef EXTERNAL_VALUE_H
2
+ #define EXTERNAL_VALUE_H
3
+
4
+ #include "ruby/config.h"
5
+
6
+ #if defined(__DOXYGEN__)
7
+
8
+ /**
9
+ * Type that represents a Ruby object. It is an unsigned integer of some kind,
10
+ * depending on platforms.
11
+ *
12
+ * ```CXX
13
+ * VALUE value = rb_eval_string("ARGF.readlines.map.with_index");
14
+ * ```
15
+ *
16
+ * @warning ::VALUE is not a pointer.
17
+ * @warning ::VALUE can be wider than `long`.
18
+ */
19
+ typedef uintptr_t VALUE;
20
+
21
+ /**
22
+ * Type that represents a Ruby identifier such as a variable name.
23
+ *
24
+ * ```CXX
25
+ * ID method = rb_intern("method");
26
+ * VALUE result = rb_funcall(obj, method, 0);
27
+ * ```
28
+ *
29
+ * @note ::rb_cSymbol is a Ruby-level data type for the same thing.
30
+ */
31
+ typedef uintptr_t ID;
32
+
33
+ /**
34
+ * A signed integer type that has the same width with ::VALUE.
35
+ *
36
+ * @internal
37
+ *
38
+ * @shyouhei wonders: is it guaranteed that `uintptr_t` and `intptr_t` are the
39
+ * same width? As far as I read ISO/IEC 9899:2018 section 7.20.1.4 paragraph 1
40
+ * no such description is given... or defined elsewhere?
41
+ */
42
+ typedef intptr_t SIGNED_VALUE;
43
+
44
+ /**
45
+ * Identical to `sizeof(VALUE)`, except it is a macro that can also be used
46
+ * inside of preprocessor directives such as `#if`. Handy on occasions.
47
+ */
48
+ #define SIZEOF_VALUE SIZEOF_UINTPTR_T
49
+
50
+ /**
51
+ * @private
52
+ *
53
+ * A compile-time constant of type ::VALUE whose value is 0.
54
+ */
55
+ #define RBIMPL_VALUE_NULL UINTPTR_C(0)
56
+
57
+ /**
58
+ * @private
59
+ *
60
+ * A compile-time constant of type ::VALUE whose value is 1.
61
+ */
62
+ #define RBIMPL_VALUE_ONE UINTPTR_C(1)
63
+
64
+ /**
65
+ * @private
66
+ *
67
+ * Maximum possible value that a ::VALUE can take.
68
+ */
69
+ #define RBIMPL_VALUE_FULL UINTPTR_MAX
70
+
71
+ #elif defined HAVE_UINTPTR_T && 0
72
+ typedef uintptr_t VALUE;
73
+ typedef uintptr_t ID;
74
+ # define SIGNED_VALUE intptr_t
75
+ # define SIZEOF_VALUE SIZEOF_UINTPTR_T
76
+ # undef PRI_VALUE_PREFIX
77
+ # define RBIMPL_VALUE_NULL UINTPTR_C(0)
78
+ # define RBIMPL_VALUE_ONE UINTPTR_C(1)
79
+ # define RBIMPL_VALUE_FULL UINTPTR_MAX
80
+
81
+ #elif SIZEOF_LONG == SIZEOF_VOIDP
82
+ typedef unsigned long VALUE;
83
+ typedef unsigned long ID;
84
+ # define SIGNED_VALUE long
85
+ # define SIZEOF_VALUE SIZEOF_LONG
86
+ # define PRI_VALUE_PREFIX "l"
87
+ # define RBIMPL_VALUE_NULL 0UL
88
+ # define RBIMPL_VALUE_ONE 1UL
89
+ # define RBIMPL_VALUE_FULL ULONG_MAX
90
+
91
+ #elif SIZEOF_LONG_LONG == SIZEOF_VOIDP
92
+ typedef unsigned LONG_LONG VALUE;
93
+ typedef unsigned LONG_LONG ID;
94
+ # define SIGNED_VALUE LONG_LONG
95
+ # define LONG_LONG_VALUE 1
96
+ # define SIZEOF_VALUE SIZEOF_LONG_LONG
97
+ # define PRI_VALUE_PREFIX PRI_LL_PREFIX
98
+ # define RBIMPL_VALUE_NULL 0ULL
99
+ # define RBIMPL_VALUE_ONE 1ULL
100
+ # define RBIMPL_VALUE_FULL ULLONG_MAX
101
+
102
+ #else
103
+ # error ---->> ruby requires sizeof(void*) == sizeof(long) or sizeof(LONG_LONG) to be compiled. <<----
104
+ #endif
105
+
106
+ #endif /* EXTERNAL_VALUE_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
313
- #ifdef __APPLE__
317
+
318
+ # ifdef __APPLE__
314
319
  rb_current_ec_set(ec);
315
- #else
320
+ # else
316
321
  ruby_current_ec = ec;
317
- #endif
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