datadog-ruby_core_source 3.4.1 → 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-4.0.0-p0/id.h +357 -0
- 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-4.0.0-p0/internal/basic_operators.h +66 -0
- data/lib/datadog/ruby_core_source/ruby-4.0.0-p0/internal/bignum.h +256 -0
- data/lib/datadog/ruby_core_source/ruby-4.0.0-p0/internal/bits.h +647 -0
- 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-4.0.0-p0/internal/cont.h +34 -0
- 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-4.0.0-p0/internal/eval.h +43 -0
- data/lib/datadog/ruby_core_source/ruby-4.0.0-p0/internal/gc.h +360 -0
- 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-4.0.0-p0/internal/numeric.h +323 -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-4.0.0-p0/internal/thread.h +112 -0
- data/lib/datadog/ruby_core_source/ruby-4.0.0-p0/internal/time.h +34 -0
- 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-4.0.0-p0/internal/vm.h +138 -0
- 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-4.0.0-p0/iseq.h +359 -0
- data/lib/datadog/ruby_core_source/ruby-4.0.0-p0/method.h +276 -0
- data/lib/datadog/ruby_core_source/ruby-4.0.0-p0/prism/ast.h +8254 -0
- 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-4.0.0-p0/prism/options.h +488 -0
- 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-4.0.0-p0/prism/prism.h +408 -0
- 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-4.0.0-p0/rubyparser.h +1393 -0
- data/lib/datadog/ruby_core_source/ruby-4.0.0-p0/shape.h +464 -0
- data/lib/datadog/ruby_core_source/ruby-4.0.0-p0/thread_pthread.h +177 -0
- data/lib/datadog/ruby_core_source/ruby-4.0.0-p0/vm_core.h +2406 -0
- data/lib/datadog/ruby_core_source/ruby-4.0.0-p0/vm_debug.h +124 -0
- data/lib/datadog/ruby_core_source/ruby-4.0.0-preview2/ccan/build_assert/build_assert.h +40 -0
- data/lib/datadog/ruby_core_source/ruby-4.0.0-preview2/ccan/check_type/check_type.h +63 -0
- data/lib/datadog/ruby_core_source/ruby-4.0.0-preview2/ccan/container_of/container_of.h +142 -0
- data/lib/datadog/ruby_core_source/ruby-4.0.0-preview2/ccan/list/list.h +791 -0
- data/lib/datadog/ruby_core_source/ruby-4.0.0-preview2/ccan/str/str.h +17 -0
- data/lib/datadog/ruby_core_source/{ruby-3.5.0-preview1 → ruby-4.0.0-preview2}/id.h +7 -5
- data/lib/datadog/ruby_core_source/ruby-4.0.0-preview2/id_table.h +54 -0
- data/lib/datadog/ruby_core_source/ruby-4.0.0-preview2/internal/array.h +154 -0
- data/lib/datadog/ruby_core_source/{ruby-3.5.0-preview1 → ruby-4.0.0-preview2}/internal/bignum.h +1 -0
- data/lib/datadog/ruby_core_source/ruby-4.0.0-preview2/internal/box.h +81 -0
- data/lib/datadog/ruby_core_source/ruby-4.0.0-preview2/internal/class.h +805 -0
- data/lib/datadog/ruby_core_source/ruby-4.0.0-preview2/internal/cmdlineopt.h +64 -0
- data/lib/datadog/ruby_core_source/ruby-4.0.0-preview2/internal/compar.h +29 -0
- data/lib/datadog/ruby_core_source/ruby-4.0.0-preview2/internal/compile.h +34 -0
- data/lib/datadog/ruby_core_source/ruby-4.0.0-preview2/internal/compilers.h +107 -0
- data/lib/datadog/ruby_core_source/ruby-4.0.0-preview2/internal/complex.h +29 -0
- data/lib/datadog/ruby_core_source/ruby-4.0.0-preview2/internal/concurrent_set.h +21 -0
- data/lib/datadog/ruby_core_source/ruby-4.0.0-preview2/internal/dir.h +16 -0
- data/lib/datadog/ruby_core_source/ruby-4.0.0-preview2/internal/enc.h +19 -0
- data/lib/datadog/ruby_core_source/ruby-4.0.0-preview2/internal/encoding.h +39 -0
- data/lib/datadog/ruby_core_source/ruby-4.0.0-preview2/internal/enum.h +18 -0
- data/lib/datadog/ruby_core_source/ruby-4.0.0-preview2/internal/enumerator.h +21 -0
- data/lib/datadog/ruby_core_source/ruby-4.0.0-preview2/internal/error.h +251 -0
- data/lib/datadog/ruby_core_source/{ruby-3.5.0-preview1 → ruby-4.0.0-preview2}/internal/eval.h +8 -0
- data/lib/datadog/ruby_core_source/ruby-4.0.0-preview2/internal/file.h +38 -0
- data/lib/datadog/ruby_core_source/ruby-4.0.0-preview2/internal/fixnum.h +185 -0
- data/lib/datadog/ruby_core_source/{ruby-3.5.0-preview1 → ruby-4.0.0-preview2}/internal/gc.h +25 -0
- data/lib/datadog/ruby_core_source/ruby-4.0.0-preview2/internal/hash.h +194 -0
- data/lib/datadog/ruby_core_source/ruby-4.0.0-preview2/internal/imemo.h +322 -0
- data/lib/datadog/ruby_core_source/ruby-4.0.0-preview2/internal/inits.h +51 -0
- data/lib/datadog/ruby_core_source/ruby-4.0.0-preview2/internal/io.h +163 -0
- data/lib/datadog/ruby_core_source/ruby-4.0.0-preview2/internal/load.h +20 -0
- data/lib/datadog/ruby_core_source/ruby-4.0.0-preview2/internal/loadpath.h +16 -0
- data/lib/datadog/ruby_core_source/ruby-4.0.0-preview2/internal/math.h +23 -0
- data/lib/datadog/ruby_core_source/ruby-4.0.0-preview2/internal/missing.h +19 -0
- data/lib/datadog/ruby_core_source/{ruby-3.5.0-preview1 → ruby-4.0.0-preview2}/internal/numeric.h +1 -0
- data/lib/datadog/ruby_core_source/ruby-4.0.0-preview2/internal/object.h +63 -0
- data/lib/datadog/ruby_core_source/ruby-4.0.0-preview2/internal/parse.h +131 -0
- data/lib/datadog/ruby_core_source/ruby-4.0.0-preview2/internal/proc.h +30 -0
- data/lib/datadog/ruby_core_source/ruby-4.0.0-preview2/internal/process.h +124 -0
- data/lib/datadog/ruby_core_source/ruby-4.0.0-preview2/internal/ractor.h +10 -0
- data/lib/datadog/ruby_core_source/ruby-4.0.0-preview2/internal/random.h +17 -0
- data/lib/datadog/ruby_core_source/ruby-4.0.0-preview2/internal/range.h +40 -0
- data/lib/datadog/ruby_core_source/ruby-4.0.0-preview2/internal/rational.h +71 -0
- data/lib/datadog/ruby_core_source/ruby-4.0.0-preview2/internal/re.h +33 -0
- data/lib/datadog/ruby_core_source/ruby-4.0.0-preview2/internal/ruby_parser.h +102 -0
- data/lib/datadog/ruby_core_source/ruby-4.0.0-preview2/internal/sanitizers.h +346 -0
- data/lib/datadog/ruby_core_source/ruby-4.0.0-preview2/internal/serial.h +23 -0
- data/lib/datadog/ruby_core_source/ruby-4.0.0-preview2/internal/set_table.h +70 -0
- data/lib/datadog/ruby_core_source/ruby-4.0.0-preview2/internal/signal.h +25 -0
- data/lib/datadog/ruby_core_source/ruby-4.0.0-preview2/internal/st.h +11 -0
- data/lib/datadog/ruby_core_source/ruby-4.0.0-preview2/internal/static_assert.h +16 -0
- data/lib/datadog/ruby_core_source/ruby-4.0.0-preview2/internal/string.h +203 -0
- data/lib/datadog/ruby_core_source/ruby-4.0.0-preview2/internal/struct.h +160 -0
- data/lib/datadog/ruby_core_source/ruby-4.0.0-preview2/internal/symbol.h +46 -0
- data/lib/datadog/ruby_core_source/{ruby-3.5.0-preview1 → ruby-4.0.0-preview2}/internal/thread.h +14 -10
- data/lib/datadog/ruby_core_source/ruby-4.0.0-preview2/internal/transcode.h +23 -0
- data/lib/datadog/ruby_core_source/ruby-4.0.0-preview2/internal/util.h +27 -0
- data/lib/datadog/ruby_core_source/ruby-4.0.0-preview2/internal/variable.h +74 -0
- data/lib/datadog/ruby_core_source/{ruby-3.5.0-preview1 → ruby-4.0.0-preview2}/internal/vm.h +3 -4
- data/lib/datadog/ruby_core_source/ruby-4.0.0-preview2/internal/warnings.h +16 -0
- data/lib/datadog/ruby_core_source/ruby-4.0.0-preview2/internal.h +105 -0
- data/lib/datadog/ruby_core_source/{ruby-3.5.0-preview1 → ruby-4.0.0-preview2}/iseq.h +7 -1
- data/lib/datadog/ruby_core_source/{ruby-3.5.0-preview1 → ruby-4.0.0-preview2}/method.h +14 -1
- data/lib/datadog/ruby_core_source/ruby-4.0.0-preview2/node.h +122 -0
- data/lib/datadog/ruby_core_source/ruby-4.0.0-preview2/parser_st.h +162 -0
- data/lib/datadog/ruby_core_source/ruby-4.0.0-preview2/parser_value.h +106 -0
- data/lib/datadog/ruby_core_source/{ruby-3.5.0-preview1 → ruby-4.0.0-preview2}/prism/ast.h +322 -53
- data/lib/datadog/ruby_core_source/ruby-4.0.0-preview2/prism/defines.h +260 -0
- data/lib/datadog/ruby_core_source/ruby-4.0.0-preview2/prism/diagnostic.h +458 -0
- data/lib/datadog/ruby_core_source/ruby-4.0.0-preview2/prism/encoding.h +283 -0
- data/lib/datadog/ruby_core_source/ruby-4.0.0-preview2/prism/extension.h +19 -0
- data/lib/datadog/ruby_core_source/ruby-4.0.0-preview2/prism/node.h +129 -0
- data/lib/datadog/ruby_core_source/{ruby-3.5.0-preview1 → ruby-4.0.0-preview2}/prism/options.h +46 -3
- data/lib/datadog/ruby_core_source/ruby-4.0.0-preview2/prism/pack.h +163 -0
- data/lib/datadog/ruby_core_source/ruby-4.0.0-preview2/prism/parser.h +936 -0
- data/lib/datadog/ruby_core_source/ruby-4.0.0-preview2/prism/prettyprint.h +34 -0
- data/lib/datadog/ruby_core_source/{ruby-3.5.0-preview1 → ruby-4.0.0-preview2}/prism/prism.h +39 -14
- data/lib/datadog/ruby_core_source/ruby-4.0.0-preview2/prism/regexp.h +43 -0
- data/lib/datadog/ruby_core_source/ruby-4.0.0-preview2/prism/static_literals.h +121 -0
- data/lib/datadog/ruby_core_source/ruby-4.0.0-preview2/prism/util/pm_buffer.h +236 -0
- data/lib/datadog/ruby_core_source/ruby-4.0.0-preview2/prism/util/pm_char.h +204 -0
- data/lib/datadog/ruby_core_source/ruby-4.0.0-preview2/prism/util/pm_constant_pool.h +218 -0
- data/lib/datadog/ruby_core_source/ruby-4.0.0-preview2/prism/util/pm_integer.h +130 -0
- data/lib/datadog/ruby_core_source/ruby-4.0.0-preview2/prism/util/pm_list.h +103 -0
- data/lib/datadog/ruby_core_source/ruby-4.0.0-preview2/prism/util/pm_memchr.h +29 -0
- data/lib/datadog/ruby_core_source/ruby-4.0.0-preview2/prism/util/pm_newline_list.h +113 -0
- data/lib/datadog/ruby_core_source/ruby-4.0.0-preview2/prism/util/pm_string.h +200 -0
- data/lib/datadog/ruby_core_source/ruby-4.0.0-preview2/prism/util/pm_strncasecmp.h +32 -0
- data/lib/datadog/ruby_core_source/ruby-4.0.0-preview2/prism/util/pm_strpbrk.h +46 -0
- data/lib/datadog/ruby_core_source/ruby-4.0.0-preview2/prism/version.h +29 -0
- data/lib/datadog/ruby_core_source/ruby-4.0.0-preview2/prism_compile.h +106 -0
- data/lib/datadog/ruby_core_source/ruby-4.0.0-preview2/ractor_core.h +306 -0
- data/lib/datadog/ruby_core_source/ruby-4.0.0-preview2/ruby_assert.h +14 -0
- data/lib/datadog/ruby_core_source/ruby-4.0.0-preview2/ruby_atomic.h +66 -0
- data/lib/datadog/ruby_core_source/{ruby-3.5.0-preview1 → ruby-4.0.0-preview2}/rubyparser.h +15 -1
- data/lib/datadog/ruby_core_source/ruby-4.0.0-preview2/shape.h +444 -0
- data/lib/datadog/ruby_core_source/ruby-4.0.0-preview2/thread_none.h +21 -0
- data/lib/datadog/ruby_core_source/{ruby-3.5.0-preview1 → ruby-4.0.0-preview2}/thread_pthread.h +10 -2
- data/lib/datadog/ruby_core_source/{ruby-3.5.0-preview1 → ruby-4.0.0-preview2}/vm_core.h +160 -45
- data/lib/datadog/ruby_core_source/ruby-4.0.0-preview2/vm_opts.h +67 -0
- data/lib/datadog/ruby_core_source/version.rb +1 -1
- data/lib/datadog/ruby_core_source.rb +1 -1
- metadata +214 -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_opts.h +0 -0
- /data/lib/datadog/ruby_core_source/{ruby-3.5.0-preview1 → ruby-4.0.0-preview2}/internal/basic_operators.h +0 -0
- /data/lib/datadog/ruby_core_source/{ruby-3.5.0-preview1 → ruby-4.0.0-preview2}/internal/bits.h +0 -0
- /data/lib/datadog/ruby_core_source/{ruby-3.5.0-preview1 → ruby-4.0.0-preview2}/internal/cont.h +0 -0
- /data/lib/datadog/ruby_core_source/{ruby-3.5.0-preview1 → ruby-4.0.0-preview2}/internal/time.h +0 -0
- /data/lib/datadog/ruby_core_source/{ruby-3.5.0-preview1 → ruby-4.0.0-preview2}/vm_debug.h +0 -0
|
@@ -118,8 +118,10 @@ extern int ruby_assert_critical_section_entered;
|
|
|
118
118
|
#include "internal.h"
|
|
119
119
|
#include "internal/array.h"
|
|
120
120
|
#include "internal/basic_operators.h"
|
|
121
|
+
#include "internal/box.h"
|
|
121
122
|
#include "internal/sanitizers.h"
|
|
122
123
|
#include "internal/serial.h"
|
|
124
|
+
#include "internal/set_table.h"
|
|
123
125
|
#include "internal/vm.h"
|
|
124
126
|
#include "method.h"
|
|
125
127
|
#include "node.h"
|
|
@@ -259,10 +261,8 @@ union ic_serial_entry {
|
|
|
259
261
|
struct iseq_inline_constant_cache_entry {
|
|
260
262
|
VALUE flags;
|
|
261
263
|
|
|
262
|
-
VALUE value;
|
|
263
|
-
|
|
264
|
-
VALUE _unused2; // v2
|
|
265
|
-
const rb_cref_t *ic_cref; // v3
|
|
264
|
+
VALUE value;
|
|
265
|
+
const rb_cref_t *ic_cref;
|
|
266
266
|
};
|
|
267
267
|
STATIC_ASSERT(sizeof_iseq_inline_constant_cache_entry,
|
|
268
268
|
(offsetof(struct iseq_inline_constant_cache_entry, ic_cref) +
|
|
@@ -286,7 +286,7 @@ struct iseq_inline_constant_cache {
|
|
|
286
286
|
};
|
|
287
287
|
|
|
288
288
|
struct iseq_inline_iv_cache_entry {
|
|
289
|
-
|
|
289
|
+
uint64_t value; // dest_shape_id in former half, attr_index in latter half
|
|
290
290
|
ID iv_set_name;
|
|
291
291
|
};
|
|
292
292
|
|
|
@@ -398,6 +398,7 @@ enum rb_builtin_attr {
|
|
|
398
398
|
};
|
|
399
399
|
|
|
400
400
|
typedef VALUE (*rb_jit_func_t)(struct rb_execution_context_struct *, struct rb_control_frame_struct *);
|
|
401
|
+
typedef VALUE (*rb_zjit_func_t)(struct rb_execution_context_struct *, struct rb_control_frame_struct *, rb_jit_func_t);
|
|
401
402
|
|
|
402
403
|
struct rb_iseq_constant_body {
|
|
403
404
|
enum rb_iseq_type type;
|
|
@@ -495,6 +496,12 @@ struct rb_iseq_constant_body {
|
|
|
495
496
|
|
|
496
497
|
const ID *local_table; /* must free */
|
|
497
498
|
|
|
499
|
+
enum lvar_state {
|
|
500
|
+
lvar_uninitialized,
|
|
501
|
+
lvar_initialized,
|
|
502
|
+
lvar_reassigned,
|
|
503
|
+
} *lvar_states;
|
|
504
|
+
|
|
498
505
|
/* catch table */
|
|
499
506
|
struct iseq_catch_table *catch_table;
|
|
500
507
|
|
|
@@ -534,7 +541,7 @@ struct rb_iseq_constant_body {
|
|
|
534
541
|
|
|
535
542
|
const rb_iseq_t *mandatory_only_iseq;
|
|
536
543
|
|
|
537
|
-
#if USE_YJIT
|
|
544
|
+
#if USE_YJIT || USE_ZJIT
|
|
538
545
|
// Function pointer for JIT code on jit_exec()
|
|
539
546
|
rb_jit_func_t jit_entry;
|
|
540
547
|
// Number of calls on jit_exec()
|
|
@@ -543,11 +550,19 @@ struct rb_iseq_constant_body {
|
|
|
543
550
|
rb_jit_func_t jit_exception;
|
|
544
551
|
// Number of calls on jit_exec_exception()
|
|
545
552
|
long unsigned jit_exception_calls;
|
|
553
|
+
#endif
|
|
554
|
+
|
|
555
|
+
#if USE_YJIT
|
|
546
556
|
// YJIT stores some data on each iseq.
|
|
547
557
|
void *yjit_payload;
|
|
548
558
|
// Used to estimate how frequently this ISEQ gets called
|
|
549
559
|
uint64_t yjit_calls_at_interv;
|
|
550
560
|
#endif
|
|
561
|
+
|
|
562
|
+
#if USE_ZJIT
|
|
563
|
+
// ZJIT stores some data on each iseq.
|
|
564
|
+
void *zjit_payload;
|
|
565
|
+
#endif
|
|
551
566
|
};
|
|
552
567
|
|
|
553
568
|
/* T_IMEMO/iseq */
|
|
@@ -672,12 +687,15 @@ typedef struct rb_vm_struct {
|
|
|
672
687
|
bool terminate_waiting;
|
|
673
688
|
|
|
674
689
|
#ifndef RUBY_THREAD_PTHREAD_H
|
|
690
|
+
// win32
|
|
675
691
|
bool barrier_waiting;
|
|
676
692
|
unsigned int barrier_cnt;
|
|
677
|
-
rb_nativethread_cond_t
|
|
693
|
+
rb_nativethread_cond_t barrier_complete_cond;
|
|
694
|
+
rb_nativethread_cond_t barrier_release_cond;
|
|
678
695
|
#endif
|
|
679
696
|
} sync;
|
|
680
697
|
|
|
698
|
+
#ifdef RUBY_THREAD_PTHREAD_H
|
|
681
699
|
// ractor scheduling
|
|
682
700
|
struct {
|
|
683
701
|
rb_nativethread_lock_t lock;
|
|
@@ -711,7 +729,10 @@ typedef struct rb_vm_struct {
|
|
|
711
729
|
bool barrier_waiting;
|
|
712
730
|
unsigned int barrier_waiting_cnt;
|
|
713
731
|
unsigned int barrier_serial;
|
|
732
|
+
struct rb_ractor_struct *barrier_ractor;
|
|
733
|
+
unsigned int barrier_lock_rec;
|
|
714
734
|
} sched;
|
|
735
|
+
#endif
|
|
715
736
|
} ractor;
|
|
716
737
|
|
|
717
738
|
#ifdef USE_SIGALTSTACK
|
|
@@ -719,7 +740,6 @@ typedef struct rb_vm_struct {
|
|
|
719
740
|
#endif
|
|
720
741
|
|
|
721
742
|
rb_serial_t fork_gen;
|
|
722
|
-
struct ccan_list_head waiting_fds; /* <=> struct waiting_fd */
|
|
723
743
|
|
|
724
744
|
/* set in single-threaded processes only: */
|
|
725
745
|
volatile int ubf_async_safe;
|
|
@@ -734,18 +754,11 @@ typedef struct rb_vm_struct {
|
|
|
734
754
|
struct global_object_list *global_object_list;
|
|
735
755
|
const VALUE special_exceptions[ruby_special_error_count];
|
|
736
756
|
|
|
757
|
+
/* Ruby Box */
|
|
758
|
+
rb_box_t *root_box;
|
|
759
|
+
rb_box_t *main_box;
|
|
760
|
+
|
|
737
761
|
/* load */
|
|
738
|
-
VALUE top_self;
|
|
739
|
-
VALUE load_path;
|
|
740
|
-
VALUE load_path_snapshot;
|
|
741
|
-
VALUE load_path_check_cache;
|
|
742
|
-
VALUE expanded_load_path;
|
|
743
|
-
VALUE loaded_features;
|
|
744
|
-
VALUE loaded_features_snapshot;
|
|
745
|
-
VALUE loaded_features_realpaths;
|
|
746
|
-
VALUE loaded_features_realpath_map;
|
|
747
|
-
struct st_table *loaded_features_index;
|
|
748
|
-
struct st_table *loading_table;
|
|
749
762
|
// For running the init function of statically linked
|
|
750
763
|
// extensions when they are loaded
|
|
751
764
|
struct st_table *static_ext_inits;
|
|
@@ -778,14 +791,13 @@ typedef struct rb_vm_struct {
|
|
|
778
791
|
|
|
779
792
|
rb_at_exit_list *at_exit;
|
|
780
793
|
|
|
781
|
-
st_table *frozen_strings;
|
|
782
|
-
|
|
783
794
|
const struct rb_builtin_function *builtin_function_table;
|
|
784
795
|
|
|
785
796
|
st_table *ci_table;
|
|
786
797
|
struct rb_id_table *negative_cme_table;
|
|
787
798
|
st_table *overloaded_cme_table; // cme -> overloaded_cme
|
|
788
|
-
|
|
799
|
+
set_table *unused_block_warning_table;
|
|
800
|
+
set_table *cc_refinement_table;
|
|
789
801
|
|
|
790
802
|
// This id table contains a mapping from ID to ICs. It does this with ID
|
|
791
803
|
// keys and nested st_tables as values. The nested tables have ICs as keys
|
|
@@ -810,9 +822,10 @@ typedef struct rb_vm_struct {
|
|
|
810
822
|
size_t fiber_vm_stack_size;
|
|
811
823
|
size_t fiber_machine_stack_size;
|
|
812
824
|
} default_params;
|
|
813
|
-
|
|
814
825
|
} rb_vm_t;
|
|
815
826
|
|
|
827
|
+
extern bool ruby_vm_during_cleanup;
|
|
828
|
+
|
|
816
829
|
/* default values */
|
|
817
830
|
|
|
818
831
|
#define RUBY_VM_SIZE_ALIGN 4096
|
|
@@ -831,7 +844,7 @@ typedef struct rb_vm_struct {
|
|
|
831
844
|
#define RUBY_VM_FIBER_MACHINE_STACK_SIZE_MIN ( 16 * 1024 * sizeof(VALUE)) /* 64 KB or 128 KB */
|
|
832
845
|
#endif
|
|
833
846
|
|
|
834
|
-
#if __has_feature(memory_sanitizer) || __has_feature(address_sanitizer)
|
|
847
|
+
#if __has_feature(memory_sanitizer) || __has_feature(address_sanitizer) || __has_feature(leak_sanitizer)
|
|
835
848
|
/* It seems sanitizers consume A LOT of machine stacks */
|
|
836
849
|
#undef RUBY_VM_THREAD_MACHINE_STACK_SIZE
|
|
837
850
|
#define RUBY_VM_THREAD_MACHINE_STACK_SIZE (1024 * 1024 * sizeof(VALUE))
|
|
@@ -1050,6 +1063,11 @@ struct rb_execution_context_struct {
|
|
|
1050
1063
|
|
|
1051
1064
|
VALUE private_const_reference;
|
|
1052
1065
|
|
|
1066
|
+
struct {
|
|
1067
|
+
VALUE obj;
|
|
1068
|
+
VALUE fields_obj;
|
|
1069
|
+
} gen_fields_cache;
|
|
1070
|
+
|
|
1053
1071
|
/* for GC */
|
|
1054
1072
|
struct {
|
|
1055
1073
|
VALUE *stack_start;
|
|
@@ -1093,7 +1111,7 @@ typedef struct rb_ractor_struct rb_ractor_t;
|
|
|
1093
1111
|
struct rb_native_thread;
|
|
1094
1112
|
|
|
1095
1113
|
typedef struct rb_thread_struct {
|
|
1096
|
-
struct ccan_list_node lt_node; // managed by a ractor
|
|
1114
|
+
struct ccan_list_node lt_node; // managed by a ractor (r->threads.set)
|
|
1097
1115
|
VALUE self;
|
|
1098
1116
|
rb_ractor_t *ractor;
|
|
1099
1117
|
rb_vm_t *vm;
|
|
@@ -1258,8 +1276,8 @@ typedef struct {
|
|
|
1258
1276
|
|
|
1259
1277
|
RUBY_SYMBOL_EXPORT_BEGIN
|
|
1260
1278
|
VALUE rb_proc_isolate(VALUE self);
|
|
1261
|
-
VALUE rb_proc_isolate_bang(VALUE self);
|
|
1262
|
-
VALUE rb_proc_ractor_make_shareable(VALUE
|
|
1279
|
+
VALUE rb_proc_isolate_bang(VALUE self, VALUE replace_self);
|
|
1280
|
+
VALUE rb_proc_ractor_make_shareable(VALUE proc, VALUE replace_self);
|
|
1263
1281
|
RUBY_SYMBOL_EXPORT_END
|
|
1264
1282
|
|
|
1265
1283
|
typedef struct {
|
|
@@ -1342,11 +1360,11 @@ typedef rb_control_frame_t *
|
|
|
1342
1360
|
|
|
1343
1361
|
enum vm_frame_env_flags {
|
|
1344
1362
|
/* Frame/Environment flag bits:
|
|
1345
|
-
* MMMM MMMM MMMM MMMM
|
|
1363
|
+
* MMMM MMMM MMMM MMMM ___F FFFF FFFE EEEX (LSB)
|
|
1346
1364
|
*
|
|
1347
1365
|
* X : tag for GC marking (It seems as Fixnum)
|
|
1348
1366
|
* EEE : 4 bits Env flags
|
|
1349
|
-
* FF..:
|
|
1367
|
+
* FF..: 8 bits Frame flags
|
|
1350
1368
|
* MM..: 15 bits frame magic (to check frame corruption)
|
|
1351
1369
|
*/
|
|
1352
1370
|
|
|
@@ -1369,8 +1387,9 @@ enum vm_frame_env_flags {
|
|
|
1369
1387
|
VM_FRAME_FLAG_CFRAME = 0x0080,
|
|
1370
1388
|
VM_FRAME_FLAG_LAMBDA = 0x0100,
|
|
1371
1389
|
VM_FRAME_FLAG_MODIFIED_BLOCK_PARAM = 0x0200,
|
|
1372
|
-
VM_FRAME_FLAG_CFRAME_KW
|
|
1373
|
-
VM_FRAME_FLAG_PASSED
|
|
1390
|
+
VM_FRAME_FLAG_CFRAME_KW = 0x0400,
|
|
1391
|
+
VM_FRAME_FLAG_PASSED = 0x0800,
|
|
1392
|
+
VM_FRAME_FLAG_BOX_REQUIRE = 0x1000,
|
|
1374
1393
|
|
|
1375
1394
|
/* env flag */
|
|
1376
1395
|
VM_ENV_FLAG_LOCAL = 0x0002,
|
|
@@ -1414,12 +1433,31 @@ VM_ENV_FLAGS(const VALUE *ep, long flag)
|
|
|
1414
1433
|
return flags & flag;
|
|
1415
1434
|
}
|
|
1416
1435
|
|
|
1436
|
+
static inline unsigned long
|
|
1437
|
+
VM_ENV_FLAGS_UNCHECKED(const VALUE *ep, long flag)
|
|
1438
|
+
{
|
|
1439
|
+
VALUE flags = ep[VM_ENV_DATA_INDEX_FLAGS];
|
|
1440
|
+
return flags & flag;
|
|
1441
|
+
}
|
|
1442
|
+
|
|
1443
|
+
static inline unsigned long
|
|
1444
|
+
VM_ENV_FRAME_TYPE_P(const VALUE *ep, unsigned long frame_type)
|
|
1445
|
+
{
|
|
1446
|
+
return VM_ENV_FLAGS(ep, VM_FRAME_MAGIC_MASK) == frame_type;
|
|
1447
|
+
}
|
|
1448
|
+
|
|
1417
1449
|
static inline unsigned long
|
|
1418
1450
|
VM_FRAME_TYPE(const rb_control_frame_t *cfp)
|
|
1419
1451
|
{
|
|
1420
1452
|
return VM_ENV_FLAGS(cfp->ep, VM_FRAME_MAGIC_MASK);
|
|
1421
1453
|
}
|
|
1422
1454
|
|
|
1455
|
+
static inline unsigned long
|
|
1456
|
+
VM_FRAME_TYPE_UNCHECKED(const rb_control_frame_t *cfp)
|
|
1457
|
+
{
|
|
1458
|
+
return VM_ENV_FLAGS_UNCHECKED(cfp->ep, VM_FRAME_MAGIC_MASK);
|
|
1459
|
+
}
|
|
1460
|
+
|
|
1423
1461
|
static inline int
|
|
1424
1462
|
VM_FRAME_LAMBDA_P(const rb_control_frame_t *cfp)
|
|
1425
1463
|
{
|
|
@@ -1438,6 +1476,12 @@ VM_FRAME_FINISHED_P(const rb_control_frame_t *cfp)
|
|
|
1438
1476
|
return VM_ENV_FLAGS(cfp->ep, VM_FRAME_FLAG_FINISH) != 0;
|
|
1439
1477
|
}
|
|
1440
1478
|
|
|
1479
|
+
static inline int
|
|
1480
|
+
VM_FRAME_FINISHED_P_UNCHECKED(const rb_control_frame_t *cfp)
|
|
1481
|
+
{
|
|
1482
|
+
return VM_ENV_FLAGS_UNCHECKED(cfp->ep, VM_FRAME_FLAG_FINISH) != 0;
|
|
1483
|
+
}
|
|
1484
|
+
|
|
1441
1485
|
static inline int
|
|
1442
1486
|
VM_FRAME_BMETHOD_P(const rb_control_frame_t *cfp)
|
|
1443
1487
|
{
|
|
@@ -1463,12 +1507,30 @@ VM_FRAME_CFRAME_P(const rb_control_frame_t *cfp)
|
|
|
1463
1507
|
return cframe_p;
|
|
1464
1508
|
}
|
|
1465
1509
|
|
|
1510
|
+
static inline int
|
|
1511
|
+
VM_FRAME_CFRAME_P_UNCHECKED(const rb_control_frame_t *cfp)
|
|
1512
|
+
{
|
|
1513
|
+
return VM_ENV_FLAGS_UNCHECKED(cfp->ep, VM_FRAME_FLAG_CFRAME) != 0;
|
|
1514
|
+
}
|
|
1515
|
+
|
|
1466
1516
|
static inline int
|
|
1467
1517
|
VM_FRAME_RUBYFRAME_P(const rb_control_frame_t *cfp)
|
|
1468
1518
|
{
|
|
1469
1519
|
return !VM_FRAME_CFRAME_P(cfp);
|
|
1470
1520
|
}
|
|
1471
1521
|
|
|
1522
|
+
static inline int
|
|
1523
|
+
VM_FRAME_RUBYFRAME_P_UNCHECKED(const rb_control_frame_t *cfp)
|
|
1524
|
+
{
|
|
1525
|
+
return !VM_FRAME_CFRAME_P_UNCHECKED(cfp);
|
|
1526
|
+
}
|
|
1527
|
+
|
|
1528
|
+
static inline int
|
|
1529
|
+
VM_FRAME_NS_REQUIRE_P(const rb_control_frame_t *cfp)
|
|
1530
|
+
{
|
|
1531
|
+
return VM_ENV_FLAGS(cfp->ep, VM_FRAME_FLAG_BOX_REQUIRE) != 0;
|
|
1532
|
+
}
|
|
1533
|
+
|
|
1472
1534
|
#define RUBYVM_CFUNC_FRAME_P(cfp) \
|
|
1473
1535
|
(VM_FRAME_TYPE(cfp) == VM_FRAME_MAGIC_CFUNC)
|
|
1474
1536
|
|
|
@@ -1481,20 +1543,57 @@ VM_ENV_LOCAL_P(const VALUE *ep)
|
|
|
1481
1543
|
return VM_ENV_FLAGS(ep, VM_ENV_FLAG_LOCAL) ? 1 : 0;
|
|
1482
1544
|
}
|
|
1483
1545
|
|
|
1546
|
+
static inline int
|
|
1547
|
+
VM_ENV_LOCAL_P_UNCHECKED(const VALUE *ep)
|
|
1548
|
+
{
|
|
1549
|
+
return VM_ENV_FLAGS_UNCHECKED(ep, VM_ENV_FLAG_LOCAL) ? 1 : 0;
|
|
1550
|
+
}
|
|
1551
|
+
|
|
1552
|
+
static inline const VALUE *
|
|
1553
|
+
VM_ENV_PREV_EP_UNCHECKED(const VALUE *ep)
|
|
1554
|
+
{
|
|
1555
|
+
return GC_GUARDED_PTR_REF(ep[VM_ENV_DATA_INDEX_SPECVAL]);
|
|
1556
|
+
}
|
|
1557
|
+
|
|
1484
1558
|
static inline const VALUE *
|
|
1485
1559
|
VM_ENV_PREV_EP(const VALUE *ep)
|
|
1486
1560
|
{
|
|
1487
1561
|
VM_ASSERT(VM_ENV_LOCAL_P(ep) == 0);
|
|
1488
|
-
return
|
|
1562
|
+
return VM_ENV_PREV_EP_UNCHECKED(ep);
|
|
1563
|
+
}
|
|
1564
|
+
|
|
1565
|
+
static inline bool
|
|
1566
|
+
VM_ENV_BOXED_P(const VALUE *ep)
|
|
1567
|
+
{
|
|
1568
|
+
return VM_ENV_FRAME_TYPE_P(ep, VM_FRAME_MAGIC_CLASS) || VM_ENV_FRAME_TYPE_P(ep, VM_FRAME_MAGIC_TOP);
|
|
1489
1569
|
}
|
|
1490
1570
|
|
|
1491
1571
|
static inline VALUE
|
|
1492
1572
|
VM_ENV_BLOCK_HANDLER(const VALUE *ep)
|
|
1493
1573
|
{
|
|
1574
|
+
if (VM_ENV_BOXED_P(ep)) {
|
|
1575
|
+
VM_ASSERT(VM_ENV_LOCAL_P(ep));
|
|
1576
|
+
return VM_BLOCK_HANDLER_NONE;
|
|
1577
|
+
}
|
|
1578
|
+
|
|
1494
1579
|
VM_ASSERT(VM_ENV_LOCAL_P(ep));
|
|
1495
1580
|
return ep[VM_ENV_DATA_INDEX_SPECVAL];
|
|
1496
1581
|
}
|
|
1497
1582
|
|
|
1583
|
+
static inline const rb_box_t *
|
|
1584
|
+
VM_ENV_BOX(const VALUE *ep)
|
|
1585
|
+
{
|
|
1586
|
+
VM_ASSERT(VM_ENV_BOXED_P(ep));
|
|
1587
|
+
VM_ASSERT(VM_ENV_LOCAL_P(ep));
|
|
1588
|
+
return (const rb_box_t *)GC_GUARDED_PTR_REF(ep[VM_ENV_DATA_INDEX_SPECVAL]);
|
|
1589
|
+
}
|
|
1590
|
+
|
|
1591
|
+
static inline const rb_box_t *
|
|
1592
|
+
VM_ENV_BOX_UNCHECKED(const VALUE *ep)
|
|
1593
|
+
{
|
|
1594
|
+
return (const rb_box_t *)GC_GUARDED_PTR_REF(ep[VM_ENV_DATA_INDEX_SPECVAL]);
|
|
1595
|
+
}
|
|
1596
|
+
|
|
1498
1597
|
#if VM_CHECK_MODE > 0
|
|
1499
1598
|
int rb_vm_ep_in_heap_p(const VALUE *ep);
|
|
1500
1599
|
#endif
|
|
@@ -1815,7 +1914,7 @@ NORETURN(void rb_bug_for_fatal_signal(ruby_sighandler_t default_sighandler, int
|
|
|
1815
1914
|
|
|
1816
1915
|
/* functions about thread/vm execution */
|
|
1817
1916
|
RUBY_SYMBOL_EXPORT_BEGIN
|
|
1818
|
-
VALUE rb_iseq_eval(const rb_iseq_t *iseq);
|
|
1917
|
+
VALUE rb_iseq_eval(const rb_iseq_t *iseq, const rb_box_t *box);
|
|
1819
1918
|
VALUE rb_iseq_eval_main(const rb_iseq_t *iseq);
|
|
1820
1919
|
VALUE rb_iseq_path(const rb_iseq_t *iseq);
|
|
1821
1920
|
VALUE rb_iseq_realpath(const rb_iseq_t *iseq);
|
|
@@ -1861,10 +1960,11 @@ void rb_thread_wakeup_timer_thread(int);
|
|
|
1861
1960
|
static inline void
|
|
1862
1961
|
rb_vm_living_threads_init(rb_vm_t *vm)
|
|
1863
1962
|
{
|
|
1864
|
-
ccan_list_head_init(&vm->waiting_fds);
|
|
1865
1963
|
ccan_list_head_init(&vm->workqueue);
|
|
1866
1964
|
ccan_list_head_init(&vm->ractor.set);
|
|
1965
|
+
#ifdef RUBY_THREAD_PTHREAD_H
|
|
1867
1966
|
ccan_list_head_init(&vm->ractor.sched.zombie_threads);
|
|
1967
|
+
#endif
|
|
1868
1968
|
}
|
|
1869
1969
|
|
|
1870
1970
|
typedef int rb_backtrace_iter_func(void *, VALUE, int, VALUE);
|
|
@@ -1874,6 +1974,7 @@ VALUE *rb_vm_svar_lep(const rb_execution_context_t *ec, const rb_control_frame_t
|
|
|
1874
1974
|
int rb_vm_get_sourceline(const rb_control_frame_t *);
|
|
1875
1975
|
void rb_vm_stack_to_heap(rb_execution_context_t *ec);
|
|
1876
1976
|
void ruby_thread_init_stack(rb_thread_t *th, void *local_in_parent_frame);
|
|
1977
|
+
void rb_thread_malloc_stack_set(rb_thread_t *th, void *stack);
|
|
1877
1978
|
rb_thread_t * ruby_thread_from_native(void);
|
|
1878
1979
|
int ruby_thread_set_native(rb_thread_t *th);
|
|
1879
1980
|
int rb_vm_control_frame_id_and_class(const rb_control_frame_t *cfp, ID *idp, ID *called_idp, VALUE *klassp);
|
|
@@ -1888,9 +1989,10 @@ void rb_vm_register_special_exception_str(enum ruby_special_exceptions sp, VALUE
|
|
|
1888
1989
|
|
|
1889
1990
|
void rb_gc_mark_machine_context(const rb_execution_context_t *ec);
|
|
1890
1991
|
|
|
1891
|
-
|
|
1992
|
+
rb_cref_t *rb_vm_rewrite_cref(rb_cref_t *node, VALUE old_klass, VALUE new_klass);
|
|
1892
1993
|
|
|
1893
1994
|
const rb_callable_method_entry_t *rb_vm_frame_method_entry(const rb_control_frame_t *cfp);
|
|
1995
|
+
const rb_callable_method_entry_t *rb_vm_frame_method_entry_unchecked(const rb_control_frame_t *cfp);
|
|
1894
1996
|
|
|
1895
1997
|
#define sysstack_error GET_VM()->special_exceptions[ruby_error_sysstack]
|
|
1896
1998
|
|
|
@@ -1962,10 +2064,10 @@ static inline rb_execution_context_t *
|
|
|
1962
2064
|
rb_current_execution_context(bool expect_ec)
|
|
1963
2065
|
{
|
|
1964
2066
|
#ifdef RB_THREAD_LOCAL_SPECIFIER
|
|
1965
|
-
#
|
|
1966
|
-
rb_execution_context_t *ec = rb_current_ec();
|
|
2067
|
+
#ifdef RB_THREAD_CURRENT_EC_NOINLINE
|
|
2068
|
+
rb_execution_context_t * volatile ec = rb_current_ec();
|
|
1967
2069
|
#else
|
|
1968
|
-
rb_execution_context_t *ec = ruby_current_ec;
|
|
2070
|
+
rb_execution_context_t * volatile ec = ruby_current_ec;
|
|
1969
2071
|
#endif
|
|
1970
2072
|
|
|
1971
2073
|
/* On the shared objects, `__tls_get_addr()` is used to access the TLS
|
|
@@ -1982,7 +2084,7 @@ rb_current_execution_context(bool expect_ec)
|
|
|
1982
2084
|
*/
|
|
1983
2085
|
VM_ASSERT(ec == rb_current_ec_noinline());
|
|
1984
2086
|
#else
|
|
1985
|
-
rb_execution_context_t *ec = native_tls_get(ruby_current_ec_key);
|
|
2087
|
+
rb_execution_context_t * volatile ec = native_tls_get(ruby_current_ec_key);
|
|
1986
2088
|
#endif
|
|
1987
2089
|
VM_ASSERT(!expect_ec || ec != NULL);
|
|
1988
2090
|
return ec;
|
|
@@ -2031,12 +2133,21 @@ void rb_ec_vm_lock_rec_release(const rb_execution_context_t *ec,
|
|
|
2031
2133
|
unsigned int recorded_lock_rec,
|
|
2032
2134
|
unsigned int current_lock_rec);
|
|
2033
2135
|
|
|
2136
|
+
/* This technically is a data race, as it's checked without the lock, however we
|
|
2137
|
+
* check against a value only our own thread will write. */
|
|
2138
|
+
NO_SANITIZE("thread", static inline bool
|
|
2139
|
+
vm_locked_by_ractor_p(rb_vm_t *vm, rb_ractor_t *cr))
|
|
2140
|
+
{
|
|
2141
|
+
VM_ASSERT(cr == GET_RACTOR());
|
|
2142
|
+
return vm->ractor.sync.lock_owner == cr;
|
|
2143
|
+
}
|
|
2144
|
+
|
|
2034
2145
|
static inline unsigned int
|
|
2035
2146
|
rb_ec_vm_lock_rec(const rb_execution_context_t *ec)
|
|
2036
2147
|
{
|
|
2037
2148
|
rb_vm_t *vm = rb_ec_vm_ptr(ec);
|
|
2038
2149
|
|
|
2039
|
-
if (vm
|
|
2150
|
+
if (!vm_locked_by_ractor_p(vm, rb_ec_ractor_ptr(ec))) {
|
|
2040
2151
|
return 0;
|
|
2041
2152
|
}
|
|
2042
2153
|
else {
|
|
@@ -2063,8 +2174,12 @@ enum {
|
|
|
2063
2174
|
#define RUBY_VM_SET_TRAP_INTERRUPT(ec) ATOMIC_OR((ec)->interrupt_flag, TRAP_INTERRUPT_MASK)
|
|
2064
2175
|
#define RUBY_VM_SET_TERMINATE_INTERRUPT(ec) ATOMIC_OR((ec)->interrupt_flag, TERMINATE_INTERRUPT_MASK)
|
|
2065
2176
|
#define RUBY_VM_SET_VM_BARRIER_INTERRUPT(ec) ATOMIC_OR((ec)->interrupt_flag, VM_BARRIER_INTERRUPT_MASK)
|
|
2066
|
-
|
|
2067
|
-
|
|
2177
|
+
|
|
2178
|
+
static inline bool
|
|
2179
|
+
RUBY_VM_INTERRUPTED(rb_execution_context_t *ec)
|
|
2180
|
+
{
|
|
2181
|
+
return (ATOMIC_LOAD_RELAXED(ec->interrupt_flag) & ~(ec->interrupt_mask) & (PENDING_INTERRUPT_MASK|TRAP_INTERRUPT_MASK));
|
|
2182
|
+
}
|
|
2068
2183
|
|
|
2069
2184
|
static inline bool
|
|
2070
2185
|
RUBY_VM_INTERRUPTED_ANY(rb_execution_context_t *ec)
|
|
@@ -2077,7 +2192,7 @@ RUBY_VM_INTERRUPTED_ANY(rb_execution_context_t *ec)
|
|
|
2077
2192
|
RUBY_VM_SET_TIMER_INTERRUPT(ec);
|
|
2078
2193
|
}
|
|
2079
2194
|
#endif
|
|
2080
|
-
return ec->interrupt_flag & ~(ec)->interrupt_mask;
|
|
2195
|
+
return ATOMIC_LOAD_RELAXED(ec->interrupt_flag) & ~(ec)->interrupt_mask;
|
|
2081
2196
|
}
|
|
2082
2197
|
|
|
2083
2198
|
VALUE rb_exc_set_backtrace(VALUE exc, VALUE bt);
|
|
@@ -2111,7 +2226,7 @@ rb_vm_check_ints(rb_execution_context_t *ec)
|
|
|
2111
2226
|
VM_ASSERT(ruby_assert_critical_section_entered == 0);
|
|
2112
2227
|
#endif
|
|
2113
2228
|
|
|
2114
|
-
VM_ASSERT(ec ==
|
|
2229
|
+
VM_ASSERT(ec == rb_current_ec_noinline());
|
|
2115
2230
|
|
|
2116
2231
|
if (UNLIKELY(RUBY_VM_INTERRUPTED_ANY(ec))) {
|
|
2117
2232
|
rb_threadptr_execute_interrupts(rb_ec_thread_ptr(ec), 0);
|
|
@@ -2138,7 +2253,7 @@ struct rb_trace_arg_struct {
|
|
|
2138
2253
|
};
|
|
2139
2254
|
|
|
2140
2255
|
void rb_hook_list_mark(rb_hook_list_t *hooks);
|
|
2141
|
-
void
|
|
2256
|
+
void rb_hook_list_mark_and_move(rb_hook_list_t *hooks);
|
|
2142
2257
|
void rb_hook_list_free(rb_hook_list_t *hooks);
|
|
2143
2258
|
void rb_hook_list_connect_tracepoint(VALUE target, rb_hook_list_t *list, VALUE tpval, unsigned int target_line);
|
|
2144
2259
|
void rb_hook_list_remove_tracepoint(rb_hook_list_t *list, VALUE tpval);
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
#ifndef RUBY_VM_OPTS_H/*-*-c-*-*/
|
|
2
|
+
#define RUBY_VM_OPTS_H
|
|
3
|
+
/**********************************************************************
|
|
4
|
+
|
|
5
|
+
vm_opts.h - VM optimize option
|
|
6
|
+
|
|
7
|
+
$Author$
|
|
8
|
+
|
|
9
|
+
Copyright (C) 2004-2007 Koichi Sasada
|
|
10
|
+
|
|
11
|
+
**********************************************************************/
|
|
12
|
+
|
|
13
|
+
/* Compile options.
|
|
14
|
+
* You can change these options at runtime by VM::CompileOption.
|
|
15
|
+
* Following definitions are default values.
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
#define OPT_TAILCALL_OPTIMIZATION 0
|
|
19
|
+
#define OPT_PEEPHOLE_OPTIMIZATION 1
|
|
20
|
+
#define OPT_SPECIALISED_INSTRUCTION 1
|
|
21
|
+
#define OPT_INLINE_CONST_CACHE 1
|
|
22
|
+
#define OPT_FROZEN_STRING_LITERAL -1
|
|
23
|
+
#define OPT_DEBUG_FROZEN_STRING_LITERAL 0
|
|
24
|
+
|
|
25
|
+
/* Build Options.
|
|
26
|
+
* You can't change these options at runtime.
|
|
27
|
+
*/
|
|
28
|
+
|
|
29
|
+
/* C compiler dependent */
|
|
30
|
+
|
|
31
|
+
/*
|
|
32
|
+
* 0: direct (using labeled goto using GCC special)
|
|
33
|
+
* 1: token (switch/case)
|
|
34
|
+
* 2: call (function call for each insn dispatch)
|
|
35
|
+
*/
|
|
36
|
+
#ifndef OPT_THREADED_CODE
|
|
37
|
+
#define OPT_THREADED_CODE 0
|
|
38
|
+
#endif
|
|
39
|
+
|
|
40
|
+
#define OPT_DIRECT_THREADED_CODE (OPT_THREADED_CODE == 0)
|
|
41
|
+
#define OPT_TOKEN_THREADED_CODE (OPT_THREADED_CODE == 1)
|
|
42
|
+
#define OPT_CALL_THREADED_CODE (OPT_THREADED_CODE == 2)
|
|
43
|
+
|
|
44
|
+
/* VM running option */
|
|
45
|
+
#define OPT_CHECKED_RUN 1
|
|
46
|
+
#define OPT_INLINE_METHOD_CACHE 1
|
|
47
|
+
#define OPT_GLOBAL_METHOD_CACHE 1
|
|
48
|
+
|
|
49
|
+
#ifndef OPT_IC_FOR_IVAR
|
|
50
|
+
#define OPT_IC_FOR_IVAR 1
|
|
51
|
+
#endif
|
|
52
|
+
|
|
53
|
+
/* architecture independent, affects generated code */
|
|
54
|
+
#define OPT_OPERANDS_UNIFICATION 1
|
|
55
|
+
#define OPT_INSTRUCTIONS_UNIFICATION 0
|
|
56
|
+
#define OPT_UNIFY_ALL_COMBINATION 0
|
|
57
|
+
|
|
58
|
+
/* misc */
|
|
59
|
+
#ifndef OPT_SUPPORT_JOKE
|
|
60
|
+
#define OPT_SUPPORT_JOKE 0
|
|
61
|
+
#endif
|
|
62
|
+
|
|
63
|
+
#ifndef VM_COLLECT_USAGE_DETAILS
|
|
64
|
+
#define VM_COLLECT_USAGE_DETAILS 0
|
|
65
|
+
#endif
|
|
66
|
+
|
|
67
|
+
#endif /* RUBY_VM_OPTS_H */
|
|
@@ -35,7 +35,7 @@ module Datadog
|
|
|
35
35
|
end
|
|
36
36
|
|
|
37
37
|
# Look for sources that ship with gem
|
|
38
|
-
dest_dir = deduce_packaged_source_dir(ruby_dir)
|
|
38
|
+
dest_dir = ENV["DATADOG_RUBY_HEADERS_OVERRIDE"] || deduce_packaged_source_dir(ruby_dir)
|
|
39
39
|
$stderr.puts "Using datadog-ruby_core_source headers from #{dest_dir}"
|
|
40
40
|
no_source_abort(ruby_dir) unless File.directory?(dest_dir)
|
|
41
41
|
|