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
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
*/
|
|
11
11
|
#include "ruby/internal/config.h"
|
|
12
12
|
#include <stddef.h> /* for size_t */
|
|
13
|
+
#include "id_table.h"
|
|
13
14
|
#include "internal/array.h" /* for rb_ary_hidden_new_fill */
|
|
14
15
|
#include "ruby/internal/stdbool.h" /* for bool */
|
|
15
16
|
#include "ruby/ruby.h" /* for rb_block_call_func_t */
|
|
@@ -24,6 +25,7 @@
|
|
|
24
25
|
#define IMEMO_FL_USER3 FL_USER7
|
|
25
26
|
#define IMEMO_FL_USER4 FL_USER8
|
|
26
27
|
#define IMEMO_FL_USER5 FL_USER9
|
|
28
|
+
#define IMEMO_FL_USER6 FL_USER10
|
|
27
29
|
|
|
28
30
|
enum imemo_type {
|
|
29
31
|
imemo_env = 0,
|
|
@@ -35,11 +37,10 @@ enum imemo_type {
|
|
|
35
37
|
imemo_ment = 6,
|
|
36
38
|
imemo_iseq = 7,
|
|
37
39
|
imemo_tmpbuf = 8,
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
imemo_constcache = 13,
|
|
40
|
+
imemo_callinfo = 10,
|
|
41
|
+
imemo_callcache = 11,
|
|
42
|
+
imemo_constcache = 12,
|
|
43
|
+
imemo_fields = 13,
|
|
43
44
|
};
|
|
44
45
|
|
|
45
46
|
/* CREF (Class REFerence) is defined in method.h */
|
|
@@ -92,9 +93,7 @@ struct vm_ifunc {
|
|
|
92
93
|
|
|
93
94
|
struct rb_imemo_tmpbuf_struct {
|
|
94
95
|
VALUE flags;
|
|
95
|
-
VALUE reserved;
|
|
96
96
|
VALUE *ptr; /* malloc'ed buffer */
|
|
97
|
-
struct rb_imemo_tmpbuf_struct *next; /* next imemo */
|
|
98
97
|
size_t cnt; /* buffer size in VALUE */
|
|
99
98
|
};
|
|
100
99
|
|
|
@@ -115,7 +114,8 @@ struct MEMO {
|
|
|
115
114
|
} u3;
|
|
116
115
|
};
|
|
117
116
|
|
|
118
|
-
#define IMEMO_NEW(T, type, v0) ((T *)rb_imemo_new((type), (v0), sizeof(T)))
|
|
117
|
+
#define IMEMO_NEW(T, type, v0) ((T *)rb_imemo_new((type), (v0), sizeof(T), false))
|
|
118
|
+
#define SHAREABLE_IMEMO_NEW(T, type, v0) ((T *)rb_imemo_new((type), (v0), sizeof(T), true))
|
|
119
119
|
|
|
120
120
|
/* ment is in method.h */
|
|
121
121
|
|
|
@@ -132,27 +132,23 @@ struct MEMO {
|
|
|
132
132
|
#ifndef RUBY_RUBYPARSER_H
|
|
133
133
|
typedef struct rb_imemo_tmpbuf_struct rb_imemo_tmpbuf_t;
|
|
134
134
|
#endif
|
|
135
|
-
|
|
135
|
+
VALUE rb_imemo_new(enum imemo_type type, VALUE v0, size_t size, bool is_shareable);
|
|
136
|
+
VALUE rb_imemo_tmpbuf_new(void);
|
|
136
137
|
struct vm_ifunc *rb_vm_ifunc_new(rb_block_call_func_t func, const void *data, int min_argc, int max_argc);
|
|
137
138
|
static inline enum imemo_type imemo_type(VALUE imemo);
|
|
138
139
|
static inline int imemo_type_p(VALUE imemo, enum imemo_type imemo_type);
|
|
139
140
|
static inline bool imemo_throw_data_p(VALUE imemo);
|
|
140
141
|
static inline struct vm_ifunc *rb_vm_ifunc_proc_new(rb_block_call_func_t func, const void *data);
|
|
141
|
-
static inline VALUE rb_imemo_tmpbuf_auto_free_pointer(void);
|
|
142
142
|
static inline void *RB_IMEMO_TMPBUF_PTR(VALUE v);
|
|
143
143
|
static inline void *rb_imemo_tmpbuf_set_ptr(VALUE v, void *ptr);
|
|
144
|
-
static inline VALUE rb_imemo_tmpbuf_auto_free_pointer_new_from_an_RString(VALUE str);
|
|
145
144
|
static inline void MEMO_V1_SET(struct MEMO *m, VALUE v);
|
|
146
145
|
static inline void MEMO_V2_SET(struct MEMO *m, VALUE v);
|
|
147
146
|
|
|
148
147
|
size_t rb_imemo_memsize(VALUE obj);
|
|
149
|
-
void rb_cc_table_mark(VALUE klass);
|
|
150
148
|
void rb_imemo_mark_and_move(VALUE obj, bool reference_updating);
|
|
151
|
-
void rb_cc_table_free(VALUE klass);
|
|
152
149
|
void rb_imemo_free(VALUE obj);
|
|
153
150
|
|
|
154
151
|
RUBY_SYMBOL_EXPORT_BEGIN
|
|
155
|
-
VALUE rb_imemo_new(enum imemo_type type, VALUE v0, size_t size);
|
|
156
152
|
const char *rb_imemo_name(enum imemo_type type);
|
|
157
153
|
RUBY_SYMBOL_EXPORT_END
|
|
158
154
|
|
|
@@ -202,12 +198,6 @@ rb_vm_ifunc_proc_new(rb_block_call_func_t func, const void *data)
|
|
|
202
198
|
return rb_vm_ifunc_new(func, data, 0, UNLIMITED_ARGUMENTS);
|
|
203
199
|
}
|
|
204
200
|
|
|
205
|
-
static inline VALUE
|
|
206
|
-
rb_imemo_tmpbuf_auto_free_pointer(void)
|
|
207
|
-
{
|
|
208
|
-
return rb_imemo_new(imemo_tmpbuf, 0, sizeof(rb_imemo_tmpbuf_t));
|
|
209
|
-
}
|
|
210
|
-
|
|
211
201
|
static inline void *
|
|
212
202
|
RB_IMEMO_TMPBUF_PTR(VALUE v)
|
|
213
203
|
{
|
|
@@ -222,7 +212,7 @@ rb_imemo_tmpbuf_set_ptr(VALUE v, void *ptr)
|
|
|
222
212
|
}
|
|
223
213
|
|
|
224
214
|
static inline VALUE
|
|
225
|
-
|
|
215
|
+
rb_imemo_tmpbuf_new_from_an_RString(VALUE str)
|
|
226
216
|
{
|
|
227
217
|
const void *src;
|
|
228
218
|
VALUE imemo;
|
|
@@ -232,7 +222,7 @@ rb_imemo_tmpbuf_auto_free_pointer_new_from_an_RString(VALUE str)
|
|
|
232
222
|
|
|
233
223
|
StringValue(str);
|
|
234
224
|
/* create tmpbuf to keep the pointer before xmalloc */
|
|
235
|
-
imemo =
|
|
225
|
+
imemo = rb_imemo_tmpbuf_new();
|
|
236
226
|
tmpbuf = (rb_imemo_tmpbuf_t *)imemo;
|
|
237
227
|
len = RSTRING_LEN(str);
|
|
238
228
|
src = RSTRING_PTR(str);
|
|
@@ -254,4 +244,79 @@ MEMO_V2_SET(struct MEMO *m, VALUE v)
|
|
|
254
244
|
RB_OBJ_WRITE(m, &m->v2, v);
|
|
255
245
|
}
|
|
256
246
|
|
|
247
|
+
struct rb_fields {
|
|
248
|
+
struct RBasic basic;
|
|
249
|
+
union {
|
|
250
|
+
struct {
|
|
251
|
+
VALUE fields[1];
|
|
252
|
+
} embed;
|
|
253
|
+
struct {
|
|
254
|
+
VALUE *ptr;
|
|
255
|
+
} external;
|
|
256
|
+
struct {
|
|
257
|
+
// Note: the st_table could be embedded, but complex T_CLASS should be rare to
|
|
258
|
+
// non-existent, so not really worth the trouble.
|
|
259
|
+
st_table *table;
|
|
260
|
+
} complex;
|
|
261
|
+
} as;
|
|
262
|
+
};
|
|
263
|
+
|
|
264
|
+
// IMEMO/fields and T_OBJECT have exactly the same layout.
|
|
265
|
+
// This is useful for JIT and common codepaths.
|
|
266
|
+
#define OBJ_FIELD_HEAP ROBJECT_HEAP
|
|
267
|
+
STATIC_ASSERT(imemo_fields_flags, OBJ_FIELD_HEAP == IMEMO_FL_USER0);
|
|
268
|
+
STATIC_ASSERT(imemo_fields_embed_offset, offsetof(struct RObject, as.ary) == offsetof(struct rb_fields, as.embed.fields));
|
|
269
|
+
STATIC_ASSERT(imemo_fields_embed_offset, offsetof(struct RObject, as.heap.fields) == offsetof(struct rb_fields, as.external.ptr));
|
|
270
|
+
STATIC_ASSERT(imemo_fields_embed_offset, offsetof(struct RObject, as.heap.fields) == offsetof(struct rb_fields, as.complex.table));
|
|
271
|
+
|
|
272
|
+
#define IMEMO_OBJ_FIELDS(fields) ((struct rb_fields *)fields)
|
|
273
|
+
|
|
274
|
+
VALUE rb_imemo_fields_new(VALUE owner, size_t capa, bool shareable);
|
|
275
|
+
VALUE rb_imemo_fields_new_complex(VALUE owner, size_t capa, bool shareable);
|
|
276
|
+
VALUE rb_imemo_fields_new_complex_tbl(VALUE owner, st_table *tbl, bool shareable);
|
|
277
|
+
VALUE rb_imemo_fields_clone(VALUE fields_obj);
|
|
278
|
+
void rb_imemo_fields_clear(VALUE fields_obj);
|
|
279
|
+
|
|
280
|
+
static inline VALUE
|
|
281
|
+
rb_imemo_fields_owner(VALUE fields_obj)
|
|
282
|
+
{
|
|
283
|
+
RUBY_ASSERT(IMEMO_TYPE_P(fields_obj, imemo_fields));
|
|
284
|
+
|
|
285
|
+
return CLASS_OF(fields_obj);
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
static inline VALUE *
|
|
289
|
+
rb_imemo_fields_ptr(VALUE fields_obj)
|
|
290
|
+
{
|
|
291
|
+
if (!fields_obj) {
|
|
292
|
+
return NULL;
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
RUBY_ASSERT(IMEMO_TYPE_P(fields_obj, imemo_fields) || RB_TYPE_P(fields_obj, T_OBJECT));
|
|
296
|
+
|
|
297
|
+
if (UNLIKELY(FL_TEST_RAW(fields_obj, OBJ_FIELD_HEAP))) {
|
|
298
|
+
return IMEMO_OBJ_FIELDS(fields_obj)->as.external.ptr;
|
|
299
|
+
}
|
|
300
|
+
else {
|
|
301
|
+
return IMEMO_OBJ_FIELDS(fields_obj)->as.embed.fields;
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
static inline st_table *
|
|
306
|
+
rb_imemo_fields_complex_tbl(VALUE fields_obj)
|
|
307
|
+
{
|
|
308
|
+
if (!fields_obj) {
|
|
309
|
+
return NULL;
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
RUBY_ASSERT(IMEMO_TYPE_P(fields_obj, imemo_fields) || RB_TYPE_P(fields_obj, T_OBJECT));
|
|
313
|
+
RUBY_ASSERT(FL_TEST_RAW(fields_obj, OBJ_FIELD_HEAP));
|
|
314
|
+
|
|
315
|
+
// Some codepaths unconditionally access the fields_ptr, and assume it can be used as st_table if the
|
|
316
|
+
// shape is too_complex.
|
|
317
|
+
RUBY_ASSERT((st_table *)rb_imemo_fields_ptr(fields_obj) == IMEMO_OBJ_FIELDS(fields_obj)->as.complex.table);
|
|
318
|
+
|
|
319
|
+
return IMEMO_OBJ_FIELDS(fields_obj)->as.complex.table;
|
|
320
|
+
}
|
|
321
|
+
|
|
257
322
|
#endif /* INTERNAL_IMEMO_H */
|
|
@@ -14,10 +14,21 @@
|
|
|
14
14
|
struct rb_io;
|
|
15
15
|
|
|
16
16
|
#include "ruby/io.h" /* for rb_io_t */
|
|
17
|
+
#include "ccan/list/list.h"
|
|
18
|
+
#include "serial.h"
|
|
17
19
|
|
|
18
20
|
#define IO_WITHOUT_GVL(func, arg) rb_nogvl(func, arg, RUBY_UBF_IO, 0, RB_NOGVL_OFFLOAD_SAFE)
|
|
19
21
|
#define IO_WITHOUT_GVL_INT(func, arg) (int)(VALUE)IO_WITHOUT_GVL(func, arg)
|
|
20
22
|
|
|
23
|
+
// Represents an in-flight blocking operation:
|
|
24
|
+
struct rb_io_blocking_operation {
|
|
25
|
+
// The linked list data structure.
|
|
26
|
+
struct ccan_list_node list;
|
|
27
|
+
|
|
28
|
+
// The execution context of the blocking operation.
|
|
29
|
+
struct rb_execution_context_struct *ec;
|
|
30
|
+
};
|
|
31
|
+
|
|
21
32
|
/** Ruby's IO, metadata and buffers. */
|
|
22
33
|
struct rb_io {
|
|
23
34
|
|
|
@@ -111,6 +122,18 @@ struct rb_io {
|
|
|
111
122
|
* The timeout associated with this IO when performing blocking operations.
|
|
112
123
|
*/
|
|
113
124
|
VALUE timeout;
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* Threads that are performing a blocking operation without the GVL using
|
|
128
|
+
* this IO. On calling IO#close, these threads will be interrupted so that
|
|
129
|
+
* the operation can be cancelled.
|
|
130
|
+
*/
|
|
131
|
+
struct ccan_list_head blocking_operations;
|
|
132
|
+
struct rb_execution_context_struct *closing_ec;
|
|
133
|
+
VALUE wakeup_mutex;
|
|
134
|
+
|
|
135
|
+
// The fork generation of the blocking operations list.
|
|
136
|
+
rb_serial_t fork_generation;
|
|
114
137
|
};
|
|
115
138
|
|
|
116
139
|
/* io.c */
|
|
@@ -119,17 +142,14 @@ void rb_stdio_set_default_encoding(void);
|
|
|
119
142
|
VALUE rb_io_flush_raw(VALUE, int);
|
|
120
143
|
size_t rb_io_memsize(const rb_io_t *);
|
|
121
144
|
int rb_stderr_tty_p(void);
|
|
122
|
-
void rb_io_fptr_finalize_internal(void *ptr);
|
|
123
|
-
#ifdef rb_io_fptr_finalize
|
|
124
|
-
# undef rb_io_fptr_finalize
|
|
125
|
-
#endif
|
|
126
|
-
#define rb_io_fptr_finalize rb_io_fptr_finalize_internal
|
|
127
145
|
VALUE rb_io_popen(VALUE pname, VALUE pmode, VALUE env, VALUE opt);
|
|
128
146
|
|
|
129
147
|
VALUE rb_io_prep_stdin(void);
|
|
130
148
|
VALUE rb_io_prep_stdout(void);
|
|
131
149
|
VALUE rb_io_prep_stderr(void);
|
|
132
150
|
|
|
151
|
+
int rb_io_notify_close(struct rb_io *fptr);
|
|
152
|
+
|
|
133
153
|
RUBY_SYMBOL_EXPORT_BEGIN
|
|
134
154
|
/* io.c (export) */
|
|
135
155
|
void rb_maygvl_fd_fix_cloexec(int fd);
|
|
@@ -0,0 +1,323 @@
|
|
|
1
|
+
#ifndef INTERNAL_NUMERIC_H /*-*-C-*-vi:se ft=c:*/
|
|
2
|
+
#define INTERNAL_NUMERIC_H
|
|
3
|
+
/**
|
|
4
|
+
* @author Ruby developers <ruby-core@ruby-lang.org>
|
|
5
|
+
* @copyright This file is a part of the programming language Ruby.
|
|
6
|
+
* Permission is hereby granted, to either redistribute and/or
|
|
7
|
+
* modify this file, provided that the conditions mentioned in the
|
|
8
|
+
* file COPYING are met. Consult the file for details.
|
|
9
|
+
* @brief Internal header for Numeric.
|
|
10
|
+
*/
|
|
11
|
+
#include "internal/bignum.h" /* for BIGNUM_POSITIVE_P */
|
|
12
|
+
#include "internal/bits.h" /* for RUBY_BIT_ROTL */
|
|
13
|
+
#include "internal/fixnum.h" /* for FIXNUM_POSITIVE_P */
|
|
14
|
+
#include "internal/vm.h" /* for rb_method_basic_definition_p */
|
|
15
|
+
#include "ruby/intern.h" /* for rb_cmperr */
|
|
16
|
+
#include "ruby/ruby.h" /* for USE_FLONUM */
|
|
17
|
+
|
|
18
|
+
#define ROUND_TO(mode, even, up, down) \
|
|
19
|
+
((mode) == RUBY_NUM_ROUND_HALF_EVEN ? even : \
|
|
20
|
+
(mode) == RUBY_NUM_ROUND_HALF_UP ? up : down)
|
|
21
|
+
#define ROUND_FUNC(mode, name) \
|
|
22
|
+
ROUND_TO(mode, name##_half_even, name##_half_up, name##_half_down)
|
|
23
|
+
#define ROUND_CALL(mode, name, args) \
|
|
24
|
+
ROUND_TO(mode, name##_half_even args, \
|
|
25
|
+
name##_half_up args, name##_half_down args)
|
|
26
|
+
|
|
27
|
+
#ifndef ROUND_DEFAULT
|
|
28
|
+
# define ROUND_DEFAULT RUBY_NUM_ROUND_HALF_UP
|
|
29
|
+
#endif
|
|
30
|
+
|
|
31
|
+
enum ruby_num_rounding_mode {
|
|
32
|
+
RUBY_NUM_ROUND_HALF_UP,
|
|
33
|
+
RUBY_NUM_ROUND_HALF_EVEN,
|
|
34
|
+
RUBY_NUM_ROUND_HALF_DOWN,
|
|
35
|
+
RUBY_NUM_ROUND_DEFAULT = ROUND_DEFAULT,
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
/* same as internal.h */
|
|
39
|
+
#define numberof(array) ((int)(sizeof(array) / sizeof((array)[0])))
|
|
40
|
+
#define roomof(x, y) (((x) + (y) - 1) / (y))
|
|
41
|
+
#define type_roomof(x, y) roomof(sizeof(x), sizeof(y))
|
|
42
|
+
|
|
43
|
+
#if SIZEOF_DOUBLE <= SIZEOF_VALUE
|
|
44
|
+
typedef double rb_float_value_type;
|
|
45
|
+
#else
|
|
46
|
+
typedef struct {
|
|
47
|
+
VALUE values[roomof(SIZEOF_DOUBLE, SIZEOF_VALUE)];
|
|
48
|
+
} rb_float_value_type;
|
|
49
|
+
#endif
|
|
50
|
+
|
|
51
|
+
struct RFloat {
|
|
52
|
+
struct RBasic basic;
|
|
53
|
+
rb_float_value_type float_value;
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
#define RFLOAT(obj) ((struct RFloat *)(obj))
|
|
57
|
+
|
|
58
|
+
/* numeric.c */
|
|
59
|
+
int rb_num_to_uint(VALUE val, unsigned int *ret);
|
|
60
|
+
VALUE ruby_num_interval_step_size(VALUE from, VALUE to, VALUE step, int excl);
|
|
61
|
+
double ruby_float_step_size(double beg, double end, double unit, int excl);
|
|
62
|
+
int ruby_float_step(VALUE from, VALUE to, VALUE step, int excl, int allow_endless);
|
|
63
|
+
int rb_num_negative_p(VALUE);
|
|
64
|
+
VALUE rb_int_succ(VALUE num);
|
|
65
|
+
VALUE rb_float_uminus(VALUE num);
|
|
66
|
+
VALUE rb_int_plus(VALUE x, VALUE y);
|
|
67
|
+
VALUE rb_float_plus(VALUE x, VALUE y);
|
|
68
|
+
VALUE rb_int_minus(VALUE x, VALUE y);
|
|
69
|
+
VALUE rb_float_minus(VALUE x, VALUE y);
|
|
70
|
+
VALUE rb_int_mul(VALUE x, VALUE y);
|
|
71
|
+
VALUE rb_float_mul(VALUE x, VALUE y);
|
|
72
|
+
VALUE rb_float_div(VALUE x, VALUE y);
|
|
73
|
+
VALUE rb_int_idiv(VALUE x, VALUE y);
|
|
74
|
+
VALUE rb_int_modulo(VALUE x, VALUE y);
|
|
75
|
+
VALUE rb_int2str(VALUE num, int base);
|
|
76
|
+
VALUE rb_fix_plus(VALUE x, VALUE y);
|
|
77
|
+
VALUE rb_int_gt(VALUE x, VALUE y);
|
|
78
|
+
VALUE rb_float_gt(VALUE x, VALUE y);
|
|
79
|
+
VALUE rb_int_ge(VALUE x, VALUE y);
|
|
80
|
+
enum ruby_num_rounding_mode rb_num_get_rounding_option(VALUE opts);
|
|
81
|
+
double rb_int_fdiv_double(VALUE x, VALUE y);
|
|
82
|
+
VALUE rb_int_pow(VALUE x, VALUE y);
|
|
83
|
+
VALUE rb_float_pow(VALUE x, VALUE y);
|
|
84
|
+
VALUE rb_int_cmp(VALUE x, VALUE y);
|
|
85
|
+
VALUE rb_int_equal(VALUE x, VALUE y);
|
|
86
|
+
VALUE rb_int_divmod(VALUE x, VALUE y);
|
|
87
|
+
VALUE rb_int_and(VALUE x, VALUE y);
|
|
88
|
+
VALUE rb_int_xor(VALUE x, VALUE y);
|
|
89
|
+
VALUE rb_int_lshift(VALUE x, VALUE y);
|
|
90
|
+
VALUE rb_int_rshift(VALUE x, VALUE y);
|
|
91
|
+
VALUE rb_int_div(VALUE x, VALUE y);
|
|
92
|
+
int rb_int_positive_p(VALUE num);
|
|
93
|
+
int rb_int_negative_p(VALUE num);
|
|
94
|
+
VALUE rb_check_integer_type(VALUE);
|
|
95
|
+
VALUE rb_num_pow(VALUE x, VALUE y);
|
|
96
|
+
VALUE rb_float_ceil(VALUE num, int ndigits);
|
|
97
|
+
VALUE rb_float_floor(VALUE x, int ndigits);
|
|
98
|
+
VALUE rb_float_abs(VALUE flt);
|
|
99
|
+
static inline VALUE rb_num_compare_with_zero(VALUE num, ID mid);
|
|
100
|
+
static inline int rb_num_positive_int_p(VALUE num);
|
|
101
|
+
static inline int rb_num_negative_int_p(VALUE num);
|
|
102
|
+
static inline double rb_float_flonum_value(VALUE v);
|
|
103
|
+
static inline double rb_float_noflonum_value(VALUE v);
|
|
104
|
+
static inline double rb_float_value_inline(VALUE v);
|
|
105
|
+
static inline VALUE rb_float_new_inline(double d);
|
|
106
|
+
static inline bool INT_POSITIVE_P(VALUE num);
|
|
107
|
+
static inline bool INT_NEGATIVE_P(VALUE num);
|
|
108
|
+
static inline bool FLOAT_ZERO_P(VALUE num);
|
|
109
|
+
#define rb_float_value rb_float_value_inline
|
|
110
|
+
#define rb_float_new rb_float_new_inline
|
|
111
|
+
|
|
112
|
+
RUBY_SYMBOL_EXPORT_BEGIN
|
|
113
|
+
/* numeric.c (export) */
|
|
114
|
+
RUBY_SYMBOL_EXPORT_END
|
|
115
|
+
|
|
116
|
+
VALUE rb_flo_div_flo(VALUE x, VALUE y);
|
|
117
|
+
double ruby_float_mod(double x, double y);
|
|
118
|
+
VALUE rb_float_equal(VALUE x, VALUE y);
|
|
119
|
+
int rb_float_cmp(VALUE x, VALUE y);
|
|
120
|
+
VALUE rb_float_eql(VALUE x, VALUE y);
|
|
121
|
+
VALUE rb_fix_aref(VALUE fix, VALUE idx);
|
|
122
|
+
VALUE rb_int_zero_p(VALUE num);
|
|
123
|
+
VALUE rb_int_even_p(VALUE num);
|
|
124
|
+
VALUE rb_int_odd_p(VALUE num);
|
|
125
|
+
VALUE rb_int_abs(VALUE num);
|
|
126
|
+
VALUE rb_int_bit_length(VALUE num);
|
|
127
|
+
VALUE rb_int_uminus(VALUE num);
|
|
128
|
+
VALUE rb_int_comp(VALUE num);
|
|
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
|
+
|
|
178
|
+
static inline bool
|
|
179
|
+
INT_POSITIVE_P(VALUE num)
|
|
180
|
+
{
|
|
181
|
+
if (FIXNUM_P(num)) {
|
|
182
|
+
return FIXNUM_POSITIVE_P(num);
|
|
183
|
+
}
|
|
184
|
+
else {
|
|
185
|
+
return BIGNUM_POSITIVE_P(num);
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
static inline bool
|
|
190
|
+
INT_NEGATIVE_P(VALUE num)
|
|
191
|
+
{
|
|
192
|
+
if (FIXNUM_P(num)) {
|
|
193
|
+
return FIXNUM_NEGATIVE_P(num);
|
|
194
|
+
}
|
|
195
|
+
else {
|
|
196
|
+
return BIGNUM_NEGATIVE_P(num);
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
static inline bool
|
|
201
|
+
FLOAT_ZERO_P(VALUE num)
|
|
202
|
+
{
|
|
203
|
+
return RFLOAT_VALUE(num) == 0.0;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
static inline VALUE
|
|
207
|
+
rb_num_compare_with_zero(VALUE num, ID mid)
|
|
208
|
+
{
|
|
209
|
+
VALUE zero = INT2FIX(0);
|
|
210
|
+
VALUE r = rb_check_funcall(num, mid, 1, &zero);
|
|
211
|
+
if (RB_UNDEF_P(r)) {
|
|
212
|
+
rb_cmperr(num, zero);
|
|
213
|
+
}
|
|
214
|
+
return r;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
static inline int
|
|
218
|
+
rb_num_positive_int_p(VALUE num)
|
|
219
|
+
{
|
|
220
|
+
const ID mid = '>';
|
|
221
|
+
|
|
222
|
+
if (FIXNUM_P(num)) {
|
|
223
|
+
if (rb_method_basic_definition_p(rb_cInteger, mid))
|
|
224
|
+
return FIXNUM_POSITIVE_P(num);
|
|
225
|
+
}
|
|
226
|
+
else if (RB_TYPE_P(num, T_BIGNUM)) {
|
|
227
|
+
if (rb_method_basic_definition_p(rb_cInteger, mid))
|
|
228
|
+
return BIGNUM_POSITIVE_P(num);
|
|
229
|
+
}
|
|
230
|
+
return RTEST(rb_num_compare_with_zero(num, mid));
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
static inline int
|
|
234
|
+
rb_num_negative_int_p(VALUE num)
|
|
235
|
+
{
|
|
236
|
+
const ID mid = '<';
|
|
237
|
+
|
|
238
|
+
if (FIXNUM_P(num)) {
|
|
239
|
+
if (rb_method_basic_definition_p(rb_cInteger, mid))
|
|
240
|
+
return FIXNUM_NEGATIVE_P(num);
|
|
241
|
+
}
|
|
242
|
+
else if (RB_TYPE_P(num, T_BIGNUM)) {
|
|
243
|
+
if (rb_method_basic_definition_p(rb_cInteger, mid))
|
|
244
|
+
return BIGNUM_NEGATIVE_P(num);
|
|
245
|
+
}
|
|
246
|
+
return RTEST(rb_num_compare_with_zero(num, mid));
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
static inline double
|
|
250
|
+
rb_float_flonum_value(VALUE v)
|
|
251
|
+
{
|
|
252
|
+
#if USE_FLONUM
|
|
253
|
+
if (v != (VALUE)0x8000000000000002) { /* LIKELY */
|
|
254
|
+
union {
|
|
255
|
+
double d;
|
|
256
|
+
VALUE v;
|
|
257
|
+
} t;
|
|
258
|
+
|
|
259
|
+
VALUE b63 = (v >> 63);
|
|
260
|
+
/* e: xx1... -> 011... */
|
|
261
|
+
/* xx0... -> 100... */
|
|
262
|
+
/* ^b63 */
|
|
263
|
+
t.v = RUBY_BIT_ROTR((2 - b63) | (v & ~(VALUE)0x03), 3);
|
|
264
|
+
return t.d;
|
|
265
|
+
}
|
|
266
|
+
#endif
|
|
267
|
+
return 0.0;
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
static inline double
|
|
271
|
+
rb_float_noflonum_value(VALUE v)
|
|
272
|
+
{
|
|
273
|
+
#if SIZEOF_DOUBLE <= SIZEOF_VALUE
|
|
274
|
+
return RFLOAT(v)->float_value;
|
|
275
|
+
#else
|
|
276
|
+
union {
|
|
277
|
+
rb_float_value_type v;
|
|
278
|
+
double d;
|
|
279
|
+
} u = {RFLOAT(v)->float_value};
|
|
280
|
+
return u.d;
|
|
281
|
+
#endif
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
static inline double
|
|
285
|
+
rb_float_value_inline(VALUE v)
|
|
286
|
+
{
|
|
287
|
+
if (FLONUM_P(v)) {
|
|
288
|
+
return rb_float_flonum_value(v);
|
|
289
|
+
}
|
|
290
|
+
return rb_float_noflonum_value(v);
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
static inline VALUE
|
|
294
|
+
rb_float_new_inline(double d)
|
|
295
|
+
{
|
|
296
|
+
#if USE_FLONUM
|
|
297
|
+
union {
|
|
298
|
+
double d;
|
|
299
|
+
VALUE v;
|
|
300
|
+
} t;
|
|
301
|
+
int bits;
|
|
302
|
+
|
|
303
|
+
t.d = d;
|
|
304
|
+
bits = (int)((VALUE)(t.v >> 60) & 0x7);
|
|
305
|
+
/* bits contains 3 bits of b62..b60. */
|
|
306
|
+
/* bits - 3 = */
|
|
307
|
+
/* b011 -> b000 */
|
|
308
|
+
/* b100 -> b001 */
|
|
309
|
+
|
|
310
|
+
if (t.v != 0x3000000000000000 /* 1.72723e-77 */ &&
|
|
311
|
+
!((bits-3) & ~0x01)) {
|
|
312
|
+
return (RUBY_BIT_ROTL(t.v, 3) & ~(VALUE)0x01) | 0x02;
|
|
313
|
+
}
|
|
314
|
+
else if (t.v == (VALUE)0) {
|
|
315
|
+
/* +0.0 */
|
|
316
|
+
return 0x8000000000000002;
|
|
317
|
+
}
|
|
318
|
+
/* out of range */
|
|
319
|
+
#endif
|
|
320
|
+
return rb_float_new_in_heap(d);
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
#endif /* INTERNAL_NUMERIC_H */
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
#include "ruby/ruby.h" /* for VALUE */
|
|
12
12
|
|
|
13
13
|
/* object.c */
|
|
14
|
-
size_t rb_obj_embedded_size(uint32_t
|
|
14
|
+
size_t rb_obj_embedded_size(uint32_t fields_count);
|
|
15
15
|
VALUE rb_class_allocate_instance(VALUE klass);
|
|
16
16
|
VALUE rb_class_search_ancestor(VALUE klass, VALUE super);
|
|
17
17
|
NORETURN(void rb_undefined_alloc(VALUE klass));
|
|
@@ -25,4 +25,9 @@ int rb_match_count(VALUE match);
|
|
|
25
25
|
VALUE rb_reg_new_ary(VALUE ary, int options);
|
|
26
26
|
VALUE rb_reg_last_defined(VALUE match);
|
|
27
27
|
|
|
28
|
+
#define ARG_REG_OPTION_MASK \
|
|
29
|
+
(ONIG_OPTION_IGNORECASE|ONIG_OPTION_MULTILINE|ONIG_OPTION_EXTEND)
|
|
30
|
+
#define ARG_ENCODING_FIXED 16
|
|
31
|
+
#define ARG_ENCODING_NONE 32
|
|
32
|
+
|
|
28
33
|
#endif /* INTERNAL_RE_H */
|
data/lib/datadog/ruby_core_source/{ruby-3.5.0-preview1 → ruby-4.0.0-p0}/internal/sanitizers.h
RENAMED
|
@@ -29,6 +29,13 @@
|
|
|
29
29
|
# endif
|
|
30
30
|
#endif
|
|
31
31
|
|
|
32
|
+
#ifdef HAVE_SANITIZER_TSAN_INTERFACE_H
|
|
33
|
+
# if __has_feature(thread_sanitizer) || defined(__SANITIZE_THREAD__)
|
|
34
|
+
# define RUBY_TSAN_ENABLED
|
|
35
|
+
# include <sanitizer/tsan_interface.h>
|
|
36
|
+
# endif
|
|
37
|
+
#endif
|
|
38
|
+
|
|
32
39
|
#include "ruby/internal/stdbool.h" /* for bool */
|
|
33
40
|
#include "ruby/ruby.h" /* for VALUE */
|
|
34
41
|
|
|
@@ -42,6 +49,9 @@
|
|
|
42
49
|
#elif defined(RUBY_MSAN_ENABLED)
|
|
43
50
|
# define ATTRIBUTE_NO_ADDRESS_SAFETY_ANALYSIS(x) \
|
|
44
51
|
__attribute__((__no_sanitize__("memory"), __noinline__)) x
|
|
52
|
+
#elif defined(RUBY_TSAN_ENABLED)
|
|
53
|
+
# define ATTRIBUTE_NO_ADDRESS_SAFETY_ANALYSIS(x) \
|
|
54
|
+
__attribute__((__no_sanitize__("thread"), __noinline__)) x
|
|
45
55
|
#elif defined(NO_SANITIZE_ADDRESS)
|
|
46
56
|
# define ATTRIBUTE_NO_ADDRESS_SAFETY_ANALYSIS(x) \
|
|
47
57
|
NO_SANITIZE_ADDRESS(NOINLINE(x))
|
|
@@ -127,6 +137,7 @@ asan_poison_memory_region(const volatile void *ptr, size_t size)
|
|
|
127
137
|
#define asan_poison_object_if(ptr, obj) ((void)(ptr), (void)(obj))
|
|
128
138
|
#endif
|
|
129
139
|
|
|
140
|
+
#ifdef RUBY_ASAN_ENABLED
|
|
130
141
|
RUBY_SYMBOL_EXPORT_BEGIN
|
|
131
142
|
/**
|
|
132
143
|
* This is a variant of asan_poison_memory_region that takes a VALUE.
|
|
@@ -153,6 +164,11 @@ void *rb_asan_poisoned_object_p(VALUE obj);
|
|
|
153
164
|
void rb_asan_unpoison_object(VALUE obj, bool newobj_p);
|
|
154
165
|
|
|
155
166
|
RUBY_SYMBOL_EXPORT_END
|
|
167
|
+
#else
|
|
168
|
+
# define rb_asan_poison_object(obj) ((void)obj)
|
|
169
|
+
# define rb_asan_poisoned_object_p(obj) ((void)obj, NULL)
|
|
170
|
+
# define rb_asan_unpoison_object(obj, newobj_p) ((void)obj, (void)newobj_p)
|
|
171
|
+
#endif
|
|
156
172
|
|
|
157
173
|
/**
|
|
158
174
|
* This function asserts that a (formally poisoned) memory region from ptr to
|