datadog-ruby_core_source 3.4.2 → 3.5.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.
- checksums.yaml +4 -4
- data/lib/datadog/ruby_core_source/{ruby-3.5.0-preview1 → ruby-4.0.0-p0}/id.h +10 -5
- data/lib/datadog/ruby_core_source/{ruby-3.5.0-preview1 → ruby-4.0.0-p0}/id_table.h +15 -0
- data/lib/datadog/ruby_core_source/{ruby-3.5.0-preview1 → ruby-4.0.0-p0}/internal/array.h +2 -0
- data/lib/datadog/ruby_core_source/{ruby-3.5.0-preview1 → ruby-4.0.0-p0}/internal/basic_operators.h +1 -0
- data/lib/datadog/ruby_core_source/{ruby-3.5.0-preview1 → ruby-4.0.0-p0}/internal/bignum.h +22 -10
- data/lib/datadog/ruby_core_source/{ruby-3.5.0-preview1 → ruby-4.0.0-p0}/internal/bits.h +14 -17
- data/lib/datadog/ruby_core_source/ruby-4.0.0-p0/internal/box.h +83 -0
- data/lib/datadog/ruby_core_source/ruby-4.0.0-p0/internal/class.h +806 -0
- data/lib/datadog/ruby_core_source/{ruby-3.5.0-preview1 → ruby-4.0.0-p0}/internal/cmdlineopt.h +3 -0
- data/lib/datadog/ruby_core_source/ruby-4.0.0-p0/internal/concurrent_set.h +21 -0
- data/lib/datadog/ruby_core_source/{ruby-3.5.0-preview1 → ruby-4.0.0-p0}/internal/cont.h +0 -1
- data/lib/datadog/ruby_core_source/{ruby-3.5.0-preview1 → ruby-4.0.0-p0}/internal/encoding.h +2 -1
- data/lib/datadog/ruby_core_source/{ruby-3.5.0-preview1 → ruby-4.0.0-p0}/internal/error.h +7 -0
- data/lib/datadog/ruby_core_source/{ruby-3.5.0-preview1 → ruby-4.0.0-p0}/internal/eval.h +10 -0
- data/lib/datadog/ruby_core_source/{ruby-3.5.0-preview1 → ruby-4.0.0-p0}/internal/gc.h +32 -5
- data/lib/datadog/ruby_core_source/{ruby-3.5.0-preview1 → ruby-4.0.0-p0}/internal/hash.h +1 -0
- data/lib/datadog/ruby_core_source/{ruby-3.5.0-preview1 → ruby-4.0.0-p0}/internal/imemo.h +87 -22
- data/lib/datadog/ruby_core_source/{ruby-3.5.0-preview1 → ruby-4.0.0-p0}/internal/inits.h +4 -0
- data/lib/datadog/ruby_core_source/{ruby-3.5.0-preview1 → ruby-4.0.0-p0}/internal/io.h +25 -5
- data/lib/datadog/ruby_core_source/{ruby-3.5.0-preview1 → ruby-4.0.0-p0}/internal/load.h +2 -0
- data/lib/datadog/ruby_core_source/{ruby-3.5.0-preview1 → ruby-4.0.0-p0}/internal/numeric.h +49 -0
- data/lib/datadog/ruby_core_source/{ruby-3.5.0-preview1 → ruby-4.0.0-p0}/internal/object.h +1 -1
- data/lib/datadog/ruby_core_source/{ruby-3.5.0-preview1 → ruby-4.0.0-p0}/internal/re.h +5 -0
- data/lib/datadog/ruby_core_source/{ruby-3.5.0-preview1 → ruby-4.0.0-p0}/internal/sanitizers.h +16 -0
- data/lib/datadog/ruby_core_source/ruby-4.0.0-p0/internal/set_table.h +70 -0
- data/lib/datadog/ruby_core_source/{ruby-3.5.0-preview1 → ruby-4.0.0-p0}/internal/signal.h +1 -0
- data/lib/datadog/ruby_core_source/{ruby-3.5.0-preview1 → ruby-4.0.0-p0}/internal/st.h +1 -1
- data/lib/datadog/ruby_core_source/{ruby-3.5.0-preview1 → ruby-4.0.0-p0}/internal/string.h +4 -0
- data/lib/datadog/ruby_core_source/{ruby-3.5.0-preview1 → ruby-4.0.0-p0}/internal/struct.h +41 -0
- data/lib/datadog/ruby_core_source/{ruby-3.5.0-preview1 → ruby-4.0.0-p0}/internal/symbol.h +4 -5
- data/lib/datadog/ruby_core_source/{ruby-3.5.0-preview1 → ruby-4.0.0-p0}/internal/thread.h +15 -11
- data/lib/datadog/ruby_core_source/{ruby-3.5.0-preview1 → ruby-4.0.0-p0}/internal/time.h +2 -5
- data/lib/datadog/ruby_core_source/{ruby-3.5.0-preview1 → ruby-4.0.0-p0}/internal/variable.h +13 -9
- data/lib/datadog/ruby_core_source/{ruby-3.5.0-preview1 → ruby-4.0.0-p0}/internal/vm.h +5 -4
- data/lib/datadog/ruby_core_source/{ruby-3.5.0-preview1 → ruby-4.0.0-p0}/internal.h +0 -3
- data/lib/datadog/ruby_core_source/{ruby-3.5.0-preview1 → ruby-4.0.0-p0}/iseq.h +10 -2
- data/lib/datadog/ruby_core_source/{ruby-3.5.0-preview1 → ruby-4.0.0-p0}/method.h +21 -3
- data/lib/datadog/ruby_core_source/{ruby-3.5.0-preview1 → ruby-4.0.0-p0}/prism/ast.h +360 -70
- data/lib/datadog/ruby_core_source/{ruby-3.5.0-preview1 → ruby-4.0.0-p0}/prism/diagnostic.h +7 -0
- data/lib/datadog/ruby_core_source/{ruby-3.5.0-preview1 → ruby-4.0.0-p0}/prism/extension.h +1 -1
- data/lib/datadog/ruby_core_source/{ruby-3.5.0-preview1 → ruby-4.0.0-p0}/prism/options.h +49 -3
- data/lib/datadog/ruby_core_source/{ruby-3.5.0-preview1 → ruby-4.0.0-p0}/prism/parser.h +3 -0
- data/lib/datadog/ruby_core_source/{ruby-3.5.0-preview1 → ruby-4.0.0-p0}/prism/prism.h +40 -15
- data/lib/datadog/ruby_core_source/{ruby-3.5.0-preview1 → ruby-4.0.0-p0}/prism/regexp.h +2 -2
- data/lib/datadog/ruby_core_source/{ruby-3.5.0-preview1 → ruby-4.0.0-p0}/prism/util/pm_buffer.h +8 -0
- data/lib/datadog/ruby_core_source/{ruby-3.5.0-preview1 → ruby-4.0.0-p0}/prism/util/pm_integer.h +4 -0
- data/lib/datadog/ruby_core_source/{ruby-3.5.0-preview1 → ruby-4.0.0-p0}/prism/util/pm_list.h +6 -0
- data/lib/datadog/ruby_core_source/{ruby-3.5.0-preview1 → ruby-4.0.0-p0}/prism/util/pm_string.h +12 -2
- data/lib/datadog/ruby_core_source/{ruby-3.5.0-preview1 → ruby-4.0.0-p0}/prism/version.h +2 -2
- data/lib/datadog/ruby_core_source/{ruby-3.5.0-preview1 → ruby-4.0.0-p0}/prism_compile.h +1 -0
- data/lib/datadog/ruby_core_source/{ruby-3.5.0-preview1 → ruby-4.0.0-p0}/ractor_core.h +63 -114
- data/lib/datadog/ruby_core_source/ruby-4.0.0-p0/ruby_atomic.h +73 -0
- data/lib/datadog/ruby_core_source/{ruby-3.5.0-preview1 → ruby-4.0.0-p0}/rubyparser.h +15 -2
- data/lib/datadog/ruby_core_source/ruby-4.0.0-p0/shape.h +464 -0
- data/lib/datadog/ruby_core_source/{ruby-3.5.0-preview1 → ruby-4.0.0-p0}/thread_pthread.h +13 -3
- data/lib/datadog/ruby_core_source/{ruby-3.5.0-preview1 → ruby-4.0.0-p0}/vm_core.h +228 -57
- data/lib/datadog/ruby_core_source/version.rb +1 -1
- metadata +108 -106
- data/CHANGELOG.datadog.md +0 -19
- data/lib/datadog/ruby_core_source/ruby-3.5.0-preview1/internal/class.h +0 -283
- data/lib/datadog/ruby_core_source/ruby-3.5.0-preview1/ruby_atomic.h +0 -23
- data/lib/datadog/ruby_core_source/ruby-3.5.0-preview1/shape.h +0 -234
- data/lib/datadog/ruby_core_source/{ruby-3.5.0-preview1 → ruby-4.0.0-p0}/ccan/build_assert/build_assert.h +0 -0
- data/lib/datadog/ruby_core_source/{ruby-3.5.0-preview1 → ruby-4.0.0-p0}/ccan/check_type/check_type.h +0 -0
- data/lib/datadog/ruby_core_source/{ruby-3.5.0-preview1 → ruby-4.0.0-p0}/ccan/container_of/container_of.h +0 -0
- data/lib/datadog/ruby_core_source/{ruby-3.5.0-preview1 → ruby-4.0.0-p0}/ccan/list/list.h +0 -0
- data/lib/datadog/ruby_core_source/{ruby-3.5.0-preview1 → ruby-4.0.0-p0}/ccan/str/str.h +0 -0
- data/lib/datadog/ruby_core_source/{ruby-3.5.0-preview1 → ruby-4.0.0-p0}/internal/compar.h +0 -0
- data/lib/datadog/ruby_core_source/{ruby-3.5.0-preview1 → ruby-4.0.0-p0}/internal/compile.h +0 -0
- data/lib/datadog/ruby_core_source/{ruby-3.5.0-preview1 → ruby-4.0.0-p0}/internal/compilers.h +0 -0
- data/lib/datadog/ruby_core_source/{ruby-3.5.0-preview1 → ruby-4.0.0-p0}/internal/complex.h +0 -0
- data/lib/datadog/ruby_core_source/{ruby-3.5.0-preview1 → ruby-4.0.0-p0}/internal/dir.h +0 -0
- data/lib/datadog/ruby_core_source/{ruby-3.5.0-preview1 → ruby-4.0.0-p0}/internal/enc.h +0 -0
- data/lib/datadog/ruby_core_source/{ruby-3.5.0-preview1 → ruby-4.0.0-p0}/internal/enum.h +0 -0
- data/lib/datadog/ruby_core_source/{ruby-3.5.0-preview1 → ruby-4.0.0-p0}/internal/enumerator.h +0 -0
- data/lib/datadog/ruby_core_source/{ruby-3.5.0-preview1 → ruby-4.0.0-p0}/internal/file.h +0 -0
- data/lib/datadog/ruby_core_source/{ruby-3.5.0-preview1 → ruby-4.0.0-p0}/internal/fixnum.h +0 -0
- data/lib/datadog/ruby_core_source/{ruby-3.5.0-preview1 → ruby-4.0.0-p0}/internal/loadpath.h +0 -0
- data/lib/datadog/ruby_core_source/{ruby-3.5.0-preview1 → ruby-4.0.0-p0}/internal/math.h +0 -0
- data/lib/datadog/ruby_core_source/{ruby-3.5.0-preview1 → ruby-4.0.0-p0}/internal/missing.h +0 -0
- data/lib/datadog/ruby_core_source/{ruby-3.5.0-preview1 → ruby-4.0.0-p0}/internal/parse.h +0 -0
- data/lib/datadog/ruby_core_source/{ruby-3.5.0-preview1 → ruby-4.0.0-p0}/internal/proc.h +0 -0
- data/lib/datadog/ruby_core_source/{ruby-3.5.0-preview1 → ruby-4.0.0-p0}/internal/process.h +0 -0
- data/lib/datadog/ruby_core_source/{ruby-3.5.0-preview1 → ruby-4.0.0-p0}/internal/ractor.h +0 -0
- data/lib/datadog/ruby_core_source/{ruby-3.5.0-preview1 → ruby-4.0.0-p0}/internal/random.h +0 -0
- data/lib/datadog/ruby_core_source/{ruby-3.5.0-preview1 → ruby-4.0.0-p0}/internal/range.h +0 -0
- data/lib/datadog/ruby_core_source/{ruby-3.5.0-preview1 → ruby-4.0.0-p0}/internal/rational.h +0 -0
- data/lib/datadog/ruby_core_source/{ruby-3.5.0-preview1 → ruby-4.0.0-p0}/internal/ruby_parser.h +0 -0
- data/lib/datadog/ruby_core_source/{ruby-3.5.0-preview1 → ruby-4.0.0-p0}/internal/serial.h +0 -0
- data/lib/datadog/ruby_core_source/{ruby-3.5.0-preview1 → ruby-4.0.0-p0}/internal/static_assert.h +0 -0
- data/lib/datadog/ruby_core_source/{ruby-3.5.0-preview1 → ruby-4.0.0-p0}/internal/transcode.h +0 -0
- data/lib/datadog/ruby_core_source/{ruby-3.5.0-preview1 → ruby-4.0.0-p0}/internal/util.h +0 -0
- data/lib/datadog/ruby_core_source/{ruby-3.5.0-preview1 → ruby-4.0.0-p0}/internal/warnings.h +0 -0
- data/lib/datadog/ruby_core_source/{ruby-3.5.0-preview1 → ruby-4.0.0-p0}/node.h +0 -0
- data/lib/datadog/ruby_core_source/{ruby-3.5.0-preview1 → ruby-4.0.0-p0}/parser_st.h +0 -0
- data/lib/datadog/ruby_core_source/{ruby-3.5.0-preview1 → ruby-4.0.0-p0}/parser_value.h +0 -0
- data/lib/datadog/ruby_core_source/{ruby-3.5.0-preview1 → ruby-4.0.0-p0}/prism/defines.h +0 -0
- data/lib/datadog/ruby_core_source/{ruby-3.5.0-preview1 → ruby-4.0.0-p0}/prism/encoding.h +0 -0
- data/lib/datadog/ruby_core_source/{ruby-3.5.0-preview1 → ruby-4.0.0-p0}/prism/node.h +0 -0
- data/lib/datadog/ruby_core_source/{ruby-3.5.0-preview1 → ruby-4.0.0-p0}/prism/pack.h +0 -0
- data/lib/datadog/ruby_core_source/{ruby-3.5.0-preview1 → ruby-4.0.0-p0}/prism/prettyprint.h +0 -0
- data/lib/datadog/ruby_core_source/{ruby-3.5.0-preview1 → ruby-4.0.0-p0}/prism/static_literals.h +0 -0
- data/lib/datadog/ruby_core_source/{ruby-3.5.0-preview1 → ruby-4.0.0-p0}/prism/util/pm_char.h +0 -0
- data/lib/datadog/ruby_core_source/{ruby-3.5.0-preview1 → ruby-4.0.0-p0}/prism/util/pm_constant_pool.h +0 -0
- data/lib/datadog/ruby_core_source/{ruby-3.5.0-preview1 → ruby-4.0.0-p0}/prism/util/pm_memchr.h +0 -0
- data/lib/datadog/ruby_core_source/{ruby-3.5.0-preview1 → ruby-4.0.0-p0}/prism/util/pm_newline_list.h +0 -0
- data/lib/datadog/ruby_core_source/{ruby-3.5.0-preview1 → ruby-4.0.0-p0}/prism/util/pm_strncasecmp.h +0 -0
- data/lib/datadog/ruby_core_source/{ruby-3.5.0-preview1 → ruby-4.0.0-p0}/prism/util/pm_strpbrk.h +0 -0
- data/lib/datadog/ruby_core_source/{ruby-3.5.0-preview1 → ruby-4.0.0-p0}/ruby_assert.h +0 -0
- data/lib/datadog/ruby_core_source/{ruby-3.5.0-preview1 → ruby-4.0.0-p0}/thread_none.h +0 -0
- data/lib/datadog/ruby_core_source/{ruby-3.5.0-preview1 → ruby-4.0.0-p0}/vm_debug.h +4 -4
- /data/lib/datadog/ruby_core_source/{ruby-3.5.0-preview1 → ruby-4.0.0-p0}/vm_opts.h +0 -0
|
@@ -30,6 +30,7 @@ enum ruby_rstring_private_flags {
|
|
|
30
30
|
#endif
|
|
31
31
|
|
|
32
32
|
/* string.c */
|
|
33
|
+
VALUE rb_str_dup_m(VALUE str);
|
|
33
34
|
VALUE rb_fstring(VALUE);
|
|
34
35
|
VALUE rb_fstring_cstr(const char *str);
|
|
35
36
|
VALUE rb_fstring_enc_new(const char *ptr, long len, rb_encoding *enc);
|
|
@@ -83,6 +84,9 @@ VALUE rb_setup_fake_str(struct RString *fake_str, const char *name, long len, rb
|
|
|
83
84
|
RUBY_SYMBOL_EXPORT_END
|
|
84
85
|
|
|
85
86
|
VALUE rb_fstring_new(const char *ptr, long len);
|
|
87
|
+
void rb_gc_free_fstring(VALUE obj);
|
|
88
|
+
bool rb_obj_is_fstring_table(VALUE obj);
|
|
89
|
+
void Init_fstring_table();
|
|
86
90
|
VALUE rb_obj_as_string_result(VALUE str, VALUE obj);
|
|
87
91
|
VALUE rb_str_opt_plus(VALUE x, VALUE y);
|
|
88
92
|
VALUE rb_str_concat_literals(size_t num, const VALUE *strary);
|
|
@@ -11,10 +11,23 @@
|
|
|
11
11
|
#include "ruby/internal/stdbool.h" /* for bool */
|
|
12
12
|
#include "ruby/ruby.h" /* for struct RBasic */
|
|
13
13
|
|
|
14
|
+
/* Flags of RStruct
|
|
15
|
+
*
|
|
16
|
+
* 1-7: RSTRUCT_EMBED_LEN
|
|
17
|
+
* If non-zero, the struct is embedded (its contents follow the
|
|
18
|
+
* header, rather than being on a separately allocated buffer) and
|
|
19
|
+
* these bits are the length of the Struct.
|
|
20
|
+
* 8: RSTRUCT_GEN_FIELDS
|
|
21
|
+
* The struct is embedded and has no space left to store the
|
|
22
|
+
* IMEMO/fields reference. Any ivar this struct may have will be in
|
|
23
|
+
* the generic_fields_tbl. This flag doesn't imply the struct has
|
|
24
|
+
* ivars.
|
|
25
|
+
*/
|
|
14
26
|
enum {
|
|
15
27
|
RSTRUCT_EMBED_LEN_MASK = RUBY_FL_USER7 | RUBY_FL_USER6 | RUBY_FL_USER5 | RUBY_FL_USER4 |
|
|
16
28
|
RUBY_FL_USER3 | RUBY_FL_USER2 | RUBY_FL_USER1,
|
|
17
29
|
RSTRUCT_EMBED_LEN_SHIFT = (RUBY_FL_USHIFT+1),
|
|
30
|
+
RSTRUCT_GEN_FIELDS = RUBY_FL_USER8,
|
|
18
31
|
};
|
|
19
32
|
|
|
20
33
|
struct RStruct {
|
|
@@ -23,6 +36,7 @@ struct RStruct {
|
|
|
23
36
|
struct {
|
|
24
37
|
long len;
|
|
25
38
|
const VALUE *ptr;
|
|
39
|
+
VALUE fields_obj;
|
|
26
40
|
} heap;
|
|
27
41
|
/* This is a length 1 array because:
|
|
28
42
|
* 1. GCC has a bug that does not optimize C flexible array members
|
|
@@ -116,4 +130,31 @@ RSTRUCT_GET(VALUE st, long k)
|
|
|
116
130
|
return RSTRUCT_CONST_PTR(st)[k];
|
|
117
131
|
}
|
|
118
132
|
|
|
133
|
+
static inline VALUE
|
|
134
|
+
RSTRUCT_FIELDS_OBJ(VALUE st)
|
|
135
|
+
{
|
|
136
|
+
const long embed_len = RSTRUCT_EMBED_LEN(st);
|
|
137
|
+
VALUE fields_obj;
|
|
138
|
+
if (embed_len) {
|
|
139
|
+
RUBY_ASSERT(!FL_TEST_RAW(st, RSTRUCT_GEN_FIELDS));
|
|
140
|
+
fields_obj = RSTRUCT_GET(st, embed_len);
|
|
141
|
+
}
|
|
142
|
+
else {
|
|
143
|
+
fields_obj = RSTRUCT(st)->as.heap.fields_obj;
|
|
144
|
+
}
|
|
145
|
+
return fields_obj;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
static inline void
|
|
149
|
+
RSTRUCT_SET_FIELDS_OBJ(VALUE st, VALUE fields_obj)
|
|
150
|
+
{
|
|
151
|
+
const long embed_len = RSTRUCT_EMBED_LEN(st);
|
|
152
|
+
if (embed_len) {
|
|
153
|
+
RUBY_ASSERT(!FL_TEST_RAW(st, RSTRUCT_GEN_FIELDS));
|
|
154
|
+
RSTRUCT_SET(st, embed_len, fields_obj);
|
|
155
|
+
}
|
|
156
|
+
else {
|
|
157
|
+
RB_OBJ_WRITE(st, &RSTRUCT(st)->as.heap.fields_obj, fields_obj);
|
|
158
|
+
}
|
|
159
|
+
}
|
|
119
160
|
#endif /* INTERNAL_STRUCT_H */
|
|
@@ -17,8 +17,7 @@
|
|
|
17
17
|
#endif
|
|
18
18
|
|
|
19
19
|
/* symbol.c */
|
|
20
|
-
void
|
|
21
|
-
void rb_sym_global_symbols_update_references(void);
|
|
20
|
+
void rb_sym_global_symbols_mark_and_move(void);
|
|
22
21
|
VALUE rb_to_symbol_type(VALUE obj);
|
|
23
22
|
VALUE rb_sym_intern(const char *ptr, long len, rb_encoding *enc);
|
|
24
23
|
VALUE rb_sym_intern_ascii(const char *ptr, long len);
|
|
@@ -31,11 +30,11 @@ PUREFUNC(int rb_is_const_sym(VALUE sym));
|
|
|
31
30
|
PUREFUNC(int rb_is_attrset_sym(VALUE sym));
|
|
32
31
|
ID rb_make_internal_id(void);
|
|
33
32
|
ID rb_make_temporary_id(size_t n);
|
|
33
|
+
bool rb_obj_is_symbol_table(VALUE obj);
|
|
34
|
+
void rb_sym_global_symbol_table_foreach_weak_reference(int (*callback)(VALUE *key, void *data), void *data);
|
|
34
35
|
void rb_gc_free_dsymbol(VALUE);
|
|
35
36
|
int rb_static_id_valid_p(ID id);
|
|
36
|
-
|
|
37
|
-
/* vm.c */
|
|
38
|
-
void rb_free_static_symid_str(void);
|
|
37
|
+
void rb_free_global_symbol_table(void);
|
|
39
38
|
|
|
40
39
|
#if __has_builtin(__builtin_constant_p)
|
|
41
40
|
#define rb_sym_intern_ascii_cstr(ptr) \
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
#include "ccan/list/list.h" /* for list in rb_io_close_wait_list */
|
|
14
14
|
|
|
15
15
|
struct rb_thread_struct; /* in vm_core.h */
|
|
16
|
+
struct rb_io;
|
|
16
17
|
|
|
17
18
|
#define RB_VM_SAVE_MACHINE_CONTEXT(th) \
|
|
18
19
|
do { \
|
|
@@ -55,26 +56,26 @@ VALUE rb_mutex_owned_p(VALUE self);
|
|
|
55
56
|
VALUE rb_exec_recursive_outer_mid(VALUE (*f)(VALUE g, VALUE h, int r), VALUE g, VALUE h, ID mid);
|
|
56
57
|
void ruby_mn_threads_params(void);
|
|
57
58
|
|
|
58
|
-
int
|
|
59
|
+
int rb_thread_io_wait(struct rb_thread_struct *th, struct rb_io *io, int events, struct timeval * timeout);
|
|
60
|
+
int rb_thread_wait_for_single_fd(struct rb_thread_struct *th, int fd, int events, struct timeval * timeout);
|
|
59
61
|
|
|
60
|
-
struct
|
|
61
|
-
|
|
62
|
-
VALUE closing_thread;
|
|
63
|
-
VALUE closing_fiber;
|
|
64
|
-
VALUE wakeup_mutex;
|
|
65
|
-
};
|
|
66
|
-
int rb_notify_fd_close(int fd, struct rb_io_close_wait_list *busy);
|
|
67
|
-
void rb_notify_fd_close_wait(struct rb_io_close_wait_list *busy);
|
|
62
|
+
size_t rb_thread_io_close_interrupt(struct rb_io *);
|
|
63
|
+
void rb_thread_io_close_wait(struct rb_io *);
|
|
68
64
|
|
|
69
65
|
void rb_ec_check_ints(struct rb_execution_context_struct *ec);
|
|
70
66
|
|
|
67
|
+
void rb_thread_free_native_thread(void *th_ptr);
|
|
68
|
+
|
|
71
69
|
RUBY_SYMBOL_EXPORT_BEGIN
|
|
72
70
|
|
|
73
71
|
void *rb_thread_prevent_fork(void *(*func)(void *), void *data); /* for ext/socket/raddrinfo.c */
|
|
74
72
|
|
|
75
73
|
/* Temporary. This API will be removed (renamed). */
|
|
76
|
-
VALUE rb_thread_io_blocking_region(rb_blocking_function_t *func, void *data1
|
|
77
|
-
VALUE rb_thread_io_blocking_call(rb_blocking_function_t *func, void *data1, int
|
|
74
|
+
VALUE rb_thread_io_blocking_region(struct rb_io *io, rb_blocking_function_t *func, void *data1);
|
|
75
|
+
VALUE rb_thread_io_blocking_call(struct rb_io *io, rb_blocking_function_t *func, void *data1, int events);
|
|
76
|
+
|
|
77
|
+
// Invoke the given function, with the specified argument, in a way that `IO#close` from another execution context can interrupt it.
|
|
78
|
+
VALUE rb_thread_io_blocking_operation(VALUE self, VALUE(*function)(VALUE), VALUE argument);
|
|
78
79
|
|
|
79
80
|
/* thread.c (export) */
|
|
80
81
|
int ruby_thread_has_gvl_p(void); /* for ext/fiddle/closure.c */
|
|
@@ -84,6 +85,8 @@ RUBY_SYMBOL_EXPORT_END
|
|
|
84
85
|
int rb_threadptr_execute_interrupts(struct rb_thread_struct *th, int blocking_timing);
|
|
85
86
|
bool rb_thread_mn_schedulable(VALUE thread);
|
|
86
87
|
|
|
88
|
+
bool rb_thread_resolve_unblock_function(rb_unblock_function_t **unblock_function, void **data2, struct rb_thread_struct *thread);
|
|
89
|
+
|
|
87
90
|
// interrupt exec
|
|
88
91
|
|
|
89
92
|
typedef VALUE (rb_interrupt_exec_func_t)(void *data);
|
|
@@ -91,6 +94,7 @@ typedef VALUE (rb_interrupt_exec_func_t)(void *data);
|
|
|
91
94
|
enum rb_interrupt_exec_flag {
|
|
92
95
|
rb_interrupt_exec_flag_none = 0x00,
|
|
93
96
|
rb_interrupt_exec_flag_value_data = 0x01,
|
|
97
|
+
rb_interrupt_exec_flag_new_thread = 0x02,
|
|
94
98
|
};
|
|
95
99
|
|
|
96
100
|
// interrupt the target_th and run func.
|
|
@@ -27,11 +27,8 @@ struct timeval rb_time_timeval(VALUE);
|
|
|
27
27
|
|
|
28
28
|
RUBY_SYMBOL_EXPORT_BEGIN
|
|
29
29
|
/* time.c (export) */
|
|
30
|
-
void ruby_reset_leap_second_info(void);
|
|
31
|
-
#ifdef RBIMPL_ATTR_DEPRECATED_INTERNAL_ONLY
|
|
32
|
-
RBIMPL_ATTR_DEPRECATED_INTERNAL_ONLY()
|
|
33
|
-
#endif
|
|
34
|
-
void ruby_reset_timezone(const char *);
|
|
35
30
|
RUBY_SYMBOL_EXPORT_END
|
|
36
31
|
|
|
32
|
+
void ruby_reset_timezone(const char *);
|
|
33
|
+
|
|
37
34
|
#endif /* INTERNAL_TIME_H */
|
|
@@ -13,21 +13,22 @@
|
|
|
13
13
|
#include "constant.h" /* for rb_const_entry_t */
|
|
14
14
|
#include "ruby/internal/stdbool.h" /* for bool */
|
|
15
15
|
#include "ruby/ruby.h" /* for VALUE */
|
|
16
|
-
#include "shape.h" /* for
|
|
16
|
+
#include "shape.h" /* for shape_id_t */
|
|
17
17
|
|
|
18
18
|
/* variable.c */
|
|
19
19
|
void rb_gc_mark_global_tbl(void);
|
|
20
20
|
void rb_gc_update_global_tbl(void);
|
|
21
|
-
size_t rb_generic_ivar_memsize(VALUE);
|
|
22
21
|
VALUE rb_search_class_path(VALUE);
|
|
23
22
|
VALUE rb_attr_delete(VALUE, ID);
|
|
24
23
|
void rb_autoload_str(VALUE mod, ID id, VALUE file);
|
|
25
24
|
VALUE rb_autoload_at_p(VALUE, ID, int);
|
|
25
|
+
void rb_autoload_copy_table_for_box(st_table *, const rb_box_t *);
|
|
26
26
|
NORETURN(VALUE rb_mod_const_missing(VALUE,VALUE));
|
|
27
27
|
rb_gvar_getter_t *rb_gvar_getter_function_of(ID);
|
|
28
28
|
rb_gvar_setter_t *rb_gvar_setter_function_of(ID);
|
|
29
29
|
void rb_gvar_readonly_setter(VALUE v, ID id, VALUE *_);
|
|
30
30
|
void rb_gvar_ractor_local(const char *name);
|
|
31
|
+
void rb_gvar_box_ready(const char *name);
|
|
31
32
|
|
|
32
33
|
/**
|
|
33
34
|
* Sets the name of a module.
|
|
@@ -45,18 +46,22 @@ void rb_gvar_ractor_local(const char *name);
|
|
|
45
46
|
*/
|
|
46
47
|
VALUE rb_mod_set_temporary_name(VALUE, VALUE);
|
|
47
48
|
|
|
48
|
-
struct gen_ivtbl;
|
|
49
|
-
int rb_gen_ivtbl_get(VALUE obj, ID id, struct gen_ivtbl **ivtbl);
|
|
50
49
|
void rb_obj_copy_ivs_to_hash_table(VALUE obj, st_table *table);
|
|
51
|
-
void
|
|
50
|
+
void rb_obj_init_too_complex(VALUE obj, st_table *table);
|
|
52
51
|
void rb_evict_ivars_to_hash(VALUE obj);
|
|
52
|
+
VALUE rb_obj_field_get(VALUE obj, shape_id_t target_shape_id);
|
|
53
|
+
void rb_ivar_set_internal(VALUE obj, ID id, VALUE val);
|
|
54
|
+
attr_index_t rb_ivar_set_index(VALUE obj, ID id, VALUE val);
|
|
55
|
+
attr_index_t rb_obj_field_set(VALUE obj, shape_id_t target_shape_id, ID field_name, VALUE val);
|
|
56
|
+
VALUE rb_ivar_get_at(VALUE obj, attr_index_t index, ID id);
|
|
57
|
+
VALUE rb_ivar_get_at_no_ractor_check(VALUE obj, attr_index_t index);
|
|
53
58
|
|
|
54
59
|
RUBY_SYMBOL_EXPORT_BEGIN
|
|
55
60
|
/* variable.c (export) */
|
|
56
61
|
void rb_mark_generic_ivar(VALUE obj);
|
|
57
62
|
VALUE rb_const_missing(VALUE klass, VALUE name);
|
|
58
|
-
|
|
59
|
-
void
|
|
63
|
+
bool rb_class_ivar_set(VALUE klass, ID vid, VALUE value);
|
|
64
|
+
void rb_fields_tbl_copy(VALUE dst, VALUE src);
|
|
60
65
|
RUBY_SYMBOL_EXPORT_END
|
|
61
66
|
|
|
62
67
|
VALUE rb_ivar_lookup(VALUE obj, ID id, VALUE undef);
|
|
@@ -64,7 +69,6 @@ VALUE rb_gvar_get(ID);
|
|
|
64
69
|
VALUE rb_gvar_set(ID, VALUE);
|
|
65
70
|
VALUE rb_gvar_defined(ID);
|
|
66
71
|
void rb_const_warn_if_deprecated(const rb_const_entry_t *, VALUE, ID);
|
|
67
|
-
void rb_ensure_iv_list_size(VALUE obj, uint32_t
|
|
68
|
-
attr_index_t rb_obj_ivar_set(VALUE obj, ID id, VALUE val);
|
|
72
|
+
void rb_ensure_iv_list_size(VALUE obj, uint32_t current_len, uint32_t newsize);
|
|
69
73
|
|
|
70
74
|
#endif /* INTERNAL_VARIABLE_H */
|
|
@@ -56,7 +56,6 @@ void rb_vm_check_redefinition_by_prepend(VALUE klass);
|
|
|
56
56
|
int rb_vm_check_optimizable_mid(VALUE mid);
|
|
57
57
|
VALUE rb_yield_refine_block(VALUE refinement, VALUE refinements);
|
|
58
58
|
VALUE ruby_vm_special_exception_copy(VALUE);
|
|
59
|
-
PUREFUNC(st_table *rb_vm_fstring_table(void));
|
|
60
59
|
|
|
61
60
|
void rb_lastline_set_up(VALUE val, unsigned int up);
|
|
62
61
|
|
|
@@ -70,6 +69,7 @@ const char *rb_type_str(enum ruby_value_type type);
|
|
|
70
69
|
VALUE rb_check_funcall_default(VALUE, ID, int, const VALUE *, VALUE);
|
|
71
70
|
VALUE rb_check_funcall_basic_kw(VALUE, ID, VALUE, int, const VALUE*, int);
|
|
72
71
|
VALUE rb_yield_1(VALUE val);
|
|
72
|
+
VALUE rb_ec_yield(struct rb_execution_context_struct *ec, VALUE val);
|
|
73
73
|
VALUE rb_yield_force_blockarg(VALUE values);
|
|
74
74
|
VALUE rb_lambda_call(VALUE obj, ID mid, int argc, const VALUE *argv,
|
|
75
75
|
rb_block_call_func_t bl_proc, int min_argc, int max_argc,
|
|
@@ -78,10 +78,12 @@ void rb_check_stack_overflow(void);
|
|
|
78
78
|
#define RB_BLOCK_NO_USE_PACKED_ARGS 2
|
|
79
79
|
VALUE rb_block_call2(VALUE obj, ID mid, int argc, const VALUE *argv, rb_block_call_func_t bl_proc, VALUE data2, long flags);
|
|
80
80
|
struct vm_ifunc *rb_current_ifunc(void);
|
|
81
|
+
VALUE rb_gccct_clear_table(VALUE);
|
|
82
|
+
VALUE rb_eval_cmd_call_kw(VALUE cmd, int argc, const VALUE *argv, int kw_splat);
|
|
81
83
|
|
|
82
|
-
#if USE_YJIT
|
|
84
|
+
#if USE_YJIT || USE_ZJIT
|
|
83
85
|
/* vm_exec.c */
|
|
84
|
-
extern uint64_t
|
|
86
|
+
extern uint64_t rb_vm_insn_count;
|
|
85
87
|
#endif
|
|
86
88
|
|
|
87
89
|
extern bool rb_free_at_exit;
|
|
@@ -121,7 +123,6 @@ int rb_get_node_id_from_frame_info(VALUE obj);
|
|
|
121
123
|
const struct rb_iseq_struct *rb_get_iseq_from_frame_info(VALUE obj);
|
|
122
124
|
|
|
123
125
|
VALUE rb_ec_backtrace_object(const struct rb_execution_context_struct *ec);
|
|
124
|
-
void rb_backtrace_use_iseq_first_lineno_for_last_location(VALUE self);
|
|
125
126
|
|
|
126
127
|
#define RUBY_DTRACE_CREATE_HOOK(name, arg) \
|
|
127
128
|
RUBY_DTRACE_HOOK(name##_CREATE, arg)
|
|
@@ -58,9 +58,6 @@
|
|
|
58
58
|
/* internal/array.h */
|
|
59
59
|
#define rb_ary_new_from_args(...) rb_nonexistent_symbol(__VA_ARGS__)
|
|
60
60
|
|
|
61
|
-
/* internal/io.h */
|
|
62
|
-
#define rb_io_fptr_finalize(...) rb_nonexistent_symbol(__VA_ARGS__)
|
|
63
|
-
|
|
64
61
|
/* internal/string.h */
|
|
65
62
|
#define rb_fstring_cstr(...) rb_nonexistent_symbol(__VA_ARGS__)
|
|
66
63
|
|
|
@@ -175,7 +175,12 @@ ISEQ_COMPILE_DATA_CLEAR(rb_iseq_t *iseq)
|
|
|
175
175
|
static inline rb_iseq_t *
|
|
176
176
|
iseq_imemo_alloc(void)
|
|
177
177
|
{
|
|
178
|
-
|
|
178
|
+
rb_iseq_t *iseq = SHAREABLE_IMEMO_NEW(rb_iseq_t, imemo_iseq, 0);
|
|
179
|
+
|
|
180
|
+
// Clear out the whole iseq except for the flags.
|
|
181
|
+
memset((char *)iseq + sizeof(VALUE), 0, sizeof(rb_iseq_t) - sizeof(VALUE));
|
|
182
|
+
|
|
183
|
+
return iseq;
|
|
179
184
|
}
|
|
180
185
|
|
|
181
186
|
VALUE rb_iseq_ibf_dump(const rb_iseq_t *iseq, VALUE opt);
|
|
@@ -185,9 +190,12 @@ const rb_iseq_t *rb_iseq_ibf_load_bytes(const char *cstr, size_t);
|
|
|
185
190
|
VALUE rb_iseq_ibf_load_extra_data(VALUE str);
|
|
186
191
|
void rb_iseq_init_trace(rb_iseq_t *iseq);
|
|
187
192
|
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);
|
|
188
|
-
int rb_iseq_remove_local_tracepoint_recursively(const rb_iseq_t *iseq, VALUE tpval);
|
|
193
|
+
int rb_iseq_remove_local_tracepoint_recursively(const rb_iseq_t *iseq, VALUE tpval, rb_ractor_t *r);
|
|
189
194
|
const rb_iseq_t *rb_iseq_load_iseq(VALUE fname);
|
|
195
|
+
const rb_iseq_t *rb_iseq_compile_iseq(VALUE str, VALUE fname);
|
|
190
196
|
int rb_iseq_opt_frozen_string_literal(void);
|
|
197
|
+
rb_hook_list_t *rb_iseq_local_hooks(const rb_iseq_t *iseq, rb_ractor_t *r, bool create);
|
|
198
|
+
|
|
191
199
|
|
|
192
200
|
#if VM_INSN_INFO_TABLE_IMPL == 2
|
|
193
201
|
unsigned int *rb_iseq_insns_info_decode_positions(const struct rb_iseq_constant_body *body);
|
|
@@ -73,10 +73,17 @@ typedef struct rb_callable_method_entry_struct { /* same fields with rb_method_e
|
|
|
73
73
|
#define METHOD_ENTRY_COMPLEMENTED(me) ((me)->flags & IMEMO_FL_USER3)
|
|
74
74
|
#define METHOD_ENTRY_COMPLEMENTED_SET(me) ((me)->flags |= IMEMO_FL_USER3)
|
|
75
75
|
#define METHOD_ENTRY_CACHED(me) ((me)->flags & IMEMO_FL_USER4)
|
|
76
|
-
#define METHOD_ENTRY_CACHED_SET(me) ((me)->flags |= IMEMO_FL_USER4)
|
|
77
76
|
#define METHOD_ENTRY_INVALIDATED(me) ((me)->flags & IMEMO_FL_USER5)
|
|
78
77
|
#define METHOD_ENTRY_INVALIDATED_SET(me) ((me)->flags |= IMEMO_FL_USER5)
|
|
79
78
|
|
|
79
|
+
static inline void
|
|
80
|
+
METHOD_ENTRY_CACHED_SET(rb_callable_method_entry_t *me)
|
|
81
|
+
{
|
|
82
|
+
if (!METHOD_ENTRY_CACHED(me)) {
|
|
83
|
+
me->flags |= IMEMO_FL_USER4;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
|
|
80
87
|
static inline void
|
|
81
88
|
METHOD_ENTRY_VISI_SET(rb_method_entry_t *me, rb_method_visibility_t visi)
|
|
82
89
|
{
|
|
@@ -159,8 +166,8 @@ typedef struct rb_method_refined_struct {
|
|
|
159
166
|
|
|
160
167
|
typedef struct rb_method_bmethod_struct {
|
|
161
168
|
VALUE proc; /* should be marked */
|
|
162
|
-
|
|
163
|
-
|
|
169
|
+
rb_serial_t defined_ractor_id;
|
|
170
|
+
unsigned int local_hooks_cnt;
|
|
164
171
|
} rb_method_bmethod_t;
|
|
165
172
|
|
|
166
173
|
enum method_optimized_type {
|
|
@@ -197,9 +204,12 @@ struct rb_method_definition_struct {
|
|
|
197
204
|
|
|
198
205
|
ID original_id;
|
|
199
206
|
uintptr_t method_serial;
|
|
207
|
+
const rb_box_t *box;
|
|
200
208
|
};
|
|
201
209
|
|
|
202
210
|
struct rb_id_table;
|
|
211
|
+
struct rb_ractor_struct;
|
|
212
|
+
struct rb_hook_list_struct;
|
|
203
213
|
|
|
204
214
|
typedef struct rb_method_definition_struct rb_method_definition_t;
|
|
205
215
|
STATIC_ASSERT(sizeof_method_def, offsetof(rb_method_definition_t, body) <= 8);
|
|
@@ -247,12 +257,20 @@ const rb_callable_method_entry_t *rb_method_entry_complement_defined_class(const
|
|
|
247
257
|
void rb_method_entry_copy(rb_method_entry_t *dst, const rb_method_entry_t *src);
|
|
248
258
|
|
|
249
259
|
void rb_method_table_insert(VALUE klass, struct rb_id_table *table, ID method_id, const rb_method_entry_t *me);
|
|
260
|
+
void rb_method_table_insert0(VALUE klass, struct rb_id_table *table, ID method_id, const rb_method_entry_t *me, bool iclass_shared_mtbl);
|
|
250
261
|
|
|
251
262
|
void rb_scope_visibility_set(rb_method_visibility_t);
|
|
252
263
|
|
|
253
264
|
VALUE rb_unnamed_parameters(int arity);
|
|
254
265
|
|
|
266
|
+
void rb_vm_insert_cc_refinement(const struct rb_callcache *cc);
|
|
267
|
+
void rb_vm_delete_cc_refinement(const struct rb_callcache *cc);
|
|
268
|
+
|
|
255
269
|
void rb_clear_method_cache(VALUE klass_or_module, ID mid);
|
|
256
270
|
void rb_clear_all_refinement_method_cache(void);
|
|
271
|
+
void rb_invalidate_method_caches(struct rb_id_table *cm_tbl, VALUE cc_tbl);
|
|
272
|
+
struct rb_hook_list_struct *rb_method_def_local_hooks(rb_method_definition_t *def, struct rb_ractor_struct *cr, bool create);
|
|
273
|
+
void rb_method_definition_addref(rb_method_definition_t *def);
|
|
274
|
+
void rb_method_definition_release(rb_method_definition_t *def);
|
|
257
275
|
|
|
258
276
|
#endif /* RUBY_METHOD_H */
|