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,126 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @file pm_integer.h
|
|
3
|
-
*
|
|
4
|
-
* This module provides functions for working with arbitrary-sized integers.
|
|
5
|
-
*/
|
|
6
|
-
#ifndef PRISM_NUMBER_H
|
|
7
|
-
#define PRISM_NUMBER_H
|
|
8
|
-
|
|
9
|
-
#include "prism/defines.h"
|
|
10
|
-
#include "prism/util/pm_buffer.h"
|
|
11
|
-
|
|
12
|
-
#include <assert.h>
|
|
13
|
-
#include <stdbool.h>
|
|
14
|
-
#include <stdint.h>
|
|
15
|
-
#include <stdlib.h>
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* A structure represents an arbitrary-sized integer.
|
|
19
|
-
*/
|
|
20
|
-
typedef struct {
|
|
21
|
-
/**
|
|
22
|
-
* The number of allocated values. length is set to 0 if the integer fits
|
|
23
|
-
* into uint32_t.
|
|
24
|
-
*/
|
|
25
|
-
size_t length;
|
|
26
|
-
|
|
27
|
-
/**
|
|
28
|
-
* List of 32-bit integers. Set to NULL if the integer fits into uint32_t.
|
|
29
|
-
*/
|
|
30
|
-
uint32_t *values;
|
|
31
|
-
|
|
32
|
-
/**
|
|
33
|
-
* Embedded value for small integer. This value is set to 0 if the value
|
|
34
|
-
* does not fit into uint32_t.
|
|
35
|
-
*/
|
|
36
|
-
uint32_t value;
|
|
37
|
-
|
|
38
|
-
/**
|
|
39
|
-
* Whether or not the integer is negative. It is stored this way so that a
|
|
40
|
-
* zeroed pm_integer_t is always positive zero.
|
|
41
|
-
*/
|
|
42
|
-
bool negative;
|
|
43
|
-
} pm_integer_t;
|
|
44
|
-
|
|
45
|
-
/**
|
|
46
|
-
* An enum controlling the base of an integer. It is expected that the base is
|
|
47
|
-
* already known before parsing the integer, even though it could be derived
|
|
48
|
-
* from the string itself.
|
|
49
|
-
*/
|
|
50
|
-
typedef enum {
|
|
51
|
-
/** The default decimal base, with no prefix. Leading 0s will be ignored. */
|
|
52
|
-
PM_INTEGER_BASE_DEFAULT,
|
|
53
|
-
|
|
54
|
-
/** The binary base, indicated by a 0b or 0B prefix. */
|
|
55
|
-
PM_INTEGER_BASE_BINARY,
|
|
56
|
-
|
|
57
|
-
/** The octal base, indicated by a 0, 0o, or 0O prefix. */
|
|
58
|
-
PM_INTEGER_BASE_OCTAL,
|
|
59
|
-
|
|
60
|
-
/** The decimal base, indicated by a 0d, 0D, or empty prefix. */
|
|
61
|
-
PM_INTEGER_BASE_DECIMAL,
|
|
62
|
-
|
|
63
|
-
/** The hexadecimal base, indicated by a 0x or 0X prefix. */
|
|
64
|
-
PM_INTEGER_BASE_HEXADECIMAL,
|
|
65
|
-
|
|
66
|
-
/**
|
|
67
|
-
* An unknown base, in which case pm_integer_parse will derive it based on
|
|
68
|
-
* the content of the string. This is less efficient and does more
|
|
69
|
-
* comparisons, so if callers know the base ahead of time, they should use
|
|
70
|
-
* that instead.
|
|
71
|
-
*/
|
|
72
|
-
PM_INTEGER_BASE_UNKNOWN
|
|
73
|
-
} pm_integer_base_t;
|
|
74
|
-
|
|
75
|
-
/**
|
|
76
|
-
* Parse an integer from a string. This assumes that the format of the integer
|
|
77
|
-
* has already been validated, as internal validation checks are not performed
|
|
78
|
-
* here.
|
|
79
|
-
*
|
|
80
|
-
* @param integer The integer to parse into.
|
|
81
|
-
* @param base The base of the integer.
|
|
82
|
-
* @param start The start of the string.
|
|
83
|
-
* @param end The end of the string.
|
|
84
|
-
*/
|
|
85
|
-
void pm_integer_parse(pm_integer_t *integer, pm_integer_base_t base, const uint8_t *start, const uint8_t *end);
|
|
86
|
-
|
|
87
|
-
/**
|
|
88
|
-
* Compare two integers. This function returns -1 if the left integer is less
|
|
89
|
-
* than the right integer, 0 if they are equal, and 1 if the left integer is
|
|
90
|
-
* greater than the right integer.
|
|
91
|
-
*
|
|
92
|
-
* @param left The left integer to compare.
|
|
93
|
-
* @param right The right integer to compare.
|
|
94
|
-
* @return The result of the comparison.
|
|
95
|
-
*/
|
|
96
|
-
int pm_integer_compare(const pm_integer_t *left, const pm_integer_t *right);
|
|
97
|
-
|
|
98
|
-
/**
|
|
99
|
-
* Reduce a ratio of integers to its simplest form.
|
|
100
|
-
*
|
|
101
|
-
* If either the numerator or denominator do not fit into a 32-bit integer, then
|
|
102
|
-
* this function is a no-op. In the future, we may consider reducing even the
|
|
103
|
-
* larger numbers, but for now we're going to keep it simple.
|
|
104
|
-
*
|
|
105
|
-
* @param numerator The numerator of the ratio.
|
|
106
|
-
* @param denominator The denominator of the ratio.
|
|
107
|
-
*/
|
|
108
|
-
void pm_integers_reduce(pm_integer_t *numerator, pm_integer_t *denominator);
|
|
109
|
-
|
|
110
|
-
/**
|
|
111
|
-
* Convert an integer to a decimal string.
|
|
112
|
-
*
|
|
113
|
-
* @param buffer The buffer to append the string to.
|
|
114
|
-
* @param integer The integer to convert to a string.
|
|
115
|
-
*/
|
|
116
|
-
PRISM_EXPORTED_FUNCTION void pm_integer_string(pm_buffer_t *buffer, const pm_integer_t *integer);
|
|
117
|
-
|
|
118
|
-
/**
|
|
119
|
-
* Free the internal memory of an integer. This memory will only be allocated if
|
|
120
|
-
* the integer exceeds the size of a single node in the linked list.
|
|
121
|
-
*
|
|
122
|
-
* @param integer The integer to free.
|
|
123
|
-
*/
|
|
124
|
-
PRISM_EXPORTED_FUNCTION void pm_integer_free(pm_integer_t *integer);
|
|
125
|
-
|
|
126
|
-
#endif
|
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @file pm_list.h
|
|
3
|
-
*
|
|
4
|
-
* An abstract linked list.
|
|
5
|
-
*/
|
|
6
|
-
#ifndef PRISM_LIST_H
|
|
7
|
-
#define PRISM_LIST_H
|
|
8
|
-
|
|
9
|
-
#include "prism/defines.h"
|
|
10
|
-
|
|
11
|
-
#include <stdbool.h>
|
|
12
|
-
#include <stddef.h>
|
|
13
|
-
#include <stdint.h>
|
|
14
|
-
#include <stdlib.h>
|
|
15
|
-
|
|
16
|
-
/**
|
|
17
|
-
* This struct represents an abstract linked list that provides common
|
|
18
|
-
* functionality. It is meant to be used any time a linked list is necessary to
|
|
19
|
-
* store data.
|
|
20
|
-
*
|
|
21
|
-
* The linked list itself operates off a set of pointers. Because the pointers
|
|
22
|
-
* are not necessarily sequential, they can be of any size. We use this fact to
|
|
23
|
-
* allow the consumer of this linked list to extend the node struct to include
|
|
24
|
-
* any data they want. This is done by using the pm_list_node_t as the first
|
|
25
|
-
* member of the struct.
|
|
26
|
-
*
|
|
27
|
-
* For example, if we want to store a list of integers, we can do the following:
|
|
28
|
-
*
|
|
29
|
-
* ```c
|
|
30
|
-
* typedef struct {
|
|
31
|
-
* pm_list_node_t node;
|
|
32
|
-
* int value;
|
|
33
|
-
* } pm_int_node_t;
|
|
34
|
-
*
|
|
35
|
-
* pm_list_t list = { 0 };
|
|
36
|
-
* pm_int_node_t *node = xmalloc(sizeof(pm_int_node_t));
|
|
37
|
-
* node->value = 5;
|
|
38
|
-
*
|
|
39
|
-
* pm_list_append(&list, &node->node);
|
|
40
|
-
* ```
|
|
41
|
-
*
|
|
42
|
-
* The pm_list_t struct is used to represent the overall linked list. It
|
|
43
|
-
* contains a pointer to the head and tail of the list. This allows for easy
|
|
44
|
-
* iteration and appending of new nodes.
|
|
45
|
-
*/
|
|
46
|
-
typedef struct pm_list_node {
|
|
47
|
-
/** A pointer to the next node in the list. */
|
|
48
|
-
struct pm_list_node *next;
|
|
49
|
-
} pm_list_node_t;
|
|
50
|
-
|
|
51
|
-
/**
|
|
52
|
-
* This represents the overall linked list. It keeps a pointer to the head and
|
|
53
|
-
* tail so that iteration is easy and pushing new nodes is easy.
|
|
54
|
-
*/
|
|
55
|
-
typedef struct {
|
|
56
|
-
/** The size of the list. */
|
|
57
|
-
size_t size;
|
|
58
|
-
|
|
59
|
-
/** A pointer to the head of the list. */
|
|
60
|
-
pm_list_node_t *head;
|
|
61
|
-
|
|
62
|
-
/** A pointer to the tail of the list. */
|
|
63
|
-
pm_list_node_t *tail;
|
|
64
|
-
} pm_list_t;
|
|
65
|
-
|
|
66
|
-
/**
|
|
67
|
-
* Returns true if the given list is empty.
|
|
68
|
-
*
|
|
69
|
-
* @param list The list to check.
|
|
70
|
-
* @return True if the given list is empty, otherwise false.
|
|
71
|
-
*/
|
|
72
|
-
PRISM_EXPORTED_FUNCTION bool pm_list_empty_p(pm_list_t *list);
|
|
73
|
-
|
|
74
|
-
/**
|
|
75
|
-
* Returns the size of the list.
|
|
76
|
-
*
|
|
77
|
-
* @param list The list to check.
|
|
78
|
-
* @return The size of the list.
|
|
79
|
-
*/
|
|
80
|
-
PRISM_EXPORTED_FUNCTION size_t pm_list_size(pm_list_t *list);
|
|
81
|
-
|
|
82
|
-
/**
|
|
83
|
-
* Append a node to the given list.
|
|
84
|
-
*
|
|
85
|
-
* @param list The list to append to.
|
|
86
|
-
* @param node The node to append.
|
|
87
|
-
*/
|
|
88
|
-
void pm_list_append(pm_list_t *list, pm_list_node_t *node);
|
|
89
|
-
|
|
90
|
-
/**
|
|
91
|
-
* Deallocate the internal state of the given list.
|
|
92
|
-
*
|
|
93
|
-
* @param list The list to free.
|
|
94
|
-
*/
|
|
95
|
-
PRISM_EXPORTED_FUNCTION void pm_list_free(pm_list_t *list);
|
|
96
|
-
|
|
97
|
-
#endif
|
|
@@ -1,190 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @file pm_string.h
|
|
3
|
-
*
|
|
4
|
-
* A generic string type that can have various ownership semantics.
|
|
5
|
-
*/
|
|
6
|
-
#ifndef PRISM_STRING_H
|
|
7
|
-
#define PRISM_STRING_H
|
|
8
|
-
|
|
9
|
-
#include "prism/defines.h"
|
|
10
|
-
|
|
11
|
-
#include <assert.h>
|
|
12
|
-
#include <errno.h>
|
|
13
|
-
#include <stdbool.h>
|
|
14
|
-
#include <stddef.h>
|
|
15
|
-
#include <stdlib.h>
|
|
16
|
-
#include <string.h>
|
|
17
|
-
|
|
18
|
-
// The following headers are necessary to read files using demand paging.
|
|
19
|
-
#ifdef _WIN32
|
|
20
|
-
#include <windows.h>
|
|
21
|
-
#elif defined(_POSIX_MAPPED_FILES)
|
|
22
|
-
#include <fcntl.h>
|
|
23
|
-
#include <sys/mman.h>
|
|
24
|
-
#include <sys/stat.h>
|
|
25
|
-
#elif defined(PRISM_HAS_FILESYSTEM)
|
|
26
|
-
#include <fcntl.h>
|
|
27
|
-
#include <sys/stat.h>
|
|
28
|
-
#endif
|
|
29
|
-
|
|
30
|
-
/**
|
|
31
|
-
* A generic string type that can have various ownership semantics.
|
|
32
|
-
*/
|
|
33
|
-
typedef struct {
|
|
34
|
-
/** A pointer to the start of the string. */
|
|
35
|
-
const uint8_t *source;
|
|
36
|
-
|
|
37
|
-
/** The length of the string in bytes of memory. */
|
|
38
|
-
size_t length;
|
|
39
|
-
|
|
40
|
-
/** The type of the string. This field determines how the string should be freed. */
|
|
41
|
-
enum {
|
|
42
|
-
/** This string is a constant string, and should not be freed. */
|
|
43
|
-
PM_STRING_CONSTANT,
|
|
44
|
-
|
|
45
|
-
/** This is a slice of another string, and should not be freed. */
|
|
46
|
-
PM_STRING_SHARED,
|
|
47
|
-
|
|
48
|
-
/** This string owns its memory, and should be freed using `pm_string_free`. */
|
|
49
|
-
PM_STRING_OWNED,
|
|
50
|
-
|
|
51
|
-
#ifdef PRISM_HAS_MMAP
|
|
52
|
-
/** This string is a memory-mapped file, and should be freed using `pm_string_free`. */
|
|
53
|
-
PM_STRING_MAPPED
|
|
54
|
-
#endif
|
|
55
|
-
} type;
|
|
56
|
-
} pm_string_t;
|
|
57
|
-
|
|
58
|
-
/**
|
|
59
|
-
* Returns the size of the pm_string_t struct. This is necessary to allocate the
|
|
60
|
-
* correct amount of memory in the FFI backend.
|
|
61
|
-
*
|
|
62
|
-
* @return The size of the pm_string_t struct.
|
|
63
|
-
*/
|
|
64
|
-
PRISM_EXPORTED_FUNCTION size_t pm_string_sizeof(void);
|
|
65
|
-
|
|
66
|
-
/**
|
|
67
|
-
* Defines an empty string. This is useful for initializing a string that will
|
|
68
|
-
* be filled in later.
|
|
69
|
-
*/
|
|
70
|
-
#define PM_STRING_EMPTY ((pm_string_t) { .type = PM_STRING_CONSTANT, .source = NULL, .length = 0 })
|
|
71
|
-
|
|
72
|
-
/**
|
|
73
|
-
* Initialize a shared string that is based on initial input.
|
|
74
|
-
*
|
|
75
|
-
* @param string The string to initialize.
|
|
76
|
-
* @param start The start of the string.
|
|
77
|
-
* @param end The end of the string.
|
|
78
|
-
*/
|
|
79
|
-
void pm_string_shared_init(pm_string_t *string, const uint8_t *start, const uint8_t *end);
|
|
80
|
-
|
|
81
|
-
/**
|
|
82
|
-
* Initialize an owned string that is responsible for freeing allocated memory.
|
|
83
|
-
*
|
|
84
|
-
* @param string The string to initialize.
|
|
85
|
-
* @param source The source of the string.
|
|
86
|
-
* @param length The length of the string.
|
|
87
|
-
*/
|
|
88
|
-
void pm_string_owned_init(pm_string_t *string, uint8_t *source, size_t length);
|
|
89
|
-
|
|
90
|
-
/**
|
|
91
|
-
* Initialize a constant string that doesn't own its memory source.
|
|
92
|
-
*
|
|
93
|
-
* @param string The string to initialize.
|
|
94
|
-
* @param source The source of the string.
|
|
95
|
-
* @param length The length of the string.
|
|
96
|
-
*/
|
|
97
|
-
void pm_string_constant_init(pm_string_t *string, const char *source, size_t length);
|
|
98
|
-
|
|
99
|
-
/**
|
|
100
|
-
* Represents the result of calling pm_string_mapped_init or
|
|
101
|
-
* pm_string_file_init. We need this additional information because there is
|
|
102
|
-
* not a platform-agnostic way to indicate that the file that was attempted to
|
|
103
|
-
* be opened was a directory.
|
|
104
|
-
*/
|
|
105
|
-
typedef enum {
|
|
106
|
-
/** Indicates that the string was successfully initialized. */
|
|
107
|
-
PM_STRING_INIT_SUCCESS = 0,
|
|
108
|
-
/**
|
|
109
|
-
* Indicates a generic error from a string_*_init function, where the type
|
|
110
|
-
* of error should be read from `errno` or `GetLastError()`.
|
|
111
|
-
*/
|
|
112
|
-
PM_STRING_INIT_ERROR_GENERIC = 1,
|
|
113
|
-
/**
|
|
114
|
-
* Indicates that the file that was attempted to be opened was a directory.
|
|
115
|
-
*/
|
|
116
|
-
PM_STRING_INIT_ERROR_DIRECTORY = 2
|
|
117
|
-
} pm_string_init_result_t;
|
|
118
|
-
|
|
119
|
-
/**
|
|
120
|
-
* Read the file indicated by the filepath parameter into source and load its
|
|
121
|
-
* contents and size into the given `pm_string_t`. The given `pm_string_t`
|
|
122
|
-
* should be freed using `pm_string_free` when it is no longer used.
|
|
123
|
-
*
|
|
124
|
-
* We want to use demand paging as much as possible in order to avoid having to
|
|
125
|
-
* read the entire file into memory (which could be detrimental to performance
|
|
126
|
-
* for large files). This means that if we're on windows we'll use
|
|
127
|
-
* `MapViewOfFile`, on POSIX systems that have access to `mmap` we'll use
|
|
128
|
-
* `mmap`, and on other POSIX systems we'll use `read`.
|
|
129
|
-
*
|
|
130
|
-
* @param string The string to initialize.
|
|
131
|
-
* @param filepath The filepath to read.
|
|
132
|
-
* @return The success of the read, indicated by the value of the enum.
|
|
133
|
-
*/
|
|
134
|
-
PRISM_EXPORTED_FUNCTION pm_string_init_result_t pm_string_mapped_init(pm_string_t *string, const char *filepath);
|
|
135
|
-
|
|
136
|
-
/**
|
|
137
|
-
* Read the file indicated by the filepath parameter into source and load its
|
|
138
|
-
* contents and size into the given `pm_string_t`. The given `pm_string_t`
|
|
139
|
-
* should be freed using `pm_string_free` when it is no longer used.
|
|
140
|
-
*
|
|
141
|
-
* @param string The string to initialize.
|
|
142
|
-
* @param filepath The filepath to read.
|
|
143
|
-
* @return The success of the read, indicated by the value of the enum.
|
|
144
|
-
*/
|
|
145
|
-
PRISM_EXPORTED_FUNCTION pm_string_init_result_t pm_string_file_init(pm_string_t *string, const char *filepath);
|
|
146
|
-
|
|
147
|
-
/**
|
|
148
|
-
* Ensure the string is owned. If it is not, then reinitialize it as owned and
|
|
149
|
-
* copy over the previous source.
|
|
150
|
-
*
|
|
151
|
-
* @param string The string to ensure is owned.
|
|
152
|
-
*/
|
|
153
|
-
void pm_string_ensure_owned(pm_string_t *string);
|
|
154
|
-
|
|
155
|
-
/**
|
|
156
|
-
* Compare the underlying lengths and bytes of two strings. Returns 0 if the
|
|
157
|
-
* strings are equal, a negative number if the left string is less than the
|
|
158
|
-
* right string, and a positive number if the left string is greater than the
|
|
159
|
-
* right string.
|
|
160
|
-
*
|
|
161
|
-
* @param left The left string to compare.
|
|
162
|
-
* @param right The right string to compare.
|
|
163
|
-
* @return The comparison result.
|
|
164
|
-
*/
|
|
165
|
-
int pm_string_compare(const pm_string_t *left, const pm_string_t *right);
|
|
166
|
-
|
|
167
|
-
/**
|
|
168
|
-
* Returns the length associated with the string.
|
|
169
|
-
*
|
|
170
|
-
* @param string The string to get the length of.
|
|
171
|
-
* @return The length of the string.
|
|
172
|
-
*/
|
|
173
|
-
PRISM_EXPORTED_FUNCTION size_t pm_string_length(const pm_string_t *string);
|
|
174
|
-
|
|
175
|
-
/**
|
|
176
|
-
* Returns the start pointer associated with the string.
|
|
177
|
-
*
|
|
178
|
-
* @param string The string to get the start pointer of.
|
|
179
|
-
* @return The start pointer of the string.
|
|
180
|
-
*/
|
|
181
|
-
PRISM_EXPORTED_FUNCTION const uint8_t * pm_string_source(const pm_string_t *string);
|
|
182
|
-
|
|
183
|
-
/**
|
|
184
|
-
* Free the associated memory of the given string.
|
|
185
|
-
*
|
|
186
|
-
* @param string The string to free.
|
|
187
|
-
*/
|
|
188
|
-
PRISM_EXPORTED_FUNCTION void pm_string_free(pm_string_t *string);
|
|
189
|
-
|
|
190
|
-
#endif
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @file version.h
|
|
3
|
-
*
|
|
4
|
-
* The version of the Prism library.
|
|
5
|
-
*/
|
|
6
|
-
#ifndef PRISM_VERSION_H
|
|
7
|
-
#define PRISM_VERSION_H
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* The major version of the Prism library as an int.
|
|
11
|
-
*/
|
|
12
|
-
#define PRISM_VERSION_MAJOR 1
|
|
13
|
-
|
|
14
|
-
/**
|
|
15
|
-
* The minor version of the Prism library as an int.
|
|
16
|
-
*/
|
|
17
|
-
#define PRISM_VERSION_MINOR 4
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
* The patch version of the Prism library as an int.
|
|
21
|
-
*/
|
|
22
|
-
#define PRISM_VERSION_PATCH 0
|
|
23
|
-
|
|
24
|
-
/**
|
|
25
|
-
* The version of the Prism library as a constant string.
|
|
26
|
-
*/
|
|
27
|
-
#define PRISM_VERSION "1.4.0"
|
|
28
|
-
|
|
29
|
-
#endif
|
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
#include "prism/prism.h"
|
|
2
|
-
#include "ruby/encoding.h"
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* the getlocal and setlocal instructions require two parameters. level is how
|
|
6
|
-
* many hops up the iseq stack one needs to go before finding the correct local
|
|
7
|
-
* table. The index is the index in that table where our variable is.
|
|
8
|
-
*
|
|
9
|
-
* Because these are always calculated and used together, we'll bind them
|
|
10
|
-
* together as a tuple.
|
|
11
|
-
*/
|
|
12
|
-
typedef struct pm_local_index_struct {
|
|
13
|
-
int index, level;
|
|
14
|
-
} pm_local_index_t;
|
|
15
|
-
|
|
16
|
-
// A declaration for the struct that lives in compile.c.
|
|
17
|
-
struct iseq_link_anchor;
|
|
18
|
-
|
|
19
|
-
// ScopeNodes are helper nodes, and will never be part of the AST. We manually
|
|
20
|
-
// declare them here to avoid generating them.
|
|
21
|
-
typedef struct pm_scope_node {
|
|
22
|
-
pm_node_t base;
|
|
23
|
-
struct pm_scope_node *previous;
|
|
24
|
-
pm_node_t *ast_node;
|
|
25
|
-
pm_node_t *parameters;
|
|
26
|
-
pm_node_t *body;
|
|
27
|
-
pm_constant_id_list_t locals;
|
|
28
|
-
|
|
29
|
-
const pm_parser_t *parser;
|
|
30
|
-
rb_encoding *encoding;
|
|
31
|
-
|
|
32
|
-
/**
|
|
33
|
-
* This is a pointer to the list of script lines for the ISEQs that will be
|
|
34
|
-
* associated with this scope node. It is only set if
|
|
35
|
-
* RubyVM.keep_script_lines is true. If it is set, it will be set to a
|
|
36
|
-
* pointer to an array that is always stack allocated (so no GC marking is
|
|
37
|
-
* needed by this struct). If it is not set, it will be NULL. It is
|
|
38
|
-
* inherited by all child scopes.
|
|
39
|
-
*/
|
|
40
|
-
VALUE *script_lines;
|
|
41
|
-
|
|
42
|
-
/**
|
|
43
|
-
* This is the encoding of the actual filepath object that will be used when
|
|
44
|
-
* a __FILE__ node is compiled or when the path has to be set on a syntax
|
|
45
|
-
* error.
|
|
46
|
-
*/
|
|
47
|
-
rb_encoding *filepath_encoding;
|
|
48
|
-
|
|
49
|
-
// The size of the local table on the iseq which includes locals and hidden
|
|
50
|
-
// variables.
|
|
51
|
-
int local_table_for_iseq_size;
|
|
52
|
-
|
|
53
|
-
ID *constants;
|
|
54
|
-
st_table *index_lookup_table;
|
|
55
|
-
|
|
56
|
-
// The current coverage setting, passed down through the various scopes.
|
|
57
|
-
int coverage_enabled;
|
|
58
|
-
|
|
59
|
-
/**
|
|
60
|
-
* This will only be set on the top-level scope node. It will contain all of
|
|
61
|
-
* the instructions pertaining to BEGIN{} nodes.
|
|
62
|
-
*/
|
|
63
|
-
struct iseq_link_anchor *pre_execution_anchor;
|
|
64
|
-
} pm_scope_node_t;
|
|
65
|
-
|
|
66
|
-
void pm_scope_node_init(const pm_node_t *node, pm_scope_node_t *scope, pm_scope_node_t *previous);
|
|
67
|
-
void pm_scope_node_destroy(pm_scope_node_t *scope_node);
|
|
68
|
-
|
|
69
|
-
typedef struct {
|
|
70
|
-
/** The parser that will do the actual parsing. */
|
|
71
|
-
pm_parser_t parser;
|
|
72
|
-
|
|
73
|
-
/** The options that will be passed to the parser. */
|
|
74
|
-
pm_options_t options;
|
|
75
|
-
|
|
76
|
-
/** The input that represents the source to be parsed. */
|
|
77
|
-
pm_string_t input;
|
|
78
|
-
|
|
79
|
-
/** The resulting scope node that will hold the generated AST. */
|
|
80
|
-
pm_scope_node_t node;
|
|
81
|
-
|
|
82
|
-
/** Whether or not this parse result has performed its parsing yet. */
|
|
83
|
-
bool parsed;
|
|
84
|
-
} pm_parse_result_t;
|
|
85
|
-
|
|
86
|
-
#define PM_SPECIAL_CONSTANT_FLAG ((pm_constant_id_t)(1 << 31))
|
|
87
|
-
#define PM_CONSTANT_AND ((pm_constant_id_t)(idAnd | PM_SPECIAL_CONSTANT_FLAG))
|
|
88
|
-
#define PM_CONSTANT_DOT3 ((pm_constant_id_t)(idDot3 | PM_SPECIAL_CONSTANT_FLAG))
|
|
89
|
-
#define PM_CONSTANT_MULT ((pm_constant_id_t)(idMULT | PM_SPECIAL_CONSTANT_FLAG))
|
|
90
|
-
#define PM_CONSTANT_POW ((pm_constant_id_t)(idPow | PM_SPECIAL_CONSTANT_FLAG))
|
|
91
|
-
|
|
92
|
-
VALUE pm_load_file(pm_parse_result_t *result, VALUE filepath, bool load_error);
|
|
93
|
-
VALUE pm_parse_file(pm_parse_result_t *result, VALUE filepath, VALUE *script_lines);
|
|
94
|
-
VALUE pm_load_parse_file(pm_parse_result_t *result, VALUE filepath, VALUE *script_lines);
|
|
95
|
-
VALUE pm_parse_string(pm_parse_result_t *result, VALUE source, VALUE filepath, VALUE *script_lines);
|
|
96
|
-
VALUE pm_parse_stdin(pm_parse_result_t *result);
|
|
97
|
-
void pm_parse_result_free(pm_parse_result_t *result);
|
|
98
|
-
|
|
99
|
-
rb_iseq_t *pm_iseq_new(pm_scope_node_t *node, VALUE name, VALUE path, VALUE realpath, const rb_iseq_t *parent, enum rb_iseq_type, int *error_state);
|
|
100
|
-
rb_iseq_t *pm_iseq_new_top(pm_scope_node_t *node, VALUE name, VALUE path, VALUE realpath, const rb_iseq_t *parent, int *error_state);
|
|
101
|
-
rb_iseq_t *pm_iseq_new_main(pm_scope_node_t *node, VALUE path, VALUE realpath, const rb_iseq_t *parent, int opt, int *error_state);
|
|
102
|
-
rb_iseq_t *pm_iseq_new_eval(pm_scope_node_t *node, VALUE name, VALUE path, VALUE realpath, int first_lineno, const rb_iseq_t *parent, int isolated_depth, int *error_state);
|
|
103
|
-
rb_iseq_t *pm_iseq_new_with_opt(pm_scope_node_t *node, VALUE name, VALUE path, VALUE realpath, int first_lineno, const rb_iseq_t *parent, int isolated_depth, enum rb_iseq_type, const rb_compile_option_t *option, int *error_state);
|
|
104
|
-
|
|
105
|
-
VALUE pm_iseq_compile_node(rb_iseq_t *iseq, pm_scope_node_t *node);
|