debase-ruby_core_source 0.10.13 → 0.10.16
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/CHANGELOG.md +28 -0
- data/debase-ruby_core_source.gemspec +3 -3
- data/lib/debase/ruby_core_source/{ruby-1.9.3-p550 → ruby-2.5.4-p155}/addr2line.h +1 -1
- data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-2.5.4-p155}/ccan/build_assert/build_assert.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-2.5.4-p155}/ccan/check_type/check_type.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-2.5.4-p155}/ccan/container_of/container_of.h +0 -0
- data/lib/debase/ruby_core_source/ruby-2.5.4-p155/ccan/list/list.h +773 -0
- data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-2.5.4-p155}/ccan/str/str.h +0 -0
- data/lib/debase/ruby_core_source/ruby-2.5.4-p155/constant.h +51 -0
- data/lib/debase/ruby_core_source/ruby-2.5.4-p155/debug_counter.h +109 -0
- data/lib/debase/ruby_core_source/{ruby-1.9.3-p550 → ruby-2.5.4-p155}/dln.h +10 -9
- data/lib/debase/ruby_core_source/ruby-2.5.4-p155/encindex.h +69 -0
- data/lib/debase/ruby_core_source/ruby-2.5.4-p155/eval_intern.h +334 -0
- data/lib/debase/ruby_core_source/{ruby-1.9.3-p550 → ruby-2.5.4-p155}/gc.h +27 -10
- data/lib/debase/ruby_core_source/ruby-2.5.4-p155/id.h +250 -0
- data/lib/debase/ruby_core_source/ruby-2.5.4-p155/id_table.h +31 -0
- data/lib/debase/ruby_core_source/ruby-2.5.4-p155/insns.inc +217 -0
- data/lib/debase/ruby_core_source/ruby-2.5.4-p155/insns_info.inc +1570 -0
- data/lib/debase/ruby_core_source/ruby-2.5.4-p155/internal.h +2036 -0
- data/lib/debase/ruby_core_source/ruby-2.5.4-p155/iseq.h +308 -0
- data/lib/debase/ruby_core_source/{ruby-1.9.3-p550 → ruby-2.5.4-p155}/known_errors.inc +16 -1
- data/lib/debase/ruby_core_source/ruby-2.5.4-p155/method.h +218 -0
- data/lib/debase/ruby_core_source/{ruby-1.9.3-p550 → ruby-2.5.4-p155}/node.h +115 -79
- data/lib/debase/ruby_core_source/{ruby-1.9.3-p550 → ruby-2.5.4-p155}/node_name.inc +12 -22
- data/lib/debase/ruby_core_source/ruby-2.5.4-p155/opt_sc.inc +1601 -0
- data/lib/debase/ruby_core_source/ruby-2.5.4-p155/optinsn.inc +103 -0
- data/lib/debase/ruby_core_source/{ruby-1.9.3-p550 → ruby-2.5.4-p155}/optunifs.inc +28 -83
- data/lib/debase/ruby_core_source/{ruby-1.9.3-p550 → ruby-2.5.4-p155}/parse.h +74 -60
- data/lib/debase/ruby_core_source/ruby-2.5.4-p155/probes_helper.h +43 -0
- data/lib/debase/ruby_core_source/ruby-2.5.4-p155/regenc.h +254 -0
- data/lib/debase/ruby_core_source/{ruby-1.9.3-p550 → ruby-2.5.4-p155}/regint.h +299 -211
- data/lib/debase/ruby_core_source/{ruby-1.9.3-p550 → ruby-2.5.4-p155}/regparse.h +45 -37
- data/lib/debase/ruby_core_source/ruby-2.5.4-p155/revision.h +1 -0
- data/lib/debase/ruby_core_source/ruby-2.5.4-p155/ruby_assert.h +54 -0
- data/lib/debase/ruby_core_source/{ruby-1.9.3-p550 → ruby-2.5.4-p155}/ruby_atomic.h +84 -26
- data/lib/debase/ruby_core_source/{ruby-1.9.3-p550 → ruby-2.5.4-p155}/siphash.h +1 -1
- data/lib/debase/ruby_core_source/ruby-2.5.4-p155/symbol.h +108 -0
- data/lib/debase/ruby_core_source/{ruby-1.9.3-p550 → ruby-2.5.4-p155}/thread_pthread.h +14 -11
- data/lib/debase/ruby_core_source/{ruby-1.9.3-p550 → ruby-2.5.4-p155}/thread_win32.h +2 -6
- data/lib/debase/ruby_core_source/ruby-2.5.4-p155/timev.h +42 -0
- data/lib/debase/ruby_core_source/{ruby-1.9.3-p550 → ruby-2.5.4-p155}/transcode_data.h +34 -12
- data/lib/debase/ruby_core_source/ruby-2.5.4-p155/version.h +73 -0
- data/lib/debase/ruby_core_source/ruby-2.5.4-p155/vm.inc +3667 -0
- data/lib/debase/ruby_core_source/ruby-2.5.4-p155/vm_call_iseq_optimized.inc +213 -0
- data/lib/debase/ruby_core_source/ruby-2.5.4-p155/vm_core.h +1768 -0
- data/lib/debase/ruby_core_source/{ruby-1.9.3-p550/debug.h → ruby-2.5.4-p155/vm_debug.h} +4 -8
- data/lib/debase/ruby_core_source/{ruby-1.9.3-p550 → ruby-2.5.4-p155}/vm_exec.h +38 -30
- data/lib/debase/ruby_core_source/ruby-2.5.4-p155/vm_insnhelper.h +255 -0
- data/lib/debase/ruby_core_source/{ruby-1.9.3-p550 → ruby-2.5.4-p155}/vm_opts.h +14 -9
- data/lib/debase/ruby_core_source/ruby-2.5.4-p155/vmtc.inc +214 -0
- data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/addr2line.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/builtin.h +1 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-p0/ccan/build_assert/build_assert.h +40 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-p0/ccan/check_type/check_type.h +63 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-p0/ccan/container_of/container_of.h +142 -0
- data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/ccan/list/list.h +0 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-p0/ccan/str/str.h +16 -0
- data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/constant.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/darray.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/debug_counter.h +2 -0
- data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/dln.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/encindex.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/eval_intern.h +32 -1
- data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/gc.h +0 -1
- data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/hrtime.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/id.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/id_table.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/insns.inc +4 -2
- data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/insns_info.inc +309 -224
- data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/internal/array.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/internal/bignum.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/internal/bits.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/internal/class.h +13 -5
- data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/internal/compar.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/internal/compile.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/internal/compilers.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/internal/complex.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/internal/cont.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/internal/dir.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/internal/enc.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/internal/encoding.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/internal/enum.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/internal/enumerator.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/internal/error.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/internal/eval.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/internal/file.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/internal/fixnum.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/internal/gc.h +12 -1
- data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/internal/hash.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/internal/imemo.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/internal/inits.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/internal/io.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/internal/load.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/internal/loadpath.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/internal/math.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/internal/missing.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/internal/numeric.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/internal/object.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/internal/parse.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/internal/proc.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/internal/process.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/internal/random.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/internal/range.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/internal/rational.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/internal/re.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/internal/sanitizers.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/internal/serial.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/internal/signal.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/internal/static_assert.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/internal/string.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/internal/struct.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/internal/symbol.h +1 -0
- data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/internal/thread.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/internal/time.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/internal/transcode.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/internal/util.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/internal/variable.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/internal/vm.h +2 -1
- data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/internal/warnings.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/internal.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/iseq.h +3 -1
- data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/known_errors.inc +0 -0
- data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/method.h +14 -6
- data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/mjit.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/mjit_compile.inc +64 -7
- data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/node.h +28 -17
- data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/node_name.inc +0 -2
- data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/opt_sc.inc +2 -0
- data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/optinsn.inc +0 -0
- data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/optunifs.inc +1 -1
- data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/parse.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/probes_helper.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/ractor_core.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/regenc.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/regint.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/regparse.h +0 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-p0/revision.h +2 -0
- data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/ruby_assert.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/ruby_atomic.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/siphash.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/symbol.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/thread_pthread.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/thread_win32.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/timev.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/transcode_data.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/transient_heap.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/variable.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/version.h +4 -4
- data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/vm.inc +338 -283
- data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/vm_call_iseq_optimized.inc +0 -0
- data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/vm_callinfo.h +41 -8
- data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/vm_core.h +6 -2
- data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/vm_debug.h +8 -3
- data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/vm_exec.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/vm_insnhelper.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/vm_opts.h +0 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-p0/vm_sync.h +137 -0
- data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/vmtc.inc +4 -2
- data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/yjit.h +11 -1
- data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/yjit_asm.h +21 -5
- data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/yjit_codegen.h +5 -1
- data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/yjit_core.h +11 -6
- data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/yjit_iface.h +0 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/addr2line.h +20 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/builtin.h +84 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/ccan/build_assert/build_assert.h +40 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/ccan/check_type/check_type.h +63 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/ccan/container_of/container_of.h +142 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/ccan/list/list.h +789 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/ccan/str/str.h +17 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/constant.h +55 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/darray.h +226 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/debug_counter.h +469 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/dln.h +31 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/encindex.h +70 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/eval_intern.h +339 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/gc.h +143 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/hrtime.h +216 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/id.h +295 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/id_table.h +36 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/insns.inc +249 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/insns_info.inc +9064 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/array.h +113 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/bignum.h +246 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/bits.h +565 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/class.h +211 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/cmdlineopt.h +61 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/compar.h +49 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/compile.h +35 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/compilers.h +107 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/complex.h +29 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/cont.h +24 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/dir.h +16 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/enc.h +19 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/encoding.h +30 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/enum.h +18 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/enumerator.h +21 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/error.h +191 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/eval.h +32 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/file.h +38 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/fixnum.h +184 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/gc.h +188 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/hash.h +243 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/imemo.h +243 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/inits.h +50 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/io.h +38 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/load.h +18 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/loadpath.h +16 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/math.h +23 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/missing.h +18 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/numeric.h +271 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/object.h +83 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/parse.h +23 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/proc.h +32 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/process.h +137 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/ractor.h +6 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/random.h +16 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/range.h +40 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/rational.h +72 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/re.h +30 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/sanitizers.h +190 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/serial.h +23 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/signal.h +21 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/static_assert.h +16 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/string.h +141 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/struct.h +153 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/symbol.h +41 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/thread.h +53 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/time.h +34 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/transcode.h +20 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/util.h +27 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/variable.h +83 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/vm.h +134 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/warnings.h +16 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal.h +109 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/iseq.h +325 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/known_errors.inc +791 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/method.h +254 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/mjit.h +231 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/mjit_compile.inc +8333 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/node.h +510 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/node_name.inc +208 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/opt_sc.inc +109 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/optinsn.inc +128 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/optunifs.inc +43 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/parse.h +214 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/probes_helper.h +44 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/ractor_core.h +346 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/regenc.h +255 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/regint.h +957 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/regparse.h +370 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/revision.h +2 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/ruby_assert.h +14 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/ruby_atomic.h +23 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/siphash.h +48 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/symbol.h +119 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/thread_none.h +17 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/thread_pthread.h +115 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/thread_win32.h +61 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/timev.h +57 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/transcode_data.h +138 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/transient_heap.h +65 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/variable.h +21 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/version.h +91 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/vm.inc +5481 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/vm_call_iseq_optimized.inc +244 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/vm_callinfo.h +502 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/vm_core.h +2089 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/vm_debug.h +113 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/vm_exec.h +197 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/vm_insnhelper.h +262 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/vm_opts.h +73 -0
- data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.2.0-preview1}/vm_sync.h +0 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/vmtc.inc +243 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/yjit.h +73 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/yjit_asm.h +408 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/yjit_codegen.h +23 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/yjit_core.h +307 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/yjit_iface.h +38 -0
- data/lib/debase/ruby_core_source/version.rb +1 -1
- metadata +284 -158
- data/lib/debase/ruby_core_source/ruby-1.9.3-p550/constant.h +0 -34
- data/lib/debase/ruby_core_source/ruby-1.9.3-p550/encdb.h +0 -167
- data/lib/debase/ruby_core_source/ruby-1.9.3-p550/eval_intern.h +0 -234
- data/lib/debase/ruby_core_source/ruby-1.9.3-p550/id.h +0 -177
- data/lib/debase/ruby_core_source/ruby-1.9.3-p550/insns.inc +0 -179
- data/lib/debase/ruby_core_source/ruby-1.9.3-p550/insns_info.inc +0 -695
- data/lib/debase/ruby_core_source/ruby-1.9.3-p550/internal.h +0 -242
- data/lib/debase/ruby_core_source/ruby-1.9.3-p550/iseq.h +0 -126
- data/lib/debase/ruby_core_source/ruby-1.9.3-p550/method.h +0 -105
- data/lib/debase/ruby_core_source/ruby-1.9.3-p550/opt_sc.inc +0 -670
- data/lib/debase/ruby_core_source/ruby-1.9.3-p550/optinsn.inc +0 -30
- data/lib/debase/ruby_core_source/ruby-1.9.3-p550/regenc.h +0 -219
- data/lib/debase/ruby_core_source/ruby-1.9.3-p550/revision.h +0 -1
- data/lib/debase/ruby_core_source/ruby-1.9.3-p550/timev.h +0 -21
- data/lib/debase/ruby_core_source/ruby-1.9.3-p550/transdb.h +0 -189
- data/lib/debase/ruby_core_source/ruby-1.9.3-p550/version.h +0 -52
- data/lib/debase/ruby_core_source/ruby-1.9.3-p550/vm.inc +0 -3054
- data/lib/debase/ruby_core_source/ruby-1.9.3-p550/vm_core.h +0 -763
- data/lib/debase/ruby_core_source/ruby-1.9.3-p550/vm_insnhelper.h +0 -220
- data/lib/debase/ruby_core_source/ruby-1.9.3-p550/vmtc.inc +0 -97
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/revision.h +0 -2
data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/vm_call_iseq_optimized.inc
RENAMED
|
File without changes
|
|
@@ -290,6 +290,7 @@ struct rb_callcache {
|
|
|
290
290
|
};
|
|
291
291
|
|
|
292
292
|
#define VM_CALLCACHE_UNMARKABLE IMEMO_FL_USER0
|
|
293
|
+
#define VM_CALLCACHE_ON_STACK IMEMO_FL_USER1
|
|
293
294
|
|
|
294
295
|
static inline const struct rb_callcache *
|
|
295
296
|
vm_cc_new(VALUE klass,
|
|
@@ -305,7 +306,8 @@ vm_cc_new(VALUE klass,
|
|
|
305
306
|
(struct rb_callcache) { \
|
|
306
307
|
.flags = T_IMEMO | \
|
|
307
308
|
(imemo_callcache << FL_USHIFT) | \
|
|
308
|
-
VM_CALLCACHE_UNMARKABLE
|
|
309
|
+
VM_CALLCACHE_UNMARKABLE | \
|
|
310
|
+
VM_CALLCACHE_ON_STACK, \
|
|
309
311
|
.klass = clazz, \
|
|
310
312
|
.cme_ = cme, \
|
|
311
313
|
.call_ = call, \
|
|
@@ -321,10 +323,21 @@ vm_cc_class_check(const struct rb_callcache *cc, VALUE klass)
|
|
|
321
323
|
return cc->klass == klass;
|
|
322
324
|
}
|
|
323
325
|
|
|
326
|
+
static inline int
|
|
327
|
+
vm_cc_markable(const struct rb_callcache *cc)
|
|
328
|
+
{
|
|
329
|
+
VM_ASSERT(IMEMO_TYPE_P(cc, imemo_callcache));
|
|
330
|
+
return FL_TEST_RAW((VALUE)cc, VM_CALLCACHE_UNMARKABLE) == 0;
|
|
331
|
+
}
|
|
332
|
+
|
|
324
333
|
static inline const struct rb_callable_method_entry_struct *
|
|
325
334
|
vm_cc_cme(const struct rb_callcache *cc)
|
|
326
335
|
{
|
|
327
336
|
VM_ASSERT(IMEMO_TYPE_P(cc, imemo_callcache));
|
|
337
|
+
VM_ASSERT(cc->call_ == NULL || // not initialized yet
|
|
338
|
+
!vm_cc_markable(cc) ||
|
|
339
|
+
cc->cme_ != NULL);
|
|
340
|
+
|
|
328
341
|
return cc->cme_;
|
|
329
342
|
}
|
|
330
343
|
|
|
@@ -332,6 +345,7 @@ static inline vm_call_handler
|
|
|
332
345
|
vm_cc_call(const struct rb_callcache *cc)
|
|
333
346
|
{
|
|
334
347
|
VM_ASSERT(IMEMO_TYPE_P(cc, imemo_callcache));
|
|
348
|
+
VM_ASSERT(cc->call_ != NULL);
|
|
335
349
|
return cc->call_;
|
|
336
350
|
}
|
|
337
351
|
|
|
@@ -349,13 +363,6 @@ vm_cc_cmethod_missing_reason(const struct rb_callcache *cc)
|
|
|
349
363
|
return cc->aux_.method_missing_reason;
|
|
350
364
|
}
|
|
351
365
|
|
|
352
|
-
static inline int
|
|
353
|
-
vm_cc_markable(const struct rb_callcache *cc)
|
|
354
|
-
{
|
|
355
|
-
VM_ASSERT(IMEMO_TYPE_P(cc, imemo_callcache));
|
|
356
|
-
return FL_TEST_RAW((VALUE)cc, VM_CALLCACHE_UNMARKABLE) == 0;
|
|
357
|
-
}
|
|
358
|
-
|
|
359
366
|
static inline bool
|
|
360
367
|
vm_cc_invalidated_p(const struct rb_callcache *cc)
|
|
361
368
|
{
|
|
@@ -381,6 +388,7 @@ vm_cc_valid_p(const struct rb_callcache *cc, const rb_callable_method_entry_t *c
|
|
|
381
388
|
}
|
|
382
389
|
|
|
383
390
|
extern const struct rb_callcache *rb_vm_empty_cc(void);
|
|
391
|
+
extern const struct rb_callcache *rb_vm_empty_cc_for_super(void);
|
|
384
392
|
#define vm_cc_empty() rb_vm_empty_cc()
|
|
385
393
|
|
|
386
394
|
/* callcache: mutate */
|
|
@@ -441,11 +449,36 @@ struct rb_class_cc_entries {
|
|
|
441
449
|
};
|
|
442
450
|
|
|
443
451
|
#if VM_CHECK_MODE > 0
|
|
452
|
+
|
|
453
|
+
const rb_callable_method_entry_t *rb_vm_lookup_overloaded_cme(const rb_callable_method_entry_t *cme);
|
|
454
|
+
void rb_vm_dump_overloaded_cme_table(void);
|
|
455
|
+
|
|
444
456
|
static inline bool
|
|
445
457
|
vm_ccs_p(const struct rb_class_cc_entries *ccs)
|
|
446
458
|
{
|
|
447
459
|
return ccs->debug_sig == ~(VALUE)ccs;
|
|
448
460
|
}
|
|
461
|
+
|
|
462
|
+
static inline bool
|
|
463
|
+
vm_cc_check_cme(const struct rb_callcache *cc, const rb_callable_method_entry_t *cme)
|
|
464
|
+
{
|
|
465
|
+
if (vm_cc_cme(cc) == cme ||
|
|
466
|
+
(cme->def->iseq_overload && vm_cc_cme(cc) == rb_vm_lookup_overloaded_cme(cme))) {
|
|
467
|
+
return true;
|
|
468
|
+
}
|
|
469
|
+
else {
|
|
470
|
+
#if 1
|
|
471
|
+
// debug print
|
|
472
|
+
|
|
473
|
+
fprintf(stderr, "iseq_overload:%d\n", (int)cme->def->iseq_overload);
|
|
474
|
+
rp(cme);
|
|
475
|
+
rp(vm_cc_cme(cc));
|
|
476
|
+
rb_vm_lookup_overloaded_cme(cme);
|
|
477
|
+
#endif
|
|
478
|
+
return false;
|
|
479
|
+
}
|
|
480
|
+
}
|
|
481
|
+
|
|
449
482
|
#endif
|
|
450
483
|
|
|
451
484
|
// gc.c
|
|
@@ -482,6 +482,8 @@ struct rb_iseq_constant_body {
|
|
|
482
482
|
bool builtin_inline_p;
|
|
483
483
|
struct rb_id_table *outer_variables;
|
|
484
484
|
|
|
485
|
+
const rb_iseq_t *mandatory_only_iseq;
|
|
486
|
+
|
|
485
487
|
#if USE_MJIT
|
|
486
488
|
/* The following fields are MJIT related info. */
|
|
487
489
|
VALUE (*jit_func)(struct rb_execution_context_struct *,
|
|
@@ -607,8 +609,9 @@ void rb_objspace_call_finalizer(struct rb_objspace *);
|
|
|
607
609
|
typedef struct rb_hook_list_struct {
|
|
608
610
|
struct rb_event_hook_struct *hooks;
|
|
609
611
|
rb_event_flag_t events;
|
|
610
|
-
unsigned int need_clean;
|
|
611
612
|
unsigned int running;
|
|
613
|
+
bool need_clean;
|
|
614
|
+
bool is_local;
|
|
612
615
|
} rb_hook_list_t;
|
|
613
616
|
|
|
614
617
|
|
|
@@ -711,6 +714,7 @@ typedef struct rb_vm_struct {
|
|
|
711
714
|
int builtin_inline_index;
|
|
712
715
|
|
|
713
716
|
struct rb_id_table *negative_cme_table;
|
|
717
|
+
st_table *overloaded_cme_table; // cme -> overloaded_cme
|
|
714
718
|
|
|
715
719
|
#ifndef VM_GLOBAL_CC_CACHE_TABLE_SIZE
|
|
716
720
|
#define VM_GLOBAL_CC_CACHE_TABLE_SIZE 1023
|
|
@@ -1103,7 +1107,7 @@ RUBY_SYMBOL_EXPORT_BEGIN
|
|
|
1103
1107
|
/* node -> iseq */
|
|
1104
1108
|
rb_iseq_t *rb_iseq_new (const rb_ast_body_t *ast, VALUE name, VALUE path, VALUE realpath, const rb_iseq_t *parent, enum iseq_type);
|
|
1105
1109
|
rb_iseq_t *rb_iseq_new_top (const rb_ast_body_t *ast, VALUE name, VALUE path, VALUE realpath, const rb_iseq_t *parent);
|
|
1106
|
-
rb_iseq_t *rb_iseq_new_main (const rb_ast_body_t *ast, VALUE path, VALUE realpath, const rb_iseq_t *parent);
|
|
1110
|
+
rb_iseq_t *rb_iseq_new_main (const rb_ast_body_t *ast, VALUE path, VALUE realpath, const rb_iseq_t *parent, int opt);
|
|
1107
1111
|
rb_iseq_t *rb_iseq_new_eval (const rb_ast_body_t *ast, VALUE name, VALUE path, VALUE realpath, VALUE first_lineno, const rb_iseq_t *parent, int isolated_depth);
|
|
1108
1112
|
rb_iseq_t *rb_iseq_new_with_opt(const rb_ast_body_t *ast, VALUE name, VALUE path, VALUE realpath, VALUE first_lineno, const rb_iseq_t *parent, int isolated_depth,
|
|
1109
1113
|
enum iseq_type, const rb_compile_option_t*);
|
|
@@ -12,7 +12,6 @@
|
|
|
12
12
|
**********************************************************************/
|
|
13
13
|
|
|
14
14
|
#include "ruby/ruby.h"
|
|
15
|
-
#include "node.h"
|
|
16
15
|
|
|
17
16
|
RUBY_SYMBOL_EXPORT_BEGIN
|
|
18
17
|
|
|
@@ -21,15 +20,21 @@ RUBY_SYMBOL_EXPORT_BEGIN
|
|
|
21
20
|
#define dpi(i) ruby_debug_print_id(-1, 0, "", (i))
|
|
22
21
|
#define dpn(n) ruby_debug_print_node(-1, 0, "", (n))
|
|
23
22
|
|
|
23
|
+
struct RNode;
|
|
24
|
+
|
|
24
25
|
VALUE ruby_debug_print_value(int level, int debug_level, const char *header, VALUE v);
|
|
25
26
|
ID ruby_debug_print_id(int level, int debug_level, const char *header, ID id);
|
|
26
|
-
|
|
27
|
+
struct RNode *ruby_debug_print_node(int level, int debug_level, const char *header, const struct RNode *node);
|
|
27
28
|
int ruby_debug_print_indent(int level, int debug_level, int indent_level);
|
|
28
29
|
void ruby_debug_gc_check_func(void);
|
|
29
30
|
void ruby_set_debug_option(const char *str);
|
|
30
31
|
|
|
31
32
|
RUBY_SYMBOL_EXPORT_END
|
|
32
33
|
|
|
34
|
+
#ifndef RUBY_DEVEL
|
|
35
|
+
# define RUBY_DEVEL 0
|
|
36
|
+
#endif
|
|
37
|
+
|
|
33
38
|
#if RUBY_DEVEL
|
|
34
39
|
#ifndef USE_RUBY_DEBUG_LOG
|
|
35
40
|
#define USE_RUBY_DEBUG_LOG 0
|
|
@@ -96,7 +101,7 @@ bool ruby_debug_log_filter(const char *func_name);
|
|
|
96
101
|
// You can use this macro for temporary usage (you should not commit it).
|
|
97
102
|
#define _RUBY_DEBUG_LOG(...) ruby_debug_log(__FILE__, __LINE__, RUBY_FUNCTION_NAME_STRING, "" __VA_ARGS__)
|
|
98
103
|
|
|
99
|
-
#if USE_RUBY_DEBUG_LOG
|
|
104
|
+
#if defined(USE_RUBY_DEBUG_LOG) && USE_RUBY_DEBUG_LOG
|
|
100
105
|
# define RUBY_DEBUG_LOG_ENABLED(func_name) \
|
|
101
106
|
(ruby_debug_log_mode && ruby_debug_log_filter(func_name))
|
|
102
107
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
#ifndef RUBY_VM_SYNC_H
|
|
2
|
+
#define RUBY_VM_SYNC_H
|
|
3
|
+
|
|
4
|
+
#include "vm_debug.h"
|
|
5
|
+
#include "debug_counter.h"
|
|
6
|
+
|
|
7
|
+
#if defined(USE_RUBY_DEBUG_LOG) && USE_RUBY_DEBUG_LOG
|
|
8
|
+
#define LOCATION_ARGS const char *file, int line
|
|
9
|
+
#define LOCATION_PARAMS file, line
|
|
10
|
+
#define APPEND_LOCATION_ARGS , const char *file, int line
|
|
11
|
+
#define APPEND_LOCATION_PARAMS , file, line
|
|
12
|
+
#else
|
|
13
|
+
#define LOCATION_ARGS void
|
|
14
|
+
#define LOCATION_PARAMS
|
|
15
|
+
#define APPEND_LOCATION_ARGS
|
|
16
|
+
#define APPEND_LOCATION_PARAMS
|
|
17
|
+
#endif
|
|
18
|
+
|
|
19
|
+
bool rb_vm_locked_p(void);
|
|
20
|
+
void rb_vm_lock_body(LOCATION_ARGS);
|
|
21
|
+
void rb_vm_unlock_body(LOCATION_ARGS);
|
|
22
|
+
|
|
23
|
+
struct rb_ractor_struct;
|
|
24
|
+
void rb_vm_lock_enter_body_cr(struct rb_ractor_struct *cr, unsigned int *lev APPEND_LOCATION_ARGS);
|
|
25
|
+
void rb_vm_lock_enter_body_nb(unsigned int *lev APPEND_LOCATION_ARGS);
|
|
26
|
+
void rb_vm_lock_enter_body(unsigned int *lev APPEND_LOCATION_ARGS);
|
|
27
|
+
void rb_vm_lock_leave_body(unsigned int *lev APPEND_LOCATION_ARGS);
|
|
28
|
+
void rb_vm_barrier(void);
|
|
29
|
+
|
|
30
|
+
#if RUBY_DEBUG
|
|
31
|
+
// GET_VM()
|
|
32
|
+
#include "vm_core.h"
|
|
33
|
+
#endif
|
|
34
|
+
|
|
35
|
+
RUBY_EXTERN struct rb_ractor_struct *ruby_single_main_ractor; // ractor.c
|
|
36
|
+
|
|
37
|
+
static inline bool
|
|
38
|
+
rb_multi_ractor_p(void)
|
|
39
|
+
{
|
|
40
|
+
if (LIKELY(ruby_single_main_ractor)) {
|
|
41
|
+
// 0 on boot time.
|
|
42
|
+
RUBY_ASSERT(GET_VM()->ractor.cnt <= 1);
|
|
43
|
+
return false;
|
|
44
|
+
}
|
|
45
|
+
else {
|
|
46
|
+
// multi-ractor mode can run ractor.cnt == 1
|
|
47
|
+
return true;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
static inline void
|
|
52
|
+
rb_vm_lock(const char *file, int line)
|
|
53
|
+
{
|
|
54
|
+
RB_DEBUG_COUNTER_INC(vm_sync_lock);
|
|
55
|
+
|
|
56
|
+
if (rb_multi_ractor_p()) {
|
|
57
|
+
rb_vm_lock_body(LOCATION_PARAMS);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
static inline void
|
|
62
|
+
rb_vm_unlock(const char *file, int line)
|
|
63
|
+
{
|
|
64
|
+
if (rb_multi_ractor_p()) {
|
|
65
|
+
rb_vm_unlock_body(LOCATION_PARAMS);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
static inline void
|
|
70
|
+
rb_vm_lock_enter(unsigned int *lev, const char *file, int line)
|
|
71
|
+
{
|
|
72
|
+
RB_DEBUG_COUNTER_INC(vm_sync_lock_enter);
|
|
73
|
+
|
|
74
|
+
if (rb_multi_ractor_p()) {
|
|
75
|
+
rb_vm_lock_enter_body(lev APPEND_LOCATION_PARAMS);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
static inline void
|
|
80
|
+
rb_vm_lock_enter_nb(unsigned int *lev, const char *file, int line)
|
|
81
|
+
{
|
|
82
|
+
RB_DEBUG_COUNTER_INC(vm_sync_lock_enter_nb);
|
|
83
|
+
|
|
84
|
+
if (rb_multi_ractor_p()) {
|
|
85
|
+
rb_vm_lock_enter_body_nb(lev APPEND_LOCATION_PARAMS);
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
static inline void
|
|
90
|
+
rb_vm_lock_leave(unsigned int *lev, const char *file, int line)
|
|
91
|
+
{
|
|
92
|
+
if (rb_multi_ractor_p()) {
|
|
93
|
+
rb_vm_lock_leave_body(lev APPEND_LOCATION_PARAMS);
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
static inline void
|
|
98
|
+
rb_vm_lock_enter_cr(struct rb_ractor_struct *cr, unsigned int *levp, const char *file, int line)
|
|
99
|
+
{
|
|
100
|
+
RB_DEBUG_COUNTER_INC(vm_sync_lock_enter_cr);
|
|
101
|
+
rb_vm_lock_enter_body_cr(cr, levp APPEND_LOCATION_PARAMS);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
static inline void
|
|
105
|
+
rb_vm_lock_leave_cr(struct rb_ractor_struct *cr, unsigned int *levp, const char *file, int line)
|
|
106
|
+
{
|
|
107
|
+
rb_vm_lock_leave_body(levp APPEND_LOCATION_PARAMS);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
#define RB_VM_LOCKED_P() rb_vm_locked_p()
|
|
111
|
+
|
|
112
|
+
#define RB_VM_LOCK() rb_vm_lock(__FILE__, __LINE__)
|
|
113
|
+
#define RB_VM_UNLOCK() rb_vm_unlock(__FILE__, __LINE__)
|
|
114
|
+
|
|
115
|
+
#define RB_VM_LOCK_ENTER_CR_LEV(cr, levp) rb_vm_lock_enter_cr(cr, levp, __FILE__, __LINE__)
|
|
116
|
+
#define RB_VM_LOCK_LEAVE_CR_LEV(cr, levp) rb_vm_lock_leave_cr(cr, levp, __FILE__, __LINE__)
|
|
117
|
+
#define RB_VM_LOCK_ENTER_LEV(levp) rb_vm_lock_enter(levp, __FILE__, __LINE__)
|
|
118
|
+
#define RB_VM_LOCK_LEAVE_LEV(levp) rb_vm_lock_leave(levp, __FILE__, __LINE__)
|
|
119
|
+
|
|
120
|
+
#define RB_VM_LOCK_ENTER() { unsigned int _lev; RB_VM_LOCK_ENTER_LEV(&_lev);
|
|
121
|
+
#define RB_VM_LOCK_LEAVE() RB_VM_LOCK_LEAVE_LEV(&_lev); }
|
|
122
|
+
|
|
123
|
+
#define RB_VM_LOCK_ENTER_LEV_NB(levp) rb_vm_lock_enter_nb(levp, __FILE__, __LINE__)
|
|
124
|
+
#define RB_VM_LOCK_ENTER_NO_BARRIER() { unsigned int _lev; RB_VM_LOCK_ENTER_LEV_NB(&_lev);
|
|
125
|
+
#define RB_VM_LOCK_LEAVE_NO_BARRIER() RB_VM_LOCK_LEAVE_LEV(&_lev); }
|
|
126
|
+
|
|
127
|
+
#if RUBY_DEBUG > 0
|
|
128
|
+
void RUBY_ASSERT_vm_locking(void);
|
|
129
|
+
void RUBY_ASSERT_vm_unlocking(void);
|
|
130
|
+
#define ASSERT_vm_locking() RUBY_ASSERT_vm_locking()
|
|
131
|
+
#define ASSERT_vm_unlocking() RUBY_ASSERT_vm_unlocking()
|
|
132
|
+
#else
|
|
133
|
+
#define ASSERT_vm_locking()
|
|
134
|
+
#define ASSERT_vm_unlocking()
|
|
135
|
+
#endif
|
|
136
|
+
|
|
137
|
+
#endif // RUBY_VM_SYNC_H
|
|
@@ -58,7 +58,7 @@ static const void *const insns_address_table[] = {
|
|
|
58
58
|
LABEL_PTR(putspecialobject),
|
|
59
59
|
LABEL_PTR(putstring),
|
|
60
60
|
LABEL_PTR(concatstrings),
|
|
61
|
-
LABEL_PTR(
|
|
61
|
+
LABEL_PTR(anytostring),
|
|
62
62
|
LABEL_PTR(toregexp),
|
|
63
63
|
LABEL_PTR(intern),
|
|
64
64
|
LABEL_PTR(newarray),
|
|
@@ -86,6 +86,7 @@ static const void *const insns_address_table[] = {
|
|
|
86
86
|
LABEL_PTR(definesmethod),
|
|
87
87
|
LABEL_PTR(send),
|
|
88
88
|
LABEL_PTR(opt_send_without_block),
|
|
89
|
+
LABEL_PTR(objtostring),
|
|
89
90
|
LABEL_PTR(opt_str_freeze),
|
|
90
91
|
LABEL_PTR(opt_nil_p),
|
|
91
92
|
LABEL_PTR(opt_str_uminus),
|
|
@@ -158,7 +159,7 @@ static const void *const insns_address_table[] = {
|
|
|
158
159
|
LABEL_PTR(trace_putspecialobject),
|
|
159
160
|
LABEL_PTR(trace_putstring),
|
|
160
161
|
LABEL_PTR(trace_concatstrings),
|
|
161
|
-
LABEL_PTR(
|
|
162
|
+
LABEL_PTR(trace_anytostring),
|
|
162
163
|
LABEL_PTR(trace_toregexp),
|
|
163
164
|
LABEL_PTR(trace_intern),
|
|
164
165
|
LABEL_PTR(trace_newarray),
|
|
@@ -186,6 +187,7 @@ static const void *const insns_address_table[] = {
|
|
|
186
187
|
LABEL_PTR(trace_definesmethod),
|
|
187
188
|
LABEL_PTR(trace_send),
|
|
188
189
|
LABEL_PTR(trace_opt_send_without_block),
|
|
190
|
+
LABEL_PTR(trace_objtostring),
|
|
189
191
|
LABEL_PTR(trace_opt_str_freeze),
|
|
190
192
|
LABEL_PTR(trace_opt_nil_p),
|
|
191
193
|
LABEL_PTR(trace_opt_str_uminus),
|
|
@@ -15,6 +15,13 @@
|
|
|
15
15
|
# define YJIT_STATS RUBY_DEBUG
|
|
16
16
|
#endif
|
|
17
17
|
|
|
18
|
+
// We generate x86 assembly and rely on mmap(2).
|
|
19
|
+
#if defined(__x86_64__) && !defined(_WIN32)
|
|
20
|
+
# define YJIT_SUPPORTED_P 1
|
|
21
|
+
#else
|
|
22
|
+
# define YJIT_SUPPORTED_P 0
|
|
23
|
+
#endif
|
|
24
|
+
|
|
18
25
|
struct rb_yjit_options {
|
|
19
26
|
// Enable compilation with YJIT
|
|
20
27
|
bool yjit_enabled;
|
|
@@ -29,6 +36,9 @@ struct rb_yjit_options {
|
|
|
29
36
|
// Generate versions greedily until the limit is hit
|
|
30
37
|
bool greedy_versioning;
|
|
31
38
|
|
|
39
|
+
// Disable the propagation of type information
|
|
40
|
+
bool no_type_prop;
|
|
41
|
+
|
|
32
42
|
// Maximum number of versions per block
|
|
33
43
|
// 1 means always create generic versions
|
|
34
44
|
unsigned max_versions;
|
|
@@ -57,7 +67,7 @@ void rb_yjit_iseq_mark(const struct rb_iseq_constant_body *body);
|
|
|
57
67
|
void rb_yjit_iseq_update_references(const struct rb_iseq_constant_body *body);
|
|
58
68
|
void rb_yjit_iseq_free(const struct rb_iseq_constant_body *body);
|
|
59
69
|
void rb_yjit_before_ractor_spawn(void);
|
|
60
|
-
void rb_yjit_constant_ic_update(const rb_iseq_t *iseq, IC ic);
|
|
70
|
+
void rb_yjit_constant_ic_update(const rb_iseq_t *const iseq, IC ic);
|
|
61
71
|
void rb_yjit_tracing_invalidate_all(void);
|
|
62
72
|
|
|
63
73
|
#endif // #ifndef YJIT_H
|
|
@@ -26,12 +26,13 @@ typedef struct LabelRef
|
|
|
26
26
|
typedef struct CodeBlock
|
|
27
27
|
{
|
|
28
28
|
// Memory block
|
|
29
|
-
|
|
29
|
+
// Users are advised to not use this directly.
|
|
30
|
+
uint8_t *mem_block_;
|
|
30
31
|
|
|
31
32
|
// Memory block size
|
|
32
33
|
uint32_t mem_size;
|
|
33
34
|
|
|
34
|
-
|
|
35
|
+
// Current writing position
|
|
35
36
|
uint32_t write_pos;
|
|
36
37
|
|
|
37
38
|
// Table of registered label addresses
|
|
@@ -50,13 +51,25 @@ typedef struct CodeBlock
|
|
|
50
51
|
// Number of references to labels
|
|
51
52
|
uint32_t num_refs;
|
|
52
53
|
|
|
53
|
-
|
|
54
|
+
|
|
55
|
+
// Keep track of the current aligned write position.
|
|
56
|
+
// Used for changing protection when writing to the JIT buffer
|
|
57
|
+
uint32_t current_aligned_write_pos;
|
|
58
|
+
|
|
59
|
+
// Set if the assembler is unable to output some instructions,
|
|
60
|
+
// for example, when there is not enough space or when a jump
|
|
61
|
+
// target is too far away.
|
|
62
|
+
bool dropped_bytes;
|
|
54
63
|
|
|
55
64
|
// Flag to enable or disable comments
|
|
56
65
|
bool has_asm;
|
|
57
66
|
|
|
67
|
+
|
|
58
68
|
} codeblock_t;
|
|
59
69
|
|
|
70
|
+
// 1 is not aligned so this won't match any pages
|
|
71
|
+
#define ALIGNED_WRITE_POSITION_NONE 1
|
|
72
|
+
|
|
60
73
|
enum OpndType
|
|
61
74
|
{
|
|
62
75
|
OPND_NONE,
|
|
@@ -252,8 +265,8 @@ static inline void cb_init(codeblock_t *cb, uint8_t *mem_block, uint32_t mem_siz
|
|
|
252
265
|
static inline void cb_align_pos(codeblock_t *cb, uint32_t multiple);
|
|
253
266
|
static inline void cb_set_pos(codeblock_t *cb, uint32_t pos);
|
|
254
267
|
static inline void cb_set_write_ptr(codeblock_t *cb, uint8_t *code_ptr);
|
|
255
|
-
static inline uint8_t *cb_get_ptr(codeblock_t *cb, uint32_t index);
|
|
256
|
-
static inline uint8_t *cb_get_write_ptr(codeblock_t *cb);
|
|
268
|
+
static inline uint8_t *cb_get_ptr(const codeblock_t *cb, uint32_t index);
|
|
269
|
+
static inline uint8_t *cb_get_write_ptr(const codeblock_t *cb);
|
|
257
270
|
static inline void cb_write_byte(codeblock_t *cb, uint8_t byte);
|
|
258
271
|
static inline void cb_write_bytes(codeblock_t *cb, uint32_t num_bytes, ...);
|
|
259
272
|
static inline void cb_write_int(codeblock_t *cb, uint64_t val, uint32_t num_bits);
|
|
@@ -261,6 +274,9 @@ static inline uint32_t cb_new_label(codeblock_t *cb, const char *name);
|
|
|
261
274
|
static inline void cb_write_label(codeblock_t *cb, uint32_t label_idx);
|
|
262
275
|
static inline void cb_label_ref(codeblock_t *cb, uint32_t label_idx);
|
|
263
276
|
static inline void cb_link_labels(codeblock_t *cb);
|
|
277
|
+
static inline void cb_mark_all_writeable(codeblock_t *cb);
|
|
278
|
+
static inline void cb_mark_position_writeable(codeblock_t *cb, uint32_t write_pos);
|
|
279
|
+
static inline void cb_mark_all_executable(codeblock_t *cb);
|
|
264
280
|
|
|
265
281
|
// Encode individual instructions into a code block
|
|
266
282
|
static inline void add(codeblock_t *cb, x86opnd_t opnd0, x86opnd_t opnd1);
|
|
@@ -10,9 +10,13 @@ typedef enum codegen_status {
|
|
|
10
10
|
// Code generation function signature
|
|
11
11
|
typedef codegen_status_t (*codegen_fn)(jitstate_t *jit, ctx_t *ctx, codeblock_t *cb);
|
|
12
12
|
|
|
13
|
+
static void jit_ensure_block_entry_exit(jitstate_t *jit);
|
|
14
|
+
|
|
13
15
|
static uint8_t *yjit_entry_prologue(codeblock_t *cb, const rb_iseq_t *iseq);
|
|
14
16
|
|
|
15
|
-
static
|
|
17
|
+
static block_t *gen_single_block(blockid_t blockid, const ctx_t *start_ctx, rb_execution_context_t *ec);
|
|
18
|
+
|
|
19
|
+
static void gen_code_for_exit_from_stub(void);
|
|
16
20
|
|
|
17
21
|
static void yjit_init_codegen(void);
|
|
18
22
|
|
|
@@ -192,11 +192,12 @@ typedef struct yjit_branch_entry
|
|
|
192
192
|
struct yjit_block_version *block;
|
|
193
193
|
|
|
194
194
|
// Positions where the generated code starts and ends
|
|
195
|
-
uint8_t*
|
|
196
|
-
uint8_t*
|
|
195
|
+
uint8_t *start_addr;
|
|
196
|
+
uint8_t *end_addr;
|
|
197
197
|
|
|
198
198
|
// Context right after the branch instruction
|
|
199
|
-
|
|
199
|
+
// Unused for now.
|
|
200
|
+
// ctx_t src_ctx;
|
|
200
201
|
|
|
201
202
|
// Branch target blocks and their contexts
|
|
202
203
|
blockid_t targets[2];
|
|
@@ -204,7 +205,7 @@ typedef struct yjit_branch_entry
|
|
|
204
205
|
struct yjit_block_version *blocks[2];
|
|
205
206
|
|
|
206
207
|
// Jump target addresses
|
|
207
|
-
uint8_t*
|
|
208
|
+
uint8_t *dst_addrs[2];
|
|
208
209
|
|
|
209
210
|
// Branch code generation function
|
|
210
211
|
branchgen_fn gen_fn;
|
|
@@ -241,8 +242,8 @@ typedef struct yjit_block_version
|
|
|
241
242
|
ctx_t ctx;
|
|
242
243
|
|
|
243
244
|
// Positions where the generated code starts and ends
|
|
244
|
-
uint8_t*
|
|
245
|
-
uint8_t*
|
|
245
|
+
uint8_t *start_addr;
|
|
246
|
+
uint8_t *end_addr;
|
|
246
247
|
|
|
247
248
|
// List of incoming branches (from predecessors)
|
|
248
249
|
branch_array_t incoming;
|
|
@@ -258,6 +259,10 @@ typedef struct yjit_block_version
|
|
|
258
259
|
// block in the system.
|
|
259
260
|
cme_dependency_array_t cme_dependencies;
|
|
260
261
|
|
|
262
|
+
// Code address of an exit for `ctx` and `blockid`. Used for block
|
|
263
|
+
// invalidation.
|
|
264
|
+
uint8_t *entry_exit;
|
|
265
|
+
|
|
261
266
|
// Index one past the last instruction in the iseq
|
|
262
267
|
uint32_t end_idx;
|
|
263
268
|
|
|
File without changes
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
#ifndef RUBY_ADDR2LINE_H
|
|
2
|
+
#define RUBY_ADDR2LINE_H
|
|
3
|
+
/**********************************************************************
|
|
4
|
+
|
|
5
|
+
addr2line.h -
|
|
6
|
+
|
|
7
|
+
$Author$
|
|
8
|
+
|
|
9
|
+
Copyright (C) 2010 Shinichiro Hamaji
|
|
10
|
+
|
|
11
|
+
**********************************************************************/
|
|
12
|
+
|
|
13
|
+
#if (defined(USE_ELF) || defined(HAVE_MACH_O_LOADER_H))
|
|
14
|
+
|
|
15
|
+
void
|
|
16
|
+
rb_dump_backtrace_with_lines(int num_traces, void **traces);
|
|
17
|
+
|
|
18
|
+
#endif /* USE_ELF */
|
|
19
|
+
|
|
20
|
+
#endif /* RUBY_ADDR2LINE_H */
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
#ifndef BUILTIN_H_INCLUDED
|
|
2
|
+
#define BUILTIN_H_INCLUDED
|
|
3
|
+
|
|
4
|
+
// invoke
|
|
5
|
+
|
|
6
|
+
struct rb_builtin_function {
|
|
7
|
+
// for invocation
|
|
8
|
+
const void * const func_ptr;
|
|
9
|
+
const int argc;
|
|
10
|
+
|
|
11
|
+
// for load
|
|
12
|
+
const int index;
|
|
13
|
+
const char * const name;
|
|
14
|
+
|
|
15
|
+
// for jit
|
|
16
|
+
void (*compiler)(FILE *, long, unsigned, bool);
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
#define RB_BUILTIN_FUNCTION(_i, _name, _fname, _arity, _compiler) {\
|
|
20
|
+
.name = #_name, \
|
|
21
|
+
.func_ptr = (void *)_fname, \
|
|
22
|
+
.argc = _arity, \
|
|
23
|
+
.index = _i, \
|
|
24
|
+
.compiler = _compiler, \
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
void rb_load_with_builtin_functions(const char *feature_name, const struct rb_builtin_function *table);
|
|
28
|
+
|
|
29
|
+
#ifndef rb_execution_context_t
|
|
30
|
+
typedef struct rb_execution_context_struct rb_execution_context_t;
|
|
31
|
+
#define rb_execution_context_t rb_execution_context_t
|
|
32
|
+
#endif
|
|
33
|
+
|
|
34
|
+
/* The following code is generated by the following Ruby script:
|
|
35
|
+
|
|
36
|
+
16.times{|i|
|
|
37
|
+
args = (i > 0 ? ', ' : '') + (0...i).map{"VALUE"}.join(', ')
|
|
38
|
+
puts "static inline void rb_builtin_function_check_arity#{i}(VALUE (*f)(rb_execution_context_t *ec, VALUE self#{args})){}"
|
|
39
|
+
}
|
|
40
|
+
*/
|
|
41
|
+
|
|
42
|
+
static inline void rb_builtin_function_check_arity0(VALUE (*f)(rb_execution_context_t *ec, VALUE self)){}
|
|
43
|
+
static inline void rb_builtin_function_check_arity1(VALUE (*f)(rb_execution_context_t *ec, VALUE self, VALUE)){}
|
|
44
|
+
static inline void rb_builtin_function_check_arity2(VALUE (*f)(rb_execution_context_t *ec, VALUE self, VALUE, VALUE)){}
|
|
45
|
+
static inline void rb_builtin_function_check_arity3(VALUE (*f)(rb_execution_context_t *ec, VALUE self, VALUE, VALUE, VALUE)){}
|
|
46
|
+
static inline void rb_builtin_function_check_arity4(VALUE (*f)(rb_execution_context_t *ec, VALUE self, VALUE, VALUE, VALUE, VALUE)){}
|
|
47
|
+
static inline void rb_builtin_function_check_arity5(VALUE (*f)(rb_execution_context_t *ec, VALUE self, VALUE, VALUE, VALUE, VALUE, VALUE)){}
|
|
48
|
+
static inline void rb_builtin_function_check_arity6(VALUE (*f)(rb_execution_context_t *ec, VALUE self, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE)){}
|
|
49
|
+
static inline void rb_builtin_function_check_arity7(VALUE (*f)(rb_execution_context_t *ec, VALUE self, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE)){}
|
|
50
|
+
static inline void rb_builtin_function_check_arity8(VALUE (*f)(rb_execution_context_t *ec, VALUE self, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE)){}
|
|
51
|
+
static inline void rb_builtin_function_check_arity9(VALUE (*f)(rb_execution_context_t *ec, VALUE self, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE)){}
|
|
52
|
+
static inline void rb_builtin_function_check_arity10(VALUE (*f)(rb_execution_context_t *ec, VALUE self, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE)){}
|
|
53
|
+
static inline void rb_builtin_function_check_arity11(VALUE (*f)(rb_execution_context_t *ec, VALUE self, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE)){}
|
|
54
|
+
static inline void rb_builtin_function_check_arity12(VALUE (*f)(rb_execution_context_t *ec, VALUE self, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE)){}
|
|
55
|
+
static inline void rb_builtin_function_check_arity13(VALUE (*f)(rb_execution_context_t *ec, VALUE self, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE)){}
|
|
56
|
+
static inline void rb_builtin_function_check_arity14(VALUE (*f)(rb_execution_context_t *ec, VALUE self, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE)){}
|
|
57
|
+
static inline void rb_builtin_function_check_arity15(VALUE (*f)(rb_execution_context_t *ec, VALUE self, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE)){}
|
|
58
|
+
|
|
59
|
+
PUREFUNC(VALUE rb_vm_lvar_exposed(rb_execution_context_t *ec, int index));
|
|
60
|
+
VALUE rb_vm_lvar_exposed(rb_execution_context_t *ec, int index);
|
|
61
|
+
|
|
62
|
+
// __builtin_inline!
|
|
63
|
+
|
|
64
|
+
PUREFUNC(static inline VALUE rb_vm_lvar(rb_execution_context_t *ec, int index));
|
|
65
|
+
|
|
66
|
+
static inline VALUE
|
|
67
|
+
rb_vm_lvar(rb_execution_context_t *ec, int index)
|
|
68
|
+
{
|
|
69
|
+
#if defined(VM_CORE_H_EC_DEFINED) && VM_CORE_H_EC_DEFINED
|
|
70
|
+
return ec->cfp->ep[index];
|
|
71
|
+
#else
|
|
72
|
+
return rb_vm_lvar_exposed(ec, index);
|
|
73
|
+
#endif
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
// dump/load
|
|
77
|
+
|
|
78
|
+
struct builtin_binary {
|
|
79
|
+
const char *feature; // feature name
|
|
80
|
+
const unsigned char *bin; // binary by ISeq#to_binary
|
|
81
|
+
size_t bin_size;
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
#endif // BUILTIN_H_INCLUDED
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/* CC0 (Public domain) - see ccan/licenses/CC0 file for details */
|
|
2
|
+
#ifndef CCAN_BUILD_ASSERT_H
|
|
3
|
+
#define CCAN_BUILD_ASSERT_H
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* CCAN_BUILD_ASSERT - assert a build-time dependency.
|
|
7
|
+
* @cond: the compile-time condition which must be true.
|
|
8
|
+
*
|
|
9
|
+
* Your compile will fail if the condition isn't true, or can't be evaluated
|
|
10
|
+
* by the compiler. This can only be used within a function.
|
|
11
|
+
*
|
|
12
|
+
* Example:
|
|
13
|
+
* #include <stddef.h>
|
|
14
|
+
* ...
|
|
15
|
+
* static char *foo_to_char(struct foo *foo)
|
|
16
|
+
* {
|
|
17
|
+
* // This code needs string to be at start of foo.
|
|
18
|
+
* CCAN_BUILD_ASSERT(offsetof(struct foo, string) == 0);
|
|
19
|
+
* return (char *)foo;
|
|
20
|
+
* }
|
|
21
|
+
*/
|
|
22
|
+
#define CCAN_BUILD_ASSERT(cond) \
|
|
23
|
+
do { (void) sizeof(char [1 - 2*!(cond)]); } while(0)
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* CCAN_BUILD_ASSERT_OR_ZERO - assert a build-time dependency, as an expression.
|
|
27
|
+
* @cond: the compile-time condition which must be true.
|
|
28
|
+
*
|
|
29
|
+
* Your compile will fail if the condition isn't true, or can't be evaluated
|
|
30
|
+
* by the compiler. This can be used in an expression: its value is "0".
|
|
31
|
+
*
|
|
32
|
+
* Example:
|
|
33
|
+
* #define foo_to_char(foo) \
|
|
34
|
+
* ((char *)(foo) \
|
|
35
|
+
* + CCAN_BUILD_ASSERT_OR_ZERO(offsetof(struct foo, string) == 0))
|
|
36
|
+
*/
|
|
37
|
+
#define CCAN_BUILD_ASSERT_OR_ZERO(cond) \
|
|
38
|
+
(sizeof(char [1 - 2*!(cond)]) - 1)
|
|
39
|
+
|
|
40
|
+
#endif /* CCAN_BUILD_ASSERT_H */
|