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
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
#ifndef RUBY_RACTOR_SAFE_TABLE_H
|
|
2
|
+
#define RUBY_RACTOR_SAFE_TABLE_H
|
|
3
|
+
|
|
4
|
+
#include "ruby/atomic.h"
|
|
5
|
+
#include "ruby/ruby.h"
|
|
6
|
+
|
|
7
|
+
struct rb_concurrent_set_funcs {
|
|
8
|
+
VALUE (*hash)(VALUE key);
|
|
9
|
+
bool (*cmp)(VALUE a, VALUE b);
|
|
10
|
+
VALUE (*create)(VALUE key, void *data);
|
|
11
|
+
void (*free)(VALUE key);
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
VALUE rb_concurrent_set_new(const struct rb_concurrent_set_funcs *funcs, int capacity);
|
|
15
|
+
rb_atomic_t rb_concurrent_set_size(VALUE set_obj);
|
|
16
|
+
VALUE rb_concurrent_set_find(VALUE *set_obj_ptr, VALUE key);
|
|
17
|
+
VALUE rb_concurrent_set_find_or_insert(VALUE *set_obj_ptr, VALUE key, void *data);
|
|
18
|
+
VALUE rb_concurrent_set_delete_by_identity(VALUE set_obj, VALUE key);
|
|
19
|
+
void rb_concurrent_set_foreach_with_replace(VALUE set_obj, int (*callback)(VALUE *key, void *data), void *data);
|
|
20
|
+
|
|
21
|
+
#endif
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
#ifndef INTERNAL_CONT_H /*-*-C-*-vi:se ft=c:*/
|
|
2
|
+
#define INTERNAL_CONT_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 Fiber.
|
|
10
|
+
*/
|
|
11
|
+
#include "ruby/ruby.h" /* for VALUE */
|
|
12
|
+
#include "iseq.h"
|
|
13
|
+
|
|
14
|
+
struct rb_thread_struct; /* in vm_core.h */
|
|
15
|
+
struct rb_fiber_struct; /* in cont.c */
|
|
16
|
+
struct rb_execution_context_struct; /* in vm_core.c */
|
|
17
|
+
|
|
18
|
+
/* cont.c */
|
|
19
|
+
void rb_fiber_reset_root_local_storage(struct rb_thread_struct *);
|
|
20
|
+
void ruby_register_rollback_func_for_ensure(VALUE (*ensure_func)(VALUE), VALUE (*rollback_func)(VALUE));
|
|
21
|
+
void rb_jit_cont_init(void);
|
|
22
|
+
void rb_jit_cont_each_iseq(rb_iseq_callback callback, void *data);
|
|
23
|
+
void rb_jit_cont_finish(void);
|
|
24
|
+
|
|
25
|
+
/* vm.c */
|
|
26
|
+
void rb_free_shared_fiber_pool(void);
|
|
27
|
+
|
|
28
|
+
// Copy locals from the current execution to the specified fiber.
|
|
29
|
+
VALUE rb_fiber_inherit_storage(struct rb_execution_context_struct *ec, struct rb_fiber_struct *fiber);
|
|
30
|
+
|
|
31
|
+
VALUE rb_fiberptr_self(struct rb_fiber_struct *fiber);
|
|
32
|
+
unsigned int rb_fiberptr_blocking(struct rb_fiber_struct *fiber);
|
|
33
|
+
struct rb_execution_context_struct * rb_fiberptr_get_ec(struct rb_fiber_struct *fiber);
|
|
34
|
+
#endif /* INTERNAL_CONT_H */
|
|
@@ -11,7 +11,6 @@
|
|
|
11
11
|
#include "ruby/ruby.h" /* for ID */
|
|
12
12
|
#include "ruby/encoding.h" /* for rb_encoding */
|
|
13
13
|
|
|
14
|
-
#define rb_enc_autoload_p(enc) (!rb_enc_mbmaxlen(enc))
|
|
15
14
|
#define rb_is_usascii_enc(enc) ((enc) == rb_usascii_encoding())
|
|
16
15
|
#define rb_is_ascii8bit_enc(enc) ((enc) == rb_ascii8bit_encoding())
|
|
17
16
|
#define rb_is_locale_enc(enc) ((enc) == rb_locale_encoding())
|
|
@@ -24,11 +23,13 @@ rb_encoding *rb_enc_check_str(VALUE str1, VALUE str2);
|
|
|
24
23
|
int rb_encdb_replicate(const char *alias, const char *orig);
|
|
25
24
|
int rb_encdb_alias(const char *alias, const char *orig);
|
|
26
25
|
int rb_enc_autoload(rb_encoding *enc);
|
|
26
|
+
bool rb_enc_autoload_p(rb_encoding *enc);
|
|
27
27
|
int rb_encdb_dummy(const char *name);
|
|
28
28
|
void rb_encdb_declare(const char *name);
|
|
29
29
|
void rb_enc_set_base(const char *name, const char *orig);
|
|
30
30
|
int rb_enc_set_dummy(int index);
|
|
31
31
|
void rb_enc_raw_set(VALUE obj, rb_encoding *enc);
|
|
32
|
+
int rb_enc_registered(const char *name);
|
|
32
33
|
|
|
33
34
|
PUREFUNC(int rb_data_is_encoding(VALUE obj));
|
|
34
35
|
|
|
@@ -241,4 +241,11 @@ rb_typeddata_is_instance_of_inline(VALUE obj, const rb_data_type_t *data_type)
|
|
|
241
241
|
return RB_TYPE_P(obj, T_DATA) && RTYPEDDATA_P(obj) && (RTYPEDDATA_TYPE(obj) == data_type);
|
|
242
242
|
}
|
|
243
243
|
|
|
244
|
+
typedef enum {
|
|
245
|
+
rb_stack_overflow_prevention = 0, // VM stack overflow or about to machine stack overflow
|
|
246
|
+
rb_stack_overflow_signal = 1, // machine stack overflow but may be recoverable
|
|
247
|
+
rb_stack_overflow_fatal = 2, // fatal machine stack overflow
|
|
248
|
+
} ruby_stack_overflow_critical_level;
|
|
249
|
+
NORETURN(void rb_ec_stack_overflow(struct rb_execution_context_struct *ec, ruby_stack_overflow_critical_level crit));
|
|
250
|
+
|
|
244
251
|
#endif /* INTERNAL_ERROR_H */
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
#ifndef INTERNAL_EVAL_H /*-*-C-*-vi:se ft=c:*/
|
|
2
|
+
#define INTERNAL_EVAL_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 the evaluator.
|
|
10
|
+
* @note There also is eval_intern.h, which is evaluator's internal
|
|
11
|
+
* header (related to this file, but not the same role).
|
|
12
|
+
*/
|
|
13
|
+
#include "ruby/ruby.h" /* for ID */
|
|
14
|
+
#include "vm_core.h" /* for ID */
|
|
15
|
+
|
|
16
|
+
#define id_signo ruby_static_id_signo
|
|
17
|
+
#define id_status ruby_static_id_status
|
|
18
|
+
|
|
19
|
+
/* eval.c */
|
|
20
|
+
struct rb_refinements_data {
|
|
21
|
+
VALUE refinement;
|
|
22
|
+
VALUE refinements;
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
extern ID ruby_static_id_signo;
|
|
26
|
+
extern ID ruby_static_id_status;
|
|
27
|
+
VALUE rb_refinement_module_get_refined_class(VALUE module);
|
|
28
|
+
void rb_class_modify_check(VALUE);
|
|
29
|
+
NORETURN(VALUE rb_f_raise(int argc, VALUE *argv));
|
|
30
|
+
VALUE rb_exception_setup(int argc, VALUE *argv);
|
|
31
|
+
void rb_refinement_setup(struct rb_refinements_data *data, VALUE module, VALUE klass);
|
|
32
|
+
void rb_vm_using_module(VALUE module);
|
|
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);
|
|
35
|
+
|
|
36
|
+
/* eval_error.c */
|
|
37
|
+
VALUE rb_get_backtrace(VALUE info);
|
|
38
|
+
|
|
39
|
+
/* eval_jump.c */
|
|
40
|
+
void rb_call_end_proc(VALUE data);
|
|
41
|
+
void rb_mark_end_proc(void);
|
|
42
|
+
|
|
43
|
+
#endif /* INTERNAL_EVAL_H */
|
|
@@ -0,0 +1,360 @@
|
|
|
1
|
+
#ifndef INTERNAL_GC_H /*-*-C-*-vi:se ft=c:*/
|
|
2
|
+
#define INTERNAL_GC_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 GC.
|
|
10
|
+
*/
|
|
11
|
+
#include "ruby/internal/config.h"
|
|
12
|
+
|
|
13
|
+
#include <stddef.h> /* for size_t */
|
|
14
|
+
|
|
15
|
+
#include "internal/compilers.h" /* for __has_attribute */
|
|
16
|
+
#include "ruby/ruby.h" /* for rb_event_flag_t */
|
|
17
|
+
#include "vm_core.h" /* for GET_EC() */
|
|
18
|
+
|
|
19
|
+
#ifndef USE_MODULAR_GC
|
|
20
|
+
# define USE_MODULAR_GC 0
|
|
21
|
+
#endif
|
|
22
|
+
|
|
23
|
+
#if defined(__x86_64__) && !defined(_ILP32) && defined(__GNUC__)
|
|
24
|
+
#define SET_MACHINE_STACK_END(p) __asm__ __volatile__ ("movq\t%%rsp, %0" : "=r" (*(p)))
|
|
25
|
+
#elif defined(__i386) && defined(__GNUC__)
|
|
26
|
+
#define SET_MACHINE_STACK_END(p) __asm__ __volatile__ ("movl\t%%esp, %0" : "=r" (*(p)))
|
|
27
|
+
#elif (defined(__powerpc__) || defined(__powerpc64__)) && defined(__GNUC__) && !defined(_AIX) && !defined(__APPLE__) // Not Apple is NEEDED to unbreak ppc64 build on Darwin. Don't ask.
|
|
28
|
+
#define SET_MACHINE_STACK_END(p) __asm__ __volatile__ ("mr\t%0, %%r1" : "=r" (*(p)))
|
|
29
|
+
#elif (defined(__powerpc__) || defined(__powerpc64__)) && defined(__GNUC__) && defined(_AIX)
|
|
30
|
+
#define SET_MACHINE_STACK_END(p) __asm__ __volatile__ ("mr %0,1" : "=r" (*(p)))
|
|
31
|
+
#elif defined(__POWERPC__) && defined(__APPLE__) // Darwin ppc and ppc64
|
|
32
|
+
#define SET_MACHINE_STACK_END(p) __asm__ volatile("mr %0, r1" : "=r" (*(p)))
|
|
33
|
+
#elif defined(__aarch64__) && defined(__GNUC__)
|
|
34
|
+
#define SET_MACHINE_STACK_END(p) __asm__ __volatile__ ("mov\t%0, sp" : "=r" (*(p)))
|
|
35
|
+
#else
|
|
36
|
+
NOINLINE(void rb_gc_set_stack_end(VALUE **stack_end_p));
|
|
37
|
+
#define SET_MACHINE_STACK_END(p) rb_gc_set_stack_end(p)
|
|
38
|
+
#define USE_CONSERVATIVE_STACK_END
|
|
39
|
+
#endif
|
|
40
|
+
|
|
41
|
+
/* for GC debug */
|
|
42
|
+
|
|
43
|
+
#ifndef RUBY_MARK_FREE_DEBUG
|
|
44
|
+
#define RUBY_MARK_FREE_DEBUG 0
|
|
45
|
+
#endif
|
|
46
|
+
|
|
47
|
+
#if RUBY_MARK_FREE_DEBUG
|
|
48
|
+
extern int ruby_gc_debug_indent;
|
|
49
|
+
|
|
50
|
+
static inline void
|
|
51
|
+
rb_gc_debug_indent(void)
|
|
52
|
+
{
|
|
53
|
+
ruby_debug_printf("%*s", ruby_gc_debug_indent, "");
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
static inline void
|
|
57
|
+
rb_gc_debug_body(const char *mode, const char *msg, int st, void *ptr)
|
|
58
|
+
{
|
|
59
|
+
if (st == 0) {
|
|
60
|
+
ruby_gc_debug_indent--;
|
|
61
|
+
}
|
|
62
|
+
rb_gc_debug_indent();
|
|
63
|
+
ruby_debug_printf("%s: %s %s (%p)\n", mode, st ? "->" : "<-", msg, ptr);
|
|
64
|
+
|
|
65
|
+
if (st) {
|
|
66
|
+
ruby_gc_debug_indent++;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
fflush(stdout);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
#define RUBY_MARK_ENTER(msg) rb_gc_debug_body("mark", (msg), 1, ptr)
|
|
73
|
+
#define RUBY_MARK_LEAVE(msg) rb_gc_debug_body("mark", (msg), 0, ptr)
|
|
74
|
+
#define RUBY_FREE_ENTER(msg) rb_gc_debug_body("free", (msg), 1, ptr)
|
|
75
|
+
#define RUBY_FREE_LEAVE(msg) rb_gc_debug_body("free", (msg), 0, ptr)
|
|
76
|
+
#define RUBY_GC_INFO rb_gc_debug_indent(), ruby_debug_printf
|
|
77
|
+
|
|
78
|
+
#else
|
|
79
|
+
#define RUBY_MARK_ENTER(msg)
|
|
80
|
+
#define RUBY_MARK_LEAVE(msg)
|
|
81
|
+
#define RUBY_FREE_ENTER(msg)
|
|
82
|
+
#define RUBY_FREE_LEAVE(msg)
|
|
83
|
+
#define RUBY_GC_INFO if(0)printf
|
|
84
|
+
#endif
|
|
85
|
+
|
|
86
|
+
#define RUBY_FREE_UNLESS_NULL(ptr) if(ptr){ruby_xfree(ptr);(ptr)=NULL;}
|
|
87
|
+
|
|
88
|
+
#if STACK_GROW_DIRECTION > 0
|
|
89
|
+
# define STACK_UPPER(x, a, b) (a)
|
|
90
|
+
#elif STACK_GROW_DIRECTION < 0
|
|
91
|
+
# define STACK_UPPER(x, a, b) (b)
|
|
92
|
+
#else
|
|
93
|
+
RUBY_EXTERN int ruby_stack_grow_direction;
|
|
94
|
+
int ruby_get_stack_grow_direction(volatile VALUE *addr);
|
|
95
|
+
# define stack_growup_p(x) ( \
|
|
96
|
+
(ruby_stack_grow_direction ? \
|
|
97
|
+
ruby_stack_grow_direction : \
|
|
98
|
+
ruby_get_stack_grow_direction(x)) > 0)
|
|
99
|
+
# define STACK_UPPER(x, a, b) (stack_growup_p(x) ? (a) : (b))
|
|
100
|
+
#endif
|
|
101
|
+
|
|
102
|
+
/*
|
|
103
|
+
STACK_GROW_DIR_DETECTION is used with STACK_DIR_UPPER.
|
|
104
|
+
|
|
105
|
+
On most normal systems, stacks grow from high address to lower address. In
|
|
106
|
+
this case, STACK_DIR_UPPER(a, b) will return (b), but on exotic systems where
|
|
107
|
+
the stack grows UP (from low address to high address), it will return (a).
|
|
108
|
+
*/
|
|
109
|
+
|
|
110
|
+
#if STACK_GROW_DIRECTION
|
|
111
|
+
#define STACK_GROW_DIR_DETECTION
|
|
112
|
+
#define STACK_DIR_UPPER(a,b) STACK_UPPER(0, (a), (b))
|
|
113
|
+
#else
|
|
114
|
+
#define STACK_GROW_DIR_DETECTION VALUE stack_grow_dir_detection
|
|
115
|
+
#define STACK_DIR_UPPER(a,b) STACK_UPPER(&stack_grow_dir_detection, (a), (b))
|
|
116
|
+
#endif
|
|
117
|
+
#define IS_STACK_DIR_UPPER() STACK_DIR_UPPER(1,0)
|
|
118
|
+
|
|
119
|
+
const char *rb_obj_info(VALUE obj);
|
|
120
|
+
const char *rb_raw_obj_info(char *const buff, const size_t buff_size, VALUE obj);
|
|
121
|
+
|
|
122
|
+
struct rb_execution_context_struct; /* in vm_core.h */
|
|
123
|
+
struct rb_objspace; /* in vm_core.h */
|
|
124
|
+
|
|
125
|
+
#define NEWOBJ_OF_WITH_SHAPE(var, T, c, f, shape_id, s, ec) \
|
|
126
|
+
T *(var) = (T *)(((f) & FL_WB_PROTECTED) ? \
|
|
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)
|
|
131
|
+
|
|
132
|
+
#ifndef RB_GC_OBJECT_METADATA_ENTRY_DEFINED
|
|
133
|
+
# define RB_GC_OBJECT_METADATA_ENTRY_DEFINED
|
|
134
|
+
struct rb_gc_object_metadata_entry {
|
|
135
|
+
ID name;
|
|
136
|
+
VALUE val;
|
|
137
|
+
};
|
|
138
|
+
#endif
|
|
139
|
+
|
|
140
|
+
#ifndef USE_UNALIGNED_MEMBER_ACCESS
|
|
141
|
+
# define UNALIGNED_MEMBER_ACCESS(expr) (expr)
|
|
142
|
+
#elif ! USE_UNALIGNED_MEMBER_ACCESS
|
|
143
|
+
# define UNALIGNED_MEMBER_ACCESS(expr) (expr)
|
|
144
|
+
#elif ! (__has_warning("-Waddress-of-packed-member") || GCC_VERSION_SINCE(9, 0, 0))
|
|
145
|
+
# define UNALIGNED_MEMBER_ACCESS(expr) (expr)
|
|
146
|
+
#else
|
|
147
|
+
# include "internal/warnings.h"
|
|
148
|
+
# define UNALIGNED_MEMBER_ACCESS(expr) __extension__({ \
|
|
149
|
+
COMPILER_WARNING_PUSH; \
|
|
150
|
+
COMPILER_WARNING_IGNORED(-Waddress-of-packed-member); \
|
|
151
|
+
__typeof__(expr) unaligned_member_access_result = (expr); \
|
|
152
|
+
COMPILER_WARNING_POP; \
|
|
153
|
+
unaligned_member_access_result; \
|
|
154
|
+
})
|
|
155
|
+
|
|
156
|
+
# define UNALIGNED_MEMBER_PTR(ptr, mem) __extension__({ \
|
|
157
|
+
COMPILER_WARNING_PUSH; \
|
|
158
|
+
COMPILER_WARNING_IGNORED(-Waddress-of-packed-member); \
|
|
159
|
+
const volatile void *unaligned_member_ptr_result = &(ptr)->mem; \
|
|
160
|
+
COMPILER_WARNING_POP; \
|
|
161
|
+
(__typeof__((ptr)->mem) *)unaligned_member_ptr_result; \
|
|
162
|
+
})
|
|
163
|
+
#endif
|
|
164
|
+
|
|
165
|
+
#ifndef UNALIGNED_MEMBER_PTR
|
|
166
|
+
# define UNALIGNED_MEMBER_PTR(ptr, mem) UNALIGNED_MEMBER_ACCESS(&(ptr)->mem)
|
|
167
|
+
#endif
|
|
168
|
+
|
|
169
|
+
#define RB_OBJ_WRITE_UNALIGNED(old, slot, young) do { \
|
|
170
|
+
VALUE *_slot = UNALIGNED_MEMBER_ACCESS(slot); \
|
|
171
|
+
RB_OBJ_WRITE(old, _slot, young); \
|
|
172
|
+
} while (0)
|
|
173
|
+
|
|
174
|
+
/* Used in places that could malloc during, which can cause the GC to run. We
|
|
175
|
+
* need to temporarily disable the GC to allow the malloc to happen.
|
|
176
|
+
* Allocating memory during GC is a bad idea, so use this only when absolutely
|
|
177
|
+
* necessary. */
|
|
178
|
+
#define DURING_GC_COULD_MALLOC_REGION_START() \
|
|
179
|
+
assert(rb_during_gc()); \
|
|
180
|
+
VALUE _already_disabled = rb_gc_disable_no_rest()
|
|
181
|
+
|
|
182
|
+
#define DURING_GC_COULD_MALLOC_REGION_END() \
|
|
183
|
+
if (_already_disabled == Qfalse) rb_gc_enable()
|
|
184
|
+
|
|
185
|
+
/* gc.c */
|
|
186
|
+
RUBY_ATTR_MALLOC void *ruby_mimmalloc(size_t size);
|
|
187
|
+
RUBY_ATTR_MALLOC void *ruby_mimcalloc(size_t num, size_t size);
|
|
188
|
+
void ruby_mimfree(void *ptr);
|
|
189
|
+
void rb_gc_prepare_heap(void);
|
|
190
|
+
void rb_objspace_set_event_hook(const rb_event_flag_t event);
|
|
191
|
+
VALUE rb_objspace_gc_enable(void *objspace);
|
|
192
|
+
VALUE rb_objspace_gc_disable(void *objspace);
|
|
193
|
+
void ruby_gc_set_params(void);
|
|
194
|
+
void rb_gc_copy_attributes(VALUE dest, VALUE obj);
|
|
195
|
+
size_t rb_size_mul_or_raise(size_t, size_t, VALUE); /* used in compile.c */
|
|
196
|
+
size_t rb_size_mul_add_or_raise(size_t, size_t, size_t, VALUE); /* used in iseq.h */
|
|
197
|
+
size_t rb_malloc_grow_capa(size_t current_capacity, size_t type_size);
|
|
198
|
+
RUBY_ATTR_MALLOC void *rb_xmalloc_mul_add(size_t, size_t, size_t);
|
|
199
|
+
RUBY_ATTR_MALLOC void *rb_xcalloc_mul_add(size_t, size_t, size_t);
|
|
200
|
+
void *rb_xrealloc_mul_add(const void *, size_t, size_t, size_t);
|
|
201
|
+
RUBY_ATTR_MALLOC void *rb_xmalloc_mul_add_mul(size_t, size_t, size_t, size_t);
|
|
202
|
+
RUBY_ATTR_MALLOC void *rb_xcalloc_mul_add_mul(size_t, size_t, size_t, size_t);
|
|
203
|
+
static inline void *ruby_sized_xrealloc_inlined(void *ptr, size_t new_size, size_t old_size) RUBY_ATTR_RETURNS_NONNULL RUBY_ATTR_ALLOC_SIZE((2));
|
|
204
|
+
static inline void *ruby_sized_xrealloc2_inlined(void *ptr, size_t new_count, size_t elemsiz, size_t old_count) RUBY_ATTR_RETURNS_NONNULL RUBY_ATTR_ALLOC_SIZE((2, 3));
|
|
205
|
+
static inline void ruby_sized_xfree_inlined(void *ptr, size_t size);
|
|
206
|
+
void rb_gc_obj_id_moved(VALUE obj);
|
|
207
|
+
|
|
208
|
+
void *rb_gc_ractor_cache_alloc(rb_ractor_t *ractor);
|
|
209
|
+
void rb_gc_ractor_cache_free(void *cache);
|
|
210
|
+
|
|
211
|
+
bool rb_gc_size_allocatable_p(size_t size);
|
|
212
|
+
size_t *rb_gc_heap_sizes(void);
|
|
213
|
+
size_t rb_gc_heap_id_for_size(size_t size);
|
|
214
|
+
|
|
215
|
+
void rb_gc_mark_and_move(VALUE *ptr);
|
|
216
|
+
|
|
217
|
+
void rb_gc_mark_weak(VALUE *ptr);
|
|
218
|
+
void rb_gc_remove_weak(VALUE parent_obj, VALUE *ptr);
|
|
219
|
+
|
|
220
|
+
void rb_gc_ref_update_table_values_only(st_table *tbl);
|
|
221
|
+
|
|
222
|
+
void rb_gc_initial_stress_set(VALUE flag);
|
|
223
|
+
|
|
224
|
+
void rb_gc_before_fork(void);
|
|
225
|
+
void rb_gc_after_fork(rb_pid_t pid);
|
|
226
|
+
|
|
227
|
+
#define rb_gc_mark_and_move_ptr(ptr) do { \
|
|
228
|
+
VALUE _obj = (VALUE)*(ptr); \
|
|
229
|
+
rb_gc_mark_and_move(&_obj); \
|
|
230
|
+
if (_obj != (VALUE)*(ptr)) *(ptr) = (void *)_obj; \
|
|
231
|
+
} while (0)
|
|
232
|
+
|
|
233
|
+
RUBY_SYMBOL_EXPORT_BEGIN
|
|
234
|
+
/* exports for objspace module */
|
|
235
|
+
void rb_objspace_reachable_objects_from(VALUE obj, void (func)(VALUE, void *), void *data);
|
|
236
|
+
void rb_objspace_reachable_objects_from_root(void (func)(const char *category, VALUE, void *), void *data);
|
|
237
|
+
int rb_objspace_internal_object_p(VALUE obj);
|
|
238
|
+
int rb_objspace_garbage_object_p(VALUE obj);
|
|
239
|
+
bool rb_gc_pointer_to_heap_p(VALUE obj);
|
|
240
|
+
|
|
241
|
+
void rb_objspace_each_objects(
|
|
242
|
+
int (*callback)(void *start, void *end, size_t stride, void *data),
|
|
243
|
+
void *data);
|
|
244
|
+
|
|
245
|
+
size_t rb_gc_obj_slot_size(VALUE obj);
|
|
246
|
+
|
|
247
|
+
VALUE rb_gc_disable_no_rest(void);
|
|
248
|
+
|
|
249
|
+
#define RB_GC_MAX_NAME_LEN 20
|
|
250
|
+
|
|
251
|
+
/* gc.c (export) */
|
|
252
|
+
const char *rb_objspace_data_type_name(VALUE obj);
|
|
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);
|
|
255
|
+
size_t rb_obj_memsize_of(VALUE);
|
|
256
|
+
struct rb_gc_object_metadata_entry *rb_gc_object_metadata(VALUE obj);
|
|
257
|
+
void rb_gc_mark_values(long n, const VALUE *values);
|
|
258
|
+
void rb_gc_mark_vm_stack_values(long n, const VALUE *values);
|
|
259
|
+
void rb_gc_update_values(long n, VALUE *values);
|
|
260
|
+
void *ruby_sized_xrealloc(void *ptr, size_t new_size, size_t old_size) RUBY_ATTR_RETURNS_NONNULL RUBY_ATTR_ALLOC_SIZE((2));
|
|
261
|
+
void *ruby_sized_xrealloc2(void *ptr, size_t new_count, size_t element_size, size_t old_count) RUBY_ATTR_RETURNS_NONNULL RUBY_ATTR_ALLOC_SIZE((2, 3));
|
|
262
|
+
void ruby_sized_xfree(void *x, size_t size);
|
|
263
|
+
|
|
264
|
+
const char *rb_gc_active_gc_name(void);
|
|
265
|
+
int rb_gc_modular_gc_loaded_p(void);
|
|
266
|
+
|
|
267
|
+
RUBY_SYMBOL_EXPORT_END
|
|
268
|
+
|
|
269
|
+
static inline VALUE
|
|
270
|
+
rb_obj_atomic_write(
|
|
271
|
+
VALUE a, VALUE *slot, VALUE b,
|
|
272
|
+
RBIMPL_ATTR_MAYBE_UNUSED()
|
|
273
|
+
const char *filename,
|
|
274
|
+
RBIMPL_ATTR_MAYBE_UNUSED()
|
|
275
|
+
int line)
|
|
276
|
+
{
|
|
277
|
+
#ifdef RGENGC_LOGGING_WRITE
|
|
278
|
+
RGENGC_LOGGING_WRITE(a, slot, b, filename, line);
|
|
279
|
+
#endif
|
|
280
|
+
|
|
281
|
+
RUBY_ATOMIC_VALUE_SET(*slot, b);
|
|
282
|
+
|
|
283
|
+
rb_obj_written(a, RUBY_Qundef /* ignore `oldv' now */, b, filename, line);
|
|
284
|
+
return a;
|
|
285
|
+
}
|
|
286
|
+
#define RB_OBJ_ATOMIC_WRITE(old, slot, young) \
|
|
287
|
+
RBIMPL_CAST(rb_obj_atomic_write((VALUE)(old), (VALUE *)(slot), (VALUE)(young), __FILE__, __LINE__))
|
|
288
|
+
|
|
289
|
+
int rb_ec_stack_check(struct rb_execution_context_struct *ec);
|
|
290
|
+
void rb_gc_writebarrier_remember(VALUE obj);
|
|
291
|
+
const char *rb_obj_info(VALUE obj);
|
|
292
|
+
void ruby_annotate_mmap(const void *addr, unsigned long size, const char *name);
|
|
293
|
+
|
|
294
|
+
#if defined(HAVE_MALLOC_USABLE_SIZE) || defined(HAVE_MALLOC_SIZE) || defined(_WIN32)
|
|
295
|
+
|
|
296
|
+
static inline void *
|
|
297
|
+
ruby_sized_xrealloc_inlined(void *ptr, size_t new_size, size_t old_size)
|
|
298
|
+
{
|
|
299
|
+
return ruby_xrealloc(ptr, new_size);
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
static inline void *
|
|
303
|
+
ruby_sized_xrealloc2_inlined(void *ptr, size_t new_count, size_t elemsiz, size_t old_count)
|
|
304
|
+
{
|
|
305
|
+
return ruby_xrealloc2(ptr, new_count, elemsiz);
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
static inline void
|
|
309
|
+
ruby_sized_xfree_inlined(void *ptr, size_t size)
|
|
310
|
+
{
|
|
311
|
+
ruby_xfree(ptr);
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
# define SIZED_REALLOC_N(x, y, z, w) REALLOC_N(x, y, z)
|
|
315
|
+
|
|
316
|
+
static inline void *
|
|
317
|
+
ruby_sized_realloc_n(void *ptr, size_t new_count, size_t element_size, size_t old_count)
|
|
318
|
+
{
|
|
319
|
+
return ruby_xrealloc2(ptr, new_count, element_size);
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
#else
|
|
323
|
+
|
|
324
|
+
static inline void *
|
|
325
|
+
ruby_sized_xrealloc_inlined(void *ptr, size_t new_size, size_t old_size)
|
|
326
|
+
{
|
|
327
|
+
return ruby_sized_xrealloc(ptr, new_size, old_size);
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
static inline void *
|
|
331
|
+
ruby_sized_xrealloc2_inlined(void *ptr, size_t new_count, size_t elemsiz, size_t old_count)
|
|
332
|
+
{
|
|
333
|
+
return ruby_sized_xrealloc2(ptr, new_count, elemsiz, old_count);
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
static inline void
|
|
337
|
+
ruby_sized_xfree_inlined(void *ptr, size_t size)
|
|
338
|
+
{
|
|
339
|
+
ruby_sized_xfree(ptr, size);
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
# define SIZED_REALLOC_N(v, T, m, n) \
|
|
343
|
+
((v) = (T *)ruby_sized_xrealloc2((void *)(v), (m), sizeof(T), (n)))
|
|
344
|
+
|
|
345
|
+
static inline void *
|
|
346
|
+
ruby_sized_realloc_n(void *ptr, size_t new_count, size_t element_size, size_t old_count)
|
|
347
|
+
{
|
|
348
|
+
return ruby_sized_xrealloc2(ptr, new_count, element_size, old_count);
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
#endif /* HAVE_MALLOC_USABLE_SIZE */
|
|
352
|
+
|
|
353
|
+
#define ruby_sized_xrealloc ruby_sized_xrealloc_inlined
|
|
354
|
+
#define ruby_sized_xrealloc2 ruby_sized_xrealloc2_inlined
|
|
355
|
+
#define ruby_sized_xfree ruby_sized_xfree_inlined
|
|
356
|
+
|
|
357
|
+
void rb_gc_verify_shareable(VALUE);
|
|
358
|
+
bool rb_gc_checking_shareable(void);
|
|
359
|
+
|
|
360
|
+
#endif /* INTERNAL_GC_H */
|
|
@@ -72,6 +72,7 @@ struct RHash {
|
|
|
72
72
|
/* hash.c */
|
|
73
73
|
void rb_hash_st_table_set(VALUE hash, st_table *st);
|
|
74
74
|
VALUE rb_hash_default_value(VALUE hash, VALUE key);
|
|
75
|
+
VALUE rb_hash_set_default(VALUE hash, VALUE ifnone);
|
|
75
76
|
VALUE rb_hash_set_default_proc(VALUE hash, VALUE proc);
|
|
76
77
|
long rb_dbl_long_hash(double d);
|
|
77
78
|
st_table *rb_init_identtable(void);
|