datadog-ruby_core_source 3.4.3 → 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-3.5.0-preview1 → ruby-4.0.0-p0}/prism/extension.h +1 -1
- data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview3 → ruby-4.0.0-p0}/prism/options.h +4 -1
- data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview3 → ruby-4.0.0-p0}/prism/version.h +2 -2
- data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview3 → ruby-4.0.0-p0}/vm_core.h +9 -0
- data/lib/datadog/ruby_core_source/version.rb +1 -1
- metadata +108 -211
- data/lib/datadog/ruby_core_source/ruby-3.5.0-preview1/id.h +0 -352
- data/lib/datadog/ruby_core_source/ruby-3.5.0-preview1/id_table.h +0 -39
- data/lib/datadog/ruby_core_source/ruby-3.5.0-preview1/internal/array.h +0 -152
- data/lib/datadog/ruby_core_source/ruby-3.5.0-preview1/internal/basic_operators.h +0 -65
- data/lib/datadog/ruby_core_source/ruby-3.5.0-preview1/internal/bignum.h +0 -244
- data/lib/datadog/ruby_core_source/ruby-3.5.0-preview1/internal/bits.h +0 -650
- 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/internal/cmdlineopt.h +0 -61
- data/lib/datadog/ruby_core_source/ruby-3.5.0-preview1/internal/cont.h +0 -35
- data/lib/datadog/ruby_core_source/ruby-3.5.0-preview1/internal/encoding.h +0 -38
- data/lib/datadog/ruby_core_source/ruby-3.5.0-preview1/internal/error.h +0 -244
- data/lib/datadog/ruby_core_source/ruby-3.5.0-preview1/internal/eval.h +0 -33
- data/lib/datadog/ruby_core_source/ruby-3.5.0-preview1/internal/gc.h +0 -333
- data/lib/datadog/ruby_core_source/ruby-3.5.0-preview1/internal/hash.h +0 -193
- data/lib/datadog/ruby_core_source/ruby-3.5.0-preview1/internal/imemo.h +0 -257
- data/lib/datadog/ruby_core_source/ruby-3.5.0-preview1/internal/inits.h +0 -47
- data/lib/datadog/ruby_core_source/ruby-3.5.0-preview1/internal/io.h +0 -143
- data/lib/datadog/ruby_core_source/ruby-3.5.0-preview1/internal/load.h +0 -18
- data/lib/datadog/ruby_core_source/ruby-3.5.0-preview1/internal/numeric.h +0 -274
- data/lib/datadog/ruby_core_source/ruby-3.5.0-preview1/internal/object.h +0 -63
- data/lib/datadog/ruby_core_source/ruby-3.5.0-preview1/internal/re.h +0 -28
- data/lib/datadog/ruby_core_source/ruby-3.5.0-preview1/internal/sanitizers.h +0 -330
- data/lib/datadog/ruby_core_source/ruby-3.5.0-preview1/internal/signal.h +0 -24
- data/lib/datadog/ruby_core_source/ruby-3.5.0-preview1/internal/st.h +0 -11
- data/lib/datadog/ruby_core_source/ruby-3.5.0-preview1/internal/string.h +0 -199
- data/lib/datadog/ruby_core_source/ruby-3.5.0-preview1/internal/struct.h +0 -119
- data/lib/datadog/ruby_core_source/ruby-3.5.0-preview1/internal/symbol.h +0 -47
- data/lib/datadog/ruby_core_source/ruby-3.5.0-preview1/internal/thread.h +0 -108
- data/lib/datadog/ruby_core_source/ruby-3.5.0-preview1/internal/time.h +0 -37
- data/lib/datadog/ruby_core_source/ruby-3.5.0-preview1/internal/variable.h +0 -70
- data/lib/datadog/ruby_core_source/ruby-3.5.0-preview1/internal/vm.h +0 -137
- data/lib/datadog/ruby_core_source/ruby-3.5.0-preview1/internal.h +0 -108
- data/lib/datadog/ruby_core_source/ruby-3.5.0-preview1/iseq.h +0 -351
- data/lib/datadog/ruby_core_source/ruby-3.5.0-preview1/method.h +0 -258
- data/lib/datadog/ruby_core_source/ruby-3.5.0-preview1/prism/ast.h +0 -7964
- data/lib/datadog/ruby_core_source/ruby-3.5.0-preview1/prism/diagnostic.h +0 -451
- data/lib/datadog/ruby_core_source/ruby-3.5.0-preview1/prism/options.h +0 -442
- data/lib/datadog/ruby_core_source/ruby-3.5.0-preview1/prism/parser.h +0 -933
- data/lib/datadog/ruby_core_source/ruby-3.5.0-preview1/prism/prism.h +0 -383
- data/lib/datadog/ruby_core_source/ruby-3.5.0-preview1/prism/regexp.h +0 -43
- data/lib/datadog/ruby_core_source/ruby-3.5.0-preview1/prism/util/pm_buffer.h +0 -228
- data/lib/datadog/ruby_core_source/ruby-3.5.0-preview1/prism/util/pm_integer.h +0 -126
- data/lib/datadog/ruby_core_source/ruby-3.5.0-preview1/prism/util/pm_list.h +0 -97
- data/lib/datadog/ruby_core_source/ruby-3.5.0-preview1/prism/util/pm_string.h +0 -190
- data/lib/datadog/ruby_core_source/ruby-3.5.0-preview1/prism/version.h +0 -29
- data/lib/datadog/ruby_core_source/ruby-3.5.0-preview1/prism_compile.h +0 -105
- data/lib/datadog/ruby_core_source/ruby-3.5.0-preview1/ractor_core.h +0 -382
- 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/rubyparser.h +0 -1380
- 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/thread_pthread.h +0 -167
- data/lib/datadog/ruby_core_source/ruby-3.5.0-preview1/vm_core.h +0 -2235
- data/lib/datadog/ruby_core_source/ruby-3.5.0-preview1/vm_debug.h +0 -124
- data/lib/datadog/ruby_core_source/ruby-4.0.0-preview3/ccan/build_assert/build_assert.h +0 -40
- data/lib/datadog/ruby_core_source/ruby-4.0.0-preview3/ccan/check_type/check_type.h +0 -63
- data/lib/datadog/ruby_core_source/ruby-4.0.0-preview3/ccan/container_of/container_of.h +0 -142
- data/lib/datadog/ruby_core_source/ruby-4.0.0-preview3/ccan/list/list.h +0 -791
- data/lib/datadog/ruby_core_source/ruby-4.0.0-preview3/ccan/str/str.h +0 -17
- data/lib/datadog/ruby_core_source/ruby-4.0.0-preview3/internal/compar.h +0 -29
- data/lib/datadog/ruby_core_source/ruby-4.0.0-preview3/internal/compile.h +0 -34
- data/lib/datadog/ruby_core_source/ruby-4.0.0-preview3/internal/compilers.h +0 -107
- data/lib/datadog/ruby_core_source/ruby-4.0.0-preview3/internal/complex.h +0 -29
- data/lib/datadog/ruby_core_source/ruby-4.0.0-preview3/internal/dir.h +0 -16
- data/lib/datadog/ruby_core_source/ruby-4.0.0-preview3/internal/enc.h +0 -19
- data/lib/datadog/ruby_core_source/ruby-4.0.0-preview3/internal/enum.h +0 -18
- data/lib/datadog/ruby_core_source/ruby-4.0.0-preview3/internal/enumerator.h +0 -21
- data/lib/datadog/ruby_core_source/ruby-4.0.0-preview3/internal/file.h +0 -38
- data/lib/datadog/ruby_core_source/ruby-4.0.0-preview3/internal/fixnum.h +0 -185
- data/lib/datadog/ruby_core_source/ruby-4.0.0-preview3/internal/loadpath.h +0 -16
- data/lib/datadog/ruby_core_source/ruby-4.0.0-preview3/internal/math.h +0 -23
- data/lib/datadog/ruby_core_source/ruby-4.0.0-preview3/internal/missing.h +0 -19
- data/lib/datadog/ruby_core_source/ruby-4.0.0-preview3/internal/parse.h +0 -131
- data/lib/datadog/ruby_core_source/ruby-4.0.0-preview3/internal/proc.h +0 -30
- data/lib/datadog/ruby_core_source/ruby-4.0.0-preview3/internal/process.h +0 -124
- data/lib/datadog/ruby_core_source/ruby-4.0.0-preview3/internal/ractor.h +0 -10
- data/lib/datadog/ruby_core_source/ruby-4.0.0-preview3/internal/random.h +0 -17
- data/lib/datadog/ruby_core_source/ruby-4.0.0-preview3/internal/range.h +0 -40
- data/lib/datadog/ruby_core_source/ruby-4.0.0-preview3/internal/rational.h +0 -71
- data/lib/datadog/ruby_core_source/ruby-4.0.0-preview3/internal/ruby_parser.h +0 -102
- data/lib/datadog/ruby_core_source/ruby-4.0.0-preview3/internal/serial.h +0 -23
- data/lib/datadog/ruby_core_source/ruby-4.0.0-preview3/internal/static_assert.h +0 -16
- data/lib/datadog/ruby_core_source/ruby-4.0.0-preview3/internal/transcode.h +0 -23
- data/lib/datadog/ruby_core_source/ruby-4.0.0-preview3/internal/util.h +0 -27
- data/lib/datadog/ruby_core_source/ruby-4.0.0-preview3/internal/warnings.h +0 -16
- data/lib/datadog/ruby_core_source/ruby-4.0.0-preview3/node.h +0 -122
- data/lib/datadog/ruby_core_source/ruby-4.0.0-preview3/parser_st.h +0 -162
- data/lib/datadog/ruby_core_source/ruby-4.0.0-preview3/parser_value.h +0 -106
- data/lib/datadog/ruby_core_source/ruby-4.0.0-preview3/prism/defines.h +0 -260
- data/lib/datadog/ruby_core_source/ruby-4.0.0-preview3/prism/encoding.h +0 -283
- data/lib/datadog/ruby_core_source/ruby-4.0.0-preview3/prism/extension.h +0 -19
- data/lib/datadog/ruby_core_source/ruby-4.0.0-preview3/prism/node.h +0 -129
- data/lib/datadog/ruby_core_source/ruby-4.0.0-preview3/prism/pack.h +0 -163
- data/lib/datadog/ruby_core_source/ruby-4.0.0-preview3/prism/prettyprint.h +0 -34
- data/lib/datadog/ruby_core_source/ruby-4.0.0-preview3/prism/static_literals.h +0 -121
- data/lib/datadog/ruby_core_source/ruby-4.0.0-preview3/prism/util/pm_char.h +0 -204
- data/lib/datadog/ruby_core_source/ruby-4.0.0-preview3/prism/util/pm_constant_pool.h +0 -218
- data/lib/datadog/ruby_core_source/ruby-4.0.0-preview3/prism/util/pm_memchr.h +0 -29
- data/lib/datadog/ruby_core_source/ruby-4.0.0-preview3/prism/util/pm_newline_list.h +0 -113
- data/lib/datadog/ruby_core_source/ruby-4.0.0-preview3/prism/util/pm_strncasecmp.h +0 -32
- data/lib/datadog/ruby_core_source/ruby-4.0.0-preview3/prism/util/pm_strpbrk.h +0 -46
- data/lib/datadog/ruby_core_source/ruby-4.0.0-preview3/ruby_assert.h +0 -14
- data/lib/datadog/ruby_core_source/ruby-4.0.0-preview3/thread_none.h +0 -21
- data/lib/datadog/ruby_core_source/ruby-4.0.0-preview3/vm_opts.h +0 -67
- /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-4.0.0-preview3 → ruby-4.0.0-p0}/id.h +0 -0
- /data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview3 → ruby-4.0.0-p0}/id_table.h +0 -0
- /data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview3 → ruby-4.0.0-p0}/internal/array.h +0 -0
- /data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview3 → ruby-4.0.0-p0}/internal/basic_operators.h +0 -0
- /data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview3 → ruby-4.0.0-p0}/internal/bignum.h +0 -0
- /data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview3 → ruby-4.0.0-p0}/internal/bits.h +0 -0
- /data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview3 → ruby-4.0.0-p0}/internal/box.h +0 -0
- /data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview3 → ruby-4.0.0-p0}/internal/class.h +0 -0
- /data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview3 → ruby-4.0.0-p0}/internal/cmdlineopt.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-4.0.0-preview3 → ruby-4.0.0-p0}/internal/concurrent_set.h +0 -0
- /data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview3 → ruby-4.0.0-p0}/internal/cont.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-4.0.0-preview3 → ruby-4.0.0-p0}/internal/encoding.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-4.0.0-preview3 → ruby-4.0.0-p0}/internal/error.h +0 -0
- /data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview3 → ruby-4.0.0-p0}/internal/eval.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-4.0.0-preview3 → ruby-4.0.0-p0}/internal/gc.h +0 -0
- /data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview3 → ruby-4.0.0-p0}/internal/hash.h +0 -0
- /data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview3 → ruby-4.0.0-p0}/internal/imemo.h +0 -0
- /data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview3 → ruby-4.0.0-p0}/internal/inits.h +0 -0
- /data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview3 → ruby-4.0.0-p0}/internal/io.h +0 -0
- /data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview3 → ruby-4.0.0-p0}/internal/load.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-4.0.0-preview3 → ruby-4.0.0-p0}/internal/numeric.h +0 -0
- /data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview3 → ruby-4.0.0-p0}/internal/object.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-4.0.0-preview3 → ruby-4.0.0-p0}/internal/re.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-4.0.0-preview3 → ruby-4.0.0-p0}/internal/sanitizers.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-4.0.0-preview3 → ruby-4.0.0-p0}/internal/set_table.h +0 -0
- /data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview3 → ruby-4.0.0-p0}/internal/signal.h +0 -0
- /data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview3 → ruby-4.0.0-p0}/internal/st.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-4.0.0-preview3 → ruby-4.0.0-p0}/internal/string.h +0 -0
- /data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview3 → ruby-4.0.0-p0}/internal/struct.h +0 -0
- /data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview3 → ruby-4.0.0-p0}/internal/symbol.h +0 -0
- /data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview3 → ruby-4.0.0-p0}/internal/thread.h +0 -0
- /data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview3 → ruby-4.0.0-p0}/internal/time.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-4.0.0-preview3 → ruby-4.0.0-p0}/internal/variable.h +0 -0
- /data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview3 → ruby-4.0.0-p0}/internal/vm.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-4.0.0-preview3 → ruby-4.0.0-p0}/internal.h +0 -0
- /data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview3 → ruby-4.0.0-p0}/iseq.h +0 -0
- /data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview3 → ruby-4.0.0-p0}/method.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-4.0.0-preview3 → ruby-4.0.0-p0}/prism/ast.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-4.0.0-preview3 → ruby-4.0.0-p0}/prism/diagnostic.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-4.0.0-preview3 → ruby-4.0.0-p0}/prism/parser.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-4.0.0-preview3 → ruby-4.0.0-p0}/prism/prism.h +0 -0
- /data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview3 → ruby-4.0.0-p0}/prism/regexp.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-4.0.0-preview3 → ruby-4.0.0-p0}/prism/util/pm_buffer.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-4.0.0-preview3 → ruby-4.0.0-p0}/prism/util/pm_integer.h +0 -0
- /data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview3 → ruby-4.0.0-p0}/prism/util/pm_list.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-4.0.0-preview3 → ruby-4.0.0-p0}/prism/util/pm_string.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-4.0.0-preview3 → ruby-4.0.0-p0}/prism_compile.h +0 -0
- /data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview3 → ruby-4.0.0-p0}/ractor_core.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-4.0.0-preview3 → ruby-4.0.0-p0}/ruby_atomic.h +0 -0
- /data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview3 → ruby-4.0.0-p0}/rubyparser.h +0 -0
- /data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview3 → ruby-4.0.0-p0}/shape.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-4.0.0-preview3 → ruby-4.0.0-p0}/thread_pthread.h +0 -0
- /data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview3 → ruby-4.0.0-p0}/vm_debug.h +0 -0
- /data/lib/datadog/ruby_core_source/{ruby-3.5.0-preview1 → ruby-4.0.0-p0}/vm_opts.h +0 -0
|
@@ -1,274 +0,0 @@
|
|
|
1
|
-
#ifndef INTERNAL_NUMERIC_H /*-*-C-*-vi:se ft=c:*/
|
|
2
|
-
#define INTERNAL_NUMERIC_H
|
|
3
|
-
/**
|
|
4
|
-
* @author Ruby developers <ruby-core@ruby-lang.org>
|
|
5
|
-
* @copyright This file is a part of the programming language Ruby.
|
|
6
|
-
* Permission is hereby granted, to either redistribute and/or
|
|
7
|
-
* modify this file, provided that the conditions mentioned in the
|
|
8
|
-
* file COPYING are met. Consult the file for details.
|
|
9
|
-
* @brief Internal header for Numeric.
|
|
10
|
-
*/
|
|
11
|
-
#include "internal/bignum.h" /* for BIGNUM_POSITIVE_P */
|
|
12
|
-
#include "internal/bits.h" /* for RUBY_BIT_ROTL */
|
|
13
|
-
#include "internal/fixnum.h" /* for FIXNUM_POSITIVE_P */
|
|
14
|
-
#include "internal/vm.h" /* for rb_method_basic_definition_p */
|
|
15
|
-
#include "ruby/intern.h" /* for rb_cmperr */
|
|
16
|
-
#include "ruby/ruby.h" /* for USE_FLONUM */
|
|
17
|
-
|
|
18
|
-
#define ROUND_TO(mode, even, up, down) \
|
|
19
|
-
((mode) == RUBY_NUM_ROUND_HALF_EVEN ? even : \
|
|
20
|
-
(mode) == RUBY_NUM_ROUND_HALF_UP ? up : down)
|
|
21
|
-
#define ROUND_FUNC(mode, name) \
|
|
22
|
-
ROUND_TO(mode, name##_half_even, name##_half_up, name##_half_down)
|
|
23
|
-
#define ROUND_CALL(mode, name, args) \
|
|
24
|
-
ROUND_TO(mode, name##_half_even args, \
|
|
25
|
-
name##_half_up args, name##_half_down args)
|
|
26
|
-
|
|
27
|
-
#ifndef ROUND_DEFAULT
|
|
28
|
-
# define ROUND_DEFAULT RUBY_NUM_ROUND_HALF_UP
|
|
29
|
-
#endif
|
|
30
|
-
|
|
31
|
-
enum ruby_num_rounding_mode {
|
|
32
|
-
RUBY_NUM_ROUND_HALF_UP,
|
|
33
|
-
RUBY_NUM_ROUND_HALF_EVEN,
|
|
34
|
-
RUBY_NUM_ROUND_HALF_DOWN,
|
|
35
|
-
RUBY_NUM_ROUND_DEFAULT = ROUND_DEFAULT,
|
|
36
|
-
};
|
|
37
|
-
|
|
38
|
-
/* same as internal.h */
|
|
39
|
-
#define numberof(array) ((int)(sizeof(array) / sizeof((array)[0])))
|
|
40
|
-
#define roomof(x, y) (((x) + (y) - 1) / (y))
|
|
41
|
-
#define type_roomof(x, y) roomof(sizeof(x), sizeof(y))
|
|
42
|
-
|
|
43
|
-
#if SIZEOF_DOUBLE <= SIZEOF_VALUE
|
|
44
|
-
typedef double rb_float_value_type;
|
|
45
|
-
#else
|
|
46
|
-
typedef struct {
|
|
47
|
-
VALUE values[roomof(SIZEOF_DOUBLE, SIZEOF_VALUE)];
|
|
48
|
-
} rb_float_value_type;
|
|
49
|
-
#endif
|
|
50
|
-
|
|
51
|
-
struct RFloat {
|
|
52
|
-
struct RBasic basic;
|
|
53
|
-
rb_float_value_type float_value;
|
|
54
|
-
};
|
|
55
|
-
|
|
56
|
-
#define RFLOAT(obj) ((struct RFloat *)(obj))
|
|
57
|
-
|
|
58
|
-
/* numeric.c */
|
|
59
|
-
int rb_num_to_uint(VALUE val, unsigned int *ret);
|
|
60
|
-
VALUE ruby_num_interval_step_size(VALUE from, VALUE to, VALUE step, int excl);
|
|
61
|
-
double ruby_float_step_size(double beg, double end, double unit, int excl);
|
|
62
|
-
int ruby_float_step(VALUE from, VALUE to, VALUE step, int excl, int allow_endless);
|
|
63
|
-
int rb_num_negative_p(VALUE);
|
|
64
|
-
VALUE rb_int_succ(VALUE num);
|
|
65
|
-
VALUE rb_float_uminus(VALUE num);
|
|
66
|
-
VALUE rb_int_plus(VALUE x, VALUE y);
|
|
67
|
-
VALUE rb_float_plus(VALUE x, VALUE y);
|
|
68
|
-
VALUE rb_int_minus(VALUE x, VALUE y);
|
|
69
|
-
VALUE rb_float_minus(VALUE x, VALUE y);
|
|
70
|
-
VALUE rb_int_mul(VALUE x, VALUE y);
|
|
71
|
-
VALUE rb_float_mul(VALUE x, VALUE y);
|
|
72
|
-
VALUE rb_float_div(VALUE x, VALUE y);
|
|
73
|
-
VALUE rb_int_idiv(VALUE x, VALUE y);
|
|
74
|
-
VALUE rb_int_modulo(VALUE x, VALUE y);
|
|
75
|
-
VALUE rb_int2str(VALUE num, int base);
|
|
76
|
-
VALUE rb_fix_plus(VALUE x, VALUE y);
|
|
77
|
-
VALUE rb_int_gt(VALUE x, VALUE y);
|
|
78
|
-
VALUE rb_float_gt(VALUE x, VALUE y);
|
|
79
|
-
VALUE rb_int_ge(VALUE x, VALUE y);
|
|
80
|
-
enum ruby_num_rounding_mode rb_num_get_rounding_option(VALUE opts);
|
|
81
|
-
double rb_int_fdiv_double(VALUE x, VALUE y);
|
|
82
|
-
VALUE rb_int_pow(VALUE x, VALUE y);
|
|
83
|
-
VALUE rb_float_pow(VALUE x, VALUE y);
|
|
84
|
-
VALUE rb_int_cmp(VALUE x, VALUE y);
|
|
85
|
-
VALUE rb_int_equal(VALUE x, VALUE y);
|
|
86
|
-
VALUE rb_int_divmod(VALUE x, VALUE y);
|
|
87
|
-
VALUE rb_int_and(VALUE x, VALUE y);
|
|
88
|
-
VALUE rb_int_lshift(VALUE x, VALUE y);
|
|
89
|
-
VALUE rb_int_rshift(VALUE x, VALUE y);
|
|
90
|
-
VALUE rb_int_div(VALUE x, VALUE y);
|
|
91
|
-
int rb_int_positive_p(VALUE num);
|
|
92
|
-
int rb_int_negative_p(VALUE num);
|
|
93
|
-
VALUE rb_check_integer_type(VALUE);
|
|
94
|
-
VALUE rb_num_pow(VALUE x, VALUE y);
|
|
95
|
-
VALUE rb_float_ceil(VALUE num, int ndigits);
|
|
96
|
-
VALUE rb_float_floor(VALUE x, int ndigits);
|
|
97
|
-
VALUE rb_float_abs(VALUE flt);
|
|
98
|
-
static inline VALUE rb_num_compare_with_zero(VALUE num, ID mid);
|
|
99
|
-
static inline int rb_num_positive_int_p(VALUE num);
|
|
100
|
-
static inline int rb_num_negative_int_p(VALUE num);
|
|
101
|
-
static inline double rb_float_flonum_value(VALUE v);
|
|
102
|
-
static inline double rb_float_noflonum_value(VALUE v);
|
|
103
|
-
static inline double rb_float_value_inline(VALUE v);
|
|
104
|
-
static inline VALUE rb_float_new_inline(double d);
|
|
105
|
-
static inline bool INT_POSITIVE_P(VALUE num);
|
|
106
|
-
static inline bool INT_NEGATIVE_P(VALUE num);
|
|
107
|
-
static inline bool FLOAT_ZERO_P(VALUE num);
|
|
108
|
-
#define rb_float_value rb_float_value_inline
|
|
109
|
-
#define rb_float_new rb_float_new_inline
|
|
110
|
-
|
|
111
|
-
RUBY_SYMBOL_EXPORT_BEGIN
|
|
112
|
-
/* numeric.c (export) */
|
|
113
|
-
RUBY_SYMBOL_EXPORT_END
|
|
114
|
-
|
|
115
|
-
VALUE rb_flo_div_flo(VALUE x, VALUE y);
|
|
116
|
-
double ruby_float_mod(double x, double y);
|
|
117
|
-
VALUE rb_float_equal(VALUE x, VALUE y);
|
|
118
|
-
int rb_float_cmp(VALUE x, VALUE y);
|
|
119
|
-
VALUE rb_float_eql(VALUE x, VALUE y);
|
|
120
|
-
VALUE rb_fix_aref(VALUE fix, VALUE idx);
|
|
121
|
-
VALUE rb_int_zero_p(VALUE num);
|
|
122
|
-
VALUE rb_int_even_p(VALUE num);
|
|
123
|
-
VALUE rb_int_odd_p(VALUE num);
|
|
124
|
-
VALUE rb_int_abs(VALUE num);
|
|
125
|
-
VALUE rb_int_bit_length(VALUE num);
|
|
126
|
-
VALUE rb_int_uminus(VALUE num);
|
|
127
|
-
VALUE rb_int_comp(VALUE num);
|
|
128
|
-
|
|
129
|
-
static inline bool
|
|
130
|
-
INT_POSITIVE_P(VALUE num)
|
|
131
|
-
{
|
|
132
|
-
if (FIXNUM_P(num)) {
|
|
133
|
-
return FIXNUM_POSITIVE_P(num);
|
|
134
|
-
}
|
|
135
|
-
else {
|
|
136
|
-
return BIGNUM_POSITIVE_P(num);
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
static inline bool
|
|
141
|
-
INT_NEGATIVE_P(VALUE num)
|
|
142
|
-
{
|
|
143
|
-
if (FIXNUM_P(num)) {
|
|
144
|
-
return FIXNUM_NEGATIVE_P(num);
|
|
145
|
-
}
|
|
146
|
-
else {
|
|
147
|
-
return BIGNUM_NEGATIVE_P(num);
|
|
148
|
-
}
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
static inline bool
|
|
152
|
-
FLOAT_ZERO_P(VALUE num)
|
|
153
|
-
{
|
|
154
|
-
return RFLOAT_VALUE(num) == 0.0;
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
static inline VALUE
|
|
158
|
-
rb_num_compare_with_zero(VALUE num, ID mid)
|
|
159
|
-
{
|
|
160
|
-
VALUE zero = INT2FIX(0);
|
|
161
|
-
VALUE r = rb_check_funcall(num, mid, 1, &zero);
|
|
162
|
-
if (RB_UNDEF_P(r)) {
|
|
163
|
-
rb_cmperr(num, zero);
|
|
164
|
-
}
|
|
165
|
-
return r;
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
static inline int
|
|
169
|
-
rb_num_positive_int_p(VALUE num)
|
|
170
|
-
{
|
|
171
|
-
const ID mid = '>';
|
|
172
|
-
|
|
173
|
-
if (FIXNUM_P(num)) {
|
|
174
|
-
if (rb_method_basic_definition_p(rb_cInteger, mid))
|
|
175
|
-
return FIXNUM_POSITIVE_P(num);
|
|
176
|
-
}
|
|
177
|
-
else if (RB_TYPE_P(num, T_BIGNUM)) {
|
|
178
|
-
if (rb_method_basic_definition_p(rb_cInteger, mid))
|
|
179
|
-
return BIGNUM_POSITIVE_P(num);
|
|
180
|
-
}
|
|
181
|
-
return RTEST(rb_num_compare_with_zero(num, mid));
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
static inline int
|
|
185
|
-
rb_num_negative_int_p(VALUE num)
|
|
186
|
-
{
|
|
187
|
-
const ID mid = '<';
|
|
188
|
-
|
|
189
|
-
if (FIXNUM_P(num)) {
|
|
190
|
-
if (rb_method_basic_definition_p(rb_cInteger, mid))
|
|
191
|
-
return FIXNUM_NEGATIVE_P(num);
|
|
192
|
-
}
|
|
193
|
-
else if (RB_TYPE_P(num, T_BIGNUM)) {
|
|
194
|
-
if (rb_method_basic_definition_p(rb_cInteger, mid))
|
|
195
|
-
return BIGNUM_NEGATIVE_P(num);
|
|
196
|
-
}
|
|
197
|
-
return RTEST(rb_num_compare_with_zero(num, mid));
|
|
198
|
-
}
|
|
199
|
-
|
|
200
|
-
static inline double
|
|
201
|
-
rb_float_flonum_value(VALUE v)
|
|
202
|
-
{
|
|
203
|
-
#if USE_FLONUM
|
|
204
|
-
if (v != (VALUE)0x8000000000000002) { /* LIKELY */
|
|
205
|
-
union {
|
|
206
|
-
double d;
|
|
207
|
-
VALUE v;
|
|
208
|
-
} t;
|
|
209
|
-
|
|
210
|
-
VALUE b63 = (v >> 63);
|
|
211
|
-
/* e: xx1... -> 011... */
|
|
212
|
-
/* xx0... -> 100... */
|
|
213
|
-
/* ^b63 */
|
|
214
|
-
t.v = RUBY_BIT_ROTR((2 - b63) | (v & ~(VALUE)0x03), 3);
|
|
215
|
-
return t.d;
|
|
216
|
-
}
|
|
217
|
-
#endif
|
|
218
|
-
return 0.0;
|
|
219
|
-
}
|
|
220
|
-
|
|
221
|
-
static inline double
|
|
222
|
-
rb_float_noflonum_value(VALUE v)
|
|
223
|
-
{
|
|
224
|
-
#if SIZEOF_DOUBLE <= SIZEOF_VALUE
|
|
225
|
-
return RFLOAT(v)->float_value;
|
|
226
|
-
#else
|
|
227
|
-
union {
|
|
228
|
-
rb_float_value_type v;
|
|
229
|
-
double d;
|
|
230
|
-
} u = {RFLOAT(v)->float_value};
|
|
231
|
-
return u.d;
|
|
232
|
-
#endif
|
|
233
|
-
}
|
|
234
|
-
|
|
235
|
-
static inline double
|
|
236
|
-
rb_float_value_inline(VALUE v)
|
|
237
|
-
{
|
|
238
|
-
if (FLONUM_P(v)) {
|
|
239
|
-
return rb_float_flonum_value(v);
|
|
240
|
-
}
|
|
241
|
-
return rb_float_noflonum_value(v);
|
|
242
|
-
}
|
|
243
|
-
|
|
244
|
-
static inline VALUE
|
|
245
|
-
rb_float_new_inline(double d)
|
|
246
|
-
{
|
|
247
|
-
#if USE_FLONUM
|
|
248
|
-
union {
|
|
249
|
-
double d;
|
|
250
|
-
VALUE v;
|
|
251
|
-
} t;
|
|
252
|
-
int bits;
|
|
253
|
-
|
|
254
|
-
t.d = d;
|
|
255
|
-
bits = (int)((VALUE)(t.v >> 60) & 0x7);
|
|
256
|
-
/* bits contains 3 bits of b62..b60. */
|
|
257
|
-
/* bits - 3 = */
|
|
258
|
-
/* b011 -> b000 */
|
|
259
|
-
/* b100 -> b001 */
|
|
260
|
-
|
|
261
|
-
if (t.v != 0x3000000000000000 /* 1.72723e-77 */ &&
|
|
262
|
-
!((bits-3) & ~0x01)) {
|
|
263
|
-
return (RUBY_BIT_ROTL(t.v, 3) & ~(VALUE)0x01) | 0x02;
|
|
264
|
-
}
|
|
265
|
-
else if (t.v == (VALUE)0) {
|
|
266
|
-
/* +0.0 */
|
|
267
|
-
return 0x8000000000000002;
|
|
268
|
-
}
|
|
269
|
-
/* out of range */
|
|
270
|
-
#endif
|
|
271
|
-
return rb_float_new_in_heap(d);
|
|
272
|
-
}
|
|
273
|
-
|
|
274
|
-
#endif /* INTERNAL_NUMERIC_H */
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
#ifndef INTERNAL_OBJECT_H /*-*-C-*-vi:se ft=c:*/
|
|
2
|
-
#define INTERNAL_OBJECT_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 Object.
|
|
10
|
-
*/
|
|
11
|
-
#include "ruby/ruby.h" /* for VALUE */
|
|
12
|
-
|
|
13
|
-
/* object.c */
|
|
14
|
-
size_t rb_obj_embedded_size(uint32_t numiv);
|
|
15
|
-
VALUE rb_class_allocate_instance(VALUE klass);
|
|
16
|
-
VALUE rb_class_search_ancestor(VALUE klass, VALUE super);
|
|
17
|
-
NORETURN(void rb_undefined_alloc(VALUE klass));
|
|
18
|
-
double rb_num_to_dbl(VALUE val);
|
|
19
|
-
VALUE rb_obj_dig(int argc, VALUE *argv, VALUE self, VALUE notfound);
|
|
20
|
-
VALUE rb_obj_clone_setup(VALUE obj, VALUE clone, VALUE kwfreeze);
|
|
21
|
-
VALUE rb_obj_dup_setup(VALUE obj, VALUE dup);
|
|
22
|
-
VALUE rb_immutable_obj_clone(int, VALUE *, VALUE);
|
|
23
|
-
VALUE rb_check_convert_type_with_id(VALUE,int,const char*,ID);
|
|
24
|
-
int rb_bool_expected(VALUE, const char *, int raise);
|
|
25
|
-
static inline void RBASIC_CLEAR_CLASS(VALUE obj);
|
|
26
|
-
static inline void RBASIC_SET_CLASS_RAW(VALUE obj, VALUE klass);
|
|
27
|
-
static inline void RBASIC_SET_CLASS(VALUE obj, VALUE klass);
|
|
28
|
-
|
|
29
|
-
RUBY_SYMBOL_EXPORT_BEGIN
|
|
30
|
-
/* object.c (export) */
|
|
31
|
-
int rb_opts_exception_p(VALUE opts, int default_value);
|
|
32
|
-
RUBY_SYMBOL_EXPORT_END
|
|
33
|
-
|
|
34
|
-
CONSTFUNC(VALUE rb_obj_equal(VALUE obj1, VALUE obj2));
|
|
35
|
-
CONSTFUNC(VALUE rb_obj_not(VALUE obj));
|
|
36
|
-
VALUE rb_obj_not_equal(VALUE obj1, VALUE obj2);
|
|
37
|
-
void rb_obj_copy_ivar(VALUE dest, VALUE obj);
|
|
38
|
-
VALUE rb_false(VALUE obj);
|
|
39
|
-
VALUE rb_convert_type_with_id(VALUE v, int t, const char* nam, ID mid);
|
|
40
|
-
VALUE rb_obj_size(VALUE self, VALUE args, VALUE obj);
|
|
41
|
-
VALUE rb_get_freeze_opt(int argc, VALUE *argv);
|
|
42
|
-
|
|
43
|
-
static inline void
|
|
44
|
-
RBASIC_SET_CLASS_RAW(VALUE obj, VALUE klass)
|
|
45
|
-
{
|
|
46
|
-
const VALUE *ptr = &RBASIC(obj)->klass;
|
|
47
|
-
*(VALUE *)ptr = klass;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
static inline void
|
|
51
|
-
RBASIC_CLEAR_CLASS(VALUE obj)
|
|
52
|
-
{
|
|
53
|
-
RBASIC_SET_CLASS_RAW(obj, 0);
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
static inline void
|
|
57
|
-
RBASIC_SET_CLASS(VALUE obj, VALUE klass)
|
|
58
|
-
{
|
|
59
|
-
VALUE oldv = RBASIC_CLASS(obj);
|
|
60
|
-
RBASIC_SET_CLASS_RAW(obj, klass);
|
|
61
|
-
RB_OBJ_WRITTEN(obj, oldv, klass);
|
|
62
|
-
}
|
|
63
|
-
#endif /* INTERNAL_OBJECT_H */
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
#ifndef INTERNAL_RE_H /*-*-C-*-vi:se ft=c:*/
|
|
2
|
-
#define INTERNAL_RE_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 Regexp.
|
|
10
|
-
*/
|
|
11
|
-
#include "ruby/internal/stdbool.h" /* for bool */
|
|
12
|
-
#include "ruby/ruby.h" /* for VALUE */
|
|
13
|
-
|
|
14
|
-
/* re.c */
|
|
15
|
-
VALUE rb_reg_compile(VALUE str, int options, const char *sourcefile, int sourceline);
|
|
16
|
-
VALUE rb_reg_check_preprocess(VALUE);
|
|
17
|
-
long rb_reg_search0(VALUE, VALUE, long, int, int, VALUE *);
|
|
18
|
-
VALUE rb_reg_match_p(VALUE re, VALUE str, long pos);
|
|
19
|
-
bool rb_reg_start_with_p(VALUE re, VALUE str);
|
|
20
|
-
VALUE rb_reg_hash(VALUE re);
|
|
21
|
-
VALUE rb_reg_equal(VALUE re1, VALUE re2);
|
|
22
|
-
VALUE rb_backref_set_string(VALUE string, long pos, long len);
|
|
23
|
-
void rb_match_unbusy(VALUE);
|
|
24
|
-
int rb_match_count(VALUE match);
|
|
25
|
-
VALUE rb_reg_new_ary(VALUE ary, int options);
|
|
26
|
-
VALUE rb_reg_last_defined(VALUE match);
|
|
27
|
-
|
|
28
|
-
#endif /* INTERNAL_RE_H */
|
|
@@ -1,330 +0,0 @@
|
|
|
1
|
-
#ifndef INTERNAL_SANITIZERS_H /*-*-C-*-vi:se ft=c:*/
|
|
2
|
-
#define INTERNAL_SANITIZERS_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 ASAN / MSAN / etc.
|
|
10
|
-
*/
|
|
11
|
-
#include "ruby/internal/config.h"
|
|
12
|
-
#include "internal/compilers.h" /* for __has_feature */
|
|
13
|
-
|
|
14
|
-
#ifdef HAVE_VALGRIND_MEMCHECK_H
|
|
15
|
-
# include <valgrind/memcheck.h>
|
|
16
|
-
#endif
|
|
17
|
-
|
|
18
|
-
#ifdef HAVE_SANITIZER_ASAN_INTERFACE_H
|
|
19
|
-
# if __has_feature(address_sanitizer) || defined(__SANITIZE_ADDRESS__)
|
|
20
|
-
# define RUBY_ASAN_ENABLED
|
|
21
|
-
# include <sanitizer/asan_interface.h>
|
|
22
|
-
# endif
|
|
23
|
-
#endif
|
|
24
|
-
|
|
25
|
-
#ifdef HAVE_SANITIZER_MSAN_INTERFACE_H
|
|
26
|
-
# if __has_feature(memory_sanitizer)
|
|
27
|
-
# define RUBY_MSAN_ENABLED
|
|
28
|
-
# include <sanitizer/msan_interface.h>
|
|
29
|
-
# endif
|
|
30
|
-
#endif
|
|
31
|
-
|
|
32
|
-
#include "ruby/internal/stdbool.h" /* for bool */
|
|
33
|
-
#include "ruby/ruby.h" /* for VALUE */
|
|
34
|
-
|
|
35
|
-
#if 0
|
|
36
|
-
#elif defined(RUBY_ASAN_ENABLED) && defined(RUBY_MSAN_ENABLED)
|
|
37
|
-
# define ATTRIBUTE_NO_ADDRESS_SAFETY_ANALYSIS(x) \
|
|
38
|
-
__attribute__((__no_sanitize__("memory, address"), __noinline__)) x
|
|
39
|
-
#elif defined(RUBY_ASAN_ENABLED)
|
|
40
|
-
# define ATTRIBUTE_NO_ADDRESS_SAFETY_ANALYSIS(x) \
|
|
41
|
-
__attribute__((__no_sanitize__("address"), __noinline__)) x
|
|
42
|
-
#elif defined(RUBY_MSAN_ENABLED)
|
|
43
|
-
# define ATTRIBUTE_NO_ADDRESS_SAFETY_ANALYSIS(x) \
|
|
44
|
-
__attribute__((__no_sanitize__("memory"), __noinline__)) x
|
|
45
|
-
#elif defined(NO_SANITIZE_ADDRESS)
|
|
46
|
-
# define ATTRIBUTE_NO_ADDRESS_SAFETY_ANALYSIS(x) \
|
|
47
|
-
NO_SANITIZE_ADDRESS(NOINLINE(x))
|
|
48
|
-
#elif defined(NO_ADDRESS_SAFETY_ANALYSIS)
|
|
49
|
-
# define ATTRIBUTE_NO_ADDRESS_SAFETY_ANALYSIS(x) \
|
|
50
|
-
NO_ADDRESS_SAFETY_ANALYSIS(NOINLINE(x))
|
|
51
|
-
#else
|
|
52
|
-
# define ATTRIBUTE_NO_ADDRESS_SAFETY_ANALYSIS(x) x
|
|
53
|
-
#endif
|
|
54
|
-
|
|
55
|
-
#if defined(NO_SANITIZE) && RBIMPL_COMPILER_IS(GCC)
|
|
56
|
-
/* GCC warns about unknown sanitizer, which is annoying. */
|
|
57
|
-
# include "internal/warnings.h"
|
|
58
|
-
# undef NO_SANITIZE
|
|
59
|
-
# define NO_SANITIZE(x, y) \
|
|
60
|
-
COMPILER_WARNING_PUSH \
|
|
61
|
-
COMPILER_WARNING_IGNORED(-Wattributes) \
|
|
62
|
-
__attribute__((__no_sanitize__(x))) y; \
|
|
63
|
-
COMPILER_WARNING_POP \
|
|
64
|
-
y
|
|
65
|
-
#endif
|
|
66
|
-
|
|
67
|
-
#ifndef NO_SANITIZE
|
|
68
|
-
# define NO_SANITIZE(x, y) y
|
|
69
|
-
#endif
|
|
70
|
-
|
|
71
|
-
#ifndef RUBY_ASAN_ENABLED
|
|
72
|
-
# define __asan_poison_memory_region(x, y)
|
|
73
|
-
# define __asan_unpoison_memory_region(x, y)
|
|
74
|
-
# define __asan_region_is_poisoned(x, y) 0
|
|
75
|
-
# define __asan_get_current_fake_stack() NULL
|
|
76
|
-
# define __asan_addr_is_in_fake_stack(fake_stack, slot, start, end) NULL
|
|
77
|
-
#endif
|
|
78
|
-
|
|
79
|
-
#ifndef RUBY_MSAN_ENABLED
|
|
80
|
-
# define __msan_allocated_memory(x, y) ((void)(x), (void)(y))
|
|
81
|
-
# define __msan_poison(x, y) ((void)(x), (void)(y))
|
|
82
|
-
# define __msan_unpoison(x, y) ((void)(x), (void)(y))
|
|
83
|
-
# define __msan_unpoison_string(x) ((void)(x))
|
|
84
|
-
#endif
|
|
85
|
-
|
|
86
|
-
#ifdef VALGRIND_MAKE_READABLE
|
|
87
|
-
# define VALGRIND_MAKE_MEM_DEFINED(p, n) VALGRIND_MAKE_READABLE((p), (n))
|
|
88
|
-
#endif
|
|
89
|
-
|
|
90
|
-
#ifdef VALGRIND_MAKE_WRITABLE
|
|
91
|
-
# define VALGRIND_MAKE_MEM_UNDEFINED(p, n) VALGRIND_MAKE_WRITABLE((p), (n))
|
|
92
|
-
#endif
|
|
93
|
-
|
|
94
|
-
#ifndef VALGRIND_MAKE_MEM_DEFINED
|
|
95
|
-
# define VALGRIND_MAKE_MEM_DEFINED(p, n) 0
|
|
96
|
-
#endif
|
|
97
|
-
|
|
98
|
-
#ifndef VALGRIND_MAKE_MEM_UNDEFINED
|
|
99
|
-
# define VALGRIND_MAKE_MEM_UNDEFINED(p, n) 0
|
|
100
|
-
#endif
|
|
101
|
-
|
|
102
|
-
/**
|
|
103
|
-
* This function asserts that a (continuous) memory region from ptr to size
|
|
104
|
-
* being "poisoned". Both read / write access to such memory region are
|
|
105
|
-
* prohibited until properly unpoisoned. The region must be previously
|
|
106
|
-
* allocated (do not pass a freed pointer here), but not necessarily be an
|
|
107
|
-
* entire object that the malloc returns. You can punch hole a part of a
|
|
108
|
-
* gigantic heap arena. This is handy when you do not free an allocated memory
|
|
109
|
-
* region to reuse later: poison when you keep it unused, and unpoison when you
|
|
110
|
-
* reuse.
|
|
111
|
-
*
|
|
112
|
-
* @param[in] ptr pointer to the beginning of the memory region to poison.
|
|
113
|
-
* @param[in] size the length of the memory region to poison.
|
|
114
|
-
*/
|
|
115
|
-
static inline void
|
|
116
|
-
asan_poison_memory_region(const volatile void *ptr, size_t size)
|
|
117
|
-
{
|
|
118
|
-
__msan_poison(ptr, size);
|
|
119
|
-
__asan_poison_memory_region(ptr, size);
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
#ifdef RUBY_ASAN_ENABLED
|
|
123
|
-
#define asan_poison_object_if(ptr, obj) do { \
|
|
124
|
-
if (ptr) rb_asan_poison_object(obj); \
|
|
125
|
-
} while (0)
|
|
126
|
-
#else
|
|
127
|
-
#define asan_poison_object_if(ptr, obj) ((void)(ptr), (void)(obj))
|
|
128
|
-
#endif
|
|
129
|
-
|
|
130
|
-
RUBY_SYMBOL_EXPORT_BEGIN
|
|
131
|
-
/**
|
|
132
|
-
* This is a variant of asan_poison_memory_region that takes a VALUE.
|
|
133
|
-
*
|
|
134
|
-
* @param[in] obj target object.
|
|
135
|
-
*/
|
|
136
|
-
void rb_asan_poison_object(VALUE obj);
|
|
137
|
-
|
|
138
|
-
/**
|
|
139
|
-
* This function predicates if the given object is fully addressable or not.
|
|
140
|
-
*
|
|
141
|
-
* @param[in] obj target object.
|
|
142
|
-
* @retval 0 the given object is fully addressable.
|
|
143
|
-
* @retval otherwise pointer to first such byte who is poisoned.
|
|
144
|
-
*/
|
|
145
|
-
void *rb_asan_poisoned_object_p(VALUE obj);
|
|
146
|
-
|
|
147
|
-
/**
|
|
148
|
-
* This is a variant of asan_unpoison_memory_region that takes a VALUE.
|
|
149
|
-
*
|
|
150
|
-
* @param[in] obj target object.
|
|
151
|
-
* @param[in] malloc_p if the memory region is like a malloc's return value or not.
|
|
152
|
-
*/
|
|
153
|
-
void rb_asan_unpoison_object(VALUE obj, bool newobj_p);
|
|
154
|
-
|
|
155
|
-
RUBY_SYMBOL_EXPORT_END
|
|
156
|
-
|
|
157
|
-
/**
|
|
158
|
-
* This function asserts that a (formally poisoned) memory region from ptr to
|
|
159
|
-
* size is now addressable. Write access to such memory region gets allowed.
|
|
160
|
-
* However read access might or might not be possible depending on situations,
|
|
161
|
-
* because the region can have contents of previous usages. That information
|
|
162
|
-
* should be passed by the malloc_p flag. If that is true, the contents of the
|
|
163
|
-
* region is _not_ fully defined (like the return value of malloc behaves).
|
|
164
|
-
* Reading from there is NG; write something first. If malloc_p is false on
|
|
165
|
-
* the other hand, that memory region is fully defined and can be read
|
|
166
|
-
* immediately.
|
|
167
|
-
*
|
|
168
|
-
* @param[in] ptr pointer to the beginning of the memory region to unpoison.
|
|
169
|
-
* @param[in] size the length of the memory region.
|
|
170
|
-
* @param[in] malloc_p if the memory region is like a malloc's return value or not.
|
|
171
|
-
*/
|
|
172
|
-
static inline void
|
|
173
|
-
asan_unpoison_memory_region(const volatile void *ptr, size_t size, bool malloc_p)
|
|
174
|
-
{
|
|
175
|
-
__asan_unpoison_memory_region(ptr, size);
|
|
176
|
-
if (malloc_p) {
|
|
177
|
-
__msan_allocated_memory(ptr, size);
|
|
178
|
-
}
|
|
179
|
-
else {
|
|
180
|
-
__msan_unpoison(ptr, size);
|
|
181
|
-
}
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
static inline void *
|
|
185
|
-
asan_unpoison_object_temporary(VALUE obj)
|
|
186
|
-
{
|
|
187
|
-
void *ptr = rb_asan_poisoned_object_p(obj);
|
|
188
|
-
rb_asan_unpoison_object(obj, false);
|
|
189
|
-
return ptr;
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
static inline void *
|
|
193
|
-
asan_poison_object_restore(VALUE obj, void *ptr)
|
|
194
|
-
{
|
|
195
|
-
if (ptr) {
|
|
196
|
-
rb_asan_poison_object(obj);
|
|
197
|
-
}
|
|
198
|
-
return NULL;
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
#define asan_unpoisoning_object(obj) \
|
|
202
|
-
for (void *poisoned = asan_unpoison_object_temporary(obj), \
|
|
203
|
-
*unpoisoning = &poisoned; /* flag to loop just once */ \
|
|
204
|
-
unpoisoning; \
|
|
205
|
-
unpoisoning = asan_poison_object_restore(obj, poisoned))
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
static inline void *
|
|
209
|
-
asan_unpoison_memory_region_temporary(void *ptr, size_t len)
|
|
210
|
-
{
|
|
211
|
-
void *poisoned_ptr = __asan_region_is_poisoned(ptr, len);
|
|
212
|
-
asan_unpoison_memory_region(ptr, len, false);
|
|
213
|
-
return poisoned_ptr;
|
|
214
|
-
}
|
|
215
|
-
|
|
216
|
-
static inline void *
|
|
217
|
-
asan_poison_memory_region_restore(void *ptr, size_t len, void *poisoned_ptr)
|
|
218
|
-
{
|
|
219
|
-
if (poisoned_ptr) {
|
|
220
|
-
asan_poison_memory_region(ptr, len);
|
|
221
|
-
}
|
|
222
|
-
return NULL;
|
|
223
|
-
}
|
|
224
|
-
|
|
225
|
-
#define asan_unpoisoning_memory_region(ptr, len) \
|
|
226
|
-
for (void *poisoned = asan_unpoison_memory_region_temporary(ptr, len), \
|
|
227
|
-
*unpoisoning = &poisoned; /* flag to loop just once */ \
|
|
228
|
-
unpoisoning; \
|
|
229
|
-
unpoisoning = asan_poison_memory_region_restore(ptr, len, poisoned))
|
|
230
|
-
|
|
231
|
-
/**
|
|
232
|
-
* Checks if the given pointer is on an ASAN fake stack. If so, it returns the
|
|
233
|
-
* address this variable has on the real frame; if not, it returns the origin
|
|
234
|
-
* address unmodified.
|
|
235
|
-
*
|
|
236
|
-
* n.b. - _dereferencing_ the returned address is meaningless and should not
|
|
237
|
-
* be done; even though ASAN reserves space for the variable in both the real and
|
|
238
|
-
* fake stacks, the _value_ of that variable is only in the fake stack.
|
|
239
|
-
*
|
|
240
|
-
* n.b. - this only works for addresses passed in from local variables on the same
|
|
241
|
-
* thread, because the ASAN fake stacks are threadlocal.
|
|
242
|
-
*
|
|
243
|
-
* @param[in] slot the address of some local variable
|
|
244
|
-
* @retval a pointer to something from that frame on the _real_ machine stack
|
|
245
|
-
*/
|
|
246
|
-
static inline void *
|
|
247
|
-
asan_get_real_stack_addr(void* slot)
|
|
248
|
-
{
|
|
249
|
-
VALUE *addr;
|
|
250
|
-
addr = __asan_addr_is_in_fake_stack(__asan_get_current_fake_stack(), slot, NULL, NULL);
|
|
251
|
-
return addr ? addr : slot;
|
|
252
|
-
}
|
|
253
|
-
|
|
254
|
-
/**
|
|
255
|
-
* Gets the current thread's fake stack handle, which can be passed into get_fake_stack_extents
|
|
256
|
-
*
|
|
257
|
-
* @retval An opaque value which can be passed to asan_get_fake_stack_extents
|
|
258
|
-
*/
|
|
259
|
-
static inline void *
|
|
260
|
-
asan_get_thread_fake_stack_handle(void)
|
|
261
|
-
{
|
|
262
|
-
return __asan_get_current_fake_stack();
|
|
263
|
-
}
|
|
264
|
-
|
|
265
|
-
/**
|
|
266
|
-
* Checks if the given VALUE _actually_ represents a pointer to an ASAN fake stack.
|
|
267
|
-
*
|
|
268
|
-
* If the given slot _is_ actually a reference to an ASAN fake stack, and that fake stack
|
|
269
|
-
* contains the real values for the passed-in range of machine stack addresses, returns true
|
|
270
|
-
* and the range of the fake stack through the outparams.
|
|
271
|
-
*
|
|
272
|
-
* Otherwise, returns false, and sets the outparams to NULL.
|
|
273
|
-
*
|
|
274
|
-
* Note that this function expects "start" to be > "end" on downward-growing stack architectures;
|
|
275
|
-
*
|
|
276
|
-
* @param[in] thread_fake_stack_handle The asan fake stack reference for the thread we're scanning
|
|
277
|
-
* @param[in] slot The value on the machine stack we want to inspect
|
|
278
|
-
* @param[in] machine_stack_start The extents of the real machine stack on which slot lives
|
|
279
|
-
* @param[in] machine_stack_end The extents of the real machine stack on which slot lives
|
|
280
|
-
* @param[out] fake_stack_start_out The extents of the fake stack which contains real VALUEs
|
|
281
|
-
* @param[out] fake_stack_end_out The extents of the fake stack which contains real VALUEs
|
|
282
|
-
* @return Whether slot is a pointer to a fake stack for the given machine stack range
|
|
283
|
-
*/
|
|
284
|
-
|
|
285
|
-
static inline bool
|
|
286
|
-
asan_get_fake_stack_extents(void *thread_fake_stack_handle, VALUE slot,
|
|
287
|
-
void *machine_stack_start, void *machine_stack_end,
|
|
288
|
-
void **fake_stack_start_out, void **fake_stack_end_out)
|
|
289
|
-
{
|
|
290
|
-
/* the ifdef is needed here to suppress a warning about fake_frame_{start/end} being
|
|
291
|
-
uninitialized if __asan_addr_is_in_fake_stack is an empty macro */
|
|
292
|
-
#ifdef RUBY_ASAN_ENABLED
|
|
293
|
-
void *fake_frame_start;
|
|
294
|
-
void *fake_frame_end;
|
|
295
|
-
void *real_stack_frame = __asan_addr_is_in_fake_stack(
|
|
296
|
-
thread_fake_stack_handle, (void *)slot, &fake_frame_start, &fake_frame_end
|
|
297
|
-
);
|
|
298
|
-
if (real_stack_frame) {
|
|
299
|
-
bool in_range;
|
|
300
|
-
#if STACK_GROW_DIRECTION < 0
|
|
301
|
-
in_range = machine_stack_start >= real_stack_frame && real_stack_frame >= machine_stack_end;
|
|
302
|
-
#else
|
|
303
|
-
in_range = machine_stack_start <= real_stack_frame && real_stack_frame <= machine_stack_end;
|
|
304
|
-
#endif
|
|
305
|
-
if (in_range) {
|
|
306
|
-
*fake_stack_start_out = fake_frame_start;
|
|
307
|
-
*fake_stack_end_out = fake_frame_end;
|
|
308
|
-
return true;
|
|
309
|
-
}
|
|
310
|
-
}
|
|
311
|
-
#endif
|
|
312
|
-
*fake_stack_start_out = 0;
|
|
313
|
-
*fake_stack_end_out = 0;
|
|
314
|
-
return false;
|
|
315
|
-
}
|
|
316
|
-
|
|
317
|
-
extern const char ruby_asan_default_options[];
|
|
318
|
-
|
|
319
|
-
#ifdef RUBY_ASAN_ENABLED
|
|
320
|
-
/* Compile in the ASAN options Ruby needs, rather than relying on environment variables, so
|
|
321
|
-
* that even tests which fork ruby with a clean environment will run ASAN with the right
|
|
322
|
-
* settings */
|
|
323
|
-
# undef RUBY__ASAN_DEFAULT_OPTIONS
|
|
324
|
-
# define RUBY__ASAN_DEFAULT_OPTIONS \
|
|
325
|
-
RBIMPL_SYMBOL_EXPORT_BEGIN() \
|
|
326
|
-
const char * __asan_default_options(void) {return ruby_asan_default_options;} \
|
|
327
|
-
RBIMPL_SYMBOL_EXPORT_END()
|
|
328
|
-
#endif
|
|
329
|
-
|
|
330
|
-
#endif /* INTERNAL_SANITIZERS_H */
|