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
|
@@ -1,283 +0,0 @@
|
|
|
1
|
-
#ifndef INTERNAL_CLASS_H /*-*-C-*-vi:se ft=c:*/
|
|
2
|
-
#define INTERNAL_CLASS_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 Class.
|
|
10
|
-
*/
|
|
11
|
-
#include "id.h"
|
|
12
|
-
#include "id_table.h" /* for struct rb_id_table */
|
|
13
|
-
#include "internal/serial.h" /* for rb_serial_t */
|
|
14
|
-
#include "internal/static_assert.h"
|
|
15
|
-
#include "internal/variable.h" /* for rb_class_ivar_set */
|
|
16
|
-
#include "ruby/internal/stdbool.h" /* for bool */
|
|
17
|
-
#include "ruby/intern.h" /* for rb_alloc_func_t */
|
|
18
|
-
#include "ruby/ruby.h" /* for struct RBasic */
|
|
19
|
-
#include "shape.h"
|
|
20
|
-
#include "ruby_assert.h"
|
|
21
|
-
#include "vm_core.h"
|
|
22
|
-
#include "vm_sync.h"
|
|
23
|
-
#include "method.h" /* for rb_cref_t */
|
|
24
|
-
|
|
25
|
-
#ifdef RCLASS_SUPER
|
|
26
|
-
# undef RCLASS_SUPER
|
|
27
|
-
#endif
|
|
28
|
-
|
|
29
|
-
struct rb_subclass_entry {
|
|
30
|
-
VALUE klass;
|
|
31
|
-
struct rb_subclass_entry *next;
|
|
32
|
-
struct rb_subclass_entry *prev;
|
|
33
|
-
};
|
|
34
|
-
typedef struct rb_subclass_entry rb_subclass_entry_t;
|
|
35
|
-
|
|
36
|
-
struct rb_cvar_class_tbl_entry {
|
|
37
|
-
uint32_t index;
|
|
38
|
-
rb_serial_t global_cvar_state;
|
|
39
|
-
const rb_cref_t * cref;
|
|
40
|
-
VALUE class_value;
|
|
41
|
-
};
|
|
42
|
-
|
|
43
|
-
struct rb_classext_struct {
|
|
44
|
-
VALUE *iv_ptr;
|
|
45
|
-
struct rb_id_table *const_tbl;
|
|
46
|
-
struct rb_id_table *callable_m_tbl;
|
|
47
|
-
struct rb_id_table *cc_tbl; /* ID -> [[ci1, cc1], [ci2, cc2] ...] */
|
|
48
|
-
struct rb_id_table *cvc_tbl;
|
|
49
|
-
size_t superclass_depth;
|
|
50
|
-
VALUE *superclasses;
|
|
51
|
-
struct rb_subclass_entry *subclasses;
|
|
52
|
-
struct rb_subclass_entry *subclass_entry;
|
|
53
|
-
/**
|
|
54
|
-
* In the case that this is an `ICLASS`, `module_subclasses` points to the link
|
|
55
|
-
* in the module's `subclasses` list that indicates that the klass has been
|
|
56
|
-
* included. Hopefully that makes sense.
|
|
57
|
-
*/
|
|
58
|
-
struct rb_subclass_entry *module_subclass_entry;
|
|
59
|
-
const VALUE origin_;
|
|
60
|
-
const VALUE refined_class;
|
|
61
|
-
union {
|
|
62
|
-
struct {
|
|
63
|
-
rb_alloc_func_t allocator;
|
|
64
|
-
} class;
|
|
65
|
-
struct {
|
|
66
|
-
VALUE attached_object;
|
|
67
|
-
} singleton_class;
|
|
68
|
-
} as;
|
|
69
|
-
const VALUE includer;
|
|
70
|
-
attr_index_t max_iv_count;
|
|
71
|
-
unsigned char variation_count;
|
|
72
|
-
bool permanent_classpath : 1;
|
|
73
|
-
bool cloned : 1;
|
|
74
|
-
VALUE classpath;
|
|
75
|
-
};
|
|
76
|
-
typedef struct rb_classext_struct rb_classext_t;
|
|
77
|
-
|
|
78
|
-
STATIC_ASSERT(shape_max_variations, SHAPE_MAX_VARIATIONS < (1 << (sizeof(((rb_classext_t *)0)->variation_count) * CHAR_BIT)));
|
|
79
|
-
|
|
80
|
-
struct RClass {
|
|
81
|
-
struct RBasic basic;
|
|
82
|
-
VALUE super;
|
|
83
|
-
struct rb_id_table *m_tbl;
|
|
84
|
-
};
|
|
85
|
-
|
|
86
|
-
// Assert that classes can be embedded in heaps[2] (which has 160B slot size)
|
|
87
|
-
STATIC_ASSERT(sizeof_rb_classext_t, sizeof(struct RClass) + sizeof(rb_classext_t) <= 4 * RVALUE_SIZE);
|
|
88
|
-
|
|
89
|
-
struct RClass_and_rb_classext_t {
|
|
90
|
-
struct RClass rclass;
|
|
91
|
-
rb_classext_t classext;
|
|
92
|
-
};
|
|
93
|
-
|
|
94
|
-
#define RCLASS_EXT(c) (&((struct RClass_and_rb_classext_t*)(c))->classext)
|
|
95
|
-
#define RCLASS_CONST_TBL(c) (RCLASS_EXT(c)->const_tbl)
|
|
96
|
-
#define RCLASS_M_TBL(c) (RCLASS(c)->m_tbl)
|
|
97
|
-
#define RCLASS_IVPTR(c) (RCLASS_EXT(c)->iv_ptr)
|
|
98
|
-
#define RCLASS_CALLABLE_M_TBL(c) (RCLASS_EXT(c)->callable_m_tbl)
|
|
99
|
-
#define RCLASS_CC_TBL(c) (RCLASS_EXT(c)->cc_tbl)
|
|
100
|
-
#define RCLASS_CVC_TBL(c) (RCLASS_EXT(c)->cvc_tbl)
|
|
101
|
-
#define RCLASS_ORIGIN(c) (RCLASS_EXT(c)->origin_)
|
|
102
|
-
#define RCLASS_REFINED_CLASS(c) (RCLASS_EXT(c)->refined_class)
|
|
103
|
-
#define RCLASS_INCLUDER(c) (RCLASS_EXT(c)->includer)
|
|
104
|
-
#define RCLASS_SUBCLASS_ENTRY(c) (RCLASS_EXT(c)->subclass_entry)
|
|
105
|
-
#define RCLASS_MODULE_SUBCLASS_ENTRY(c) (RCLASS_EXT(c)->module_subclass_entry)
|
|
106
|
-
#define RCLASS_SUBCLASSES(c) (RCLASS_EXT(c)->subclasses)
|
|
107
|
-
#define RCLASS_SUPERCLASS_DEPTH(c) (RCLASS_EXT(c)->superclass_depth)
|
|
108
|
-
#define RCLASS_SUPERCLASSES(c) (RCLASS_EXT(c)->superclasses)
|
|
109
|
-
#define RCLASS_ATTACHED_OBJECT(c) (RCLASS_EXT(c)->as.singleton_class.attached_object)
|
|
110
|
-
|
|
111
|
-
#define RCLASS_IS_ROOT FL_USER0
|
|
112
|
-
#define RICLASS_IS_ORIGIN FL_USER0
|
|
113
|
-
#define RCLASS_SUPERCLASSES_INCLUDE_SELF FL_USER2
|
|
114
|
-
#define RICLASS_ORIGIN_SHARED_MTBL FL_USER3
|
|
115
|
-
|
|
116
|
-
static inline st_table *
|
|
117
|
-
RCLASS_IV_HASH(VALUE obj)
|
|
118
|
-
{
|
|
119
|
-
RUBY_ASSERT(RB_TYPE_P(obj, RUBY_T_CLASS) || RB_TYPE_P(obj, RUBY_T_MODULE));
|
|
120
|
-
RUBY_ASSERT(rb_shape_obj_too_complex(obj));
|
|
121
|
-
return (st_table *)RCLASS_IVPTR(obj);
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
static inline void
|
|
125
|
-
RCLASS_SET_IV_HASH(VALUE obj, const st_table *tbl)
|
|
126
|
-
{
|
|
127
|
-
RUBY_ASSERT(RB_TYPE_P(obj, RUBY_T_CLASS) || RB_TYPE_P(obj, RUBY_T_MODULE));
|
|
128
|
-
RUBY_ASSERT(rb_shape_obj_too_complex(obj));
|
|
129
|
-
RCLASS_IVPTR(obj) = (VALUE *)tbl;
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
static inline uint32_t
|
|
133
|
-
RCLASS_IV_COUNT(VALUE obj)
|
|
134
|
-
{
|
|
135
|
-
RUBY_ASSERT(RB_TYPE_P(obj, RUBY_T_CLASS) || RB_TYPE_P(obj, RUBY_T_MODULE));
|
|
136
|
-
if (rb_shape_obj_too_complex(obj)) {
|
|
137
|
-
uint32_t count;
|
|
138
|
-
|
|
139
|
-
// "Too complex" classes could have their IV hash mutated in
|
|
140
|
-
// parallel, so lets lock around getting the hash size.
|
|
141
|
-
RB_VM_LOCK_ENTER();
|
|
142
|
-
{
|
|
143
|
-
count = (uint32_t)rb_st_table_size(RCLASS_IV_HASH(obj));
|
|
144
|
-
}
|
|
145
|
-
RB_VM_LOCK_LEAVE();
|
|
146
|
-
|
|
147
|
-
return count;
|
|
148
|
-
}
|
|
149
|
-
else {
|
|
150
|
-
return rb_shape_get_shape_by_id(RCLASS_SHAPE_ID(obj))->next_iv_index;
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
static inline void
|
|
155
|
-
RCLASS_SET_M_TBL(VALUE klass, struct rb_id_table *table)
|
|
156
|
-
{
|
|
157
|
-
RUBY_ASSERT(!RB_OBJ_PROMOTED(klass));
|
|
158
|
-
RCLASS_M_TBL(klass) = table;
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
/* class.c */
|
|
162
|
-
void rb_class_subclass_add(VALUE super, VALUE klass);
|
|
163
|
-
void rb_class_remove_from_super_subclasses(VALUE);
|
|
164
|
-
void rb_class_update_superclasses(VALUE);
|
|
165
|
-
size_t rb_class_superclasses_memsize(VALUE);
|
|
166
|
-
void rb_class_remove_subclass_head(VALUE);
|
|
167
|
-
int rb_singleton_class_internal_p(VALUE sklass);
|
|
168
|
-
VALUE rb_class_boot(VALUE);
|
|
169
|
-
VALUE rb_class_s_alloc(VALUE klass);
|
|
170
|
-
VALUE rb_module_s_alloc(VALUE klass);
|
|
171
|
-
void rb_module_set_initialized(VALUE module);
|
|
172
|
-
void rb_module_check_initializable(VALUE module);
|
|
173
|
-
VALUE rb_make_metaclass(VALUE, VALUE);
|
|
174
|
-
VALUE rb_include_class_new(VALUE, VALUE);
|
|
175
|
-
void rb_class_foreach_subclass(VALUE klass, void (*f)(VALUE, VALUE), VALUE);
|
|
176
|
-
void rb_class_detach_subclasses(VALUE);
|
|
177
|
-
void rb_class_detach_module_subclasses(VALUE);
|
|
178
|
-
void rb_class_remove_from_module_subclasses(VALUE);
|
|
179
|
-
VALUE rb_define_class_id_under_no_pin(VALUE outer, ID id, VALUE super);
|
|
180
|
-
VALUE rb_obj_methods(int argc, const VALUE *argv, VALUE obj);
|
|
181
|
-
VALUE rb_obj_protected_methods(int argc, const VALUE *argv, VALUE obj);
|
|
182
|
-
VALUE rb_obj_private_methods(int argc, const VALUE *argv, VALUE obj);
|
|
183
|
-
VALUE rb_obj_public_methods(int argc, const VALUE *argv, VALUE obj);
|
|
184
|
-
VALUE rb_class_undefined_instance_methods(VALUE mod);
|
|
185
|
-
VALUE rb_special_singleton_class(VALUE);
|
|
186
|
-
VALUE rb_singleton_class_clone_and_attach(VALUE obj, VALUE attach);
|
|
187
|
-
VALUE rb_singleton_class_get(VALUE obj);
|
|
188
|
-
void rb_undef_methods_from(VALUE klass, VALUE super);
|
|
189
|
-
|
|
190
|
-
static inline void RCLASS_SET_ORIGIN(VALUE klass, VALUE origin);
|
|
191
|
-
static inline void RICLASS_SET_ORIGIN_SHARED_MTBL(VALUE iclass);
|
|
192
|
-
static inline VALUE RCLASS_SUPER(VALUE klass);
|
|
193
|
-
static inline VALUE RCLASS_SET_SUPER(VALUE klass, VALUE super);
|
|
194
|
-
static inline void RCLASS_SET_INCLUDER(VALUE iclass, VALUE klass);
|
|
195
|
-
|
|
196
|
-
VALUE rb_class_inherited(VALUE, VALUE);
|
|
197
|
-
VALUE rb_keyword_error_new(const char *, VALUE);
|
|
198
|
-
|
|
199
|
-
static inline bool
|
|
200
|
-
RCLASS_SINGLETON_P(VALUE klass)
|
|
201
|
-
{
|
|
202
|
-
return RB_TYPE_P(klass, T_CLASS) && FL_TEST_RAW(klass, FL_SINGLETON);
|
|
203
|
-
}
|
|
204
|
-
|
|
205
|
-
static inline rb_alloc_func_t
|
|
206
|
-
RCLASS_ALLOCATOR(VALUE klass)
|
|
207
|
-
{
|
|
208
|
-
if (RCLASS_SINGLETON_P(klass)) {
|
|
209
|
-
return 0;
|
|
210
|
-
}
|
|
211
|
-
return RCLASS_EXT(klass)->as.class.allocator;
|
|
212
|
-
}
|
|
213
|
-
|
|
214
|
-
static inline void
|
|
215
|
-
RCLASS_SET_ALLOCATOR(VALUE klass, rb_alloc_func_t allocator)
|
|
216
|
-
{
|
|
217
|
-
assert(!RCLASS_SINGLETON_P(klass));
|
|
218
|
-
RCLASS_EXT(klass)->as.class.allocator = allocator;
|
|
219
|
-
}
|
|
220
|
-
|
|
221
|
-
static inline void
|
|
222
|
-
RCLASS_SET_ORIGIN(VALUE klass, VALUE origin)
|
|
223
|
-
{
|
|
224
|
-
RB_OBJ_WRITE(klass, &RCLASS_ORIGIN(klass), origin);
|
|
225
|
-
if (klass != origin) FL_SET(origin, RICLASS_IS_ORIGIN);
|
|
226
|
-
}
|
|
227
|
-
|
|
228
|
-
static inline void
|
|
229
|
-
RICLASS_SET_ORIGIN_SHARED_MTBL(VALUE iclass)
|
|
230
|
-
{
|
|
231
|
-
FL_SET(iclass, RICLASS_ORIGIN_SHARED_MTBL);
|
|
232
|
-
}
|
|
233
|
-
|
|
234
|
-
static inline bool
|
|
235
|
-
RICLASS_OWNS_M_TBL_P(VALUE iclass)
|
|
236
|
-
{
|
|
237
|
-
return FL_TEST_RAW(iclass, RICLASS_IS_ORIGIN | RICLASS_ORIGIN_SHARED_MTBL) == RICLASS_IS_ORIGIN;
|
|
238
|
-
}
|
|
239
|
-
|
|
240
|
-
static inline void
|
|
241
|
-
RCLASS_SET_INCLUDER(VALUE iclass, VALUE klass)
|
|
242
|
-
{
|
|
243
|
-
RB_OBJ_WRITE(iclass, &RCLASS_INCLUDER(iclass), klass);
|
|
244
|
-
}
|
|
245
|
-
|
|
246
|
-
static inline VALUE
|
|
247
|
-
RCLASS_SUPER(VALUE klass)
|
|
248
|
-
{
|
|
249
|
-
return RCLASS(klass)->super;
|
|
250
|
-
}
|
|
251
|
-
|
|
252
|
-
static inline VALUE
|
|
253
|
-
RCLASS_SET_SUPER(VALUE klass, VALUE super)
|
|
254
|
-
{
|
|
255
|
-
if (super) {
|
|
256
|
-
rb_class_remove_from_super_subclasses(klass);
|
|
257
|
-
rb_class_subclass_add(super, klass);
|
|
258
|
-
}
|
|
259
|
-
RB_OBJ_WRITE(klass, &RCLASS(klass)->super, super);
|
|
260
|
-
rb_class_update_superclasses(klass);
|
|
261
|
-
return super;
|
|
262
|
-
}
|
|
263
|
-
|
|
264
|
-
static inline void
|
|
265
|
-
RCLASS_SET_CLASSPATH(VALUE klass, VALUE classpath, bool permanent)
|
|
266
|
-
{
|
|
267
|
-
assert(BUILTIN_TYPE(klass) == T_CLASS || BUILTIN_TYPE(klass) == T_MODULE);
|
|
268
|
-
assert(classpath == 0 || BUILTIN_TYPE(classpath) == T_STRING);
|
|
269
|
-
|
|
270
|
-
RB_OBJ_WRITE(klass, &(RCLASS_EXT(klass)->classpath), classpath);
|
|
271
|
-
RCLASS_EXT(klass)->permanent_classpath = permanent;
|
|
272
|
-
}
|
|
273
|
-
|
|
274
|
-
static inline VALUE
|
|
275
|
-
RCLASS_SET_ATTACHED_OBJECT(VALUE klass, VALUE attached_object)
|
|
276
|
-
{
|
|
277
|
-
assert(RCLASS_SINGLETON_P(klass));
|
|
278
|
-
|
|
279
|
-
RB_OBJ_WRITE(klass, &RCLASS_EXT(klass)->as.singleton_class.attached_object, attached_object);
|
|
280
|
-
return attached_object;
|
|
281
|
-
}
|
|
282
|
-
|
|
283
|
-
#endif /* INTERNAL_CLASS_H */
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
#include "ruby/atomic.h"
|
|
2
|
-
|
|
3
|
-
/* shim macros only */
|
|
4
|
-
#define ATOMIC_ADD(var, val) RUBY_ATOMIC_ADD(var, val)
|
|
5
|
-
#define ATOMIC_CAS(var, oldval, newval) RUBY_ATOMIC_CAS(var, oldval, newval)
|
|
6
|
-
#define ATOMIC_DEC(var) RUBY_ATOMIC_DEC(var)
|
|
7
|
-
#define ATOMIC_EXCHANGE(var, val) RUBY_ATOMIC_EXCHANGE(var, val)
|
|
8
|
-
#define ATOMIC_FETCH_ADD(var, val) RUBY_ATOMIC_FETCH_ADD(var, val)
|
|
9
|
-
#define ATOMIC_FETCH_SUB(var, val) RUBY_ATOMIC_FETCH_SUB(var, val)
|
|
10
|
-
#define ATOMIC_INC(var) RUBY_ATOMIC_INC(var)
|
|
11
|
-
#define ATOMIC_OR(var, val) RUBY_ATOMIC_OR(var, val)
|
|
12
|
-
#define ATOMIC_PTR_CAS(var, oldval, newval) RUBY_ATOMIC_PTR_CAS(var, oldval, newval)
|
|
13
|
-
#define ATOMIC_PTR_EXCHANGE(var, val) RUBY_ATOMIC_PTR_EXCHANGE(var, val)
|
|
14
|
-
#define ATOMIC_SET(var, val) RUBY_ATOMIC_SET(var, val)
|
|
15
|
-
#define ATOMIC_SIZE_ADD(var, val) RUBY_ATOMIC_SIZE_ADD(var, val)
|
|
16
|
-
#define ATOMIC_SIZE_CAS(var, oldval, newval) RUBY_ATOMIC_SIZE_CAS(var, oldval, newval)
|
|
17
|
-
#define ATOMIC_SIZE_DEC(var) RUBY_ATOMIC_SIZE_DEC(var)
|
|
18
|
-
#define ATOMIC_SIZE_EXCHANGE(var, val) RUBY_ATOMIC_SIZE_EXCHANGE(var, val)
|
|
19
|
-
#define ATOMIC_SIZE_INC(var) RUBY_ATOMIC_SIZE_INC(var)
|
|
20
|
-
#define ATOMIC_SIZE_SUB(var, val) RUBY_ATOMIC_SIZE_SUB(var, val)
|
|
21
|
-
#define ATOMIC_SUB(var, val) RUBY_ATOMIC_SUB(var, val)
|
|
22
|
-
#define ATOMIC_VALUE_CAS(var, oldval, val) RUBY_ATOMIC_VALUE_CAS(var, oldval, val)
|
|
23
|
-
#define ATOMIC_VALUE_EXCHANGE(var, val) RUBY_ATOMIC_VALUE_EXCHANGE(var, val)
|
|
@@ -1,234 +0,0 @@
|
|
|
1
|
-
#ifndef RUBY_SHAPE_H
|
|
2
|
-
#define RUBY_SHAPE_H
|
|
3
|
-
|
|
4
|
-
#include "internal/gc.h"
|
|
5
|
-
|
|
6
|
-
#if (SIZEOF_UINT64_T <= SIZEOF_VALUE)
|
|
7
|
-
|
|
8
|
-
#define SIZEOF_SHAPE_T 4
|
|
9
|
-
#define SHAPE_IN_BASIC_FLAGS 1
|
|
10
|
-
typedef uint32_t attr_index_t;
|
|
11
|
-
typedef uint32_t shape_id_t;
|
|
12
|
-
# define SHAPE_ID_NUM_BITS 32
|
|
13
|
-
|
|
14
|
-
#else
|
|
15
|
-
|
|
16
|
-
#define SIZEOF_SHAPE_T 2
|
|
17
|
-
#define SHAPE_IN_BASIC_FLAGS 0
|
|
18
|
-
typedef uint16_t attr_index_t;
|
|
19
|
-
typedef uint16_t shape_id_t;
|
|
20
|
-
# define SHAPE_ID_NUM_BITS 16
|
|
21
|
-
|
|
22
|
-
#endif
|
|
23
|
-
|
|
24
|
-
typedef uint32_t redblack_id_t;
|
|
25
|
-
|
|
26
|
-
#define MAX_IVARS (attr_index_t)(-1)
|
|
27
|
-
|
|
28
|
-
# define SHAPE_MASK (((uintptr_t)1 << SHAPE_ID_NUM_BITS) - 1)
|
|
29
|
-
# define SHAPE_FLAG_MASK (((VALUE)-1) >> SHAPE_ID_NUM_BITS)
|
|
30
|
-
|
|
31
|
-
# define SHAPE_FLAG_SHIFT ((SIZEOF_VALUE * 8) - SHAPE_ID_NUM_BITS)
|
|
32
|
-
|
|
33
|
-
# define SHAPE_MAX_VARIATIONS 8
|
|
34
|
-
|
|
35
|
-
# define INVALID_SHAPE_ID SHAPE_MASK
|
|
36
|
-
# define ROOT_SHAPE_ID 0x0
|
|
37
|
-
|
|
38
|
-
# define SPECIAL_CONST_SHAPE_ID (ROOT_SHAPE_ID + 1)
|
|
39
|
-
# define OBJ_TOO_COMPLEX_SHAPE_ID (SPECIAL_CONST_SHAPE_ID + 1)
|
|
40
|
-
# define FIRST_T_OBJECT_SHAPE_ID (OBJ_TOO_COMPLEX_SHAPE_ID + 1)
|
|
41
|
-
|
|
42
|
-
typedef struct redblack_node redblack_node_t;
|
|
43
|
-
|
|
44
|
-
struct rb_shape {
|
|
45
|
-
struct rb_id_table * edges; // id_table from ID (ivar) to next shape
|
|
46
|
-
ID edge_name; // ID (ivar) for transition from parent to rb_shape
|
|
47
|
-
attr_index_t next_iv_index;
|
|
48
|
-
uint32_t capacity; // Total capacity of the object with this shape
|
|
49
|
-
uint8_t type;
|
|
50
|
-
uint8_t heap_index;
|
|
51
|
-
shape_id_t parent_id;
|
|
52
|
-
redblack_node_t * ancestor_index;
|
|
53
|
-
};
|
|
54
|
-
|
|
55
|
-
typedef struct rb_shape rb_shape_t;
|
|
56
|
-
|
|
57
|
-
struct redblack_node {
|
|
58
|
-
ID key;
|
|
59
|
-
rb_shape_t * value;
|
|
60
|
-
redblack_id_t l;
|
|
61
|
-
redblack_id_t r;
|
|
62
|
-
};
|
|
63
|
-
|
|
64
|
-
enum shape_type {
|
|
65
|
-
SHAPE_ROOT,
|
|
66
|
-
SHAPE_IVAR,
|
|
67
|
-
SHAPE_FROZEN,
|
|
68
|
-
SHAPE_T_OBJECT,
|
|
69
|
-
SHAPE_OBJ_TOO_COMPLEX,
|
|
70
|
-
};
|
|
71
|
-
|
|
72
|
-
typedef struct {
|
|
73
|
-
/* object shapes */
|
|
74
|
-
rb_shape_t *shape_list;
|
|
75
|
-
rb_shape_t *root_shape;
|
|
76
|
-
shape_id_t next_shape_id;
|
|
77
|
-
|
|
78
|
-
redblack_node_t *shape_cache;
|
|
79
|
-
unsigned int cache_size;
|
|
80
|
-
} rb_shape_tree_t;
|
|
81
|
-
RUBY_EXTERN rb_shape_tree_t *rb_shape_tree_ptr;
|
|
82
|
-
|
|
83
|
-
static inline rb_shape_tree_t *
|
|
84
|
-
rb_current_shape_tree(void)
|
|
85
|
-
{
|
|
86
|
-
return rb_shape_tree_ptr;
|
|
87
|
-
}
|
|
88
|
-
#define GET_SHAPE_TREE() rb_current_shape_tree()
|
|
89
|
-
|
|
90
|
-
static inline shape_id_t
|
|
91
|
-
get_shape_id_from_flags(VALUE obj)
|
|
92
|
-
{
|
|
93
|
-
RUBY_ASSERT(!RB_SPECIAL_CONST_P(obj));
|
|
94
|
-
return (shape_id_t)(SHAPE_MASK & ((RBASIC(obj)->flags) >> SHAPE_FLAG_SHIFT));
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
static inline void
|
|
98
|
-
set_shape_id_in_flags(VALUE obj, shape_id_t shape_id)
|
|
99
|
-
{
|
|
100
|
-
// Ractors are occupying the upper 32 bits of flags, but only in debug mode
|
|
101
|
-
// Object shapes are occupying top bits
|
|
102
|
-
RBASIC(obj)->flags &= SHAPE_FLAG_MASK;
|
|
103
|
-
RBASIC(obj)->flags |= ((VALUE)(shape_id) << SHAPE_FLAG_SHIFT);
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
#if SHAPE_IN_BASIC_FLAGS
|
|
108
|
-
static inline shape_id_t
|
|
109
|
-
RBASIC_SHAPE_ID(VALUE obj)
|
|
110
|
-
{
|
|
111
|
-
return get_shape_id_from_flags(obj);
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
static inline void
|
|
115
|
-
RBASIC_SET_SHAPE_ID(VALUE obj, shape_id_t shape_id)
|
|
116
|
-
{
|
|
117
|
-
set_shape_id_in_flags(obj, shape_id);
|
|
118
|
-
}
|
|
119
|
-
#endif
|
|
120
|
-
|
|
121
|
-
static inline shape_id_t
|
|
122
|
-
ROBJECT_SHAPE_ID(VALUE obj)
|
|
123
|
-
{
|
|
124
|
-
RBIMPL_ASSERT_TYPE(obj, RUBY_T_OBJECT);
|
|
125
|
-
return get_shape_id_from_flags(obj);
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
static inline void
|
|
129
|
-
ROBJECT_SET_SHAPE_ID(VALUE obj, shape_id_t shape_id)
|
|
130
|
-
{
|
|
131
|
-
RBIMPL_ASSERT_TYPE(obj, RUBY_T_OBJECT);
|
|
132
|
-
set_shape_id_in_flags(obj, shape_id);
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
static inline shape_id_t
|
|
136
|
-
RCLASS_SHAPE_ID(VALUE obj)
|
|
137
|
-
{
|
|
138
|
-
RUBY_ASSERT(RB_TYPE_P(obj, T_CLASS) || RB_TYPE_P(obj, T_MODULE));
|
|
139
|
-
return get_shape_id_from_flags(obj);
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
static inline void
|
|
143
|
-
RCLASS_SET_SHAPE_ID(VALUE obj, shape_id_t shape_id)
|
|
144
|
-
{
|
|
145
|
-
RUBY_ASSERT(RB_TYPE_P(obj, T_CLASS) || RB_TYPE_P(obj, T_MODULE));
|
|
146
|
-
set_shape_id_in_flags(obj, shape_id);
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
rb_shape_t * rb_shape_get_root_shape(void);
|
|
150
|
-
int32_t rb_shape_id_offset(void);
|
|
151
|
-
|
|
152
|
-
rb_shape_t * rb_shape_get_parent(rb_shape_t * shape);
|
|
153
|
-
|
|
154
|
-
RUBY_FUNC_EXPORTED rb_shape_t *rb_shape_get_shape_by_id(shape_id_t shape_id);
|
|
155
|
-
RUBY_FUNC_EXPORTED shape_id_t rb_shape_get_shape_id(VALUE obj);
|
|
156
|
-
rb_shape_t * rb_shape_get_next_iv_shape(rb_shape_t * shape, ID id);
|
|
157
|
-
bool rb_shape_get_iv_index(rb_shape_t * shape, ID id, attr_index_t * value);
|
|
158
|
-
bool rb_shape_get_iv_index_with_hint(shape_id_t shape_id, ID id, attr_index_t * value, shape_id_t *shape_id_hint);
|
|
159
|
-
RUBY_FUNC_EXPORTED bool rb_shape_obj_too_complex(VALUE obj);
|
|
160
|
-
|
|
161
|
-
void rb_shape_set_shape(VALUE obj, rb_shape_t* shape);
|
|
162
|
-
rb_shape_t* rb_shape_get_shape(VALUE obj);
|
|
163
|
-
int rb_shape_frozen_shape_p(rb_shape_t* shape);
|
|
164
|
-
rb_shape_t* rb_shape_transition_shape_frozen(VALUE obj);
|
|
165
|
-
bool rb_shape_transition_shape_remove_ivar(VALUE obj, ID id, rb_shape_t *shape, VALUE * removed);
|
|
166
|
-
rb_shape_t* rb_shape_get_next(rb_shape_t* shape, VALUE obj, ID id);
|
|
167
|
-
rb_shape_t* rb_shape_get_next_no_warnings(rb_shape_t* shape, VALUE obj, ID id);
|
|
168
|
-
|
|
169
|
-
rb_shape_t * rb_shape_rebuild_shape(rb_shape_t * initial_shape, rb_shape_t * dest_shape);
|
|
170
|
-
|
|
171
|
-
static inline uint32_t
|
|
172
|
-
ROBJECT_IV_CAPACITY(VALUE obj)
|
|
173
|
-
{
|
|
174
|
-
RBIMPL_ASSERT_TYPE(obj, RUBY_T_OBJECT);
|
|
175
|
-
// Asking for capacity doesn't make sense when the object is using
|
|
176
|
-
// a hash table for storing instance variables
|
|
177
|
-
RUBY_ASSERT(!rb_shape_obj_too_complex(obj));
|
|
178
|
-
return rb_shape_get_shape_by_id(ROBJECT_SHAPE_ID(obj))->capacity;
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
static inline st_table *
|
|
182
|
-
ROBJECT_IV_HASH(VALUE obj)
|
|
183
|
-
{
|
|
184
|
-
RBIMPL_ASSERT_TYPE(obj, RUBY_T_OBJECT);
|
|
185
|
-
RUBY_ASSERT(rb_shape_obj_too_complex(obj));
|
|
186
|
-
return (st_table *)ROBJECT(obj)->as.heap.ivptr;
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
static inline void
|
|
190
|
-
ROBJECT_SET_IV_HASH(VALUE obj, const st_table *tbl)
|
|
191
|
-
{
|
|
192
|
-
RBIMPL_ASSERT_TYPE(obj, RUBY_T_OBJECT);
|
|
193
|
-
RUBY_ASSERT(rb_shape_obj_too_complex(obj));
|
|
194
|
-
ROBJECT(obj)->as.heap.ivptr = (VALUE *)tbl;
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
size_t rb_id_table_size(const struct rb_id_table *tbl);
|
|
198
|
-
|
|
199
|
-
static inline uint32_t
|
|
200
|
-
ROBJECT_IV_COUNT(VALUE obj)
|
|
201
|
-
{
|
|
202
|
-
if (rb_shape_obj_too_complex(obj)) {
|
|
203
|
-
return (uint32_t)rb_st_table_size(ROBJECT_IV_HASH(obj));
|
|
204
|
-
}
|
|
205
|
-
else {
|
|
206
|
-
RBIMPL_ASSERT_TYPE(obj, RUBY_T_OBJECT);
|
|
207
|
-
RUBY_ASSERT(!rb_shape_obj_too_complex(obj));
|
|
208
|
-
return rb_shape_get_shape_by_id(ROBJECT_SHAPE_ID(obj))->next_iv_index;
|
|
209
|
-
}
|
|
210
|
-
}
|
|
211
|
-
|
|
212
|
-
static inline uint32_t
|
|
213
|
-
RBASIC_IV_COUNT(VALUE obj)
|
|
214
|
-
{
|
|
215
|
-
return rb_shape_get_shape_by_id(rb_shape_get_shape_id(obj))->next_iv_index;
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
rb_shape_t *rb_shape_traverse_from_new_root(rb_shape_t *initial_shape, rb_shape_t *orig_shape);
|
|
219
|
-
|
|
220
|
-
bool rb_shape_set_shape_id(VALUE obj, shape_id_t shape_id);
|
|
221
|
-
|
|
222
|
-
VALUE rb_obj_debug_shape(VALUE self, VALUE obj);
|
|
223
|
-
|
|
224
|
-
// For ext/objspace
|
|
225
|
-
RUBY_SYMBOL_EXPORT_BEGIN
|
|
226
|
-
typedef void each_shape_callback(rb_shape_t * shape, void *data);
|
|
227
|
-
void rb_shape_each_shape(each_shape_callback callback, void *data);
|
|
228
|
-
size_t rb_shape_memsize(rb_shape_t *shape);
|
|
229
|
-
size_t rb_shape_edges_count(rb_shape_t *shape);
|
|
230
|
-
size_t rb_shape_depth(rb_shape_t *shape);
|
|
231
|
-
shape_id_t rb_shape_id(rb_shape_t * shape);
|
|
232
|
-
RUBY_SYMBOL_EXPORT_END
|
|
233
|
-
|
|
234
|
-
#endif
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/data/lib/datadog/ruby_core_source/{ruby-3.5.0-preview1 → ruby-4.0.0-p0}/internal/compilers.h
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/data/lib/datadog/ruby_core_source/{ruby-3.5.0-preview1 → ruby-4.0.0-p0}/internal/enumerator.h
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
/data/lib/datadog/ruby_core_source/{ruby-3.5.0-preview1 → ruby-4.0.0-p0}/internal/loadpath.h
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/data/lib/datadog/ruby_core_source/{ruby-3.5.0-preview1 → ruby-4.0.0-p0}/internal/rational.h
RENAMED
|
File without changes
|
/data/lib/datadog/ruby_core_source/{ruby-3.5.0-preview1 → ruby-4.0.0-p0}/internal/ruby_parser.h
RENAMED
|
File without changes
|
|
File without changes
|
/data/lib/datadog/ruby_core_source/{ruby-3.5.0-preview1 → ruby-4.0.0-p0}/internal/static_assert.h
RENAMED
|
File without changes
|
/data/lib/datadog/ruby_core_source/{ruby-3.5.0-preview1 → ruby-4.0.0-p0}/internal/transcode.h
RENAMED
|
File without changes
|
|
File without changes
|
/data/lib/datadog/ruby_core_source/{ruby-3.5.0-preview1 → ruby-4.0.0-p0}/internal/warnings.h
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/data/lib/datadog/ruby_core_source/{ruby-3.5.0-preview1 → ruby-4.0.0-p0}/prism/prettyprint.h
RENAMED
|
File without changes
|
/data/lib/datadog/ruby_core_source/{ruby-3.5.0-preview1 → ruby-4.0.0-p0}/prism/static_literals.h
RENAMED
|
File without changes
|
/data/lib/datadog/ruby_core_source/{ruby-3.5.0-preview1 → ruby-4.0.0-p0}/prism/util/pm_char.h
RENAMED
|
File without changes
|
|
File without changes
|
/data/lib/datadog/ruby_core_source/{ruby-3.5.0-preview1 → ruby-4.0.0-p0}/prism/util/pm_memchr.h
RENAMED
|
File without changes
|
|
File without changes
|
/data/lib/datadog/ruby_core_source/{ruby-3.5.0-preview1 → ruby-4.0.0-p0}/prism/util/pm_strncasecmp.h
RENAMED
|
File without changes
|
/data/lib/datadog/ruby_core_source/{ruby-3.5.0-preview1 → ruby-4.0.0-p0}/prism/util/pm_strpbrk.h
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/data/lib/datadog/ruby_core_source/{ruby-3.5.0-preview1 → ruby-4.0.0-preview2}/internal/bits.h
RENAMED
|
File without changes
|
/data/lib/datadog/ruby_core_source/{ruby-3.5.0-preview1 → ruby-4.0.0-preview2}/internal/cont.h
RENAMED
|
File without changes
|
/data/lib/datadog/ruby_core_source/{ruby-3.5.0-preview1 → ruby-4.0.0-preview2}/internal/time.h
RENAMED
|
File without changes
|
|
File without changes
|