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,116 @@
|
|
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
|
+
void ruby_debug_log(const char *file, int line, const char *func_name, const char *fmt, ...);
|
91
|
+
void ruby_debug_log_print(unsigned int n);
|
92
|
+
bool ruby_debug_log_filter(const char *func_name);
|
93
|
+
|
94
|
+
// convenient macro to log even if the USE_RUBY_DEBUG_LOG macro is not specified.
|
95
|
+
// You can use this macro for temporary usage (you should not commit it).
|
96
|
+
#define _RUBY_DEBUG_LOG(fmt, ...) ruby_debug_log(__FILE__, __LINE__, __func__, fmt, __VA_ARGS__)
|
97
|
+
|
98
|
+
#if USE_RUBY_DEBUG_LOG
|
99
|
+
|
100
|
+
#define RUBY_DEBUG_LOG(fmt, ...) do { \
|
101
|
+
if (ruby_debug_log_mode && ruby_debug_log_filter(__func__)) \
|
102
|
+
ruby_debug_log(__FILE__, __LINE__, __func__, fmt, __VA_ARGS__); \
|
103
|
+
} while (0)
|
104
|
+
|
105
|
+
#define RUBY_DEBUG_LOG2(file, line, fmt, ...) do { \
|
106
|
+
if (ruby_debug_log_mode && ruby_debug_log_filter(__func__)) \
|
107
|
+
ruby_debug_log(file, line, __func__, fmt, __VA_ARGS__); \
|
108
|
+
} while (0)
|
109
|
+
|
110
|
+
#else
|
111
|
+
// do nothing
|
112
|
+
#define RUBY_DEBUG_LOG(fmt, ...)
|
113
|
+
#define RUBY_DEBUG_LOG2(file, line, fmt, ...)
|
114
|
+
#endif // USE_RUBY_DEBUG_LOG
|
115
|
+
|
116
|
+
#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;
|
@@ -41,6 +40,10 @@ typedef rb_iseq_t *ISEQ;
|
|
41
40
|
#define throwdebug if(0)printf
|
42
41
|
/* #define throwdebug printf */
|
43
42
|
|
43
|
+
#ifndef USE_INSNS_COUNTER
|
44
|
+
#define USE_INSNS_COUNTER 0
|
45
|
+
#endif
|
46
|
+
|
44
47
|
/************************************************/
|
45
48
|
#if defined(DISPATCH_XXX)
|
46
49
|
error !
|
@@ -75,7 +78,8 @@ error !
|
|
75
78
|
(reg_pc - reg_cfp->iseq->body->iseq_encoded), \
|
76
79
|
(reg_cfp->pc - reg_cfp->iseq->body->iseq_encoded), \
|
77
80
|
RSTRING_PTR(rb_iseq_path(reg_cfp->iseq)), \
|
78
|
-
rb_iseq_line_no(reg_cfp->iseq, reg_pc - reg_cfp->iseq->body->iseq_encoded));
|
81
|
+
rb_iseq_line_no(reg_cfp->iseq, reg_pc - reg_cfp->iseq->body->iseq_encoded)); \
|
82
|
+
if (USE_INSNS_COUNTER) vm_insns_counter_count_insn(BIN(insn));
|
79
83
|
|
80
84
|
#define INSN_DISPATCH_SIG(insn)
|
81
85
|
|
@@ -181,8 +185,7 @@ default: \
|
|
181
185
|
#define VM_DEBUG_STACKOVERFLOW 0
|
182
186
|
|
183
187
|
#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()
|
188
|
+
#define CHECK_VM_STACK_OVERFLOW_FOR_INSN CHECK_VM_STACK_OVERFLOW
|
186
189
|
#else
|
187
190
|
#define CHECK_VM_STACK_OVERFLOW_FOR_INSN(cfp, margin)
|
188
191
|
#endif
|
@@ -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,13 +11,9 @@
|
|
9
11
|
|
10
12
|
**********************************************************************/
|
11
13
|
|
12
|
-
#ifndef RUBY_INSNHELPER_H
|
13
|
-
#define RUBY_INSNHELPER_H
|
14
|
-
|
15
14
|
RUBY_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;
|
21
19
|
|
@@ -94,7 +92,7 @@ enum vm_regan_acttype {
|
|
94
92
|
#define SET_SP(x) (VM_REG_SP = (COLLECT_USAGE_REGISTER_HELPER(SP, SET, (x))))
|
95
93
|
#define INC_SP(x) (VM_REG_SP += (COLLECT_USAGE_REGISTER_HELPER(SP, SET, (x))))
|
96
94
|
#define DEC_SP(x) (VM_REG_SP -= (COLLECT_USAGE_REGISTER_HELPER(SP, SET, (x))))
|
97
|
-
#define SET_SV(x) (*GET_SP() = (x))
|
95
|
+
#define SET_SV(x) (*GET_SP() = rb_ractor_confirm_belonging(x))
|
98
96
|
/* set current stack value as x */
|
99
97
|
|
100
98
|
/* instruction sequence C struct */
|
@@ -120,9 +118,13 @@ enum vm_regan_acttype {
|
|
120
118
|
* because inline method cache does not care about receiver.
|
121
119
|
*/
|
122
120
|
|
123
|
-
|
124
|
-
|
125
|
-
|
121
|
+
static inline void
|
122
|
+
CC_SET_FASTPATH(const struct rb_callcache *cc, vm_call_handler func, bool enabled)
|
123
|
+
{
|
124
|
+
if (LIKELY(enabled)) {
|
125
|
+
vm_cc_call_set(cc, func);
|
126
|
+
}
|
127
|
+
}
|
126
128
|
|
127
129
|
#define GET_BLOCK_HANDLER() (GET_LEP()[VM_ENV_DATA_INDEX_SPECVAL])
|
128
130
|
|
@@ -136,27 +138,27 @@ enum vm_regan_acttype {
|
|
136
138
|
/**********************************************************/
|
137
139
|
|
138
140
|
#if VM_CHECK_MODE > 0
|
139
|
-
#define SETUP_CANARY() \
|
140
|
-
VALUE *canary; \
|
141
|
-
if (
|
141
|
+
#define SETUP_CANARY(cond) \
|
142
|
+
VALUE *canary = 0; \
|
143
|
+
if (cond) { \
|
142
144
|
canary = GET_SP(); \
|
143
145
|
SET_SV(vm_stack_canary); \
|
144
146
|
} \
|
145
147
|
else {\
|
146
148
|
SET_SV(Qfalse); /* cleanup */ \
|
147
149
|
}
|
148
|
-
#define CHECK_CANARY() \
|
149
|
-
if (
|
150
|
+
#define CHECK_CANARY(cond, insn) \
|
151
|
+
if (cond) { \
|
150
152
|
if (*canary == vm_stack_canary) { \
|
151
153
|
*canary = Qfalse; /* cleanup */ \
|
152
154
|
} \
|
153
155
|
else { \
|
154
|
-
vm_canary_is_found_dead(
|
156
|
+
vm_canary_is_found_dead(insn, *canary); \
|
155
157
|
} \
|
156
158
|
}
|
157
159
|
#else
|
158
|
-
#define SETUP_CANARY()
|
159
|
-
#define CHECK_CANARY()
|
160
|
+
#define SETUP_CANARY(cond) if (cond) {} else {}
|
161
|
+
#define CHECK_CANARY(cond, insn) if (cond) {(void)(insn);}
|
160
162
|
#endif
|
161
163
|
|
162
164
|
/**********************************************************/
|
@@ -166,16 +168,15 @@ enum vm_regan_acttype {
|
|
166
168
|
#ifndef MJIT_HEADER
|
167
169
|
#define CALL_SIMPLE_METHOD() do { \
|
168
170
|
rb_snum_t x = leaf ? INSN_ATTR(width) : 0; \
|
169
|
-
rb_snum_t y = attr_width_opt_send_without_block(0
|
171
|
+
rb_snum_t y = attr_width_opt_send_without_block(0); \
|
170
172
|
rb_snum_t z = x - y; \
|
171
173
|
ADD_PC(z); \
|
172
174
|
DISPATCH_ORIGINAL_INSN(opt_send_without_block); \
|
173
175
|
} while (0)
|
174
176
|
#endif
|
175
177
|
|
178
|
+
#define PREV_CLASS_SERIAL() (ruby_vm_class_serial)
|
176
179
|
#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
180
|
#define GET_GLOBAL_CONSTANT_STATE() (ruby_vm_global_constant_state)
|
180
181
|
#define INC_GLOBAL_CONSTANT_STATE() (++ruby_vm_global_constant_state)
|
181
182
|
|
@@ -238,18 +239,19 @@ THROW_DATA_CONSUMED_SET(struct vm_throw_data *obj)
|
|
238
239
|
}
|
239
240
|
}
|
240
241
|
|
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)
|
242
|
+
#define IS_ARGS_SPLAT(ci) (vm_ci_flag(ci) & VM_CALL_ARGS_SPLAT)
|
243
|
+
#define IS_ARGS_KEYWORD(ci) (vm_ci_flag(ci) & VM_CALL_KWARG)
|
244
|
+
#define IS_ARGS_KW_SPLAT(ci) (vm_ci_flag(ci) & VM_CALL_KW_SPLAT)
|
245
|
+
#define IS_ARGS_KW_OR_KW_SPLAT(ci) (vm_ci_flag(ci) & (VM_CALL_KWARG | VM_CALL_KW_SPLAT))
|
246
|
+
#define IS_ARGS_KW_SPLAT_MUT(ci) (vm_ci_flag(ci) & VM_CALL_KW_SPLAT_MUT)
|
245
247
|
|
246
248
|
/* If this returns true, an optimized function returned by `vm_call_iseq_setup_func`
|
247
249
|
can be used as a fastpath. */
|
248
|
-
static bool
|
249
|
-
vm_call_iseq_optimizable_p(const struct
|
250
|
+
static inline bool
|
251
|
+
vm_call_iseq_optimizable_p(const struct rb_callinfo *ci, const struct rb_callcache *cc)
|
250
252
|
{
|
251
253
|
return !IS_ARGS_SPLAT(ci) && !IS_ARGS_KEYWORD(ci) &&
|
252
|
-
|
254
|
+
METHOD_ENTRY_CACHEABLE(vm_cc_cme(cc));
|
253
255
|
}
|
254
256
|
|
255
257
|
#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.
|
@@ -65,6 +62,10 @@
|
|
65
62
|
#define OPT_SUPPORT_JOKE 0
|
66
63
|
#endif
|
67
64
|
|
65
|
+
#ifndef OPT_SUPPORT_CALL_C_FUNCTION
|
66
|
+
#define OPT_SUPPORT_CALL_C_FUNCTION 0
|
67
|
+
#endif
|
68
|
+
|
68
69
|
#ifndef VM_COLLECT_USAGE_DETAILS
|
69
70
|
#define VM_COLLECT_USAGE_DETAILS 0
|
70
71
|
#endif
|
@@ -0,0 +1,136 @@
|
|
1
|
+
|
2
|
+
#ifndef RUBY_VM_SYNC_H
|
3
|
+
#define RUBY_VM_SYNC_H
|
4
|
+
|
5
|
+
#include "vm_debug.h"
|
6
|
+
#include "debug_counter.h"
|
7
|
+
|
8
|
+
#if USE_RUBY_DEBUG_LOG
|
9
|
+
#define LOCATION_ARGS const char *file, int line
|
10
|
+
#define LOCATION_PARAMS file, line
|
11
|
+
#define APPEND_LOCATION_ARGS , const char *file, int line
|
12
|
+
#define APPEND_LOCATION_PARAMS , file, line
|
13
|
+
#else
|
14
|
+
#define LOCATION_ARGS void
|
15
|
+
#define LOCATION_PARAMS
|
16
|
+
#define APPEND_LOCATION_ARGS
|
17
|
+
#define APPEND_LOCATION_PARAMS
|
18
|
+
#endif
|
19
|
+
|
20
|
+
bool rb_vm_locked_p(void);
|
21
|
+
void rb_vm_lock_body(LOCATION_ARGS);
|
22
|
+
void rb_vm_unlock_body(LOCATION_ARGS);
|
23
|
+
|
24
|
+
struct rb_ractor_struct;
|
25
|
+
void rb_vm_lock_enter_body_cr(struct rb_ractor_struct *cr, unsigned int *lev APPEND_LOCATION_ARGS);
|
26
|
+
void rb_vm_lock_enter_body_nb(unsigned int *lev APPEND_LOCATION_ARGS);
|
27
|
+
void rb_vm_lock_enter_body(unsigned int *lev APPEND_LOCATION_ARGS);
|
28
|
+
void rb_vm_lock_leave_body(unsigned int *lev APPEND_LOCATION_ARGS);
|
29
|
+
void rb_vm_barrier(void);
|
30
|
+
|
31
|
+
#if RUBY_DEBUG
|
32
|
+
// GET_VM()
|
33
|
+
#include "vm_core.h"
|
34
|
+
#endif
|
35
|
+
|
36
|
+
RUBY_EXTERN struct rb_ractor_struct *ruby_single_main_ractor; // ractor.c
|
37
|
+
|
38
|
+
static inline bool
|
39
|
+
rb_multi_ractor_p(void)
|
40
|
+
{
|
41
|
+
if (LIKELY(ruby_single_main_ractor)) {
|
42
|
+
// 0 on boot time.
|
43
|
+
RUBY_ASSERT(GET_VM()->ractor.cnt <= 1);
|
44
|
+
return false;
|
45
|
+
}
|
46
|
+
else {
|
47
|
+
// multi-ractor mode can run ractor.cnt == 1
|
48
|
+
return true;
|
49
|
+
}
|
50
|
+
}
|
51
|
+
|
52
|
+
static inline void
|
53
|
+
rb_vm_lock(const char *file, int line)
|
54
|
+
{
|
55
|
+
RB_DEBUG_COUNTER_INC(vm_sync_lock);
|
56
|
+
|
57
|
+
if (rb_multi_ractor_p()) {
|
58
|
+
rb_vm_lock_body(LOCATION_PARAMS);
|
59
|
+
}
|
60
|
+
}
|
61
|
+
|
62
|
+
static inline void
|
63
|
+
rb_vm_unlock(const char *file, int line)
|
64
|
+
{
|
65
|
+
if (rb_multi_ractor_p()) {
|
66
|
+
rb_vm_unlock_body(LOCATION_PARAMS);
|
67
|
+
}
|
68
|
+
}
|
69
|
+
|
70
|
+
static inline void
|
71
|
+
rb_vm_lock_enter(unsigned int *lev, const char *file, int line)
|
72
|
+
{
|
73
|
+
RB_DEBUG_COUNTER_INC(vm_sync_lock_enter);
|
74
|
+
|
75
|
+
if (rb_multi_ractor_p()) {
|
76
|
+
rb_vm_lock_enter_body(lev APPEND_LOCATION_PARAMS);
|
77
|
+
}
|
78
|
+
}
|
79
|
+
|
80
|
+
static inline void
|
81
|
+
rb_vm_lock_enter_nb(unsigned int *lev, const char *file, int line)
|
82
|
+
{
|
83
|
+
RB_DEBUG_COUNTER_INC(vm_sync_lock_enter_nb);
|
84
|
+
|
85
|
+
if (rb_multi_ractor_p()) {
|
86
|
+
rb_vm_lock_enter_body_nb(lev APPEND_LOCATION_PARAMS);
|
87
|
+
}
|
88
|
+
}
|
89
|
+
|
90
|
+
static inline void
|
91
|
+
rb_vm_lock_leave(unsigned int *lev, const char *file, int line)
|
92
|
+
{
|
93
|
+
if (rb_multi_ractor_p()) {
|
94
|
+
rb_vm_lock_leave_body(lev APPEND_LOCATION_PARAMS);
|
95
|
+
}
|
96
|
+
}
|
97
|
+
|
98
|
+
static inline void
|
99
|
+
rb_vm_lock_enter_cr(struct rb_ractor_struct *cr, unsigned int *levp, const char *file, int line)
|
100
|
+
{
|
101
|
+
RB_DEBUG_COUNTER_INC(vm_sync_lock_enter_cr);
|
102
|
+
rb_vm_lock_enter_body_cr(cr, levp APPEND_LOCATION_PARAMS);
|
103
|
+
}
|
104
|
+
|
105
|
+
static inline void
|
106
|
+
rb_vm_lock_leave_cr(struct rb_ractor_struct *cr, unsigned int *levp, const char *file, int line)
|
107
|
+
{
|
108
|
+
rb_vm_lock_leave_body(levp APPEND_LOCATION_PARAMS);
|
109
|
+
}
|
110
|
+
|
111
|
+
#define RB_VM_LOCKED_P() rb_vm_locked_p()
|
112
|
+
|
113
|
+
#define RB_VM_LOCK() rb_vm_lock(__FILE__, __LINE__)
|
114
|
+
#define RB_VM_UNLOCK() rb_vm_unlock(__FILE__, __LINE__)
|
115
|
+
|
116
|
+
#define RB_VM_LOCK_ENTER_CR_LEV(cr, levp) rb_vm_lock_enter_cr(cr, levp, __FILE__, __LINE__)
|
117
|
+
#define RB_VM_LOCK_LEAVE_CR_LEV(cr, levp) rb_vm_lock_leave_cr(cr, levp, __FILE__, __LINE__)
|
118
|
+
#define RB_VM_LOCK_ENTER_LEV(levp) rb_vm_lock_enter(levp, __FILE__, __LINE__)
|
119
|
+
#define RB_VM_LOCK_LEAVE_LEV(levp) rb_vm_lock_leave(levp, __FILE__, __LINE__)
|
120
|
+
|
121
|
+
#define RB_VM_LOCK_ENTER() { unsigned int _lev; RB_VM_LOCK_ENTER_LEV(&_lev);
|
122
|
+
#define RB_VM_LOCK_LEAVE() RB_VM_LOCK_LEAVE_LEV(&_lev); }
|
123
|
+
|
124
|
+
#define RB_VM_LOCK_ENTER_LEV_NB(levp) rb_vm_lock_enter_nb(levp, __FILE__, __LINE__)
|
125
|
+
#define RB_VM_LOCK_ENTER_NO_BARRIER() { unsigned int _lev; RB_VM_LOCK_ENTER_LEV_NB(&_lev);
|
126
|
+
#define RB_VM_LOCK_LEAVE_NO_BARRIER() RB_VM_LOCK_LEAVE_LEV(&_lev); }
|
127
|
+
|
128
|
+
#if RUBY_DEBUG > 0
|
129
|
+
void ASSERT_vm_locking(void);
|
130
|
+
void ASSERT_vm_unlocking(void);
|
131
|
+
#else
|
132
|
+
#define ASSERT_vm_locking()
|
133
|
+
#define ASSERT_vm_unlocking()
|
134
|
+
#endif
|
135
|
+
|
136
|
+
#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),
|
@@ -129,7 +128,6 @@ static const void *const insns_address_table[] = {
|
|
129
128
|
LABEL_PTR(opt_succ),
|
130
129
|
LABEL_PTR(opt_not),
|
131
130
|
LABEL_PTR(opt_regexpmatch2),
|
132
|
-
LABEL_PTR(opt_call_c_function),
|
133
131
|
LABEL_PTR(invokebuiltin),
|
134
132
|
LABEL_PTR(opt_invokebuiltin_delegate),
|
135
133
|
LABEL_PTR(opt_invokebuiltin_delegate_leave),
|
@@ -162,7 +160,6 @@ static const void *const insns_address_table[] = {
|
|
162
160
|
LABEL_PTR(trace_putstring),
|
163
161
|
LABEL_PTR(trace_concatstrings),
|
164
162
|
LABEL_PTR(trace_tostring),
|
165
|
-
LABEL_PTR(trace_freezestring),
|
166
163
|
LABEL_PTR(trace_toregexp),
|
167
164
|
LABEL_PTR(trace_intern),
|
168
165
|
LABEL_PTR(trace_newarray),
|
@@ -232,7 +229,6 @@ static const void *const insns_address_table[] = {
|
|
232
229
|
LABEL_PTR(trace_opt_succ),
|
233
230
|
LABEL_PTR(trace_opt_not),
|
234
231
|
LABEL_PTR(trace_opt_regexpmatch2),
|
235
|
-
LABEL_PTR(trace_opt_call_c_function),
|
236
232
|
LABEL_PTR(trace_invokebuiltin),
|
237
233
|
LABEL_PTR(trace_opt_invokebuiltin_delegate),
|
238
234
|
LABEL_PTR(trace_opt_invokebuiltin_delegate_leave),
|
@@ -1,3 +1,5 @@
|
|
1
|
+
#ifndef RUBY_ADDR2LINE_H
|
2
|
+
#define RUBY_ADDR2LINE_H
|
1
3
|
/**********************************************************************
|
2
4
|
|
3
5
|
addr2line.h -
|
@@ -8,9 +10,6 @@
|
|
8
10
|
|
9
11
|
**********************************************************************/
|
10
12
|
|
11
|
-
#ifndef RUBY_ADDR2LINE_H
|
12
|
-
#define RUBY_ADDR2LINE_H
|
13
|
-
|
14
13
|
#if (defined(USE_ELF) || defined(HAVE_MACH_O_LOADER_H))
|
15
14
|
|
16
15
|
void
|
@@ -0,0 +1,83 @@
|
|
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
|
+
VALUE rb_vm_lvar_exposed(rb_execution_context_t *ec, int index);
|
60
|
+
|
61
|
+
// __builtin_inline!
|
62
|
+
|
63
|
+
PUREFUNC(static inline VALUE rb_vm_lvar(rb_execution_context_t *ec, int index));
|
64
|
+
|
65
|
+
static inline VALUE
|
66
|
+
rb_vm_lvar(rb_execution_context_t *ec, int index)
|
67
|
+
{
|
68
|
+
#if defined(VM_CORE_H_EC_DEFINED) && VM_CORE_H_EC_DEFINED
|
69
|
+
return ec->cfp->ep[index];
|
70
|
+
#else
|
71
|
+
return rb_vm_lvar_exposed(ec, index);
|
72
|
+
#endif
|
73
|
+
}
|
74
|
+
|
75
|
+
// dump/load
|
76
|
+
|
77
|
+
struct builtin_binary {
|
78
|
+
const char *feature; // feature name
|
79
|
+
const unsigned char *bin; // binary by ISeq#to_binary
|
80
|
+
size_t bin_size;
|
81
|
+
};
|
82
|
+
|
83
|
+
#endif // BUILTIN_H_INCLUDED
|
@@ -10,17 +10,17 @@
|
|
10
10
|
* by the compiler. This can only be used within a function.
|
11
11
|
*
|
12
12
|
* Example:
|
13
|
-
*
|
14
|
-
*
|
15
|
-
*
|
16
|
-
*
|
17
|
-
*
|
18
|
-
*
|
19
|
-
*
|
20
|
-
*
|
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
|
+
* BUILD_ASSERT(offsetof(struct foo, string) == 0);
|
19
|
+
* return (char *)foo;
|
20
|
+
* }
|
21
21
|
*/
|
22
22
|
#define BUILD_ASSERT(cond) \
|
23
|
-
|
23
|
+
do { (void) sizeof(char [1 - 2*!(cond)]); } while(0)
|
24
24
|
|
25
25
|
/**
|
26
26
|
* BUILD_ASSERT_OR_ZERO - assert a build-time dependency, as an expression.
|
@@ -30,11 +30,11 @@
|
|
30
30
|
* by the compiler. This can be used in an expression: its value is "0".
|
31
31
|
*
|
32
32
|
* Example:
|
33
|
-
*
|
34
|
-
*
|
35
|
-
*
|
33
|
+
* #define foo_to_char(foo) \
|
34
|
+
* ((char *)(foo) \
|
35
|
+
* + BUILD_ASSERT_OR_ZERO(offsetof(struct foo, string) == 0))
|
36
36
|
*/
|
37
37
|
#define BUILD_ASSERT_OR_ZERO(cond) \
|
38
|
-
|
38
|
+
(sizeof(char [1 - 2*!(cond)]) - 1)
|
39
39
|
|
40
40
|
#endif /* CCAN_BUILD_ASSERT_H */
|
@@ -17,9 +17,9 @@
|
|
17
17
|
* to compile if the sizes of the types are unequal (a less complete check).
|
18
18
|
*
|
19
19
|
* Example:
|
20
|
-
*
|
21
|
-
*
|
22
|
-
*
|
20
|
+
* // They should always pass a 64-bit value to _set_some_value!
|
21
|
+
* #define set_some_value(expr) \
|
22
|
+
* _set_some_value((check_type((expr), uint64_t), (expr)))
|
23
23
|
*/
|
24
24
|
|
25
25
|
/**
|
@@ -37,27 +37,27 @@
|
|
37
37
|
* to compile if the sizes of the types are unequal (a less complete check).
|
38
38
|
*
|
39
39
|
* Example:
|
40
|
-
*
|
41
|
-
*
|
42
|
-
*
|
43
|
-
*
|
44
|
-
*
|
45
|
-
*
|
40
|
+
* // Do subtraction to get to enclosing type, but make sure that
|
41
|
+
* // pointer is of correct type for that member.
|
42
|
+
* #define container_of(mbr_ptr, encl_type, mbr) \
|
43
|
+
* (check_types_match((mbr_ptr), &((encl_type *)0)->mbr), \
|
44
|
+
* ((encl_type *) \
|
45
|
+
* ((char *)(mbr_ptr) - offsetof(enclosing_type, mbr))))
|
46
46
|
*/
|
47
47
|
#if HAVE_TYPEOF
|
48
|
-
#define check_type(expr, type)
|
49
|
-
|
48
|
+
#define check_type(expr, type) \
|
49
|
+
((typeof(expr) *)0 != (type *)0)
|
50
50
|
|
51
|
-
#define check_types_match(expr1, expr2)
|
52
|
-
|
51
|
+
#define check_types_match(expr1, expr2) \
|
52
|
+
((typeof(expr1) *)0 != (typeof(expr2) *)0)
|
53
53
|
#else
|
54
54
|
#include "ccan/build_assert/build_assert.h"
|
55
55
|
/* Without typeof, we can only test the sizes. */
|
56
|
-
#define check_type(expr, type)
|
57
|
-
|
56
|
+
#define check_type(expr, type) \
|
57
|
+
BUILD_ASSERT_OR_ZERO(sizeof(expr) == sizeof(type))
|
58
58
|
|
59
|
-
#define check_types_match(expr1, expr2)
|
60
|
-
|
59
|
+
#define check_types_match(expr1, expr2) \
|
60
|
+
BUILD_ASSERT_OR_ZERO(sizeof(expr1) == sizeof(expr2))
|
61
61
|
#endif /* HAVE_TYPEOF */
|
62
62
|
|
63
63
|
#endif /* CCAN_CHECK_TYPE_H */
|