datadog-ruby_core_source 3.5.3 → 3.5.5
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/datadog-ruby_core_source.gemspec +1 -1
- data/lib/datadog/ruby_core_source/ruby-2.5.0-p0/thread_win32.h +36 -0
- data/lib/datadog/ruby_core_source/ruby-2.5.1-p57/thread_win32.h +36 -0
- data/lib/datadog/ruby_core_source/ruby-2.5.4-p155/thread_win32.h +36 -0
- data/lib/datadog/ruby_core_source/ruby-2.6.0-p0/ccan/build_assert/build_assert.h +40 -0
- data/lib/datadog/ruby_core_source/ruby-2.6.0-p0/ccan/check_type/check_type.h +63 -0
- data/lib/datadog/ruby_core_source/ruby-2.6.0-p0/ccan/container_of/container_of.h +142 -0
- data/lib/datadog/ruby_core_source/ruby-2.6.0-p0/ccan/list/list.h +788 -0
- data/lib/datadog/ruby_core_source/ruby-2.6.0-p0/ccan/str/str.h +16 -0
- data/lib/datadog/ruby_core_source/ruby-2.6.0-p0/id.h +252 -0
- data/lib/datadog/ruby_core_source/ruby-2.6.0-p0/internal.h +2465 -0
- data/lib/datadog/ruby_core_source/ruby-2.6.0-p0/iseq.h +304 -0
- data/lib/datadog/ruby_core_source/ruby-2.6.0-p0/method.h +229 -0
- data/lib/datadog/ruby_core_source/ruby-2.6.0-p0/node.h +449 -0
- data/lib/datadog/ruby_core_source/ruby-2.6.0-p0/ruby_assert.h +60 -0
- data/lib/datadog/ruby_core_source/ruby-2.6.0-p0/ruby_atomic.h +244 -0
- data/lib/datadog/ruby_core_source/ruby-2.6.0-p0/thread_pthread.h +75 -0
- data/lib/datadog/ruby_core_source/ruby-2.6.0-p0/thread_win32.h +36 -0
- data/lib/datadog/ruby_core_source/ruby-2.6.0-p0/vm_core.h +1902 -0
- data/lib/datadog/ruby_core_source/ruby-2.6.0-p0/vm_opts.h +70 -0
- data/lib/datadog/ruby_core_source/ruby-2.7.0-p0/ccan/build_assert/build_assert.h +40 -0
- data/lib/datadog/ruby_core_source/ruby-2.7.0-p0/ccan/check_type/check_type.h +63 -0
- data/lib/datadog/ruby_core_source/ruby-2.7.0-p0/ccan/container_of/container_of.h +142 -0
- data/lib/datadog/ruby_core_source/ruby-2.7.0-p0/ccan/list/list.h +788 -0
- data/lib/datadog/ruby_core_source/ruby-2.7.0-p0/ccan/str/str.h +16 -0
- data/lib/datadog/ruby_core_source/ruby-2.7.0-p0/id.h +290 -0
- data/lib/datadog/ruby_core_source/ruby-2.7.0-p0/internal.h +2697 -0
- data/lib/datadog/ruby_core_source/ruby-2.7.0-p0/iseq.h +312 -0
- data/lib/datadog/ruby_core_source/ruby-2.7.0-p0/method.h +229 -0
- data/lib/datadog/ruby_core_source/ruby-2.7.0-p0/node.h +476 -0
- data/lib/datadog/ruby_core_source/ruby-2.7.0-p0/ruby_assert.h +15 -0
- data/lib/datadog/ruby_core_source/ruby-2.7.0-p0/ruby_atomic.h +244 -0
- data/lib/datadog/ruby_core_source/ruby-2.7.0-p0/thread_pthread.h +75 -0
- data/lib/datadog/ruby_core_source/ruby-2.7.0-p0/thread_win32.h +36 -0
- data/lib/datadog/ruby_core_source/ruby-2.7.0-p0/vm_core.h +1968 -0
- data/lib/datadog/ruby_core_source/ruby-2.7.0-p0/vm_opts.h +72 -0
- data/lib/datadog/ruby_core_source/ruby-3.0.0-p0/ccan/build_assert/build_assert.h +40 -0
- data/lib/datadog/ruby_core_source/ruby-3.0.0-p0/ccan/check_type/check_type.h +63 -0
- data/lib/datadog/ruby_core_source/ruby-3.0.0-p0/ccan/container_of/container_of.h +142 -0
- data/lib/datadog/ruby_core_source/ruby-3.0.0-p0/ccan/list/list.h +788 -0
- data/lib/datadog/ruby_core_source/ruby-3.0.0-p0/ccan/str/str.h +16 -0
- data/lib/datadog/ruby_core_source/ruby-3.0.0-p0/id.h +290 -0
- data/lib/datadog/ruby_core_source/ruby-3.0.0-p0/id_table.h +36 -0
- data/lib/datadog/ruby_core_source/ruby-3.0.0-p0/internal/array.h +119 -0
- data/lib/datadog/ruby_core_source/ruby-3.0.0-p0/internal/class.h +174 -0
- data/lib/datadog/ruby_core_source/ruby-3.0.0-p0/internal/compilers.h +108 -0
- data/lib/datadog/ruby_core_source/ruby-3.0.0-p0/internal/gc.h +161 -0
- data/lib/datadog/ruby_core_source/ruby-3.0.0-p0/internal/imemo.h +243 -0
- data/lib/datadog/ruby_core_source/ruby-3.0.0-p0/internal/serial.h +24 -0
- data/lib/datadog/ruby_core_source/ruby-3.0.0-p0/internal/static_assert.h +17 -0
- data/lib/datadog/ruby_core_source/ruby-3.0.0-p0/internal/vm.h +136 -0
- data/lib/datadog/ruby_core_source/ruby-3.0.0-p0/internal/warnings.h +17 -0
- data/lib/datadog/ruby_core_source/ruby-3.0.0-p0/internal.h +107 -0
- data/lib/datadog/ruby_core_source/ruby-3.0.0-p0/iseq.h +305 -0
- data/lib/datadog/ruby_core_source/ruby-3.0.0-p0/method.h +245 -0
- data/lib/datadog/ruby_core_source/ruby-3.0.0-p0/node.h +484 -0
- data/lib/datadog/ruby_core_source/ruby-3.0.0-p0/ractor_core.h +343 -0
- data/lib/datadog/ruby_core_source/{ruby-3.4.0-p0/internal/dir.h → ruby-3.0.0-p0/ruby_assert.h} +7 -8
- data/lib/datadog/ruby_core_source/ruby-3.0.0-p0/ruby_atomic.h +23 -0
- data/lib/datadog/ruby_core_source/ruby-3.0.0-p0/thread_pthread.h +115 -0
- data/lib/datadog/ruby_core_source/ruby-3.0.0-p0/thread_win32.h +61 -0
- data/lib/datadog/ruby_core_source/ruby-3.0.0-p0/vm_core.h +2023 -0
- data/lib/datadog/ruby_core_source/ruby-3.0.0-p0/vm_debug.h +116 -0
- data/lib/datadog/ruby_core_source/ruby-3.0.0-p0/vm_opts.h +73 -0
- data/lib/datadog/ruby_core_source/ruby-3.1.0-p0/ccan/build_assert/build_assert.h +40 -0
- data/lib/datadog/ruby_core_source/ruby-3.1.0-p0/ccan/check_type/check_type.h +63 -0
- data/lib/datadog/ruby_core_source/ruby-3.1.0-p0/ccan/container_of/container_of.h +142 -0
- data/lib/datadog/ruby_core_source/ruby-3.1.0-p0/ccan/list/list.h +788 -0
- data/lib/datadog/ruby_core_source/ruby-3.1.0-p0/ccan/str/str.h +16 -0
- data/lib/datadog/ruby_core_source/ruby-3.1.0-p0/darray.h +198 -0
- data/lib/datadog/ruby_core_source/ruby-3.1.0-p0/id.h +293 -0
- data/lib/datadog/ruby_core_source/ruby-3.1.0-p0/id_table.h +36 -0
- data/lib/datadog/ruby_core_source/ruby-3.1.0-p0/internal/array.h +113 -0
- data/lib/datadog/ruby_core_source/ruby-3.1.0-p0/internal/class.h +196 -0
- data/lib/datadog/ruby_core_source/ruby-3.1.0-p0/internal/compilers.h +107 -0
- data/lib/datadog/ruby_core_source/ruby-3.1.0-p0/internal/gc.h +186 -0
- data/lib/datadog/ruby_core_source/ruby-3.1.0-p0/internal/imemo.h +243 -0
- data/lib/datadog/ruby_core_source/ruby-3.1.0-p0/internal/serial.h +23 -0
- data/lib/datadog/ruby_core_source/{ruby-3.3.5-p100/internal/loadpath.h → ruby-3.1.0-p0/internal/static_assert.h} +8 -8
- data/lib/datadog/ruby_core_source/ruby-3.1.0-p0/internal/vm.h +133 -0
- data/lib/datadog/ruby_core_source/ruby-3.1.0-p0/internal/warnings.h +16 -0
- data/lib/datadog/ruby_core_source/ruby-3.1.0-p0/internal.h +109 -0
- data/lib/datadog/ruby_core_source/ruby-3.1.0-p0/iseq.h +322 -0
- data/lib/datadog/ruby_core_source/ruby-3.1.0-p0/method.h +253 -0
- data/lib/datadog/ruby_core_source/ruby-3.1.0-p0/node.h +510 -0
- data/lib/datadog/ruby_core_source/ruby-3.1.0-p0/ractor_core.h +346 -0
- data/lib/datadog/ruby_core_source/{ruby-3.3.0-p0/internal/dir.h → ruby-3.1.0-p0/ruby_assert.h} +6 -8
- data/lib/datadog/ruby_core_source/ruby-3.1.0-p0/ruby_atomic.h +23 -0
- data/lib/datadog/ruby_core_source/ruby-3.1.0-p0/thread_pthread.h +115 -0
- data/lib/datadog/ruby_core_source/ruby-3.1.0-p0/vm_core.h +2107 -0
- data/lib/datadog/ruby_core_source/ruby-3.1.0-p0/vm_debug.h +124 -0
- data/lib/datadog/ruby_core_source/ruby-3.1.0-p0/vm_opts.h +73 -0
- data/lib/datadog/ruby_core_source/ruby-3.2.0-p0/ccan/build_assert/build_assert.h +40 -0
- data/lib/datadog/ruby_core_source/ruby-3.2.0-p0/ccan/check_type/check_type.h +63 -0
- data/lib/datadog/ruby_core_source/ruby-3.2.0-p0/ccan/container_of/container_of.h +142 -0
- data/lib/datadog/ruby_core_source/ruby-3.2.0-p0/ccan/list/list.h +789 -0
- data/lib/datadog/ruby_core_source/ruby-3.2.0-p0/ccan/str/str.h +17 -0
- data/lib/datadog/ruby_core_source/ruby-3.2.0-p0/id.h +299 -0
- data/lib/datadog/ruby_core_source/ruby-3.2.0-p0/id_table.h +39 -0
- data/lib/datadog/ruby_core_source/ruby-3.2.0-p0/internal/array.h +163 -0
- data/lib/datadog/ruby_core_source/ruby-3.2.0-p0/internal/basic_operators.h +64 -0
- data/lib/datadog/ruby_core_source/ruby-3.2.0-p0/internal/class.h +182 -0
- data/lib/datadog/ruby_core_source/ruby-3.2.0-p0/internal/compilers.h +107 -0
- data/lib/datadog/ruby_core_source/ruby-3.2.0-p0/internal/gc.h +192 -0
- data/lib/datadog/ruby_core_source/ruby-3.2.0-p0/internal/imemo.h +242 -0
- data/lib/datadog/ruby_core_source/ruby-3.2.0-p0/internal/serial.h +23 -0
- data/lib/datadog/ruby_core_source/{ruby-3.3.0-p0/internal/loadpath.h → ruby-3.2.0-p0/internal/static_assert.h} +8 -8
- data/lib/datadog/ruby_core_source/ruby-3.2.0-p0/internal/vm.h +134 -0
- data/lib/datadog/ruby_core_source/ruby-3.2.0-p0/internal/warnings.h +16 -0
- data/lib/datadog/ruby_core_source/ruby-3.2.0-p0/internal.h +113 -0
- data/lib/datadog/ruby_core_source/ruby-3.2.0-p0/iseq.h +329 -0
- data/lib/datadog/ruby_core_source/ruby-3.2.0-p0/method.h +254 -0
- data/lib/datadog/ruby_core_source/ruby-3.2.0-p0/node.h +514 -0
- data/lib/datadog/ruby_core_source/ruby-3.2.0-p0/ractor_core.h +342 -0
- data/lib/datadog/ruby_core_source/{ruby-3.3.5-p100/internal/dir.h → ruby-3.2.0-p0/ruby_assert.h} +6 -8
- data/lib/datadog/ruby_core_source/ruby-3.2.0-p0/ruby_atomic.h +23 -0
- data/lib/datadog/ruby_core_source/ruby-3.2.0-p0/shape.h +232 -0
- data/lib/datadog/ruby_core_source/ruby-3.2.0-p0/thread_none.h +20 -0
- data/lib/datadog/ruby_core_source/ruby-3.2.0-p0/thread_pthread.h +133 -0
- data/lib/datadog/ruby_core_source/ruby-3.2.0-p0/vm_core.h +2106 -0
- data/lib/datadog/ruby_core_source/ruby-3.2.0-p0/vm_debug.h +122 -0
- data/lib/datadog/ruby_core_source/ruby-3.2.0-p0/vm_opts.h +73 -0
- data/lib/datadog/ruby_core_source/ruby-3.3.0-p0/constant.h +53 -0
- data/lib/datadog/ruby_core_source/ruby-3.3.0-p0/debug_counter.h +423 -0
- data/lib/datadog/ruby_core_source/ruby-3.3.0-p0/vm_sync.h +137 -0
- data/lib/datadog/ruby_core_source/ruby-3.3.5-p100/constant.h +53 -0
- data/lib/datadog/ruby_core_source/ruby-3.3.5-p100/debug_counter.h +423 -0
- data/lib/datadog/ruby_core_source/ruby-3.3.5-p100/vm_sync.h +137 -0
- data/lib/datadog/ruby_core_source/ruby-3.4.0-p0/constant.h +53 -0
- data/lib/datadog/ruby_core_source/ruby-3.4.0-p0/debug_counter.h +423 -0
- data/lib/datadog/ruby_core_source/ruby-3.4.0-p0/vm_sync.h +137 -0
- data/lib/datadog/ruby_core_source/ruby-4.0.0-p0/constant.h +53 -0
- data/lib/datadog/ruby_core_source/ruby-4.0.0-p0/debug_counter.h +425 -0
- data/lib/datadog/ruby_core_source/ruby-4.0.0-p0/vm_sync.h +160 -0
- data/lib/datadog/ruby_core_source/ruby-4.0.6-p0/constant.h +53 -0
- data/lib/datadog/ruby_core_source/ruby-4.0.6-p0/debug_counter.h +426 -0
- data/lib/datadog/ruby_core_source/ruby-4.0.6-p0/vm_sync.h +160 -0
- data/lib/datadog/ruby_core_source/version.rb +1 -1
- metadata +140 -226
- data/lib/datadog/ruby_core_source/ruby-3.3.0-p0/internal/bignum.h +0 -244
- data/lib/datadog/ruby_core_source/ruby-3.3.0-p0/internal/bits.h +0 -568
- data/lib/datadog/ruby_core_source/ruby-3.3.0-p0/internal/cmdlineopt.h +0 -65
- data/lib/datadog/ruby_core_source/ruby-3.3.0-p0/internal/compar.h +0 -29
- data/lib/datadog/ruby_core_source/ruby-3.3.0-p0/internal/compile.h +0 -34
- data/lib/datadog/ruby_core_source/ruby-3.3.0-p0/internal/complex.h +0 -29
- data/lib/datadog/ruby_core_source/ruby-3.3.0-p0/internal/cont.h +0 -35
- data/lib/datadog/ruby_core_source/ruby-3.3.0-p0/internal/enc.h +0 -19
- data/lib/datadog/ruby_core_source/ruby-3.3.0-p0/internal/encoding.h +0 -35
- data/lib/datadog/ruby_core_source/ruby-3.3.0-p0/internal/enum.h +0 -18
- data/lib/datadog/ruby_core_source/ruby-3.3.0-p0/internal/enumerator.h +0 -21
- data/lib/datadog/ruby_core_source/ruby-3.3.0-p0/internal/error.h +0 -216
- data/lib/datadog/ruby_core_source/ruby-3.3.0-p0/internal/eval.h +0 -32
- data/lib/datadog/ruby_core_source/ruby-3.3.0-p0/internal/file.h +0 -38
- data/lib/datadog/ruby_core_source/ruby-3.3.0-p0/internal/fixnum.h +0 -184
- data/lib/datadog/ruby_core_source/ruby-3.3.0-p0/internal/hash.h +0 -191
- data/lib/datadog/ruby_core_source/ruby-3.3.0-p0/internal/inits.h +0 -50
- data/lib/datadog/ruby_core_source/ruby-3.3.0-p0/internal/io.h +0 -137
- data/lib/datadog/ruby_core_source/ruby-3.3.0-p0/internal/load.h +0 -18
- data/lib/datadog/ruby_core_source/ruby-3.3.0-p0/internal/math.h +0 -23
- data/lib/datadog/ruby_core_source/ruby-3.3.0-p0/internal/missing.h +0 -18
- data/lib/datadog/ruby_core_source/ruby-3.3.0-p0/internal/numeric.h +0 -273
- data/lib/datadog/ruby_core_source/ruby-3.3.0-p0/internal/object.h +0 -60
- data/lib/datadog/ruby_core_source/ruby-3.3.0-p0/internal/parse.h +0 -108
- data/lib/datadog/ruby_core_source/ruby-3.3.0-p0/internal/proc.h +0 -30
- data/lib/datadog/ruby_core_source/ruby-3.3.0-p0/internal/process.h +0 -124
- data/lib/datadog/ruby_core_source/ruby-3.3.0-p0/internal/ractor.h +0 -6
- data/lib/datadog/ruby_core_source/ruby-3.3.0-p0/internal/random.h +0 -17
- data/lib/datadog/ruby_core_source/ruby-3.3.0-p0/internal/range.h +0 -40
- data/lib/datadog/ruby_core_source/ruby-3.3.0-p0/internal/rational.h +0 -71
- data/lib/datadog/ruby_core_source/ruby-3.3.0-p0/internal/re.h +0 -28
- data/lib/datadog/ruby_core_source/ruby-3.3.0-p0/internal/ruby_parser.h +0 -69
- data/lib/datadog/ruby_core_source/ruby-3.3.0-p0/internal/sanitizers.h +0 -186
- data/lib/datadog/ruby_core_source/ruby-3.3.0-p0/internal/signal.h +0 -25
- data/lib/datadog/ruby_core_source/ruby-3.3.0-p0/internal/string.h +0 -159
- data/lib/datadog/ruby_core_source/ruby-3.3.0-p0/internal/struct.h +0 -127
- data/lib/datadog/ruby_core_source/ruby-3.3.0-p0/internal/symbol.h +0 -45
- data/lib/datadog/ruby_core_source/ruby-3.3.0-p0/internal/thread.h +0 -78
- data/lib/datadog/ruby_core_source/ruby-3.3.0-p0/internal/time.h +0 -34
- data/lib/datadog/ruby_core_source/ruby-3.3.0-p0/internal/transcode.h +0 -23
- data/lib/datadog/ruby_core_source/ruby-3.3.0-p0/internal/util.h +0 -27
- data/lib/datadog/ruby_core_source/ruby-3.3.0-p0/prism/extension.h +0 -18
- data/lib/datadog/ruby_core_source/ruby-3.3.5-p100/internal/bignum.h +0 -244
- data/lib/datadog/ruby_core_source/ruby-3.3.5-p100/internal/bits.h +0 -568
- data/lib/datadog/ruby_core_source/ruby-3.3.5-p100/internal/cmdlineopt.h +0 -65
- data/lib/datadog/ruby_core_source/ruby-3.3.5-p100/internal/compar.h +0 -29
- data/lib/datadog/ruby_core_source/ruby-3.3.5-p100/internal/compile.h +0 -34
- data/lib/datadog/ruby_core_source/ruby-3.3.5-p100/internal/complex.h +0 -29
- data/lib/datadog/ruby_core_source/ruby-3.3.5-p100/internal/cont.h +0 -35
- data/lib/datadog/ruby_core_source/ruby-3.3.5-p100/internal/enc.h +0 -19
- data/lib/datadog/ruby_core_source/ruby-3.3.5-p100/internal/encoding.h +0 -35
- data/lib/datadog/ruby_core_source/ruby-3.3.5-p100/internal/enum.h +0 -18
- data/lib/datadog/ruby_core_source/ruby-3.3.5-p100/internal/enumerator.h +0 -21
- data/lib/datadog/ruby_core_source/ruby-3.3.5-p100/internal/error.h +0 -216
- data/lib/datadog/ruby_core_source/ruby-3.3.5-p100/internal/eval.h +0 -33
- data/lib/datadog/ruby_core_source/ruby-3.3.5-p100/internal/file.h +0 -38
- data/lib/datadog/ruby_core_source/ruby-3.3.5-p100/internal/fixnum.h +0 -184
- data/lib/datadog/ruby_core_source/ruby-3.3.5-p100/internal/hash.h +0 -191
- data/lib/datadog/ruby_core_source/ruby-3.3.5-p100/internal/inits.h +0 -50
- data/lib/datadog/ruby_core_source/ruby-3.3.5-p100/internal/io.h +0 -137
- data/lib/datadog/ruby_core_source/ruby-3.3.5-p100/internal/load.h +0 -18
- data/lib/datadog/ruby_core_source/ruby-3.3.5-p100/internal/math.h +0 -23
- data/lib/datadog/ruby_core_source/ruby-3.3.5-p100/internal/missing.h +0 -18
- data/lib/datadog/ruby_core_source/ruby-3.3.5-p100/internal/numeric.h +0 -273
- data/lib/datadog/ruby_core_source/ruby-3.3.5-p100/internal/object.h +0 -62
- data/lib/datadog/ruby_core_source/ruby-3.3.5-p100/internal/parse.h +0 -108
- data/lib/datadog/ruby_core_source/ruby-3.3.5-p100/internal/proc.h +0 -30
- data/lib/datadog/ruby_core_source/ruby-3.3.5-p100/internal/process.h +0 -124
- data/lib/datadog/ruby_core_source/ruby-3.3.5-p100/internal/ractor.h +0 -6
- data/lib/datadog/ruby_core_source/ruby-3.3.5-p100/internal/random.h +0 -17
- data/lib/datadog/ruby_core_source/ruby-3.3.5-p100/internal/range.h +0 -40
- data/lib/datadog/ruby_core_source/ruby-3.3.5-p100/internal/rational.h +0 -71
- data/lib/datadog/ruby_core_source/ruby-3.3.5-p100/internal/re.h +0 -28
- data/lib/datadog/ruby_core_source/ruby-3.3.5-p100/internal/ruby_parser.h +0 -69
- data/lib/datadog/ruby_core_source/ruby-3.3.5-p100/internal/sanitizers.h +0 -186
- data/lib/datadog/ruby_core_source/ruby-3.3.5-p100/internal/signal.h +0 -25
- data/lib/datadog/ruby_core_source/ruby-3.3.5-p100/internal/string.h +0 -160
- data/lib/datadog/ruby_core_source/ruby-3.3.5-p100/internal/struct.h +0 -127
- data/lib/datadog/ruby_core_source/ruby-3.3.5-p100/internal/symbol.h +0 -45
- data/lib/datadog/ruby_core_source/ruby-3.3.5-p100/internal/thread.h +0 -78
- data/lib/datadog/ruby_core_source/ruby-3.3.5-p100/internal/time.h +0 -34
- data/lib/datadog/ruby_core_source/ruby-3.3.5-p100/internal/transcode.h +0 -23
- data/lib/datadog/ruby_core_source/ruby-3.3.5-p100/internal/util.h +0 -27
- data/lib/datadog/ruby_core_source/ruby-3.3.5-p100/prism/extension.h +0 -18
- data/lib/datadog/ruby_core_source/ruby-3.4.0-p0/internal/bignum.h +0 -244
- data/lib/datadog/ruby_core_source/ruby-3.4.0-p0/internal/bits.h +0 -650
- data/lib/datadog/ruby_core_source/ruby-3.4.0-p0/internal/cmdlineopt.h +0 -65
- data/lib/datadog/ruby_core_source/ruby-3.4.0-p0/internal/compar.h +0 -29
- data/lib/datadog/ruby_core_source/ruby-3.4.0-p0/internal/compile.h +0 -34
- data/lib/datadog/ruby_core_source/ruby-3.4.0-p0/internal/complex.h +0 -29
- data/lib/datadog/ruby_core_source/ruby-3.4.0-p0/internal/cont.h +0 -35
- data/lib/datadog/ruby_core_source/ruby-3.4.0-p0/internal/enc.h +0 -19
- data/lib/datadog/ruby_core_source/ruby-3.4.0-p0/internal/encoding.h +0 -38
- data/lib/datadog/ruby_core_source/ruby-3.4.0-p0/internal/enum.h +0 -18
- data/lib/datadog/ruby_core_source/ruby-3.4.0-p0/internal/enumerator.h +0 -21
- data/lib/datadog/ruby_core_source/ruby-3.4.0-p0/internal/error.h +0 -244
- data/lib/datadog/ruby_core_source/ruby-3.4.0-p0/internal/eval.h +0 -33
- data/lib/datadog/ruby_core_source/ruby-3.4.0-p0/internal/file.h +0 -38
- data/lib/datadog/ruby_core_source/ruby-3.4.0-p0/internal/fixnum.h +0 -185
- data/lib/datadog/ruby_core_source/ruby-3.4.0-p0/internal/hash.h +0 -192
- data/lib/datadog/ruby_core_source/ruby-3.4.0-p0/internal/inits.h +0 -47
- data/lib/datadog/ruby_core_source/ruby-3.4.0-p0/internal/io.h +0 -143
- data/lib/datadog/ruby_core_source/ruby-3.4.0-p0/internal/load.h +0 -18
- data/lib/datadog/ruby_core_source/ruby-3.4.0-p0/internal/loadpath.h +0 -16
- data/lib/datadog/ruby_core_source/ruby-3.4.0-p0/internal/math.h +0 -23
- data/lib/datadog/ruby_core_source/ruby-3.4.0-p0/internal/missing.h +0 -19
- data/lib/datadog/ruby_core_source/ruby-3.4.0-p0/internal/numeric.h +0 -274
- data/lib/datadog/ruby_core_source/ruby-3.4.0-p0/internal/object.h +0 -63
- data/lib/datadog/ruby_core_source/ruby-3.4.0-p0/internal/parse.h +0 -130
- data/lib/datadog/ruby_core_source/ruby-3.4.0-p0/internal/proc.h +0 -31
- data/lib/datadog/ruby_core_source/ruby-3.4.0-p0/internal/process.h +0 -124
- data/lib/datadog/ruby_core_source/ruby-3.4.0-p0/internal/ractor.h +0 -10
- data/lib/datadog/ruby_core_source/ruby-3.4.0-p0/internal/random.h +0 -17
- data/lib/datadog/ruby_core_source/ruby-3.4.0-p0/internal/range.h +0 -40
- data/lib/datadog/ruby_core_source/ruby-3.4.0-p0/internal/rational.h +0 -71
- data/lib/datadog/ruby_core_source/ruby-3.4.0-p0/internal/re.h +0 -28
- data/lib/datadog/ruby_core_source/ruby-3.4.0-p0/internal/ruby_parser.h +0 -102
- data/lib/datadog/ruby_core_source/ruby-3.4.0-p0/internal/signal.h +0 -24
- data/lib/datadog/ruby_core_source/ruby-3.4.0-p0/internal/st.h +0 -11
- data/lib/datadog/ruby_core_source/ruby-3.4.0-p0/internal/string.h +0 -198
- data/lib/datadog/ruby_core_source/ruby-3.4.0-p0/internal/struct.h +0 -127
- data/lib/datadog/ruby_core_source/ruby-3.4.0-p0/internal/symbol.h +0 -45
- data/lib/datadog/ruby_core_source/ruby-3.4.0-p0/internal/thread.h +0 -108
- data/lib/datadog/ruby_core_source/ruby-3.4.0-p0/internal/time.h +0 -34
- data/lib/datadog/ruby_core_source/ruby-3.4.0-p0/internal/transcode.h +0 -23
- data/lib/datadog/ruby_core_source/ruby-3.4.0-p0/internal/util.h +0 -27
- data/lib/datadog/ruby_core_source/ruby-3.4.0-p0/prism/extension.h +0 -19
- data/lib/datadog/ruby_core_source/ruby-4.0.0-p0/internal/bignum.h +0 -256
- data/lib/datadog/ruby_core_source/ruby-4.0.0-p0/internal/bits.h +0 -647
- data/lib/datadog/ruby_core_source/ruby-4.0.0-p0/internal/cmdlineopt.h +0 -64
- data/lib/datadog/ruby_core_source/ruby-4.0.0-p0/internal/compar.h +0 -29
- data/lib/datadog/ruby_core_source/ruby-4.0.0-p0/internal/compile.h +0 -34
- data/lib/datadog/ruby_core_source/ruby-4.0.0-p0/internal/complex.h +0 -29
- data/lib/datadog/ruby_core_source/ruby-4.0.0-p0/internal/concurrent_set.h +0 -21
- data/lib/datadog/ruby_core_source/ruby-4.0.0-p0/internal/cont.h +0 -34
- data/lib/datadog/ruby_core_source/ruby-4.0.0-p0/internal/dir.h +0 -16
- data/lib/datadog/ruby_core_source/ruby-4.0.0-p0/internal/enc.h +0 -19
- data/lib/datadog/ruby_core_source/ruby-4.0.0-p0/internal/encoding.h +0 -39
- data/lib/datadog/ruby_core_source/ruby-4.0.0-p0/internal/enum.h +0 -18
- data/lib/datadog/ruby_core_source/ruby-4.0.0-p0/internal/enumerator.h +0 -21
- data/lib/datadog/ruby_core_source/ruby-4.0.0-p0/internal/error.h +0 -251
- data/lib/datadog/ruby_core_source/ruby-4.0.0-p0/internal/eval.h +0 -43
- data/lib/datadog/ruby_core_source/ruby-4.0.0-p0/internal/file.h +0 -38
- data/lib/datadog/ruby_core_source/ruby-4.0.0-p0/internal/fixnum.h +0 -185
- data/lib/datadog/ruby_core_source/ruby-4.0.0-p0/internal/hash.h +0 -194
- data/lib/datadog/ruby_core_source/ruby-4.0.0-p0/internal/inits.h +0 -51
- data/lib/datadog/ruby_core_source/ruby-4.0.0-p0/internal/io.h +0 -163
- data/lib/datadog/ruby_core_source/ruby-4.0.0-p0/internal/load.h +0 -20
- data/lib/datadog/ruby_core_source/ruby-4.0.0-p0/internal/loadpath.h +0 -16
- data/lib/datadog/ruby_core_source/ruby-4.0.0-p0/internal/math.h +0 -23
- data/lib/datadog/ruby_core_source/ruby-4.0.0-p0/internal/missing.h +0 -19
- data/lib/datadog/ruby_core_source/ruby-4.0.0-p0/internal/numeric.h +0 -323
- data/lib/datadog/ruby_core_source/ruby-4.0.0-p0/internal/object.h +0 -63
- data/lib/datadog/ruby_core_source/ruby-4.0.0-p0/internal/parse.h +0 -131
- data/lib/datadog/ruby_core_source/ruby-4.0.0-p0/internal/proc.h +0 -30
- data/lib/datadog/ruby_core_source/ruby-4.0.0-p0/internal/process.h +0 -124
- data/lib/datadog/ruby_core_source/ruby-4.0.0-p0/internal/ractor.h +0 -10
- data/lib/datadog/ruby_core_source/ruby-4.0.0-p0/internal/random.h +0 -17
- data/lib/datadog/ruby_core_source/ruby-4.0.0-p0/internal/range.h +0 -40
- data/lib/datadog/ruby_core_source/ruby-4.0.0-p0/internal/rational.h +0 -71
- data/lib/datadog/ruby_core_source/ruby-4.0.0-p0/internal/re.h +0 -33
- data/lib/datadog/ruby_core_source/ruby-4.0.0-p0/internal/ruby_parser.h +0 -102
- data/lib/datadog/ruby_core_source/ruby-4.0.0-p0/internal/signal.h +0 -25
- data/lib/datadog/ruby_core_source/ruby-4.0.0-p0/internal/st.h +0 -11
- data/lib/datadog/ruby_core_source/ruby-4.0.0-p0/internal/string.h +0 -203
- data/lib/datadog/ruby_core_source/ruby-4.0.0-p0/internal/struct.h +0 -160
- data/lib/datadog/ruby_core_source/ruby-4.0.0-p0/internal/symbol.h +0 -46
- data/lib/datadog/ruby_core_source/ruby-4.0.0-p0/internal/thread.h +0 -112
- data/lib/datadog/ruby_core_source/ruby-4.0.0-p0/internal/time.h +0 -34
- data/lib/datadog/ruby_core_source/ruby-4.0.0-p0/internal/transcode.h +0 -23
- data/lib/datadog/ruby_core_source/ruby-4.0.0-p0/internal/util.h +0 -27
- data/lib/datadog/ruby_core_source/ruby-4.0.0-p0/prism/extension.h +0 -19
- data/lib/datadog/ruby_core_source/ruby-4.0.6-p0/internal/bignum.h +0 -256
- data/lib/datadog/ruby_core_source/ruby-4.0.6-p0/internal/bits.h +0 -647
- data/lib/datadog/ruby_core_source/ruby-4.0.6-p0/internal/cmdlineopt.h +0 -64
- data/lib/datadog/ruby_core_source/ruby-4.0.6-p0/internal/compar.h +0 -29
- data/lib/datadog/ruby_core_source/ruby-4.0.6-p0/internal/compile.h +0 -34
- data/lib/datadog/ruby_core_source/ruby-4.0.6-p0/internal/complex.h +0 -29
- data/lib/datadog/ruby_core_source/ruby-4.0.6-p0/internal/concurrent_set.h +0 -21
- data/lib/datadog/ruby_core_source/ruby-4.0.6-p0/internal/cont.h +0 -34
- data/lib/datadog/ruby_core_source/ruby-4.0.6-p0/internal/dir.h +0 -16
- data/lib/datadog/ruby_core_source/ruby-4.0.6-p0/internal/enc.h +0 -19
- data/lib/datadog/ruby_core_source/ruby-4.0.6-p0/internal/encoding.h +0 -39
- data/lib/datadog/ruby_core_source/ruby-4.0.6-p0/internal/enum.h +0 -18
- data/lib/datadog/ruby_core_source/ruby-4.0.6-p0/internal/enumerator.h +0 -21
- data/lib/datadog/ruby_core_source/ruby-4.0.6-p0/internal/error.h +0 -251
- data/lib/datadog/ruby_core_source/ruby-4.0.6-p0/internal/eval.h +0 -43
- data/lib/datadog/ruby_core_source/ruby-4.0.6-p0/internal/file.h +0 -38
- data/lib/datadog/ruby_core_source/ruby-4.0.6-p0/internal/fixnum.h +0 -185
- data/lib/datadog/ruby_core_source/ruby-4.0.6-p0/internal/hash.h +0 -194
- data/lib/datadog/ruby_core_source/ruby-4.0.6-p0/internal/inits.h +0 -51
- data/lib/datadog/ruby_core_source/ruby-4.0.6-p0/internal/io.h +0 -163
- data/lib/datadog/ruby_core_source/ruby-4.0.6-p0/internal/load.h +0 -20
- data/lib/datadog/ruby_core_source/ruby-4.0.6-p0/internal/loadpath.h +0 -16
- data/lib/datadog/ruby_core_source/ruby-4.0.6-p0/internal/math.h +0 -23
- data/lib/datadog/ruby_core_source/ruby-4.0.6-p0/internal/missing.h +0 -19
- data/lib/datadog/ruby_core_source/ruby-4.0.6-p0/internal/numeric.h +0 -323
- data/lib/datadog/ruby_core_source/ruby-4.0.6-p0/internal/object.h +0 -63
- data/lib/datadog/ruby_core_source/ruby-4.0.6-p0/internal/parse.h +0 -131
- data/lib/datadog/ruby_core_source/ruby-4.0.6-p0/internal/proc.h +0 -30
- data/lib/datadog/ruby_core_source/ruby-4.0.6-p0/internal/process.h +0 -124
- data/lib/datadog/ruby_core_source/ruby-4.0.6-p0/internal/ractor.h +0 -10
- data/lib/datadog/ruby_core_source/ruby-4.0.6-p0/internal/random.h +0 -17
- data/lib/datadog/ruby_core_source/ruby-4.0.6-p0/internal/range.h +0 -40
- data/lib/datadog/ruby_core_source/ruby-4.0.6-p0/internal/rational.h +0 -73
- data/lib/datadog/ruby_core_source/ruby-4.0.6-p0/internal/re.h +0 -33
- data/lib/datadog/ruby_core_source/ruby-4.0.6-p0/internal/ruby_parser.h +0 -102
- data/lib/datadog/ruby_core_source/ruby-4.0.6-p0/internal/signal.h +0 -25
- data/lib/datadog/ruby_core_source/ruby-4.0.6-p0/internal/st.h +0 -11
- data/lib/datadog/ruby_core_source/ruby-4.0.6-p0/internal/string.h +0 -203
- data/lib/datadog/ruby_core_source/ruby-4.0.6-p0/internal/struct.h +0 -160
- data/lib/datadog/ruby_core_source/ruby-4.0.6-p0/internal/symbol.h +0 -46
- data/lib/datadog/ruby_core_source/ruby-4.0.6-p0/internal/thread.h +0 -112
- data/lib/datadog/ruby_core_source/ruby-4.0.6-p0/internal/time.h +0 -34
- data/lib/datadog/ruby_core_source/ruby-4.0.6-p0/internal/transcode.h +0 -23
- data/lib/datadog/ruby_core_source/ruby-4.0.6-p0/internal/util.h +0 -27
- data/lib/datadog/ruby_core_source/ruby-4.0.6-p0/prism/extension.h +0 -19
|
@@ -0,0 +1,342 @@
|
|
|
1
|
+
#include "ruby/ruby.h"
|
|
2
|
+
#include "ruby/ractor.h"
|
|
3
|
+
#include "vm_core.h"
|
|
4
|
+
#include "id_table.h"
|
|
5
|
+
#include "vm_debug.h"
|
|
6
|
+
|
|
7
|
+
#ifndef RACTOR_CHECK_MODE
|
|
8
|
+
#define RACTOR_CHECK_MODE (VM_CHECK_MODE || RUBY_DEBUG) && (SIZEOF_UINT64_T == SIZEOF_VALUE)
|
|
9
|
+
#endif
|
|
10
|
+
|
|
11
|
+
enum rb_ractor_basket_type {
|
|
12
|
+
basket_type_none,
|
|
13
|
+
basket_type_ref,
|
|
14
|
+
basket_type_copy,
|
|
15
|
+
basket_type_move,
|
|
16
|
+
basket_type_will,
|
|
17
|
+
basket_type_deleted,
|
|
18
|
+
basket_type_reserved,
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
struct rb_ractor_basket {
|
|
22
|
+
bool exception;
|
|
23
|
+
enum rb_ractor_basket_type type;
|
|
24
|
+
VALUE v;
|
|
25
|
+
VALUE sender;
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
struct rb_ractor_queue {
|
|
29
|
+
struct rb_ractor_basket *baskets;
|
|
30
|
+
int start;
|
|
31
|
+
int cnt;
|
|
32
|
+
int size;
|
|
33
|
+
unsigned int serial;
|
|
34
|
+
unsigned int reserved_cnt;
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
struct rb_ractor_waiting_list {
|
|
38
|
+
int cnt;
|
|
39
|
+
int size;
|
|
40
|
+
rb_ractor_t **ractors;
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
enum rb_ractor_wait_status {
|
|
44
|
+
wait_none = 0x00,
|
|
45
|
+
wait_receiving = 0x01,
|
|
46
|
+
wait_taking = 0x02,
|
|
47
|
+
wait_yielding = 0x04,
|
|
48
|
+
wait_moving = 0x08,
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
enum rb_ractor_wakeup_status {
|
|
52
|
+
wakeup_none,
|
|
53
|
+
wakeup_by_send,
|
|
54
|
+
wakeup_by_yield,
|
|
55
|
+
wakeup_by_take,
|
|
56
|
+
wakeup_by_close,
|
|
57
|
+
wakeup_by_interrupt,
|
|
58
|
+
wakeup_by_retry,
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
struct rb_ractor_sync {
|
|
62
|
+
// ractor lock
|
|
63
|
+
rb_nativethread_lock_t lock;
|
|
64
|
+
#if RACTOR_CHECK_MODE > 0
|
|
65
|
+
VALUE locked_by;
|
|
66
|
+
#endif
|
|
67
|
+
rb_nativethread_cond_t cond;
|
|
68
|
+
|
|
69
|
+
// communication
|
|
70
|
+
struct rb_ractor_queue incoming_queue;
|
|
71
|
+
struct rb_ractor_waiting_list taking_ractors;
|
|
72
|
+
|
|
73
|
+
bool incoming_port_closed;
|
|
74
|
+
bool outgoing_port_closed;
|
|
75
|
+
|
|
76
|
+
struct ractor_wait {
|
|
77
|
+
enum rb_ractor_wait_status status;
|
|
78
|
+
enum rb_ractor_wakeup_status wakeup_status;
|
|
79
|
+
struct rb_ractor_basket yielded_basket;
|
|
80
|
+
struct rb_ractor_basket taken_basket;
|
|
81
|
+
} wait;
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
// created
|
|
85
|
+
// | ready to run
|
|
86
|
+
// ====================== inserted to vm->ractor
|
|
87
|
+
// v
|
|
88
|
+
// blocking <---+ all threads are blocking
|
|
89
|
+
// | |
|
|
90
|
+
// v |
|
|
91
|
+
// running -----+
|
|
92
|
+
// | all threads are terminated.
|
|
93
|
+
// ====================== removed from vm->ractor
|
|
94
|
+
// v
|
|
95
|
+
// terminated
|
|
96
|
+
//
|
|
97
|
+
// status is protected by VM lock (global state)
|
|
98
|
+
enum ractor_status {
|
|
99
|
+
ractor_created,
|
|
100
|
+
ractor_running,
|
|
101
|
+
ractor_blocking,
|
|
102
|
+
ractor_terminated,
|
|
103
|
+
};
|
|
104
|
+
|
|
105
|
+
struct rb_ractor_struct {
|
|
106
|
+
struct rb_ractor_pub pub;
|
|
107
|
+
|
|
108
|
+
struct rb_ractor_sync sync;
|
|
109
|
+
VALUE receiving_mutex;
|
|
110
|
+
bool yield_atexit;
|
|
111
|
+
|
|
112
|
+
// vm wide barrier synchronization
|
|
113
|
+
rb_nativethread_cond_t barrier_wait_cond;
|
|
114
|
+
|
|
115
|
+
// thread management
|
|
116
|
+
struct {
|
|
117
|
+
struct ccan_list_head set;
|
|
118
|
+
unsigned int cnt;
|
|
119
|
+
unsigned int blocking_cnt;
|
|
120
|
+
unsigned int sleeper;
|
|
121
|
+
struct rb_thread_sched sched;
|
|
122
|
+
rb_execution_context_t *running_ec;
|
|
123
|
+
rb_thread_t *main;
|
|
124
|
+
} threads;
|
|
125
|
+
VALUE thgroup_default;
|
|
126
|
+
|
|
127
|
+
VALUE name;
|
|
128
|
+
VALUE loc;
|
|
129
|
+
|
|
130
|
+
enum ractor_status status_;
|
|
131
|
+
|
|
132
|
+
struct ccan_list_node vmlr_node;
|
|
133
|
+
|
|
134
|
+
// ractor local data
|
|
135
|
+
|
|
136
|
+
st_table *local_storage;
|
|
137
|
+
struct rb_id_table *idkey_local_storage;
|
|
138
|
+
|
|
139
|
+
VALUE r_stdin;
|
|
140
|
+
VALUE r_stdout;
|
|
141
|
+
VALUE r_stderr;
|
|
142
|
+
VALUE verbose;
|
|
143
|
+
VALUE debug;
|
|
144
|
+
|
|
145
|
+
rb_ractor_newobj_cache_t newobj_cache;
|
|
146
|
+
|
|
147
|
+
// gc.c rb_objspace_reachable_objects_from
|
|
148
|
+
struct gc_mark_func_data_struct {
|
|
149
|
+
void *data;
|
|
150
|
+
void (*mark_func)(VALUE v, void *data);
|
|
151
|
+
} *mfd;
|
|
152
|
+
}; // rb_ractor_t is defined in vm_core.h
|
|
153
|
+
|
|
154
|
+
|
|
155
|
+
static inline VALUE
|
|
156
|
+
rb_ractor_self(const rb_ractor_t *r)
|
|
157
|
+
{
|
|
158
|
+
return r->pub.self;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
rb_ractor_t *rb_ractor_main_alloc(void);
|
|
162
|
+
void rb_ractor_main_setup(rb_vm_t *vm, rb_ractor_t *main_ractor, rb_thread_t *main_thread);
|
|
163
|
+
void rb_ractor_atexit(rb_execution_context_t *ec, VALUE result);
|
|
164
|
+
void rb_ractor_atexit_exception(rb_execution_context_t *ec);
|
|
165
|
+
void rb_ractor_teardown(rb_execution_context_t *ec);
|
|
166
|
+
void rb_ractor_receive_parameters(rb_execution_context_t *ec, rb_ractor_t *g, int len, VALUE *ptr);
|
|
167
|
+
void rb_ractor_send_parameters(rb_execution_context_t *ec, rb_ractor_t *g, VALUE args);
|
|
168
|
+
|
|
169
|
+
VALUE rb_thread_create_ractor(rb_ractor_t *g, VALUE args, VALUE proc); // defined in thread.c
|
|
170
|
+
|
|
171
|
+
int rb_ractor_living_thread_num(const rb_ractor_t *);
|
|
172
|
+
VALUE rb_ractor_thread_list(rb_ractor_t *r);
|
|
173
|
+
bool rb_ractor_p(VALUE rv);
|
|
174
|
+
|
|
175
|
+
void rb_ractor_living_threads_init(rb_ractor_t *r);
|
|
176
|
+
void rb_ractor_living_threads_insert(rb_ractor_t *r, rb_thread_t *th);
|
|
177
|
+
void rb_ractor_living_threads_remove(rb_ractor_t *r, rb_thread_t *th);
|
|
178
|
+
void rb_ractor_blocking_threads_inc(rb_ractor_t *r, const char *file, int line); // TODO: file, line only for RUBY_DEBUG_LOG
|
|
179
|
+
void rb_ractor_blocking_threads_dec(rb_ractor_t *r, const char *file, int line); // TODO: file, line only for RUBY_DEBUG_LOG
|
|
180
|
+
|
|
181
|
+
void rb_ractor_vm_barrier_interrupt_running_thread(rb_ractor_t *r);
|
|
182
|
+
void rb_ractor_terminate_interrupt_main_thread(rb_ractor_t *r);
|
|
183
|
+
void rb_ractor_terminate_all(void);
|
|
184
|
+
bool rb_ractor_main_p_(void);
|
|
185
|
+
void rb_ractor_finish_marking(void);
|
|
186
|
+
void rb_ractor_atfork(rb_vm_t *vm, rb_thread_t *th);
|
|
187
|
+
|
|
188
|
+
VALUE rb_ractor_ensure_shareable(VALUE obj, VALUE name);
|
|
189
|
+
|
|
190
|
+
RUBY_SYMBOL_EXPORT_BEGIN
|
|
191
|
+
bool rb_ractor_shareable_p_continue(VALUE obj);
|
|
192
|
+
|
|
193
|
+
// THIS FUNCTION SHOULD NOT CALL WHILE INCREMENTAL MARKING!!
|
|
194
|
+
// This function is for T_DATA::free_func
|
|
195
|
+
void rb_ractor_local_storage_delkey(rb_ractor_local_key_t key);
|
|
196
|
+
|
|
197
|
+
RUBY_SYMBOL_EXPORT_END
|
|
198
|
+
|
|
199
|
+
static inline bool
|
|
200
|
+
rb_ractor_main_p(void)
|
|
201
|
+
{
|
|
202
|
+
if (ruby_single_main_ractor) {
|
|
203
|
+
return true;
|
|
204
|
+
}
|
|
205
|
+
else {
|
|
206
|
+
return rb_ractor_main_p_();
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
static inline bool
|
|
211
|
+
rb_ractor_status_p(rb_ractor_t *r, enum ractor_status status)
|
|
212
|
+
{
|
|
213
|
+
return r->status_ == status;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
static inline void
|
|
217
|
+
rb_ractor_sleeper_threads_inc(rb_ractor_t *r)
|
|
218
|
+
{
|
|
219
|
+
r->threads.sleeper++;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
static inline void
|
|
223
|
+
rb_ractor_sleeper_threads_dec(rb_ractor_t *r)
|
|
224
|
+
{
|
|
225
|
+
r->threads.sleeper--;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
static inline void
|
|
229
|
+
rb_ractor_sleeper_threads_clear(rb_ractor_t *r)
|
|
230
|
+
{
|
|
231
|
+
r->threads.sleeper = 0;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
static inline int
|
|
235
|
+
rb_ractor_sleeper_thread_num(rb_ractor_t *r)
|
|
236
|
+
{
|
|
237
|
+
return r->threads.sleeper;
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
static inline void
|
|
241
|
+
rb_ractor_thread_switch(rb_ractor_t *cr, rb_thread_t *th)
|
|
242
|
+
{
|
|
243
|
+
if (cr->threads.running_ec != th->ec) {
|
|
244
|
+
if (0) {
|
|
245
|
+
ruby_debug_printf("rb_ractor_thread_switch ec:%p->%p\n",
|
|
246
|
+
(void *)cr->threads.running_ec, (void *)th->ec);
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
else {
|
|
250
|
+
return;
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
if (cr->threads.running_ec != th->ec) {
|
|
254
|
+
th->running_time_us = 0;
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
cr->threads.running_ec = th->ec;
|
|
258
|
+
|
|
259
|
+
VM_ASSERT(cr == GET_RACTOR());
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
#define rb_ractor_set_current_ec(cr, ec) rb_ractor_set_current_ec_(cr, ec, __FILE__, __LINE__)
|
|
263
|
+
|
|
264
|
+
static inline void
|
|
265
|
+
rb_ractor_set_current_ec_(rb_ractor_t *cr, rb_execution_context_t *ec, const char *file, int line)
|
|
266
|
+
{
|
|
267
|
+
#ifdef RB_THREAD_LOCAL_SPECIFIER
|
|
268
|
+
#ifdef __APPLE__
|
|
269
|
+
rb_current_ec_set(ec);
|
|
270
|
+
#else
|
|
271
|
+
ruby_current_ec = ec;
|
|
272
|
+
#endif
|
|
273
|
+
#else
|
|
274
|
+
native_tls_set(ruby_current_ec_key, ec);
|
|
275
|
+
#endif
|
|
276
|
+
RUBY_DEBUG_LOG2(file, line, "ec:%p->%p", (void *)cr->threads.running_ec, (void *)ec);
|
|
277
|
+
VM_ASSERT(cr->threads.running_ec != ec);
|
|
278
|
+
cr->threads.running_ec = ec;
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
void rb_vm_ractor_blocking_cnt_inc(rb_vm_t *vm, rb_ractor_t *cr, const char *file, int line);
|
|
282
|
+
void rb_vm_ractor_blocking_cnt_dec(rb_vm_t *vm, rb_ractor_t *cr, const char *file, int line);
|
|
283
|
+
|
|
284
|
+
static inline uint32_t
|
|
285
|
+
rb_ractor_id(const rb_ractor_t *r)
|
|
286
|
+
{
|
|
287
|
+
return r->pub.id;
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
#if RACTOR_CHECK_MODE > 0
|
|
291
|
+
# define RACTOR_BELONGING_ID(obj) (*(uint32_t *)(((uintptr_t)(obj)) + rb_gc_obj_slot_size(obj)))
|
|
292
|
+
|
|
293
|
+
uint32_t rb_ractor_current_id(void);
|
|
294
|
+
|
|
295
|
+
static inline void
|
|
296
|
+
rb_ractor_setup_belonging_to(VALUE obj, uint32_t rid)
|
|
297
|
+
{
|
|
298
|
+
RACTOR_BELONGING_ID(obj) = rid;
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
static inline void
|
|
302
|
+
rb_ractor_setup_belonging(VALUE obj)
|
|
303
|
+
{
|
|
304
|
+
rb_ractor_setup_belonging_to(obj, rb_ractor_current_id());
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
static inline uint32_t
|
|
308
|
+
rb_ractor_belonging(VALUE obj)
|
|
309
|
+
{
|
|
310
|
+
if (SPECIAL_CONST_P(obj) || RB_OBJ_SHAREABLE_P(obj)) {
|
|
311
|
+
return 0;
|
|
312
|
+
}
|
|
313
|
+
else {
|
|
314
|
+
return RACTOR_BELONGING_ID(obj);
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
static inline VALUE
|
|
319
|
+
rb_ractor_confirm_belonging(VALUE obj)
|
|
320
|
+
{
|
|
321
|
+
uint32_t id = rb_ractor_belonging(obj);
|
|
322
|
+
|
|
323
|
+
if (id == 0) {
|
|
324
|
+
if (UNLIKELY(!rb_ractor_shareable_p(obj))) {
|
|
325
|
+
rp(obj);
|
|
326
|
+
rb_bug("id == 0 but not shareable");
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
else if (UNLIKELY(id != rb_ractor_current_id())) {
|
|
330
|
+
if (rb_ractor_shareable_p(obj)) {
|
|
331
|
+
// ok
|
|
332
|
+
}
|
|
333
|
+
else {
|
|
334
|
+
rp(obj);
|
|
335
|
+
rb_bug("rb_ractor_confirm_belonging object-ractor id:%u, current-ractor id:%u", id, rb_ractor_current_id());
|
|
336
|
+
}
|
|
337
|
+
}
|
|
338
|
+
return obj;
|
|
339
|
+
}
|
|
340
|
+
#else
|
|
341
|
+
#define rb_ractor_confirm_belonging(obj) obj
|
|
342
|
+
#endif
|
data/lib/datadog/ruby_core_source/{ruby-3.3.5-p100/internal/dir.h → ruby-3.2.0-p0/ruby_assert.h}
RENAMED
|
@@ -1,16 +1,14 @@
|
|
|
1
|
-
#ifndef
|
|
2
|
-
#define
|
|
1
|
+
#ifndef RUBY_TOPLEVEL_ASSERT_H /*-*-C-*-vi:se ft=c:*/
|
|
2
|
+
#define RUBY_TOPLEVEL_ASSERT_H
|
|
3
3
|
/**
|
|
4
4
|
* @author Ruby developers <ruby-core@ruby-lang.org>
|
|
5
5
|
* @copyright This file is a part of the programming language Ruby.
|
|
6
6
|
* Permission is hereby granted, to either redistribute and/or
|
|
7
7
|
* modify this file, provided that the conditions mentioned in the
|
|
8
8
|
* file COPYING are met. Consult the file for details.
|
|
9
|
-
* @brief Internal header for Dir.
|
|
10
9
|
*/
|
|
11
|
-
#include "ruby/
|
|
10
|
+
#include "ruby/assert.h"
|
|
11
|
+
#undef assert
|
|
12
|
+
#define assert RUBY_ASSERT_NDEBUG
|
|
12
13
|
|
|
13
|
-
/*
|
|
14
|
-
VALUE rb_dir_getwd_ospath(void);
|
|
15
|
-
|
|
16
|
-
#endif /* INTERNAL_DIR_H */
|
|
14
|
+
#endif /* RUBY_TOPLEVEL_ASSERT_H */
|
|
@@ -0,0 +1,23 @@
|
|
|
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)
|
|
@@ -0,0 +1,232 @@
|
|
|
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
|
+
#define SIZEOF_SHAPE_T 4
|
|
8
|
+
#define SHAPE_IN_BASIC_FLAGS 1
|
|
9
|
+
typedef uint32_t attr_index_t;
|
|
10
|
+
#else
|
|
11
|
+
#define SIZEOF_SHAPE_T 2
|
|
12
|
+
#define SHAPE_IN_BASIC_FLAGS 0
|
|
13
|
+
typedef uint16_t attr_index_t;
|
|
14
|
+
#endif
|
|
15
|
+
|
|
16
|
+
#define MAX_IVARS (attr_index_t)(-1)
|
|
17
|
+
|
|
18
|
+
#if SIZEOF_SHAPE_T == 4
|
|
19
|
+
typedef uint32_t shape_id_t;
|
|
20
|
+
# define SHAPE_ID_NUM_BITS 32
|
|
21
|
+
#else
|
|
22
|
+
typedef uint16_t shape_id_t;
|
|
23
|
+
# define SHAPE_ID_NUM_BITS 16
|
|
24
|
+
#endif
|
|
25
|
+
|
|
26
|
+
# define SHAPE_MASK (((uintptr_t)1 << SHAPE_ID_NUM_BITS) - 1)
|
|
27
|
+
# define SHAPE_FLAG_MASK (((VALUE)-1) >> SHAPE_ID_NUM_BITS)
|
|
28
|
+
|
|
29
|
+
# define SHAPE_FLAG_SHIFT ((SIZEOF_VALUE * 8) - SHAPE_ID_NUM_BITS)
|
|
30
|
+
|
|
31
|
+
# define SHAPE_BITMAP_SIZE 16384
|
|
32
|
+
|
|
33
|
+
# define SHAPE_MAX_VARIATIONS 8
|
|
34
|
+
|
|
35
|
+
# define MAX_SHAPE_ID (SHAPE_MASK - 1)
|
|
36
|
+
# define INVALID_SHAPE_ID SHAPE_MASK
|
|
37
|
+
# define ROOT_SHAPE_ID 0x0
|
|
38
|
+
|
|
39
|
+
# define SPECIAL_CONST_SHAPE_ID (SIZE_POOL_COUNT * 2)
|
|
40
|
+
# define OBJ_TOO_COMPLEX_SHAPE_ID (SPECIAL_CONST_SHAPE_ID + 1)
|
|
41
|
+
|
|
42
|
+
struct rb_shape {
|
|
43
|
+
struct rb_id_table * edges; // id_table from ID (ivar) to next shape
|
|
44
|
+
ID edge_name; // ID (ivar) for transition from parent to rb_shape
|
|
45
|
+
attr_index_t next_iv_index;
|
|
46
|
+
uint32_t capacity; // Total capacity of the object with this shape
|
|
47
|
+
uint8_t type;
|
|
48
|
+
uint8_t size_pool_index;
|
|
49
|
+
shape_id_t parent_id;
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
typedef struct rb_shape rb_shape_t;
|
|
53
|
+
|
|
54
|
+
enum shape_type {
|
|
55
|
+
SHAPE_ROOT,
|
|
56
|
+
SHAPE_IVAR,
|
|
57
|
+
SHAPE_FROZEN,
|
|
58
|
+
SHAPE_CAPACITY_CHANGE,
|
|
59
|
+
SHAPE_INITIAL_CAPACITY,
|
|
60
|
+
SHAPE_T_OBJECT,
|
|
61
|
+
SHAPE_OBJ_TOO_COMPLEX,
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
#if SHAPE_IN_BASIC_FLAGS
|
|
65
|
+
static inline shape_id_t
|
|
66
|
+
RBASIC_SHAPE_ID(VALUE obj)
|
|
67
|
+
{
|
|
68
|
+
RUBY_ASSERT(!RB_SPECIAL_CONST_P(obj));
|
|
69
|
+
return (shape_id_t)(SHAPE_MASK & ((RBASIC(obj)->flags) >> SHAPE_FLAG_SHIFT));
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
static inline void
|
|
73
|
+
RBASIC_SET_SHAPE_ID(VALUE obj, shape_id_t shape_id)
|
|
74
|
+
{
|
|
75
|
+
// Ractors are occupying the upper 32 bits of flags, but only in debug mode
|
|
76
|
+
// Object shapes are occupying top bits
|
|
77
|
+
RBASIC(obj)->flags &= SHAPE_FLAG_MASK;
|
|
78
|
+
RBASIC(obj)->flags |= ((VALUE)(shape_id) << SHAPE_FLAG_SHIFT);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
static inline shape_id_t
|
|
82
|
+
ROBJECT_SHAPE_ID(VALUE obj)
|
|
83
|
+
{
|
|
84
|
+
RBIMPL_ASSERT_TYPE(obj, RUBY_T_OBJECT);
|
|
85
|
+
return RBASIC_SHAPE_ID(obj);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
static inline void
|
|
89
|
+
ROBJECT_SET_SHAPE_ID(VALUE obj, shape_id_t shape_id)
|
|
90
|
+
{
|
|
91
|
+
RBIMPL_ASSERT_TYPE(obj, RUBY_T_OBJECT);
|
|
92
|
+
RBASIC_SET_SHAPE_ID(obj, shape_id);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
static inline shape_id_t
|
|
96
|
+
RCLASS_SHAPE_ID(VALUE obj)
|
|
97
|
+
{
|
|
98
|
+
RUBY_ASSERT(RB_TYPE_P(obj, T_CLASS) || RB_TYPE_P(obj, T_MODULE));
|
|
99
|
+
return RBASIC_SHAPE_ID(obj);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
#else
|
|
103
|
+
|
|
104
|
+
static inline shape_id_t
|
|
105
|
+
ROBJECT_SHAPE_ID(VALUE obj)
|
|
106
|
+
{
|
|
107
|
+
RBIMPL_ASSERT_TYPE(obj, RUBY_T_OBJECT);
|
|
108
|
+
return (shape_id_t)(SHAPE_MASK & (RBASIC(obj)->flags >> SHAPE_FLAG_SHIFT));
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
static inline void
|
|
112
|
+
ROBJECT_SET_SHAPE_ID(VALUE obj, shape_id_t shape_id)
|
|
113
|
+
{
|
|
114
|
+
RBASIC(obj)->flags &= SHAPE_FLAG_MASK;
|
|
115
|
+
RBASIC(obj)->flags |= ((VALUE)(shape_id) << SHAPE_FLAG_SHIFT);
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
MJIT_SYMBOL_EXPORT_BEGIN
|
|
119
|
+
shape_id_t rb_rclass_shape_id(VALUE obj);
|
|
120
|
+
MJIT_SYMBOL_EXPORT_END
|
|
121
|
+
|
|
122
|
+
static inline shape_id_t RCLASS_SHAPE_ID(VALUE obj)
|
|
123
|
+
{
|
|
124
|
+
return rb_rclass_shape_id(obj);
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
#endif
|
|
128
|
+
|
|
129
|
+
bool rb_shape_root_shape_p(rb_shape_t* shape);
|
|
130
|
+
rb_shape_t * rb_shape_get_root_shape(void);
|
|
131
|
+
uint8_t rb_shape_id_num_bits(void);
|
|
132
|
+
int32_t rb_shape_id_offset(void);
|
|
133
|
+
|
|
134
|
+
rb_shape_t* rb_shape_get_shape_by_id_without_assertion(shape_id_t shape_id);
|
|
135
|
+
rb_shape_t * rb_shape_get_parent(rb_shape_t * shape);
|
|
136
|
+
|
|
137
|
+
MJIT_SYMBOL_EXPORT_BEGIN
|
|
138
|
+
rb_shape_t* rb_shape_get_shape_by_id(shape_id_t shape_id);
|
|
139
|
+
shape_id_t rb_shape_get_shape_id(VALUE obj);
|
|
140
|
+
rb_shape_t * rb_shape_get_next_iv_shape(rb_shape_t * shape, ID id);
|
|
141
|
+
bool rb_shape_get_iv_index(rb_shape_t * shape, ID id, attr_index_t * value);
|
|
142
|
+
bool rb_shape_obj_too_complex(VALUE obj);
|
|
143
|
+
MJIT_SYMBOL_EXPORT_END
|
|
144
|
+
|
|
145
|
+
void rb_shape_set_shape(VALUE obj, rb_shape_t* shape);
|
|
146
|
+
rb_shape_t* rb_shape_get_shape(VALUE obj);
|
|
147
|
+
int rb_shape_frozen_shape_p(rb_shape_t* shape);
|
|
148
|
+
void rb_shape_transition_shape_frozen(VALUE obj);
|
|
149
|
+
void rb_shape_transition_shape_remove_ivar(VALUE obj, ID id, rb_shape_t *shape, VALUE * removed);
|
|
150
|
+
rb_shape_t * rb_shape_transition_shape_capa(rb_shape_t * shape, uint32_t new_capacity);
|
|
151
|
+
rb_shape_t* rb_shape_get_next(rb_shape_t* shape, VALUE obj, ID id);
|
|
152
|
+
|
|
153
|
+
rb_shape_t * rb_shape_rebuild_shape(rb_shape_t * initial_shape, rb_shape_t * dest_shape);
|
|
154
|
+
|
|
155
|
+
static inline uint32_t
|
|
156
|
+
ROBJECT_IV_CAPACITY(VALUE obj)
|
|
157
|
+
{
|
|
158
|
+
RBIMPL_ASSERT_TYPE(obj, RUBY_T_OBJECT);
|
|
159
|
+
// Asking for capacity doesn't make sense when the object is using
|
|
160
|
+
// a hash table for storing instance variables
|
|
161
|
+
RUBY_ASSERT(ROBJECT_SHAPE_ID(obj) != OBJ_TOO_COMPLEX_SHAPE_ID);
|
|
162
|
+
return rb_shape_get_shape_by_id(ROBJECT_SHAPE_ID(obj))->capacity;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
static inline struct rb_id_table *
|
|
166
|
+
ROBJECT_IV_HASH(VALUE obj)
|
|
167
|
+
{
|
|
168
|
+
RBIMPL_ASSERT_TYPE(obj, RUBY_T_OBJECT);
|
|
169
|
+
RUBY_ASSERT(ROBJECT_SHAPE_ID(obj) == OBJ_TOO_COMPLEX_SHAPE_ID);
|
|
170
|
+
return (struct rb_id_table *)ROBJECT(obj)->as.heap.ivptr;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
static inline void
|
|
174
|
+
ROBJECT_SET_IV_HASH(VALUE obj, const struct rb_id_table *tbl)
|
|
175
|
+
{
|
|
176
|
+
RBIMPL_ASSERT_TYPE(obj, RUBY_T_OBJECT);
|
|
177
|
+
RUBY_ASSERT(ROBJECT_SHAPE_ID(obj) == OBJ_TOO_COMPLEX_SHAPE_ID);
|
|
178
|
+
ROBJECT(obj)->as.heap.ivptr = (VALUE *)tbl;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
size_t rb_id_table_size(const struct rb_id_table *tbl);
|
|
182
|
+
|
|
183
|
+
static inline uint32_t
|
|
184
|
+
ROBJECT_IV_COUNT(VALUE obj)
|
|
185
|
+
{
|
|
186
|
+
if (ROBJECT_SHAPE_ID(obj) == OBJ_TOO_COMPLEX_SHAPE_ID) {
|
|
187
|
+
return (uint32_t)rb_id_table_size(ROBJECT_IV_HASH(obj));
|
|
188
|
+
}
|
|
189
|
+
else {
|
|
190
|
+
RBIMPL_ASSERT_TYPE(obj, RUBY_T_OBJECT);
|
|
191
|
+
RUBY_ASSERT(ROBJECT_SHAPE_ID(obj) != OBJ_TOO_COMPLEX_SHAPE_ID);
|
|
192
|
+
return rb_shape_get_shape_by_id(ROBJECT_SHAPE_ID(obj))->next_iv_index;
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
static inline uint32_t
|
|
197
|
+
RBASIC_IV_COUNT(VALUE obj)
|
|
198
|
+
{
|
|
199
|
+
return rb_shape_get_shape_by_id(rb_shape_get_shape_id(obj))->next_iv_index;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
static inline uint32_t
|
|
203
|
+
RCLASS_IV_COUNT(VALUE obj)
|
|
204
|
+
{
|
|
205
|
+
RUBY_ASSERT(RB_TYPE_P(obj, RUBY_T_CLASS) || RB_TYPE_P(obj, RUBY_T_MODULE));
|
|
206
|
+
uint32_t ivc = rb_shape_get_shape_by_id(RCLASS_SHAPE_ID(obj))->next_iv_index;
|
|
207
|
+
return ivc;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
rb_shape_t * rb_shape_alloc(ID edge_name, rb_shape_t * parent);
|
|
211
|
+
rb_shape_t * rb_shape_alloc_with_size_pool_index(ID edge_name, rb_shape_t * parent, uint8_t size_pool_index);
|
|
212
|
+
rb_shape_t * rb_shape_alloc_with_parent_id(ID edge_name, shape_id_t parent_id);
|
|
213
|
+
|
|
214
|
+
rb_shape_t *rb_shape_traverse_from_new_root(rb_shape_t *initial_shape, rb_shape_t *orig_shape);
|
|
215
|
+
|
|
216
|
+
bool rb_shape_set_shape_id(VALUE obj, shape_id_t shape_id);
|
|
217
|
+
|
|
218
|
+
VALUE rb_obj_debug_shape(VALUE self, VALUE obj);
|
|
219
|
+
VALUE rb_shape_flags_mask(void);
|
|
220
|
+
void rb_shape_set_too_complex(VALUE obj);
|
|
221
|
+
|
|
222
|
+
// For ext/objspace
|
|
223
|
+
RUBY_SYMBOL_EXPORT_BEGIN
|
|
224
|
+
typedef void each_shape_callback(rb_shape_t * shape, void *data);
|
|
225
|
+
void rb_shape_each_shape(each_shape_callback callback, void *data);
|
|
226
|
+
size_t rb_shape_memsize(rb_shape_t *shape);
|
|
227
|
+
size_t rb_shape_edges_count(rb_shape_t *shape);
|
|
228
|
+
size_t rb_shape_depth(rb_shape_t *shape);
|
|
229
|
+
shape_id_t rb_shape_id(rb_shape_t * shape);
|
|
230
|
+
RUBY_SYMBOL_EXPORT_END
|
|
231
|
+
|
|
232
|
+
#endif
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
#ifndef RUBY_THREAD_NONE_H
|
|
2
|
+
#define RUBY_THREAD_NONE_H
|
|
3
|
+
|
|
4
|
+
#define RB_NATIVETHREAD_LOCK_INIT (void)(0)
|
|
5
|
+
#define RB_NATIVETHREAD_COND_INIT (void)(0)
|
|
6
|
+
|
|
7
|
+
// no-thread impl doesn't use TLS but define this to avoid using tls key
|
|
8
|
+
// based implementation in vm.c
|
|
9
|
+
#define RB_THREAD_LOCAL_SPECIFIER
|
|
10
|
+
|
|
11
|
+
struct rb_native_thread {
|
|
12
|
+
void *thread_id; // NULL
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
struct rb_thread_sched_item {};
|
|
16
|
+
struct rb_thread_sched {};
|
|
17
|
+
|
|
18
|
+
RUBY_EXTERN struct rb_execution_context_struct *ruby_current_ec;
|
|
19
|
+
|
|
20
|
+
#endif /* RUBY_THREAD_NONE_H */
|