debase-ruby_core_source 3.2.1 → 3.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/lib/debase/ruby_core_source/ruby-3.3.0-preview2/darray.h +246 -0
- data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview2}/debug_counter.h +7 -10
- data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview2}/eval_intern.h +3 -1
- data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview2}/id.h +44 -0
- data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview2}/insns_info.inc +68 -94
- data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview2}/internal/array.h +2 -20
- data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview2}/internal/bits.h +6 -2
- data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview2}/internal/class.h +7 -2
- data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview2}/internal/cmdlineopt.h +3 -1
- data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview2}/internal/compile.h +0 -1
- data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview2}/internal/error.h +24 -2
- data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview2}/internal/gc.h +28 -0
- data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview2}/internal/hash.h +18 -44
- data/lib/debase/ruby_core_source/ruby-3.3.0-preview2/internal/io.h +137 -0
- data/lib/debase/ruby_core_source/ruby-3.3.0-preview2/internal/parse.h +133 -0
- data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview2}/internal/process.h +0 -14
- data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview2}/internal/range.h +2 -2
- data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview2}/internal/re.h +1 -1
- data/lib/debase/ruby_core_source/ruby-3.3.0-preview2/internal/ruby_parser.h +69 -0
- data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview2}/internal/signal.h +4 -0
- data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview2}/internal/string.h +15 -0
- data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview2}/internal/struct.h +9 -34
- data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview2}/internal/thread.h +13 -0
- data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview2}/internal/variable.h +16 -33
- data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview2}/internal/vm.h +5 -0
- data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview2}/iseq.h +4 -4
- data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview2}/method.h +1 -1
- data/lib/debase/ruby_core_source/ruby-3.3.0-preview2/node.h +125 -0
- data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview2}/parse.h +6 -4
- data/lib/debase/ruby_core_source/ruby-3.3.0-preview2/parser_bits.h +564 -0
- data/lib/debase/ruby_core_source/ruby-3.3.0-preview2/parser_node.h +133 -0
- data/lib/debase/ruby_core_source/ruby-3.3.0-preview2/parser_st.h +162 -0
- data/lib/debase/ruby_core_source/ruby-3.3.0-preview2/parser_value.h +106 -0
- data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview2}/ractor_core.h +3 -3
- data/lib/debase/ruby_core_source/ruby-3.3.0-preview2/revision.h +5 -0
- data/lib/debase/ruby_core_source/ruby-3.3.0-preview2/rubyparser.h +628 -0
- data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview2}/symbol.h +1 -1
- data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview2}/thread_pthread.h +11 -13
- data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview2}/thread_win32.h +0 -5
- data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview2}/version.h +1 -1
- data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview2}/vm.inc +303 -404
- data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview2}/vm_callinfo.h +50 -16
- data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview2}/vm_core.h +29 -47
- data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview2}/vm_exec.h +11 -10
- data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview2}/vm_insnhelper.h +20 -23
- data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview2}/vm_opts.h +0 -5
- data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview2}/yjit.h +4 -6
- data/lib/debase/ruby_core_source/version.rb +1 -1
- metadata +119 -115
- data/lib/debase/ruby_core_source/ruby-3.3.0-preview1/darray.h +0 -179
- data/lib/debase/ruby_core_source/ruby-3.3.0-preview1/internal/io.h +0 -38
- data/lib/debase/ruby_core_source/ruby-3.3.0-preview1/internal/parse.h +0 -25
- data/lib/debase/ruby_core_source/ruby-3.3.0-preview1/node.h +0 -514
- data/lib/debase/ruby_core_source/ruby-3.3.0-preview1/opt_sc.inc +0 -109
- data/lib/debase/ruby_core_source/ruby-3.3.0-preview1/revision.h +0 -5
- data/lib/debase/ruby_core_source/ruby-3.3.0-preview1/transient_heap.h +0 -65
- /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview2}/addr2line.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview2}/builtin.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview2}/ccan/build_assert/build_assert.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview2}/ccan/check_type/check_type.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview2}/ccan/container_of/container_of.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview2}/ccan/list/list.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview2}/ccan/str/str.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview2}/constant.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview2}/dln.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview2}/encindex.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview2}/hrtime.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview2}/id_table.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview2}/insns.inc +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview2}/internal/basic_operators.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview2}/internal/bignum.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview2}/internal/compar.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview2}/internal/compilers.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview2}/internal/complex.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview2}/internal/cont.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview2}/internal/dir.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview2}/internal/enc.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview2}/internal/encoding.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview2}/internal/enum.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview2}/internal/enumerator.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview2}/internal/eval.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview2}/internal/file.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview2}/internal/fixnum.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview2}/internal/imemo.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview2}/internal/inits.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview2}/internal/load.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview2}/internal/loadpath.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview2}/internal/math.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview2}/internal/missing.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview2}/internal/numeric.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview2}/internal/object.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview2}/internal/proc.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview2}/internal/ractor.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview2}/internal/random.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview2}/internal/rational.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview2}/internal/sanitizers.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview2}/internal/serial.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview2}/internal/static_assert.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview2}/internal/symbol.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview2}/internal/time.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview2}/internal/transcode.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview2}/internal/util.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview2}/internal/warnings.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview2}/internal.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview2}/known_errors.inc +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview2}/node_name.inc +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview2}/optinsn.inc +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview2}/optunifs.inc +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview2}/probes_helper.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview2}/regenc.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview2}/regint.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview2}/regparse.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview2}/rjit.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview2}/rjit_c.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview2}/ruby_assert.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview2}/ruby_atomic.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview2}/shape.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview2}/siphash.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview2}/thread_none.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview2}/timev.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview2}/transcode_data.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview2}/variable.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview2}/vm_call_iseq_optimized.inc +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview2}/vm_debug.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview2}/vm_sync.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview2}/vmtc.inc +0 -0
data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview2}/internal/string.h
RENAMED
@@ -119,6 +119,21 @@ is_broken_string(VALUE str)
|
|
119
119
|
return rb_enc_str_coderange(str) == ENC_CODERANGE_BROKEN;
|
120
120
|
}
|
121
121
|
|
122
|
+
static inline bool
|
123
|
+
at_char_boundary(const char *s, const char *p, const char *e, rb_encoding *enc)
|
124
|
+
{
|
125
|
+
return rb_enc_left_char_head(s, p, e, enc) == p;
|
126
|
+
}
|
127
|
+
|
128
|
+
static inline bool
|
129
|
+
at_char_right_boundary(const char *s, const char *p, const char *e, rb_encoding *enc)
|
130
|
+
{
|
131
|
+
RUBY_ASSERT(s <= p);
|
132
|
+
RUBY_ASSERT(p <= e);
|
133
|
+
|
134
|
+
return rb_enc_right_char_head(s, p, e, enc) == p;
|
135
|
+
}
|
136
|
+
|
122
137
|
/* expect tail call optimization */
|
123
138
|
// YJIT needs this function to never allocate and never raise
|
124
139
|
static inline VALUE
|
data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview2}/internal/struct.h
RENAMED
@@ -12,10 +12,9 @@
|
|
12
12
|
#include "ruby/ruby.h" /* for struct RBasic */
|
13
13
|
|
14
14
|
enum {
|
15
|
-
|
16
|
-
|
15
|
+
RSTRUCT_EMBED_LEN_MASK = RUBY_FL_USER7 | RUBY_FL_USER6 | RUBY_FL_USER5 | RUBY_FL_USER4 |
|
16
|
+
RUBY_FL_USER3 | RUBY_FL_USER2 | RUBY_FL_USER1,
|
17
17
|
RSTRUCT_EMBED_LEN_SHIFT = (RUBY_FL_USHIFT+1),
|
18
|
-
RSTRUCT_TRANSIENT_FLAG = FL_USER3,
|
19
18
|
};
|
20
19
|
|
21
20
|
struct RStruct {
|
@@ -25,7 +24,12 @@ struct RStruct {
|
|
25
24
|
long len;
|
26
25
|
const VALUE *ptr;
|
27
26
|
} heap;
|
28
|
-
|
27
|
+
/* This is a length 1 array because:
|
28
|
+
* 1. GCC has a bug that does not optimize C flexible array members
|
29
|
+
* (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102452)
|
30
|
+
* 2. Zero length arrays are not supported by all compilers
|
31
|
+
*/
|
32
|
+
const VALUE ary[1];
|
29
33
|
} as;
|
30
34
|
};
|
31
35
|
|
@@ -56,9 +60,6 @@ VALUE rb_struct_init_copy(VALUE copy, VALUE s);
|
|
56
60
|
VALUE rb_struct_lookup(VALUE s, VALUE idx);
|
57
61
|
VALUE rb_struct_s_keyword_init(VALUE klass);
|
58
62
|
static inline const VALUE *rb_struct_const_heap_ptr(VALUE st);
|
59
|
-
static inline bool RSTRUCT_TRANSIENT_P(VALUE st);
|
60
|
-
static inline void RSTRUCT_TRANSIENT_SET(VALUE st);
|
61
|
-
static inline void RSTRUCT_TRANSIENT_UNSET(VALUE st);
|
62
63
|
static inline long RSTRUCT_EMBED_LEN(VALUE st);
|
63
64
|
static inline long RSTRUCT_LEN(VALUE st);
|
64
65
|
static inline int RSTRUCT_LENINT(VALUE st);
|
@@ -66,32 +67,6 @@ static inline const VALUE *RSTRUCT_CONST_PTR(VALUE st);
|
|
66
67
|
static inline void RSTRUCT_SET(VALUE st, long k, VALUE v);
|
67
68
|
static inline VALUE RSTRUCT_GET(VALUE st, long k);
|
68
69
|
|
69
|
-
static inline bool
|
70
|
-
RSTRUCT_TRANSIENT_P(VALUE st)
|
71
|
-
{
|
72
|
-
#if USE_TRANSIENT_HEAP
|
73
|
-
return FL_TEST_RAW(st, RSTRUCT_TRANSIENT_FLAG);
|
74
|
-
#else
|
75
|
-
return false;
|
76
|
-
#endif
|
77
|
-
}
|
78
|
-
|
79
|
-
static inline void
|
80
|
-
RSTRUCT_TRANSIENT_SET(VALUE st)
|
81
|
-
{
|
82
|
-
#if USE_TRANSIENT_HEAP
|
83
|
-
FL_SET_RAW(st, RSTRUCT_TRANSIENT_FLAG);
|
84
|
-
#endif
|
85
|
-
}
|
86
|
-
|
87
|
-
static inline void
|
88
|
-
RSTRUCT_TRANSIENT_UNSET(VALUE st)
|
89
|
-
{
|
90
|
-
#if USE_TRANSIENT_HEAP
|
91
|
-
FL_UNSET_RAW(st, RSTRUCT_TRANSIENT_FLAG);
|
92
|
-
#endif
|
93
|
-
}
|
94
|
-
|
95
70
|
static inline long
|
96
71
|
RSTRUCT_EMBED_LEN(VALUE st)
|
97
72
|
{
|
@@ -145,7 +120,7 @@ RSTRUCT_GET(VALUE st, long k)
|
|
145
120
|
static inline const VALUE *
|
146
121
|
rb_struct_const_heap_ptr(VALUE st)
|
147
122
|
{
|
148
|
-
|
123
|
+
assert(!FL_TEST_RAW(st, RSTRUCT_EMBED_LEN_MASK));
|
149
124
|
return RSTRUCT(st)->as.heap.ptr;
|
150
125
|
}
|
151
126
|
|
data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview2}/internal/thread.h
RENAMED
@@ -10,6 +10,7 @@
|
|
10
10
|
*/
|
11
11
|
#include "ruby/ruby.h" /* for VALUE */
|
12
12
|
#include "ruby/intern.h" /* for rb_blocking_function_t */
|
13
|
+
#include "ccan/list/list.h" /* for list in rb_io_close_wait_list */
|
13
14
|
|
14
15
|
struct rb_thread_struct; /* in vm_core.h */
|
15
16
|
|
@@ -29,6 +30,10 @@ struct rb_thread_struct; /* in vm_core.h */
|
|
29
30
|
#define COVERAGE_TARGET_ONESHOT_LINES 8
|
30
31
|
#define COVERAGE_TARGET_EVAL 16
|
31
32
|
|
33
|
+
#define RUBY_FATAL_THREAD_KILLED INT2FIX(0)
|
34
|
+
#define RUBY_FATAL_THREAD_TERMINATED INT2FIX(1)
|
35
|
+
#define RUBY_FATAL_FIBER_KILLED RB_INT2FIX(2)
|
36
|
+
|
32
37
|
VALUE rb_obj_is_mutex(VALUE obj);
|
33
38
|
VALUE rb_suppress_tracing(VALUE (*func)(VALUE), VALUE arg);
|
34
39
|
void rb_thread_execute_interrupts(VALUE th);
|
@@ -48,6 +53,14 @@ VALUE rb_exec_recursive_outer_mid(VALUE (*f)(VALUE g, VALUE h, int r), VALUE g,
|
|
48
53
|
|
49
54
|
int rb_thread_wait_for_single_fd(int fd, int events, struct timeval * timeout);
|
50
55
|
|
56
|
+
struct rb_io_close_wait_list {
|
57
|
+
struct ccan_list_head pending_fd_users;
|
58
|
+
VALUE closing_thread;
|
59
|
+
VALUE wakeup_mutex;
|
60
|
+
};
|
61
|
+
int rb_notify_fd_close(int fd, struct rb_io_close_wait_list *busy);
|
62
|
+
void rb_notify_fd_close_wait(struct rb_io_close_wait_list *busy);
|
63
|
+
|
51
64
|
RUBY_SYMBOL_EXPORT_BEGIN
|
52
65
|
/* Temporary. This API will be removed (renamed). */
|
53
66
|
VALUE rb_thread_io_blocking_region(rb_blocking_function_t *func, void *data1, int fd);
|
data/lib/debase/ruby_core_source/{ruby-3.3.0-preview1 → ruby-3.3.0-preview2}/internal/variable.h
RENAMED
@@ -15,10 +15,6 @@
|
|
15
15
|
#include "ruby/ruby.h" /* for VALUE */
|
16
16
|
#include "shape.h" /* for rb_shape_t */
|
17
17
|
|
18
|
-
/* global variable */
|
19
|
-
|
20
|
-
#define ROBJECT_TRANSIENT_FLAG FL_USER2
|
21
|
-
|
22
18
|
/* variable.c */
|
23
19
|
void rb_gc_mark_global_tbl(void);
|
24
20
|
void rb_gc_update_global_tbl(void);
|
@@ -32,9 +28,22 @@ rb_gvar_getter_t *rb_gvar_getter_function_of(ID);
|
|
32
28
|
rb_gvar_setter_t *rb_gvar_setter_function_of(ID);
|
33
29
|
void rb_gvar_readonly_setter(VALUE v, ID id, VALUE *_);
|
34
30
|
void rb_gvar_ractor_local(const char *name);
|
35
|
-
|
36
|
-
|
37
|
-
|
31
|
+
|
32
|
+
/**
|
33
|
+
* Sets the name of a module.
|
34
|
+
*
|
35
|
+
* Non-permanently named classes can have a temporary name assigned (or
|
36
|
+
* cleared). In that case the name will be used for `#inspect` and `#to_s`, and
|
37
|
+
* nested classes/modules will be named with the temporary name as a prefix.
|
38
|
+
*
|
39
|
+
* After the module is assigned to a constant, the temporary name will be
|
40
|
+
* discarded, and the name will be computed based on the nesting.
|
41
|
+
*
|
42
|
+
* @param[in] mod An instance of ::rb_cModule.
|
43
|
+
* @param[in] name An instance of ::rb_cString.
|
44
|
+
* @retval mod
|
45
|
+
*/
|
46
|
+
VALUE rb_mod_set_temporary_name(VALUE, VALUE);
|
38
47
|
|
39
48
|
struct gen_ivtbl;
|
40
49
|
int rb_gen_ivtbl_get(VALUE obj, ID id, struct gen_ivtbl **ivtbl);
|
@@ -59,30 +68,4 @@ void rb_ensure_iv_list_size(VALUE obj, uint32_t len, uint32_t newsize);
|
|
59
68
|
struct gen_ivtbl *rb_ensure_generic_iv_list_size(VALUE obj, rb_shape_t *shape, uint32_t newsize);
|
60
69
|
attr_index_t rb_obj_ivar_set(VALUE obj, ID id, VALUE val);
|
61
70
|
|
62
|
-
static inline bool
|
63
|
-
ROBJ_TRANSIENT_P(VALUE obj)
|
64
|
-
{
|
65
|
-
#if USE_TRANSIENT_HEAP
|
66
|
-
return FL_TEST_RAW(obj, ROBJECT_TRANSIENT_FLAG);
|
67
|
-
#else
|
68
|
-
return false;
|
69
|
-
#endif
|
70
|
-
}
|
71
|
-
|
72
|
-
static inline void
|
73
|
-
ROBJ_TRANSIENT_SET(VALUE obj)
|
74
|
-
{
|
75
|
-
#if USE_TRANSIENT_HEAP
|
76
|
-
FL_SET_RAW(obj, ROBJECT_TRANSIENT_FLAG);
|
77
|
-
#endif
|
78
|
-
}
|
79
|
-
|
80
|
-
static inline void
|
81
|
-
ROBJ_TRANSIENT_UNSET(VALUE obj)
|
82
|
-
{
|
83
|
-
#if USE_TRANSIENT_HEAP
|
84
|
-
FL_UNSET_RAW(obj, ROBJECT_TRANSIENT_FLAG);
|
85
|
-
#endif
|
86
|
-
}
|
87
|
-
|
88
71
|
#endif /* INTERNAL_VARIABLE_H */
|
@@ -76,6 +76,11 @@ VALUE rb_lambda_call(VALUE obj, ID mid, int argc, const VALUE *argv,
|
|
76
76
|
VALUE data2);
|
77
77
|
void rb_check_stack_overflow(void);
|
78
78
|
|
79
|
+
#if USE_YJIT
|
80
|
+
/* vm_exec.c */
|
81
|
+
extern uint64_t rb_vm_insns_count;
|
82
|
+
#endif
|
83
|
+
|
79
84
|
/* vm_insnhelper.c */
|
80
85
|
VALUE rb_equal_opt(VALUE obj1, VALUE obj2);
|
81
86
|
VALUE rb_eql_opt(VALUE obj1, VALUE obj2);
|
@@ -83,9 +83,10 @@ ISEQ_ORIGINAL_ISEQ_ALLOC(const rb_iseq_t *iseq, long size)
|
|
83
83
|
RUBY_EVENT_CALL | \
|
84
84
|
RUBY_EVENT_RETURN| \
|
85
85
|
RUBY_EVENT_C_CALL| \
|
86
|
-
RUBY_EVENT_C_RETURN| \
|
87
|
-
RUBY_EVENT_B_CALL| \
|
88
|
-
RUBY_EVENT_B_RETURN| \
|
86
|
+
RUBY_EVENT_C_RETURN | \
|
87
|
+
RUBY_EVENT_B_CALL | \
|
88
|
+
RUBY_EVENT_B_RETURN | \
|
89
|
+
RUBY_EVENT_RESCUE | \
|
89
90
|
RUBY_EVENT_COVERAGE_LINE| \
|
90
91
|
RUBY_EVENT_COVERAGE_BRANCH)
|
91
92
|
|
@@ -226,7 +227,6 @@ struct rb_compile_option_struct {
|
|
226
227
|
unsigned int specialized_instruction: 1;
|
227
228
|
unsigned int operands_unification: 1;
|
228
229
|
unsigned int instructions_unification: 1;
|
229
|
-
unsigned int stack_caching: 1;
|
230
230
|
unsigned int frozen_string_literal: 1;
|
231
231
|
unsigned int debug_frozen_string_literal: 1;
|
232
232
|
unsigned int coverage_enabled: 1;
|
@@ -249,6 +249,6 @@ void rb_scope_visibility_set(rb_method_visibility_t);
|
|
249
249
|
VALUE rb_unnamed_parameters(int arity);
|
250
250
|
|
251
251
|
void rb_clear_method_cache(VALUE klass_or_module, ID mid);
|
252
|
-
void
|
252
|
+
void rb_clear_all_refinement_method_cache(void);
|
253
253
|
|
254
254
|
#endif /* RUBY_METHOD_H */
|
@@ -0,0 +1,125 @@
|
|
1
|
+
#ifndef RUBY_NODE_H
|
2
|
+
#define RUBY_NODE_H 1
|
3
|
+
/**********************************************************************
|
4
|
+
|
5
|
+
node.h -
|
6
|
+
|
7
|
+
$Author$
|
8
|
+
created at: Fri May 28 15:14:02 JST 1993
|
9
|
+
|
10
|
+
Copyright (C) 1993-2007 Yukihiro Matsumoto
|
11
|
+
|
12
|
+
**********************************************************************/
|
13
|
+
|
14
|
+
#include <stdbool.h>
|
15
|
+
#include "rubyparser.h"
|
16
|
+
#include "ruby/backward/2/attributes.h"
|
17
|
+
|
18
|
+
typedef void (*bug_report_func)(const char *fmt, ...);
|
19
|
+
|
20
|
+
typedef struct node_buffer_elem_struct {
|
21
|
+
struct node_buffer_elem_struct *next;
|
22
|
+
long len;
|
23
|
+
NODE buf[FLEX_ARY_LEN];
|
24
|
+
} node_buffer_elem_t;
|
25
|
+
|
26
|
+
typedef struct {
|
27
|
+
long idx, len;
|
28
|
+
node_buffer_elem_t *head;
|
29
|
+
node_buffer_elem_t *last;
|
30
|
+
} node_buffer_list_t;
|
31
|
+
|
32
|
+
struct node_buffer_struct {
|
33
|
+
node_buffer_list_t unmarkable;
|
34
|
+
node_buffer_list_t markable;
|
35
|
+
struct rb_ast_local_table_link *local_tables;
|
36
|
+
VALUE mark_hash;
|
37
|
+
// - id (sequence number)
|
38
|
+
// - token_type
|
39
|
+
// - text of token
|
40
|
+
// - location info
|
41
|
+
// Array, whose entry is array
|
42
|
+
VALUE tokens;
|
43
|
+
#ifdef UNIVERSAL_PARSER
|
44
|
+
rb_parser_config_t *config;
|
45
|
+
#endif
|
46
|
+
};
|
47
|
+
|
48
|
+
RUBY_SYMBOL_EXPORT_BEGIN
|
49
|
+
|
50
|
+
#ifdef UNIVERSAL_PARSER
|
51
|
+
rb_ast_t *rb_ast_new(rb_parser_config_t *config);
|
52
|
+
#else
|
53
|
+
rb_ast_t *rb_ast_new();
|
54
|
+
#endif
|
55
|
+
size_t rb_ast_memsize(const rb_ast_t*);
|
56
|
+
void rb_ast_dispose(rb_ast_t*);
|
57
|
+
VALUE rb_ast_tokens(rb_ast_t *ast);
|
58
|
+
#if RUBY_DEBUG
|
59
|
+
void rb_ast_node_type_change(NODE *n, enum node_type type);
|
60
|
+
#endif
|
61
|
+
const char *ruby_node_name(int node);
|
62
|
+
void rb_node_init(NODE *n, enum node_type type, VALUE a0, VALUE a1, VALUE a2);
|
63
|
+
|
64
|
+
void rb_ast_mark(rb_ast_t*);
|
65
|
+
void rb_ast_update_references(rb_ast_t*);
|
66
|
+
void rb_ast_free(rb_ast_t*);
|
67
|
+
void rb_ast_add_mark_object(rb_ast_t*, VALUE);
|
68
|
+
void rb_ast_set_tokens(rb_ast_t*, VALUE);
|
69
|
+
NODE *rb_ast_newnode(rb_ast_t*, enum node_type type);
|
70
|
+
void rb_ast_delete_node(rb_ast_t*, NODE *n);
|
71
|
+
rb_ast_id_table_t *rb_ast_new_local_table(rb_ast_t*, int);
|
72
|
+
rb_ast_id_table_t *rb_ast_resize_latest_local_table(rb_ast_t*, int);
|
73
|
+
|
74
|
+
VALUE rb_parser_dump_tree(const NODE *node, int comment);
|
75
|
+
|
76
|
+
const struct kwtable *rb_reserved_word(const char *, unsigned int);
|
77
|
+
|
78
|
+
struct parser_params;
|
79
|
+
void *rb_parser_malloc(struct parser_params *, size_t);
|
80
|
+
void *rb_parser_realloc(struct parser_params *, void *, size_t);
|
81
|
+
void *rb_parser_calloc(struct parser_params *, size_t, size_t);
|
82
|
+
void rb_parser_free(struct parser_params *, void *);
|
83
|
+
PRINTF_ARGS(void rb_parser_printf(struct parser_params *parser, const char *fmt, ...), 2, 3);
|
84
|
+
VALUE rb_node_set_type(NODE *n, enum node_type t);
|
85
|
+
|
86
|
+
RUBY_SYMBOL_EXPORT_END
|
87
|
+
|
88
|
+
#define NODE_LSHIFT (NODE_TYPESHIFT+7)
|
89
|
+
#define NODE_LMASK (((SIGNED_VALUE)1<<(sizeof(VALUE)*CHAR_BIT-NODE_LSHIFT))-1)
|
90
|
+
|
91
|
+
#define nd_line(n) (int)(((SIGNED_VALUE)(n)->flags)>>NODE_LSHIFT)
|
92
|
+
#define nd_set_line(n,l) \
|
93
|
+
(n)->flags=(((n)->flags&~((VALUE)(-1)<<NODE_LSHIFT))|((VALUE)((l)&NODE_LMASK)<<NODE_LSHIFT))
|
94
|
+
|
95
|
+
|
96
|
+
#define NODE_SPECIAL_REQUIRED_KEYWORD ((NODE *)-1)
|
97
|
+
#define NODE_REQUIRED_KEYWORD_P(node) ((node)->nd_value == NODE_SPECIAL_REQUIRED_KEYWORD)
|
98
|
+
#define NODE_SPECIAL_NO_NAME_REST ((NODE *)-1)
|
99
|
+
#define NODE_NAMED_REST_P(node) ((node) != NODE_SPECIAL_NO_NAME_REST)
|
100
|
+
#define NODE_SPECIAL_EXCESSIVE_COMMA ((ID)1)
|
101
|
+
#define NODE_SPECIAL_NO_REST_KEYWORD ((NODE *)-1)
|
102
|
+
|
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)
|
108
|
+
#define nd_set_first_loc(n, v) (nd_first_loc(n) = (v))
|
109
|
+
|
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)
|
115
|
+
#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))
|
118
|
+
|
119
|
+
static inline bool
|
120
|
+
nd_type_p(const NODE *n, enum node_type t)
|
121
|
+
{
|
122
|
+
return (enum node_type)nd_type(n) == t;
|
123
|
+
}
|
124
|
+
|
125
|
+
#endif /* RUBY_NODE_H */
|
@@ -1,4 +1,4 @@
|
|
1
|
-
/* A Bison parser, made by
|
1
|
+
/* A Bison parser, made by Lrama 0.5.6. */
|
2
2
|
|
3
3
|
/* Bison interface for Yacc-like parsers in C
|
4
4
|
|
@@ -35,8 +35,8 @@
|
|
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
37
|
|
38
|
-
#ifndef
|
39
|
-
# define
|
38
|
+
#ifndef YY_YY_PARSE_H_INCLUDED
|
39
|
+
# define YY_YY_PARSE_H_INCLUDED
|
40
40
|
/* Debug traces. */
|
41
41
|
#ifndef YYDEBUG
|
42
42
|
# define YYDEBUG 0
|
@@ -190,6 +190,7 @@ extern int yydebug;
|
|
190
190
|
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
|
191
191
|
union YYSTYPE
|
192
192
|
{
|
193
|
+
#line 1507 "parse.y"
|
193
194
|
|
194
195
|
VALUE val;
|
195
196
|
NODE *node;
|
@@ -200,6 +201,7 @@ union YYSTYPE
|
|
200
201
|
struct rb_strterm_struct *strterm;
|
201
202
|
struct lex_context ctxt;
|
202
203
|
|
204
|
+
#line 205 "parse.h"
|
203
205
|
|
204
206
|
};
|
205
207
|
typedef union YYSTYPE YYSTYPE;
|
@@ -227,4 +229,4 @@ struct YYLTYPE
|
|
227
229
|
int yyparse (struct parser_params *p);
|
228
230
|
|
229
231
|
|
230
|
-
#endif /* !
|
232
|
+
#endif /* !YY_YY_PARSE_H_INCLUDED */
|