debase-ruby_core_source 0.10.9 → 0.10.13
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/README.md +1 -1
- data/Rakefile +6 -3
- data/debase-ruby_core_source.gemspec +2 -1
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-3.0.0-p0}/addr2line.h +2 -3
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview3 → ruby-3.0.0-p0}/builtin.h +17 -2
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-3.0.0-p0}/ccan/build_assert/build_assert.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-3.0.0-p0}/ccan/check_type/check_type.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-3.0.0-p0}/ccan/container_of/container_of.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-3.0.0-p0}/ccan/list/list.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-3.0.0-p0}/ccan/str/str.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview3 → ruby-3.0.0-p0}/constant.h +10 -5
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview3 → ruby-3.0.0-p0}/debug_counter.h +127 -48
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview3 → ruby-3.0.0-p0}/dln.h +3 -18
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview3 → ruby-3.0.0-p0}/encindex.h +3 -2
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-3.0.0-p0}/eval_intern.h +16 -7
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-3.0.0-p0}/gc.h +13 -2
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-3.0.0-p0}/hrtime.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview3 → ruby-3.0.0-p0}/id.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-3.0.0-p0}/id_table.h +2 -0
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview3 → ruby-3.0.0-p0}/insns.inc +0 -4
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview3 → ruby-3.0.0-p0}/insns_info.inc +323 -536
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/array.h +119 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/bignum.h +246 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/bits.h +566 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/class.h +174 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/compar.h +50 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/compile.h +32 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/compilers.h +108 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/complex.h +29 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/cont.h +25 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/dir.h +17 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/enc.h +20 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/encoding.h +28 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/enum.h +19 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/enumerator.h +22 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/error.h +124 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/eval.h +33 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/file.h +39 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/fixnum.h +185 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/gc.h +161 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/hash.h +241 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/imemo.h +243 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/inits.h +51 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/io.h +35 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/load.h +19 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/loadpath.h +17 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/math.h +24 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/missing.h +19 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/numeric.h +255 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/object.h +83 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/parse.h +23 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/proc.h +33 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/process.h +136 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/random.h +17 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/range.h +41 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/rational.h +71 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/re.h +29 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/sanitizers.h +191 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/scheduler.h +44 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/serial.h +24 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/signal.h +22 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/static_assert.h +17 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/string.h +140 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/struct.h +154 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/symbol.h +41 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/thread.h +54 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/time.h +35 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/transcode.h +21 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/util.h +31 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/variable.h +84 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/vm.h +136 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/warnings.h +17 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal.h +107 -0
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-3.0.0-p0}/iseq.h +11 -18
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-3.0.0-p0}/known_errors.inc +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-3.0.0-p0}/method.h +21 -8
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-3.0.0-p0}/mjit.h +89 -48
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview3 → ruby-3.0.0-p0}/mjit_compile.inc +2746 -2288
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview3 → ruby-3.0.0-p0}/node.h +32 -24
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-3.0.0-p0}/node_name.inc +2 -2
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-3.0.0-p0}/opt_sc.inc +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-3.0.0-p0}/optinsn.inc +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-3.0.0-p0}/optunifs.inc +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview3 → ruby-3.0.0-p0}/parse.h +1 -0
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-3.0.0-p0}/probes_helper.h +2 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/ractor_core.h +343 -0
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-3.0.0-p0}/regenc.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-3.0.0-p0}/regint.h +1 -1
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-3.0.0-p0}/regparse.h +0 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/revision.h +2 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/ruby_assert.h +15 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/ruby_atomic.h +23 -0
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-3.0.0-p0}/siphash.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-3.0.0-p0}/symbol.h +4 -4
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview3 → ruby-3.0.0-p0}/thread_pthread.h +45 -5
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview3 → ruby-3.0.0-p0}/thread_win32.h +28 -3
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview3 → ruby-3.0.0-p0}/timev.h +1 -0
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-3.0.0-p0}/transcode_data.h +2 -3
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview3 → ruby-3.0.0-p0}/transient_heap.h +6 -3
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/variable.h +22 -0
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview3 → ruby-3.0.0-p0}/version.h +23 -11
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview3 → ruby-3.0.0-p0}/vm.inc +707 -671
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview3 → ruby-3.0.0-p0}/vm_call_iseq_optimized.inc +93 -86
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/vm_callinfo.h +456 -0
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-3.0.0-p0}/vm_core.h +262 -194
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/vm_debug.h +116 -0
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-3.0.0-p0}/vm_exec.h +9 -6
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-3.0.0-p0}/vm_insnhelper.h +28 -26
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview3 → ruby-3.0.0-p0}/vm_opts.h +6 -5
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/vm_sync.h +136 -0
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview3 → ruby-3.0.0-p0}/vmtc.inc +0 -4
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview3 → ruby-3.1.0-preview1}/addr2line.h +2 -3
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/builtin.h +83 -0
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview3 → ruby-3.1.0-preview1}/ccan/build_assert/build_assert.h +13 -13
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview3 → ruby-3.1.0-preview1}/ccan/check_type/check_type.h +17 -17
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview3 → ruby-3.1.0-preview1}/ccan/container_of/container_of.h +63 -63
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview3 → ruby-3.1.0-preview1}/ccan/list/list.h +262 -262
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview3 → ruby-3.1.0-preview1}/ccan/str/str.h +4 -4
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-3.1.0-preview1}/constant.h +10 -9
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/darray.h +198 -0
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-3.1.0-preview1}/debug_counter.h +137 -48
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-3.1.0-preview1}/dln.h +3 -23
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-3.1.0-preview1}/encindex.h +3 -2
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview3 → ruby-3.1.0-preview1}/eval_intern.h +34 -41
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview3 → ruby-3.1.0-preview1}/gc.h +24 -11
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview3 → ruby-3.1.0-preview1}/hrtime.h +9 -9
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-3.1.0-preview1}/id.h +4 -3
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview3 → ruby-3.1.0-preview1}/id_table.h +3 -1
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-3.1.0-preview1}/insns.inc +6 -8
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-3.1.0-preview1}/insns_info.inc +1907 -2543
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/array.h +113 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/bignum.h +246 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/bits.h +565 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/class.h +188 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/compar.h +49 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/compile.h +35 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/compilers.h +107 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/complex.h +29 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/cont.h +24 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/dir.h +16 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/enc.h +19 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/encoding.h +30 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/enum.h +18 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/enumerator.h +21 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/error.h +191 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/eval.h +32 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/file.h +38 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/fixnum.h +184 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/gc.h +175 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/hash.h +243 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/imemo.h +243 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/inits.h +50 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/io.h +38 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/load.h +18 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/loadpath.h +16 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/math.h +23 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/missing.h +18 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/numeric.h +271 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/object.h +83 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/parse.h +23 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/proc.h +32 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/process.h +137 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/random.h +16 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/range.h +40 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/rational.h +72 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/re.h +30 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/sanitizers.h +190 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/serial.h +23 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/signal.h +21 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/static_assert.h +16 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/string.h +141 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/struct.h +153 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/symbol.h +40 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/thread.h +53 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/time.h +34 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/transcode.h +20 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/util.h +27 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/variable.h +83 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/vm.h +132 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/warnings.h +16 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal.h +109 -0
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview3 → ruby-3.1.0-preview1}/iseq.h +44 -35
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview3 → ruby-3.1.0-preview1}/known_errors.inc +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview3 → ruby-3.1.0-preview1}/method.h +21 -4
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/mjit.h +231 -0
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-3.1.0-preview1}/mjit_compile.inc +3322 -2940
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-3.1.0-preview1}/node.h +39 -23
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/node_name.inc +210 -0
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview3 → ruby-3.1.0-preview1}/opt_sc.inc +0 -2
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview3 → ruby-3.1.0-preview1}/optinsn.inc +7 -7
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview3 → ruby-3.1.0-preview1}/optunifs.inc +1 -1
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-3.1.0-preview1}/parse.h +9 -5
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview3 → ruby-3.1.0-preview1}/probes_helper.h +9 -7
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/ractor_core.h +346 -0
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview3 → ruby-3.1.0-preview1}/regenc.h +8 -8
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview3 → ruby-3.1.0-preview1}/regint.h +16 -12
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview3 → ruby-3.1.0-preview1}/regparse.h +2 -2
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/revision.h +2 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/ruby_assert.h +14 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/ruby_atomic.h +23 -0
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview3 → ruby-3.1.0-preview1}/siphash.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview3 → ruby-3.1.0-preview1}/symbol.h +14 -14
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-3.1.0-preview1}/thread_pthread.h +45 -5
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-3.1.0-preview1}/thread_win32.h +30 -5
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-3.1.0-preview1}/timev.h +1 -0
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview3 → ruby-3.1.0-preview1}/transcode_data.h +49 -50
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-3.1.0-preview1}/transient_heap.h +6 -3
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/variable.h +21 -0
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-3.1.0-preview1}/version.h +15 -4
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-3.1.0-preview1}/vm.inc +1033 -887
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/vm_call_iseq_optimized.inc +244 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/vm_callinfo.h +454 -0
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview3 → ruby-3.1.0-preview1}/vm_core.h +508 -362
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/vm_debug.h +119 -0
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview3 → ruby-3.1.0-preview1}/vm_exec.h +22 -18
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview3 → ruby-3.1.0-preview1}/vm_insnhelper.h +42 -32
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-3.1.0-preview1}/vm_opts.h +8 -5
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/vm_sync.h +137 -0
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-3.1.0-preview1}/vmtc.inc +6 -8
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/yjit.h +63 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/yjit_asm.h +392 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/yjit_codegen.h +19 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/yjit_core.h +302 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/yjit_iface.h +38 -0
- data/lib/debase/ruby_core_source/version.rb +1 -1
- data/lib/debase/ruby_core_source.rb +0 -2
- metadata +240 -110
- data/lib/debase/ruby_core_source/ruby-2.7.0-preview2/internal.h +0 -2682
- data/lib/debase/ruby_core_source/ruby-2.7.0-preview2/revision.h +0 -2
- data/lib/debase/ruby_core_source/ruby-2.7.0-preview2/ruby_assert.h +0 -15
- data/lib/debase/ruby_core_source/ruby-2.7.0-preview2/ruby_atomic.h +0 -244
- data/lib/debase/ruby_core_source/ruby-2.7.0-preview2/vm_call_iseq_optimized.inc +0 -237
- data/lib/debase/ruby_core_source/ruby-2.7.0-preview2/vm_debug.h +0 -34
- data/lib/debase/ruby_core_source/ruby-2.7.0-preview3/internal.h +0 -2657
- data/lib/debase/ruby_core_source/ruby-2.7.0-preview3/mjit.h +0 -175
- data/lib/debase/ruby_core_source/ruby-2.7.0-preview3/node_name.inc +0 -208
- data/lib/debase/ruby_core_source/ruby-2.7.0-preview3/revision.h +0 -2
- data/lib/debase/ruby_core_source/ruby-2.7.0-preview3/ruby_assert.h +0 -15
- data/lib/debase/ruby_core_source/ruby-2.7.0-preview3/ruby_atomic.h +0 -244
- data/lib/debase/ruby_core_source/ruby-2.7.0-preview3/vm_debug.h +0 -34
@@ -0,0 +1,119 @@
|
|
1
|
+
#ifndef RUBY_DEBUG_H
|
2
|
+
#define RUBY_DEBUG_H
|
3
|
+
/**********************************************************************
|
4
|
+
|
5
|
+
vm_debug.h - YARV Debug function interface
|
6
|
+
|
7
|
+
$Author$
|
8
|
+
created at: 04/08/25 02:33:49 JST
|
9
|
+
|
10
|
+
Copyright (C) 2004-2007 Koichi Sasada
|
11
|
+
|
12
|
+
**********************************************************************/
|
13
|
+
|
14
|
+
#include "ruby/ruby.h"
|
15
|
+
#include "node.h"
|
16
|
+
|
17
|
+
RUBY_SYMBOL_EXPORT_BEGIN
|
18
|
+
|
19
|
+
#define dpv(h,v) ruby_debug_print_value(-1, 0, (h), (v))
|
20
|
+
#define dp(v) ruby_debug_print_value(-1, 0, "", (v))
|
21
|
+
#define dpi(i) ruby_debug_print_id(-1, 0, "", (i))
|
22
|
+
#define dpn(n) ruby_debug_print_node(-1, 0, "", (n))
|
23
|
+
|
24
|
+
VALUE ruby_debug_print_value(int level, int debug_level, const char *header, VALUE v);
|
25
|
+
ID ruby_debug_print_id(int level, int debug_level, const char *header, ID id);
|
26
|
+
NODE *ruby_debug_print_node(int level, int debug_level, const char *header, const NODE *node);
|
27
|
+
int ruby_debug_print_indent(int level, int debug_level, int indent_level);
|
28
|
+
void ruby_debug_gc_check_func(void);
|
29
|
+
void ruby_set_debug_option(const char *str);
|
30
|
+
|
31
|
+
RUBY_SYMBOL_EXPORT_END
|
32
|
+
|
33
|
+
#if RUBY_DEVEL
|
34
|
+
#ifndef USE_RUBY_DEBUG_LOG
|
35
|
+
#define USE_RUBY_DEBUG_LOG 0
|
36
|
+
#endif
|
37
|
+
#else
|
38
|
+
// disable on !RUBY_DEVEL
|
39
|
+
#ifdef USE_RUBY_DEBUG_LOG
|
40
|
+
#undef USE_RUBY_DEBUG_LOG
|
41
|
+
#endif
|
42
|
+
#endif
|
43
|
+
|
44
|
+
/* RUBY_DEBUG_LOG: Logging debug information mechanism
|
45
|
+
*
|
46
|
+
* This feature provides a mechanism to store logging information
|
47
|
+
* to a file, stderr or memory space with simple macros.
|
48
|
+
*
|
49
|
+
* The following information will be stored.
|
50
|
+
* * (1) __FILE__, __LINE__ in C
|
51
|
+
* * (2) __FILE__, __LINE__ in Ruby
|
52
|
+
* * (3) __func__ in C (message title)
|
53
|
+
* * (4) given string with sprintf format
|
54
|
+
* * (5) Thread number (if multiple threads are running)
|
55
|
+
*
|
56
|
+
* This feature is enabled only USE_RUBY_DEBUG_LOG is enabled.
|
57
|
+
* Release version should not enable it.
|
58
|
+
*
|
59
|
+
* Running with the `RUBY_DEBUG_LOG` environment variable enables
|
60
|
+
* this feature.
|
61
|
+
*
|
62
|
+
* # logging into a file
|
63
|
+
* RUBY_DEBUG_LOG=/path/to/file STDERR
|
64
|
+
*
|
65
|
+
* # logging into STDERR
|
66
|
+
* RUBY_DEBUG_LOG=stderr
|
67
|
+
*
|
68
|
+
* # logging into memory space (check with a debugger)
|
69
|
+
* # It will help if the timing is important.
|
70
|
+
* RUBY_DEBUG_LOG=mem
|
71
|
+
*
|
72
|
+
* RUBY_DEBUG_LOG_FILTER environment variable can specify the filter string.
|
73
|
+
* If "(3) __func__ in C (message title)" contains the specified string, the
|
74
|
+
* information will be stored (example: RUBY_DEBUG_LOG_FILTER=str will enable
|
75
|
+
* only on str related information).
|
76
|
+
*
|
77
|
+
* In a MRI source code, you can use the following macros:
|
78
|
+
* * RUBY_DEBUG_LOG(fmt, ...): Above (1) to (4) will be logged.
|
79
|
+
* * RUBY_DEBUG_LOG2(file, line, fmt, ...):
|
80
|
+
* Same as RUBY_DEBUG_LOG(), but (1) will be replaced with given file, line.
|
81
|
+
*/
|
82
|
+
|
83
|
+
extern enum ruby_debug_log_mode {
|
84
|
+
ruby_debug_log_disabled = 0x00,
|
85
|
+
ruby_debug_log_memory = 0x01,
|
86
|
+
ruby_debug_log_stderr = 0x02,
|
87
|
+
ruby_debug_log_file = 0x04,
|
88
|
+
} ruby_debug_log_mode;
|
89
|
+
|
90
|
+
RBIMPL_ATTR_FORMAT(RBIMPL_PRINTF_FORMAT, 4, 5)
|
91
|
+
void ruby_debug_log(const char *file, int line, const char *func_name, const char *fmt, ...);
|
92
|
+
void ruby_debug_log_print(unsigned int n);
|
93
|
+
bool ruby_debug_log_filter(const char *func_name);
|
94
|
+
|
95
|
+
// convenient macro to log even if the USE_RUBY_DEBUG_LOG macro is not specified.
|
96
|
+
// You can use this macro for temporary usage (you should not commit it).
|
97
|
+
#define _RUBY_DEBUG_LOG(...) ruby_debug_log(__FILE__, __LINE__, RUBY_FUNCTION_NAME_STRING, "" __VA_ARGS__)
|
98
|
+
|
99
|
+
#if USE_RUBY_DEBUG_LOG
|
100
|
+
# define RUBY_DEBUG_LOG_ENABLED(func_name) \
|
101
|
+
(ruby_debug_log_mode && ruby_debug_log_filter(func_name))
|
102
|
+
|
103
|
+
#define RUBY_DEBUG_LOG(...) do { \
|
104
|
+
if (RUBY_DEBUG_LOG_ENABLED(RUBY_FUNCTION_NAME_STRING)) \
|
105
|
+
ruby_debug_log(__FILE__, __LINE__, RUBY_FUNCTION_NAME_STRING, "" __VA_ARGS__); \
|
106
|
+
} while (0)
|
107
|
+
|
108
|
+
#define RUBY_DEBUG_LOG2(file, line, ...) do { \
|
109
|
+
if (RUBY_DEBUG_LOG_ENABLED(RUBY_FUNCTION_NAME_STRING)) \
|
110
|
+
ruby_debug_log(file, line, RUBY_FUNCTION_NAME_STRING, "" __VA_ARGS__); \
|
111
|
+
} while (0)
|
112
|
+
|
113
|
+
#else
|
114
|
+
// do nothing
|
115
|
+
#define RUBY_DEBUG_LOG(...)
|
116
|
+
#define RUBY_DEBUG_LOG2(file, line, ...)
|
117
|
+
#endif // USE_RUBY_DEBUG_LOG
|
118
|
+
|
119
|
+
#endif /* RUBY_DEBUG_H */
|
@@ -1,3 +1,5 @@
|
|
1
|
+
#ifndef RUBY_VM_EXEC_H
|
2
|
+
#define RUBY_VM_EXEC_H
|
1
3
|
/**********************************************************************
|
2
4
|
|
3
5
|
vm.h -
|
@@ -9,9 +11,6 @@
|
|
9
11
|
|
10
12
|
**********************************************************************/
|
11
13
|
|
12
|
-
#ifndef RUBY_VM_EXEC_H
|
13
|
-
#define RUBY_VM_EXEC_H
|
14
|
-
|
15
14
|
typedef long OFFSET;
|
16
15
|
typedef unsigned long lindex_t;
|
17
16
|
typedef VALUE GENTRY;
|
@@ -38,8 +37,12 @@ typedef rb_iseq_t *ISEQ;
|
|
38
37
|
#define DEBUG_END_INSN()
|
39
38
|
#endif
|
40
39
|
|
41
|
-
#define throwdebug if(0)
|
42
|
-
/* #define throwdebug
|
40
|
+
#define throwdebug if(0)ruby_debug_printf
|
41
|
+
/* #define throwdebug ruby_debug_printf */
|
42
|
+
|
43
|
+
#ifndef USE_INSNS_COUNTER
|
44
|
+
#define USE_INSNS_COUNTER 0
|
45
|
+
#endif
|
43
46
|
|
44
47
|
/************************************************/
|
45
48
|
#if defined(DISPATCH_XXX)
|
@@ -71,11 +74,14 @@ error !
|
|
71
74
|
#define LABEL_PTR(x) RB_GNUC_EXTENSION(&&LABEL(x))
|
72
75
|
|
73
76
|
#define INSN_ENTRY_SIG(insn) \
|
74
|
-
if (0)
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
77
|
+
if (0) { \
|
78
|
+
ruby_debug_printf("exec: %s@(%"PRIdPTRDIFF", %"PRIdPTRDIFF")@%s:%u\n", #insn, \
|
79
|
+
(reg_pc - reg_cfp->iseq->body->iseq_encoded), \
|
80
|
+
(reg_cfp->pc - reg_cfp->iseq->body->iseq_encoded), \
|
81
|
+
RSTRING_PTR(rb_iseq_path(reg_cfp->iseq)), \
|
82
|
+
rb_iseq_line_no(reg_cfp->iseq, reg_pc - reg_cfp->iseq->body->iseq_encoded)); \
|
83
|
+
} \
|
84
|
+
if (USE_INSNS_COUNTER) vm_insns_counter_count_insn(BIN(insn));
|
79
85
|
|
80
86
|
#define INSN_DISPATCH_SIG(insn)
|
81
87
|
|
@@ -126,9 +132,6 @@ error !
|
|
126
132
|
|
127
133
|
#define NEXT_INSN() TC_DISPATCH(__NEXT_INSN__)
|
128
134
|
|
129
|
-
#define START_OF_ORIGINAL_INSN(x) start_of_##x:
|
130
|
-
#define DISPATCH_ORIGINAL_INSN(x) goto start_of_##x;
|
131
|
-
|
132
135
|
/************************************************/
|
133
136
|
#else /* no threaded code */
|
134
137
|
/* most common method */
|
@@ -141,7 +144,7 @@ case BIN(insn):
|
|
141
144
|
break;
|
142
145
|
|
143
146
|
#define INSN_DISPATCH() \
|
144
|
-
while (1) {
|
147
|
+
while (1) { \
|
145
148
|
switch (GET_CURRENT_INSN()) {
|
146
149
|
|
147
150
|
#define END_INSNS_DISPATCH() \
|
@@ -153,9 +156,11 @@ default: \
|
|
153
156
|
|
154
157
|
#define NEXT_INSN() goto first
|
155
158
|
|
156
|
-
#
|
157
|
-
#define DISPATCH_ORIGINAL_INSN(x) goto start_of_##x;
|
159
|
+
#endif
|
158
160
|
|
161
|
+
#ifndef START_OF_ORIGINAL_INSN
|
162
|
+
#define START_OF_ORIGINAL_INSN(x) if (0) goto start_of_##x; start_of_##x:
|
163
|
+
#define DISPATCH_ORIGINAL_INSN(x) goto start_of_##x;
|
159
164
|
#endif
|
160
165
|
|
161
166
|
#define VM_SP_CNT(ec, sp) ((sp) - (ec)->vm_stack)
|
@@ -181,8 +186,7 @@ default: \
|
|
181
186
|
#define VM_DEBUG_STACKOVERFLOW 0
|
182
187
|
|
183
188
|
#if VM_DEBUG_STACKOVERFLOW
|
184
|
-
#define CHECK_VM_STACK_OVERFLOW_FOR_INSN
|
185
|
-
WHEN_VM_STACK_OVERFLOWED(cfp, (cfp)->sp, margin) vm_stack_overflow_for_insn()
|
189
|
+
#define CHECK_VM_STACK_OVERFLOW_FOR_INSN CHECK_VM_STACK_OVERFLOW
|
186
190
|
#else
|
187
191
|
#define CHECK_VM_STACK_OVERFLOW_FOR_INSN(cfp, margin)
|
188
192
|
#endif
|
data/lib/debase/ruby_core_source/{ruby-2.7.0-preview3 → ruby-3.1.0-preview1}/vm_insnhelper.h
RENAMED
@@ -1,3 +1,5 @@
|
|
1
|
+
#ifndef RUBY_INSNHELPER_H
|
2
|
+
#define RUBY_INSNHELPER_H
|
1
3
|
/**********************************************************************
|
2
4
|
|
3
5
|
insnhelper.h - helper macros to implement each instructions
|
@@ -9,27 +11,29 @@
|
|
9
11
|
|
10
12
|
**********************************************************************/
|
11
13
|
|
12
|
-
|
13
|
-
#define RUBY_INSNHELPER_H
|
14
|
-
|
15
|
-
RUBY_SYMBOL_EXPORT_BEGIN
|
14
|
+
MJIT_SYMBOL_EXPORT_BEGIN
|
16
15
|
|
17
16
|
RUBY_EXTERN VALUE ruby_vm_const_missing_count;
|
18
|
-
RUBY_EXTERN rb_serial_t ruby_vm_global_method_state;
|
19
17
|
RUBY_EXTERN rb_serial_t ruby_vm_global_constant_state;
|
20
18
|
RUBY_EXTERN rb_serial_t ruby_vm_class_serial;
|
19
|
+
RUBY_EXTERN rb_serial_t ruby_vm_global_cvar_state;
|
21
20
|
|
22
|
-
|
21
|
+
MJIT_SYMBOL_EXPORT_END
|
23
22
|
|
24
23
|
#if VM_COLLECT_USAGE_DETAILS
|
25
24
|
#define COLLECT_USAGE_INSN(insn) vm_collect_usage_insn(insn)
|
26
25
|
#define COLLECT_USAGE_OPERAND(insn, n, op) vm_collect_usage_operand((insn), (n), ((VALUE)(op)))
|
27
26
|
|
28
27
|
#define COLLECT_USAGE_REGISTER(reg, s) vm_collect_usage_register((reg), (s))
|
28
|
+
#elif YJIT_STATS
|
29
|
+
/* for --yjit-stats */
|
30
|
+
#define COLLECT_USAGE_INSN(insn) rb_yjit_collect_vm_usage_insn(insn)
|
31
|
+
#define COLLECT_USAGE_OPERAND(insn, n, op) /* none */
|
32
|
+
#define COLLECT_USAGE_REGISTER(reg, s) /* none */
|
29
33
|
#else
|
30
|
-
#define COLLECT_USAGE_INSN(insn)
|
31
|
-
#define COLLECT_USAGE_OPERAND(insn, n, op)
|
32
|
-
#define COLLECT_USAGE_REGISTER(reg, s)
|
34
|
+
#define COLLECT_USAGE_INSN(insn) /* none */
|
35
|
+
#define COLLECT_USAGE_OPERAND(insn, n, op) /* none */
|
36
|
+
#define COLLECT_USAGE_REGISTER(reg, s) /* none */
|
33
37
|
#endif
|
34
38
|
|
35
39
|
/**********************************************************/
|
@@ -94,7 +98,7 @@ enum vm_regan_acttype {
|
|
94
98
|
#define SET_SP(x) (VM_REG_SP = (COLLECT_USAGE_REGISTER_HELPER(SP, SET, (x))))
|
95
99
|
#define INC_SP(x) (VM_REG_SP += (COLLECT_USAGE_REGISTER_HELPER(SP, SET, (x))))
|
96
100
|
#define DEC_SP(x) (VM_REG_SP -= (COLLECT_USAGE_REGISTER_HELPER(SP, SET, (x))))
|
97
|
-
#define SET_SV(x) (*GET_SP() = (x))
|
101
|
+
#define SET_SV(x) (*GET_SP() = rb_ractor_confirm_belonging(x))
|
98
102
|
/* set current stack value as x */
|
99
103
|
|
100
104
|
/* instruction sequence C struct */
|
@@ -120,9 +124,13 @@ enum vm_regan_acttype {
|
|
120
124
|
* because inline method cache does not care about receiver.
|
121
125
|
*/
|
122
126
|
|
123
|
-
|
124
|
-
|
125
|
-
|
127
|
+
static inline void
|
128
|
+
CC_SET_FASTPATH(const struct rb_callcache *cc, vm_call_handler func, bool enabled)
|
129
|
+
{
|
130
|
+
if (LIKELY(enabled)) {
|
131
|
+
vm_cc_call_set(cc, func);
|
132
|
+
}
|
133
|
+
}
|
126
134
|
|
127
135
|
#define GET_BLOCK_HANDLER() (GET_LEP()[VM_ENV_DATA_INDEX_SPECVAL])
|
128
136
|
|
@@ -136,27 +144,27 @@ enum vm_regan_acttype {
|
|
136
144
|
/**********************************************************/
|
137
145
|
|
138
146
|
#if VM_CHECK_MODE > 0
|
139
|
-
#define SETUP_CANARY() \
|
140
|
-
VALUE *canary; \
|
141
|
-
if (
|
147
|
+
#define SETUP_CANARY(cond) \
|
148
|
+
VALUE *canary = 0; \
|
149
|
+
if (cond) { \
|
142
150
|
canary = GET_SP(); \
|
143
151
|
SET_SV(vm_stack_canary); \
|
144
152
|
} \
|
145
153
|
else {\
|
146
154
|
SET_SV(Qfalse); /* cleanup */ \
|
147
155
|
}
|
148
|
-
#define CHECK_CANARY() \
|
149
|
-
if (
|
156
|
+
#define CHECK_CANARY(cond, insn) \
|
157
|
+
if (cond) { \
|
150
158
|
if (*canary == vm_stack_canary) { \
|
151
159
|
*canary = Qfalse; /* cleanup */ \
|
152
160
|
} \
|
153
161
|
else { \
|
154
|
-
|
162
|
+
rb_vm_canary_is_found_dead(insn, *canary); \
|
155
163
|
} \
|
156
164
|
}
|
157
165
|
#else
|
158
|
-
#define SETUP_CANARY()
|
159
|
-
#define CHECK_CANARY()
|
166
|
+
#define SETUP_CANARY(cond) if (cond) {} else {}
|
167
|
+
#define CHECK_CANARY(cond, insn) if (cond) {(void)(insn);}
|
160
168
|
#endif
|
161
169
|
|
162
170
|
/**********************************************************/
|
@@ -173,11 +181,12 @@ enum vm_regan_acttype {
|
|
173
181
|
} while (0)
|
174
182
|
#endif
|
175
183
|
|
184
|
+
#define PREV_CLASS_SERIAL() (ruby_vm_class_serial)
|
176
185
|
#define NEXT_CLASS_SERIAL() (++ruby_vm_class_serial)
|
177
|
-
#define GET_GLOBAL_METHOD_STATE() (ruby_vm_global_method_state)
|
178
|
-
#define INC_GLOBAL_METHOD_STATE() (++ruby_vm_global_method_state)
|
179
186
|
#define GET_GLOBAL_CONSTANT_STATE() (ruby_vm_global_constant_state)
|
180
187
|
#define INC_GLOBAL_CONSTANT_STATE() (++ruby_vm_global_constant_state)
|
188
|
+
#define GET_GLOBAL_CVAR_STATE() (ruby_vm_global_cvar_state)
|
189
|
+
#define INC_GLOBAL_CVAR_STATE() (++ruby_vm_global_cvar_state)
|
181
190
|
|
182
191
|
static inline struct vm_throw_data *
|
183
192
|
THROW_DATA_NEW(VALUE val, const rb_control_frame_t *cf, int st)
|
@@ -233,23 +242,24 @@ static inline void
|
|
233
242
|
THROW_DATA_CONSUMED_SET(struct vm_throw_data *obj)
|
234
243
|
{
|
235
244
|
if (THROW_DATA_P(obj) &&
|
236
|
-
|
237
|
-
|
245
|
+
THROW_DATA_STATE(obj) == TAG_BREAK) {
|
246
|
+
obj->flags |= THROW_DATA_CONSUMED;
|
238
247
|
}
|
239
248
|
}
|
240
249
|
|
241
|
-
#define IS_ARGS_SPLAT(ci)
|
242
|
-
#define IS_ARGS_KEYWORD(ci)
|
243
|
-
#define IS_ARGS_KW_SPLAT(ci)
|
244
|
-
#define IS_ARGS_KW_OR_KW_SPLAT(ci) ((ci)
|
250
|
+
#define IS_ARGS_SPLAT(ci) (vm_ci_flag(ci) & VM_CALL_ARGS_SPLAT)
|
251
|
+
#define IS_ARGS_KEYWORD(ci) (vm_ci_flag(ci) & VM_CALL_KWARG)
|
252
|
+
#define IS_ARGS_KW_SPLAT(ci) (vm_ci_flag(ci) & VM_CALL_KW_SPLAT)
|
253
|
+
#define IS_ARGS_KW_OR_KW_SPLAT(ci) (vm_ci_flag(ci) & (VM_CALL_KWARG | VM_CALL_KW_SPLAT))
|
254
|
+
#define IS_ARGS_KW_SPLAT_MUT(ci) (vm_ci_flag(ci) & VM_CALL_KW_SPLAT_MUT)
|
245
255
|
|
246
256
|
/* If this returns true, an optimized function returned by `vm_call_iseq_setup_func`
|
247
257
|
can be used as a fastpath. */
|
248
|
-
static bool
|
249
|
-
vm_call_iseq_optimizable_p(const struct
|
258
|
+
static inline bool
|
259
|
+
vm_call_iseq_optimizable_p(const struct rb_callinfo *ci, const struct rb_callcache *cc)
|
250
260
|
{
|
251
261
|
return !IS_ARGS_SPLAT(ci) && !IS_ARGS_KEYWORD(ci) &&
|
252
|
-
|
262
|
+
METHOD_ENTRY_CACHEABLE(vm_cc_cme(cc));
|
253
263
|
}
|
254
264
|
|
255
265
|
#endif /* RUBY_INSNHELPER_H */
|
@@ -1,4 +1,5 @@
|
|
1
|
-
/*-*-c-*-*/
|
1
|
+
#ifndef RUBY_VM_OPTS_H/*-*-c-*-*/
|
2
|
+
#define RUBY_VM_OPTS_H
|
2
3
|
/**********************************************************************
|
3
4
|
|
4
5
|
vm_opts.h - VM optimize option
|
@@ -9,10 +10,6 @@
|
|
9
10
|
|
10
11
|
**********************************************************************/
|
11
12
|
|
12
|
-
|
13
|
-
#ifndef RUBY_VM_OPTS_H
|
14
|
-
#define RUBY_VM_OPTS_H
|
15
|
-
|
16
13
|
/* Compile options.
|
17
14
|
* You can change these options at runtime by VM::CompileOption.
|
18
15
|
* Following definitions are default values.
|
@@ -61,7 +58,13 @@
|
|
61
58
|
#define OPT_STACK_CACHING 0
|
62
59
|
|
63
60
|
/* misc */
|
61
|
+
#ifndef OPT_SUPPORT_JOKE
|
64
62
|
#define OPT_SUPPORT_JOKE 0
|
63
|
+
#endif
|
64
|
+
|
65
|
+
#ifndef OPT_SUPPORT_CALL_C_FUNCTION
|
66
|
+
#define OPT_SUPPORT_CALL_C_FUNCTION 0
|
67
|
+
#endif
|
65
68
|
|
66
69
|
#ifndef VM_COLLECT_USAGE_DETAILS
|
67
70
|
#define VM_COLLECT_USAGE_DETAILS 0
|
@@ -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 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
|
@@ -59,7 +59,6 @@ static const void *const insns_address_table[] = {
|
|
59
59
|
LABEL_PTR(putstring),
|
60
60
|
LABEL_PTR(concatstrings),
|
61
61
|
LABEL_PTR(tostring),
|
62
|
-
LABEL_PTR(freezestring),
|
63
62
|
LABEL_PTR(toregexp),
|
64
63
|
LABEL_PTR(intern),
|
65
64
|
LABEL_PTR(newarray),
|
@@ -75,7 +74,6 @@ static const void *const insns_address_table[] = {
|
|
75
74
|
LABEL_PTR(dup),
|
76
75
|
LABEL_PTR(dupn),
|
77
76
|
LABEL_PTR(swap),
|
78
|
-
LABEL_PTR(reverse),
|
79
77
|
LABEL_PTR(topn),
|
80
78
|
LABEL_PTR(setn),
|
81
79
|
LABEL_PTR(adjuststack),
|
@@ -83,7 +81,6 @@ static const void *const insns_address_table[] = {
|
|
83
81
|
LABEL_PTR(checkmatch),
|
84
82
|
LABEL_PTR(checkkeyword),
|
85
83
|
LABEL_PTR(checktype),
|
86
|
-
LABEL_PTR(methodref),
|
87
84
|
LABEL_PTR(defineclass),
|
88
85
|
LABEL_PTR(definemethod),
|
89
86
|
LABEL_PTR(definesmethod),
|
@@ -130,7 +127,9 @@ static const void *const insns_address_table[] = {
|
|
130
127
|
LABEL_PTR(opt_succ),
|
131
128
|
LABEL_PTR(opt_not),
|
132
129
|
LABEL_PTR(opt_regexpmatch2),
|
133
|
-
LABEL_PTR(
|
130
|
+
LABEL_PTR(invokebuiltin),
|
131
|
+
LABEL_PTR(opt_invokebuiltin_delegate),
|
132
|
+
LABEL_PTR(opt_invokebuiltin_delegate_leave),
|
134
133
|
LABEL_PTR(getlocal_WC_0),
|
135
134
|
LABEL_PTR(getlocal_WC_1),
|
136
135
|
LABEL_PTR(setlocal_WC_0),
|
@@ -160,7 +159,6 @@ static const void *const insns_address_table[] = {
|
|
160
159
|
LABEL_PTR(trace_putstring),
|
161
160
|
LABEL_PTR(trace_concatstrings),
|
162
161
|
LABEL_PTR(trace_tostring),
|
163
|
-
LABEL_PTR(trace_freezestring),
|
164
162
|
LABEL_PTR(trace_toregexp),
|
165
163
|
LABEL_PTR(trace_intern),
|
166
164
|
LABEL_PTR(trace_newarray),
|
@@ -176,7 +174,6 @@ static const void *const insns_address_table[] = {
|
|
176
174
|
LABEL_PTR(trace_dup),
|
177
175
|
LABEL_PTR(trace_dupn),
|
178
176
|
LABEL_PTR(trace_swap),
|
179
|
-
LABEL_PTR(trace_reverse),
|
180
177
|
LABEL_PTR(trace_topn),
|
181
178
|
LABEL_PTR(trace_setn),
|
182
179
|
LABEL_PTR(trace_adjuststack),
|
@@ -184,7 +181,6 @@ static const void *const insns_address_table[] = {
|
|
184
181
|
LABEL_PTR(trace_checkmatch),
|
185
182
|
LABEL_PTR(trace_checkkeyword),
|
186
183
|
LABEL_PTR(trace_checktype),
|
187
|
-
LABEL_PTR(trace_methodref),
|
188
184
|
LABEL_PTR(trace_defineclass),
|
189
185
|
LABEL_PTR(trace_definemethod),
|
190
186
|
LABEL_PTR(trace_definesmethod),
|
@@ -231,7 +227,9 @@ static const void *const insns_address_table[] = {
|
|
231
227
|
LABEL_PTR(trace_opt_succ),
|
232
228
|
LABEL_PTR(trace_opt_not),
|
233
229
|
LABEL_PTR(trace_opt_regexpmatch2),
|
234
|
-
LABEL_PTR(
|
230
|
+
LABEL_PTR(trace_invokebuiltin),
|
231
|
+
LABEL_PTR(trace_opt_invokebuiltin_delegate),
|
232
|
+
LABEL_PTR(trace_opt_invokebuiltin_delegate_leave),
|
235
233
|
LABEL_PTR(trace_getlocal_WC_0),
|
236
234
|
LABEL_PTR(trace_getlocal_WC_1),
|
237
235
|
LABEL_PTR(trace_setlocal_WC_0),
|
@@ -0,0 +1,63 @@
|
|
1
|
+
#ifndef YJIT_H
|
2
|
+
#define YJIT_H 1
|
3
|
+
//
|
4
|
+
// This file contains definitions YJIT exposes to the CRuby codebase
|
5
|
+
//
|
6
|
+
|
7
|
+
#include "ruby/internal/config.h"
|
8
|
+
#include "ruby_assert.h" // for RUBY_DEBUG
|
9
|
+
#include "vm_core.h"
|
10
|
+
#include "method.h"
|
11
|
+
|
12
|
+
// YJIT_STATS controls whether to support runtime counters in generated code
|
13
|
+
// and in the interpreter.
|
14
|
+
#ifndef YJIT_STATS
|
15
|
+
# define YJIT_STATS RUBY_DEBUG
|
16
|
+
#endif
|
17
|
+
|
18
|
+
struct rb_yjit_options {
|
19
|
+
// Enable compilation with YJIT
|
20
|
+
bool yjit_enabled;
|
21
|
+
|
22
|
+
// Size of the executable memory block to allocate in MiB
|
23
|
+
unsigned exec_mem_size;
|
24
|
+
|
25
|
+
// Number of method calls after which to start generating code
|
26
|
+
// Threshold==1 means compile on first execution
|
27
|
+
unsigned call_threshold;
|
28
|
+
|
29
|
+
// Generate versions greedily until the limit is hit
|
30
|
+
bool greedy_versioning;
|
31
|
+
|
32
|
+
// Maximum number of versions per block
|
33
|
+
// 1 means always create generic versions
|
34
|
+
unsigned max_versions;
|
35
|
+
|
36
|
+
// Capture and print out stats
|
37
|
+
bool gen_stats;
|
38
|
+
|
39
|
+
// Run backend tests
|
40
|
+
bool test_backend;
|
41
|
+
};
|
42
|
+
|
43
|
+
bool rb_yjit_enabled_p(void);
|
44
|
+
unsigned rb_yjit_call_threshold(void);
|
45
|
+
|
46
|
+
void rb_yjit_invalidate_all_method_lookup_assumptions(void);
|
47
|
+
void rb_yjit_method_lookup_change(VALUE klass, ID mid);
|
48
|
+
void rb_yjit_cme_invalidate(VALUE cme);
|
49
|
+
void rb_yjit_collect_vm_usage_insn(int insn);
|
50
|
+
void rb_yjit_collect_binding_alloc(void);
|
51
|
+
void rb_yjit_collect_binding_set(void);
|
52
|
+
bool rb_yjit_compile_iseq(const rb_iseq_t *iseq, rb_execution_context_t *ec);
|
53
|
+
void rb_yjit_init(struct rb_yjit_options *options);
|
54
|
+
void rb_yjit_bop_redefined(VALUE klass, const rb_method_entry_t *me, enum ruby_basic_operators bop);
|
55
|
+
void rb_yjit_constant_state_changed(void);
|
56
|
+
void rb_yjit_iseq_mark(const struct rb_iseq_constant_body *body);
|
57
|
+
void rb_yjit_iseq_update_references(const struct rb_iseq_constant_body *body);
|
58
|
+
void rb_yjit_iseq_free(const struct rb_iseq_constant_body *body);
|
59
|
+
void rb_yjit_before_ractor_spawn(void);
|
60
|
+
void rb_yjit_constant_ic_update(const rb_iseq_t *iseq, IC ic);
|
61
|
+
void rb_yjit_tracing_invalidate_all(void);
|
62
|
+
|
63
|
+
#endif // #ifndef YJIT_H
|