debase-ruby_core_source 4.0.0.preview2 → 4.0.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/CHANGELOG.md +5 -0
- data/lib/debase/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.0-p0}/id.h +3 -0
- data/lib/debase/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.0-p0}/insns.inc +2 -0
- data/lib/debase/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.0-p0}/insns_info.inc +234 -218
- data/lib/debase/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.0-p0}/internal/basic_operators.h +1 -0
- data/lib/debase/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.0-p0}/internal/bignum.h +21 -10
- data/lib/debase/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.0-p0}/internal/bits.h +14 -17
- data/lib/debase/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.0-p0}/internal/box.h +3 -1
- data/lib/debase/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.0-p0}/internal/class.h +3 -2
- data/lib/debase/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.0-p0}/internal/cont.h +0 -1
- data/lib/debase/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.0-p0}/internal/eval.h +2 -0
- data/lib/debase/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.0-p0}/internal/gc.h +7 -5
- data/lib/debase/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.0-p0}/internal/numeric.h +48 -0
- data/lib/debase/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.0-p0}/internal/thread.h +2 -2
- data/lib/debase/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.0-p0}/internal/time.h +2 -5
- data/lib/debase/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.0-p0}/internal/vm.h +2 -0
- data/lib/debase/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.0-p0}/iseq.h +3 -1
- data/lib/debase/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.0-p0}/method.h +7 -2
- data/lib/debase/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.0-p0}/parse.h +5 -3
- data/lib/debase/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.0-p0}/parser_bits.h +108 -25
- data/lib/debase/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.0-p0}/prism/ast.h +38 -17
- data/lib/debase/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.0-p0}/prism/extension.h +1 -1
- data/lib/debase/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.0-p0}/prism/options.h +4 -1
- data/lib/debase/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.0-p0}/prism/prism.h +1 -1
- data/lib/debase/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.0-p0}/prism/version.h +2 -2
- data/lib/debase/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.0-p0}/ractor_core.h +25 -0
- data/lib/debase/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.0-p0}/regint.h +1 -16
- data/lib/debase/ruby_core_source/ruby-4.0.0-p0/revision.h +5 -0
- data/lib/debase/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.0-p0}/ruby_atomic.h +7 -0
- data/lib/debase/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.0-p0}/rubyparser.h +0 -1
- data/lib/debase/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.0-p0}/shape.h +30 -10
- data/lib/debase/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.0-p0}/thread_pthread.h +3 -1
- data/lib/debase/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.0-p0}/version.h +2 -2
- data/lib/debase/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.0-p0}/vm.inc +115 -91
- data/lib/debase/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.0-p0}/vm_callinfo.h +19 -6
- data/lib/debase/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.0-p0}/vm_core.h +68 -12
- data/lib/debase/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.0-p0}/vm_exec.h +1 -1
- data/lib/debase/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.0-p0}/vm_sync.h +4 -0
- data/lib/debase/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.0-p0}/vmtc.inc +2 -0
- data/lib/debase/ruby_core_source/version.rb +1 -1
- metadata +147 -147
- data/lib/debase/ruby_core_source/ruby-4.0.0-preview2/revision.h +0 -5
- data/lib/debase/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.0-p0}/addr2line.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.0-p0}/builtin.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.0-p0}/ccan/build_assert/build_assert.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.0-p0}/ccan/check_type/check_type.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.0-p0}/ccan/container_of/container_of.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.0-p0}/ccan/list/list.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.0-p0}/ccan/str/str.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.0-p0}/constant.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.0-p0}/darray.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.0-p0}/debug_counter.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.0-p0}/dln.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.0-p0}/encindex.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.0-p0}/eval_intern.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.0-p0}/hrtime.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.0-p0}/id_table.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.0-p0}/internal/array.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.0-p0}/internal/cmdlineopt.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.0-p0}/internal/compar.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.0-p0}/internal/compile.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.0-p0}/internal/compilers.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.0-p0}/internal/complex.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.0-p0}/internal/concurrent_set.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.0-p0}/internal/dir.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.0-p0}/internal/enc.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.0-p0}/internal/encoding.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.0-p0}/internal/enum.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.0-p0}/internal/enumerator.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.0-p0}/internal/error.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.0-p0}/internal/file.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.0-p0}/internal/fixnum.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.0-p0}/internal/hash.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.0-p0}/internal/imemo.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.0-p0}/internal/inits.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.0-p0}/internal/io.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.0-p0}/internal/load.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.0-p0}/internal/loadpath.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.0-p0}/internal/math.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.0-p0}/internal/missing.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.0-p0}/internal/object.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.0-p0}/internal/parse.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.0-p0}/internal/proc.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.0-p0}/internal/process.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.0-p0}/internal/ractor.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.0-p0}/internal/random.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.0-p0}/internal/range.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.0-p0}/internal/rational.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.0-p0}/internal/re.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.0-p0}/internal/ruby_parser.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.0-p0}/internal/sanitizers.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.0-p0}/internal/serial.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.0-p0}/internal/set_table.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.0-p0}/internal/signal.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.0-p0}/internal/st.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.0-p0}/internal/static_assert.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.0-p0}/internal/string.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.0-p0}/internal/struct.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.0-p0}/internal/symbol.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.0-p0}/internal/transcode.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.0-p0}/internal/util.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.0-p0}/internal/variable.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.0-p0}/internal/warnings.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.0-p0}/internal.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.0-p0}/known_errors.inc +0 -0
- data/lib/debase/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.0-p0}/node.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.0-p0}/node_name.inc +0 -0
- data/lib/debase/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.0-p0}/optinsn.inc +0 -0
- data/lib/debase/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.0-p0}/optunifs.inc +0 -0
- data/lib/debase/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.0-p0}/parser_node.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.0-p0}/parser_st.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.0-p0}/parser_value.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.0-p0}/prism/defines.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.0-p0}/prism/diagnostic.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.0-p0}/prism/encoding.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.0-p0}/prism/node.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.0-p0}/prism/pack.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.0-p0}/prism/parser.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.0-p0}/prism/prettyprint.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.0-p0}/prism/regexp.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.0-p0}/prism/static_literals.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.0-p0}/prism/util/pm_buffer.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.0-p0}/prism/util/pm_char.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.0-p0}/prism/util/pm_constant_pool.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.0-p0}/prism/util/pm_integer.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.0-p0}/prism/util/pm_list.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.0-p0}/prism/util/pm_memchr.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.0-p0}/prism/util/pm_newline_list.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.0-p0}/prism/util/pm_string.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.0-p0}/prism/util/pm_strncasecmp.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.0-p0}/prism/util/pm_strpbrk.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.0-p0}/prism_compile.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.0-p0}/probes_helper.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.0-p0}/regenc.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.0-p0}/regparse.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.0-p0}/ruby_assert.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.0-p0}/siphash.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.0-p0}/symbol.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.0-p0}/thread_none.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.0-p0}/thread_win32.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.0-p0}/timev.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.0-p0}/transcode_data.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.0-p0}/variable.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.0-p0}/vm_call_iseq_optimized.inc +0 -0
- data/lib/debase/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.0-p0}/vm_debug.h +4 -4
- /data/lib/debase/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.0-p0}/vm_insnhelper.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.0-p0}/vm_opts.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.0-p0}/yjit.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.0-p0}/zjit.h +0 -0
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
* @brief Internal header for Bignums.
|
|
10
10
|
*/
|
|
11
11
|
#include "ruby/internal/config.h" /* for HAVE_LIBGMP */
|
|
12
|
+
#include "internal/compilers.h" /* for FLEX_ARY_LEN */
|
|
12
13
|
#include <stddef.h> /* for size_t */
|
|
13
14
|
|
|
14
15
|
#ifdef HAVE_SYS_TYPES_H
|
|
@@ -76,18 +77,17 @@
|
|
|
76
77
|
#define RBIGNUM(obj) ((struct RBignum *)(obj))
|
|
77
78
|
#define BIGNUM_SIGN_BIT FL_USER1
|
|
78
79
|
#define BIGNUM_EMBED_FLAG ((VALUE)FL_USER2)
|
|
79
|
-
|
|
80
|
+
|
|
81
|
+
/* This is likely more bits than we need today and will also need adjustment if
|
|
82
|
+
* we change GC slot sizes.
|
|
83
|
+
*/
|
|
84
|
+
#define BIGNUM_EMBED_LEN_NUMBITS 9
|
|
80
85
|
#define BIGNUM_EMBED_LEN_MASK \
|
|
81
|
-
(
|
|
86
|
+
(RUBY_FL_USER11 | RUBY_FL_USER10 | RUBY_FL_USER9 | RUBY_FL_USER8 | RUBY_FL_USER7 | \
|
|
87
|
+
RUBY_FL_USER6 | RUBY_FL_USER5 | RUBY_FL_USER4 | RUBY_FL_USER3)
|
|
82
88
|
#define BIGNUM_EMBED_LEN_SHIFT \
|
|
83
89
|
(FL_USHIFT+3) /* bit offset of BIGNUM_EMBED_LEN_MASK */
|
|
84
|
-
#
|
|
85
|
-
# if (SIZEOF_VALUE*RBIMPL_RVALUE_EMBED_LEN_MAX/SIZEOF_ACTUAL_BDIGIT) < (1 << BIGNUM_EMBED_LEN_NUMBITS)-1
|
|
86
|
-
# define BIGNUM_EMBED_LEN_MAX (SIZEOF_VALUE*RBIMPL_RVALUE_EMBED_LEN_MAX/SIZEOF_ACTUAL_BDIGIT)
|
|
87
|
-
# else
|
|
88
|
-
# define BIGNUM_EMBED_LEN_MAX ((1 << BIGNUM_EMBED_LEN_NUMBITS)-1)
|
|
89
|
-
# endif
|
|
90
|
-
#endif
|
|
90
|
+
#define BIGNUM_EMBED_LEN_MAX (BIGNUM_EMBED_LEN_MASK >> BIGNUM_EMBED_LEN_SHIFT)
|
|
91
91
|
|
|
92
92
|
enum rb_int_parse_flags {
|
|
93
93
|
RB_INT_PARSE_SIGN = 0x01,
|
|
@@ -104,7 +104,12 @@ struct RBignum {
|
|
|
104
104
|
size_t len;
|
|
105
105
|
BDIGIT *digits;
|
|
106
106
|
} heap;
|
|
107
|
-
|
|
107
|
+
/* This is a length 1 array because:
|
|
108
|
+
* 1. GCC has a bug that does not optimize C flexible array members
|
|
109
|
+
* (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102452)
|
|
110
|
+
* 2. Zero length arrays are not supported by all compilers
|
|
111
|
+
*/
|
|
112
|
+
BDIGIT ary[1];
|
|
108
113
|
} as;
|
|
109
114
|
};
|
|
110
115
|
|
|
@@ -164,7 +169,13 @@ VALUE rb_str2big_gmp(VALUE arg, int base, int badcheck);
|
|
|
164
169
|
VALUE rb_int_parse_cstr(const char *str, ssize_t len, char **endp, size_t *ndigits, int base, int flags);
|
|
165
170
|
RUBY_SYMBOL_EXPORT_END
|
|
166
171
|
|
|
172
|
+
#if HAVE_LONG_LONG
|
|
173
|
+
VALUE rb_ull2big(unsigned LONG_LONG n);
|
|
174
|
+
VALUE rb_ll2big(LONG_LONG n);
|
|
175
|
+
#endif
|
|
176
|
+
|
|
167
177
|
#if defined(HAVE_INT128_T)
|
|
178
|
+
VALUE rb_uint128t2big(uint128_t n);
|
|
168
179
|
VALUE rb_int128t2big(int128_t n);
|
|
169
180
|
#endif
|
|
170
181
|
|
|
@@ -30,13 +30,13 @@
|
|
|
30
30
|
#include <stdint.h> /* for uintptr_t */
|
|
31
31
|
#include "internal/compilers.h" /* for MSC_VERSION_SINCE */
|
|
32
32
|
|
|
33
|
-
#
|
|
33
|
+
#ifdef _MSC_VER
|
|
34
34
|
# include <stdlib.h> /* for _byteswap_uint64 */
|
|
35
35
|
#endif
|
|
36
36
|
|
|
37
37
|
#if defined(HAVE_X86INTRIN_H)
|
|
38
38
|
# include <x86intrin.h> /* for _lzcnt_u64 */
|
|
39
|
-
#elif
|
|
39
|
+
#elif defined(_MSC_VER)
|
|
40
40
|
# include <intrin.h> /* for the following intrinsics */
|
|
41
41
|
#endif
|
|
42
42
|
|
|
@@ -50,16 +50,13 @@
|
|
|
50
50
|
# pragma intrinsic(__lzcnt64)
|
|
51
51
|
#endif
|
|
52
52
|
|
|
53
|
-
#if
|
|
53
|
+
#if defined(_MSC_VER)
|
|
54
54
|
# pragma intrinsic(_rotl)
|
|
55
55
|
# pragma intrinsic(_rotr)
|
|
56
56
|
# ifdef _WIN64
|
|
57
57
|
# pragma intrinsic(_rotl64)
|
|
58
58
|
# pragma intrinsic(_rotr64)
|
|
59
59
|
# endif
|
|
60
|
-
#endif
|
|
61
|
-
|
|
62
|
-
#if MSC_VERSION_SINCE(1400)
|
|
63
60
|
# pragma intrinsic(_BitScanForward)
|
|
64
61
|
# pragma intrinsic(_BitScanReverse)
|
|
65
62
|
# ifdef _WIN64
|
|
@@ -266,7 +263,7 @@ ruby_swap16(uint16_t x)
|
|
|
266
263
|
#if __has_builtin(__builtin_bswap16)
|
|
267
264
|
return __builtin_bswap16(x);
|
|
268
265
|
|
|
269
|
-
#elif
|
|
266
|
+
#elif defined(_MSC_VER)
|
|
270
267
|
return _byteswap_ushort(x);
|
|
271
268
|
|
|
272
269
|
#else
|
|
@@ -281,7 +278,7 @@ ruby_swap32(uint32_t x)
|
|
|
281
278
|
#if __has_builtin(__builtin_bswap32)
|
|
282
279
|
return __builtin_bswap32(x);
|
|
283
280
|
|
|
284
|
-
#elif
|
|
281
|
+
#elif defined(_MSC_VER)
|
|
285
282
|
return _byteswap_ulong(x);
|
|
286
283
|
|
|
287
284
|
#else
|
|
@@ -298,7 +295,7 @@ ruby_swap64(uint64_t x)
|
|
|
298
295
|
#if __has_builtin(__builtin_bswap64)
|
|
299
296
|
return __builtin_bswap64(x);
|
|
300
297
|
|
|
301
|
-
#elif
|
|
298
|
+
#elif defined(_MSC_VER)
|
|
302
299
|
return _byteswap_uint64(x);
|
|
303
300
|
|
|
304
301
|
#else
|
|
@@ -323,7 +320,7 @@ nlz_int32(uint32_t x)
|
|
|
323
320
|
#elif defined(__x86_64__) && defined(__LZCNT__)
|
|
324
321
|
return (unsigned int)_lzcnt_u32(x);
|
|
325
322
|
|
|
326
|
-
#elif
|
|
323
|
+
#elif defined(_MSC_VER) /* &&! defined(__AVX2__) */
|
|
327
324
|
unsigned long r;
|
|
328
325
|
return _BitScanReverse(&r, x) ? (31 - (int)r) : 32;
|
|
329
326
|
|
|
@@ -352,7 +349,7 @@ nlz_int64(uint64_t x)
|
|
|
352
349
|
#elif defined(__x86_64__) && defined(__LZCNT__)
|
|
353
350
|
return (unsigned int)_lzcnt_u64(x);
|
|
354
351
|
|
|
355
|
-
#elif defined(_WIN64) &&
|
|
352
|
+
#elif defined(_WIN64) && defined(_MSC_VER) /* &&! defined(__AVX2__) */
|
|
356
353
|
unsigned long r;
|
|
357
354
|
return _BitScanReverse64(&r, x) ? (63u - (unsigned int)r) : 64;
|
|
358
355
|
|
|
@@ -538,7 +535,7 @@ ntz_int32(uint32_t x)
|
|
|
538
535
|
#if defined(__x86_64__) && defined(__BMI__)
|
|
539
536
|
return (unsigned)_tzcnt_u32(x);
|
|
540
537
|
|
|
541
|
-
#elif
|
|
538
|
+
#elif defined(_MSC_VER)
|
|
542
539
|
/* :FIXME: Is there any way to issue TZCNT instead of BSF, apart from using
|
|
543
540
|
* assembly? Because issuing LZCNT seems possible (see nlz.h). */
|
|
544
541
|
unsigned long r;
|
|
@@ -560,7 +557,7 @@ ntz_int64(uint64_t x)
|
|
|
560
557
|
#if defined(__x86_64__) && defined(__BMI__)
|
|
561
558
|
return (unsigned)_tzcnt_u64(x);
|
|
562
559
|
|
|
563
|
-
#elif defined(_WIN64) &&
|
|
560
|
+
#elif defined(_WIN64) && defined(_MSC_VER)
|
|
564
561
|
unsigned long r;
|
|
565
562
|
return _BitScanForward64(&r, x) ? (int)r : 64;
|
|
566
563
|
|
|
@@ -608,10 +605,10 @@ RUBY_BIT_ROTL(VALUE v, int n)
|
|
|
608
605
|
#elif __has_builtin(__builtin_rotateleft64) && (SIZEOF_VALUE * CHAR_BIT == 64)
|
|
609
606
|
return __builtin_rotateleft64(v, n);
|
|
610
607
|
|
|
611
|
-
#elif
|
|
608
|
+
#elif defined(_MSC_VER) && (SIZEOF_VALUE * CHAR_BIT == 32)
|
|
612
609
|
return _rotl(v, n);
|
|
613
610
|
|
|
614
|
-
#elif
|
|
611
|
+
#elif defined(_MSC_VER) && (SIZEOF_VALUE * CHAR_BIT == 64)
|
|
615
612
|
return _rotl64(v, n);
|
|
616
613
|
|
|
617
614
|
#elif defined(_lrotl) && (SIZEOF_VALUE == SIZEOF_LONG)
|
|
@@ -632,10 +629,10 @@ RUBY_BIT_ROTR(VALUE v, int n)
|
|
|
632
629
|
#elif __has_builtin(__builtin_rotateright64) && (SIZEOF_VALUE * CHAR_BIT == 64)
|
|
633
630
|
return __builtin_rotateright64(v, n);
|
|
634
631
|
|
|
635
|
-
#elif
|
|
632
|
+
#elif defined(_MSC_VER) && (SIZEOF_VALUE * CHAR_BIT == 32)
|
|
636
633
|
return _rotr(v, n);
|
|
637
634
|
|
|
638
|
-
#elif
|
|
635
|
+
#elif defined(_MSC_VER) && (SIZEOF_VALUE * CHAR_BIT == 64)
|
|
639
636
|
return _rotr64(v, n);
|
|
640
637
|
|
|
641
638
|
#elif defined(_lrotr) && (SIZEOF_VALUE == SIZEOF_LONG)
|
|
@@ -34,6 +34,7 @@ struct rb_box_struct {
|
|
|
34
34
|
VALUE ruby_dln_libmap;
|
|
35
35
|
|
|
36
36
|
VALUE gvar_tbl;
|
|
37
|
+
struct st_table *classext_cow_classes;
|
|
37
38
|
|
|
38
39
|
bool is_user;
|
|
39
40
|
bool is_optional;
|
|
@@ -74,7 +75,8 @@ void rb_box_gc_update_references(void *ptr);
|
|
|
74
75
|
rb_box_t * rb_get_box_t(VALUE ns);
|
|
75
76
|
VALUE rb_get_box_object(rb_box_t *ns);
|
|
76
77
|
|
|
77
|
-
VALUE rb_box_local_extension(VALUE box, VALUE fname, VALUE path);
|
|
78
|
+
VALUE rb_box_local_extension(VALUE box, VALUE fname, VALUE path, VALUE *cleanup);
|
|
79
|
+
void rb_box_cleanup_local_extension(VALUE cleanup);
|
|
78
80
|
|
|
79
81
|
void rb_initialize_main_box(void);
|
|
80
82
|
void rb_box_init_done(void);
|
|
@@ -513,6 +513,7 @@ void rb_undef_methods_from(VALUE klass, VALUE super);
|
|
|
513
513
|
VALUE rb_class_inherited(VALUE, VALUE);
|
|
514
514
|
VALUE rb_keyword_error_new(const char *, VALUE);
|
|
515
515
|
|
|
516
|
+
rb_classext_t *rb_class_unlink_classext(VALUE klass, const rb_box_t *box);
|
|
516
517
|
void rb_class_classext_free(VALUE klass, rb_classext_t *ext, bool is_prime);
|
|
517
518
|
void rb_iclass_classext_free(VALUE klass, rb_classext_t *ext, bool is_prime);
|
|
518
519
|
|
|
@@ -657,8 +658,8 @@ RCLASS_SET_REFINED_CLASS(VALUE klass, VALUE refined)
|
|
|
657
658
|
static inline rb_alloc_func_t
|
|
658
659
|
RCLASS_ALLOCATOR(VALUE klass)
|
|
659
660
|
{
|
|
660
|
-
|
|
661
|
-
if (RCLASS_SINGLETON_P(klass)
|
|
661
|
+
RBIMPL_ASSERT_TYPE(klass, T_CLASS);
|
|
662
|
+
if (RCLASS_SINGLETON_P(klass)) {
|
|
662
663
|
return 0;
|
|
663
664
|
}
|
|
664
665
|
return RCLASS_EXT_PRIME(klass)->as.class.allocator;
|
|
@@ -31,5 +31,4 @@ VALUE rb_fiber_inherit_storage(struct rb_execution_context_struct *ec, struct rb
|
|
|
31
31
|
VALUE rb_fiberptr_self(struct rb_fiber_struct *fiber);
|
|
32
32
|
unsigned int rb_fiberptr_blocking(struct rb_fiber_struct *fiber);
|
|
33
33
|
struct rb_execution_context_struct * rb_fiberptr_get_ec(struct rb_fiber_struct *fiber);
|
|
34
|
-
|
|
35
34
|
#endif /* INTERNAL_CONT_H */
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
* header (related to this file, but not the same role).
|
|
12
12
|
*/
|
|
13
13
|
#include "ruby/ruby.h" /* for ID */
|
|
14
|
+
#include "vm_core.h" /* for ID */
|
|
14
15
|
|
|
15
16
|
#define id_signo ruby_static_id_signo
|
|
16
17
|
#define id_status ruby_static_id_status
|
|
@@ -30,6 +31,7 @@ VALUE rb_exception_setup(int argc, VALUE *argv);
|
|
|
30
31
|
void rb_refinement_setup(struct rb_refinements_data *data, VALUE module, VALUE klass);
|
|
31
32
|
void rb_vm_using_module(VALUE module);
|
|
32
33
|
VALUE rb_top_main_class(const char *method);
|
|
34
|
+
VALUE rb_ec_ensure(rb_execution_context_t *ec, VALUE (*b_proc)(VALUE), VALUE data1, VALUE (*e_proc)(VALUE), VALUE data2);
|
|
33
35
|
|
|
34
36
|
/* eval_error.c */
|
|
35
37
|
VALUE rb_get_backtrace(VALUE info);
|
|
@@ -122,10 +122,12 @@ const char *rb_raw_obj_info(char *const buff, const size_t buff_size, VALUE obj)
|
|
|
122
122
|
struct rb_execution_context_struct; /* in vm_core.h */
|
|
123
123
|
struct rb_objspace; /* in vm_core.h */
|
|
124
124
|
|
|
125
|
-
#define
|
|
125
|
+
#define NEWOBJ_OF_WITH_SHAPE(var, T, c, f, shape_id, s, ec) \
|
|
126
126
|
T *(var) = (T *)(((f) & FL_WB_PROTECTED) ? \
|
|
127
|
-
rb_wb_protected_newobj_of((ec ? ec : GET_EC()), (c), (f) & ~FL_WB_PROTECTED, s) : \
|
|
128
|
-
rb_wb_unprotected_newobj_of((c), (f), s))
|
|
127
|
+
rb_wb_protected_newobj_of((ec ? ec : GET_EC()), (c), (f) & ~FL_WB_PROTECTED, shape_id, s) : \
|
|
128
|
+
rb_wb_unprotected_newobj_of((c), (f), shape_id, s))
|
|
129
|
+
|
|
130
|
+
#define NEWOBJ_OF(var, T, c, f, s, ec) NEWOBJ_OF_WITH_SHAPE(var, T, c, f, 0 /* ROOT_SHAPE_ID */, s, ec)
|
|
129
131
|
|
|
130
132
|
#ifndef RB_GC_OBJECT_METADATA_ENTRY_DEFINED
|
|
131
133
|
# define RB_GC_OBJECT_METADATA_ENTRY_DEFINED
|
|
@@ -248,8 +250,8 @@ VALUE rb_gc_disable_no_rest(void);
|
|
|
248
250
|
|
|
249
251
|
/* gc.c (export) */
|
|
250
252
|
const char *rb_objspace_data_type_name(VALUE obj);
|
|
251
|
-
VALUE rb_wb_protected_newobj_of(struct rb_execution_context_struct *, VALUE, VALUE, size_t);
|
|
252
|
-
VALUE rb_wb_unprotected_newobj_of(VALUE, VALUE, size_t);
|
|
253
|
+
VALUE rb_wb_protected_newobj_of(struct rb_execution_context_struct *, VALUE, VALUE, uint32_t /* shape_id_t */, size_t);
|
|
254
|
+
VALUE rb_wb_unprotected_newobj_of(VALUE, VALUE, uint32_t /* shape_id_t */, size_t);
|
|
253
255
|
size_t rb_obj_memsize_of(VALUE);
|
|
254
256
|
struct rb_gc_object_metadata_entry *rb_gc_object_metadata(VALUE obj);
|
|
255
257
|
void rb_gc_mark_values(long n, const VALUE *values);
|
|
@@ -127,6 +127,54 @@ VALUE rb_int_bit_length(VALUE num);
|
|
|
127
127
|
VALUE rb_int_uminus(VALUE num);
|
|
128
128
|
VALUE rb_int_comp(VALUE num);
|
|
129
129
|
|
|
130
|
+
// Unified 128-bit integer structures that work with or without native support:
|
|
131
|
+
union rb_uint128 {
|
|
132
|
+
#ifdef WORDS_BIGENDIAN
|
|
133
|
+
struct {
|
|
134
|
+
uint64_t high;
|
|
135
|
+
uint64_t low;
|
|
136
|
+
} parts;
|
|
137
|
+
#else
|
|
138
|
+
struct {
|
|
139
|
+
uint64_t low;
|
|
140
|
+
uint64_t high;
|
|
141
|
+
} parts;
|
|
142
|
+
#endif
|
|
143
|
+
#ifdef HAVE_UINT128_T
|
|
144
|
+
uint128_t value;
|
|
145
|
+
#endif
|
|
146
|
+
};
|
|
147
|
+
typedef union rb_uint128 rb_uint128_t;
|
|
148
|
+
|
|
149
|
+
union rb_int128 {
|
|
150
|
+
#ifdef WORDS_BIGENDIAN
|
|
151
|
+
struct {
|
|
152
|
+
uint64_t high;
|
|
153
|
+
uint64_t low;
|
|
154
|
+
} parts;
|
|
155
|
+
#else
|
|
156
|
+
struct {
|
|
157
|
+
uint64_t low;
|
|
158
|
+
uint64_t high;
|
|
159
|
+
} parts;
|
|
160
|
+
#endif
|
|
161
|
+
#ifdef HAVE_UINT128_T
|
|
162
|
+
int128_t value;
|
|
163
|
+
#endif
|
|
164
|
+
};
|
|
165
|
+
typedef union rb_int128 rb_int128_t;
|
|
166
|
+
|
|
167
|
+
union uint128_int128_conversion {
|
|
168
|
+
rb_uint128_t uint128;
|
|
169
|
+
rb_int128_t int128;
|
|
170
|
+
};
|
|
171
|
+
|
|
172
|
+
// Conversion functions for 128-bit integers:
|
|
173
|
+
rb_uint128_t rb_numeric_to_uint128(VALUE x);
|
|
174
|
+
rb_int128_t rb_numeric_to_int128(VALUE x);
|
|
175
|
+
VALUE rb_uint128_to_numeric(rb_uint128_t n);
|
|
176
|
+
VALUE rb_int128_to_numeric(rb_int128_t n);
|
|
177
|
+
|
|
130
178
|
static inline bool
|
|
131
179
|
INT_POSITIVE_P(VALUE num)
|
|
132
180
|
{
|
|
@@ -56,8 +56,8 @@ VALUE rb_mutex_owned_p(VALUE self);
|
|
|
56
56
|
VALUE rb_exec_recursive_outer_mid(VALUE (*f)(VALUE g, VALUE h, int r), VALUE g, VALUE h, ID mid);
|
|
57
57
|
void ruby_mn_threads_params(void);
|
|
58
58
|
|
|
59
|
-
int rb_thread_io_wait(struct rb_io *io, int events, struct timeval * timeout);
|
|
60
|
-
int rb_thread_wait_for_single_fd(int fd, int events, struct timeval * timeout);
|
|
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);
|
|
61
61
|
|
|
62
62
|
size_t rb_thread_io_close_interrupt(struct rb_io *);
|
|
63
63
|
void rb_thread_io_close_wait(struct rb_io *);
|
|
@@ -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 */
|
|
@@ -69,6 +69,7 @@ const char *rb_type_str(enum ruby_value_type type);
|
|
|
69
69
|
VALUE rb_check_funcall_default(VALUE, ID, int, const VALUE *, VALUE);
|
|
70
70
|
VALUE rb_check_funcall_basic_kw(VALUE, ID, VALUE, int, const VALUE*, int);
|
|
71
71
|
VALUE rb_yield_1(VALUE val);
|
|
72
|
+
VALUE rb_ec_yield(struct rb_execution_context_struct *ec, VALUE val);
|
|
72
73
|
VALUE rb_yield_force_blockarg(VALUE values);
|
|
73
74
|
VALUE rb_lambda_call(VALUE obj, ID mid, int argc, const VALUE *argv,
|
|
74
75
|
rb_block_call_func_t bl_proc, int min_argc, int max_argc,
|
|
@@ -78,6 +79,7 @@ void rb_check_stack_overflow(void);
|
|
|
78
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);
|
|
79
80
|
struct vm_ifunc *rb_current_ifunc(void);
|
|
80
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
84
|
#if USE_YJIT || USE_ZJIT
|
|
83
85
|
/* vm_exec.c */
|
|
@@ -190,10 +190,12 @@ const rb_iseq_t *rb_iseq_ibf_load_bytes(const char *cstr, size_t);
|
|
|
190
190
|
VALUE rb_iseq_ibf_load_extra_data(VALUE str);
|
|
191
191
|
void rb_iseq_init_trace(rb_iseq_t *iseq);
|
|
192
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);
|
|
193
|
-
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);
|
|
194
194
|
const rb_iseq_t *rb_iseq_load_iseq(VALUE fname);
|
|
195
195
|
const rb_iseq_t *rb_iseq_compile_iseq(VALUE str, VALUE fname);
|
|
196
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
|
+
|
|
197
199
|
|
|
198
200
|
#if VM_INSN_INFO_TABLE_IMPL == 2
|
|
199
201
|
unsigned int *rb_iseq_insns_info_decode_positions(const struct rb_iseq_constant_body *body);
|
|
@@ -166,8 +166,8 @@ typedef struct rb_method_refined_struct {
|
|
|
166
166
|
|
|
167
167
|
typedef struct rb_method_bmethod_struct {
|
|
168
168
|
VALUE proc; /* should be marked */
|
|
169
|
-
|
|
170
|
-
|
|
169
|
+
rb_serial_t defined_ractor_id;
|
|
170
|
+
unsigned int local_hooks_cnt;
|
|
171
171
|
} rb_method_bmethod_t;
|
|
172
172
|
|
|
173
173
|
enum method_optimized_type {
|
|
@@ -208,6 +208,8 @@ struct rb_method_definition_struct {
|
|
|
208
208
|
};
|
|
209
209
|
|
|
210
210
|
struct rb_id_table;
|
|
211
|
+
struct rb_ractor_struct;
|
|
212
|
+
struct rb_hook_list_struct;
|
|
211
213
|
|
|
212
214
|
typedef struct rb_method_definition_struct rb_method_definition_t;
|
|
213
215
|
STATIC_ASSERT(sizeof_method_def, offsetof(rb_method_definition_t, body) <= 8);
|
|
@@ -267,5 +269,8 @@ void rb_vm_delete_cc_refinement(const struct rb_callcache *cc);
|
|
|
267
269
|
void rb_clear_method_cache(VALUE klass_or_module, ID mid);
|
|
268
270
|
void rb_clear_all_refinement_method_cache(void);
|
|
269
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);
|
|
270
275
|
|
|
271
276
|
#endif /* RUBY_METHOD_H */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* A Bison parser, made by Lrama 0.7.
|
|
1
|
+
/* A Bison parser, made by Lrama 0.7.1. */
|
|
2
2
|
|
|
3
3
|
/* Bison interface for Yacc-like parsers in C
|
|
4
4
|
|
|
@@ -186,10 +186,11 @@ extern int yydebug;
|
|
|
186
186
|
#endif
|
|
187
187
|
|
|
188
188
|
/* Value type. */
|
|
189
|
+
|
|
189
190
|
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
|
|
190
191
|
union YYSTYPE
|
|
191
192
|
{
|
|
192
|
-
#line
|
|
193
|
+
#line 2670 "parse.y"
|
|
193
194
|
|
|
194
195
|
NODE *node;
|
|
195
196
|
rb_node_fcall_t *node_fcall;
|
|
@@ -211,7 +212,7 @@ union YYSTYPE
|
|
|
211
212
|
struct lex_context ctxt;
|
|
212
213
|
enum lex_state_e state;
|
|
213
214
|
|
|
214
|
-
#line
|
|
215
|
+
#line 216 "parse.h"
|
|
215
216
|
|
|
216
217
|
};
|
|
217
218
|
typedef union YYSTYPE YYSTYPE;
|
|
@@ -219,6 +220,7 @@ typedef union YYSTYPE YYSTYPE;
|
|
|
219
220
|
# define YYSTYPE_IS_DECLARED 1
|
|
220
221
|
#endif
|
|
221
222
|
|
|
223
|
+
|
|
222
224
|
/* Location type. */
|
|
223
225
|
#if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED
|
|
224
226
|
typedef struct YYLTYPE YYLTYPE;
|