debase-ruby_core_source 0.10.2 → 0.10.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +5 -5
- data/CHANGELOG.md +34 -0
- data/README.md +6 -2
- data/Rakefile +6 -3
- data/debase-ruby_core_source.gemspec +2 -1
- data/lib/debase/ruby_core_source.rb +6 -5
- data/lib/debase/ruby_core_source/{ruby-2.5.0-preview1 → ruby-2.5.1-p57}/addr2line.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.5.0-preview1 → ruby-2.5.1-p57}/ccan/build_assert/build_assert.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.5.0-preview1 → ruby-2.5.1-p57}/ccan/check_type/check_type.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.5.0-preview1 → ruby-2.5.1-p57}/ccan/container_of/container_of.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.5.0-preview1 → ruby-2.5.1-p57}/ccan/list/list.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.5.0-preview1 → ruby-2.5.1-p57}/ccan/str/str.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.5.0-preview1 → ruby-2.5.1-p57}/constant.h +1 -0
- data/lib/debase/ruby_core_source/{ruby-2.5.0-preview1 → ruby-2.5.1-p57}/debug_counter.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.5.0-preview1 → ruby-2.5.1-p57}/dln.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.5.0-preview1 → ruby-2.5.1-p57}/encindex.h +2 -0
- data/lib/debase/ruby_core_source/{ruby-2.5.0-rc1 → ruby-2.5.1-p57}/eval_intern.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.5.0-rc1 → ruby-2.5.1-p57}/gc.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.5.0-preview1 → ruby-2.5.1-p57}/id.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.5.0-preview1 → ruby-2.5.1-p57}/id_table.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.5.0-rc1 → ruby-2.5.1-p57}/insns.inc +2 -2
- data/lib/debase/ruby_core_source/{ruby-2.5.0-rc1 → ruby-2.5.1-p57}/insns_info.inc +157 -157
- data/lib/debase/ruby_core_source/{ruby-2.5.0-rc1 → ruby-2.5.1-p57}/internal.h +5 -4
- data/lib/debase/ruby_core_source/{ruby-2.5.0-rc1 → ruby-2.5.1-p57}/iseq.h +2 -2
- data/lib/debase/ruby_core_source/{ruby-2.5.0-preview1 → ruby-2.5.1-p57}/known_errors.inc +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.5.0-rc1 → ruby-2.5.1-p57}/method.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.5.0-rc1 → ruby-2.5.1-p57}/node.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.5.0-rc1 → ruby-2.5.1-p57}/node_name.inc +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.5.0-rc1 → ruby-2.5.1-p57}/opt_sc.inc +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.5.0-rc1 → ruby-2.5.1-p57}/optinsn.inc +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.5.0-rc1 → ruby-2.5.1-p57}/optunifs.inc +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.5.0-rc1 → ruby-2.5.1-p57}/parse.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.5.0-rc1 → ruby-2.5.1-p57}/probes_helper.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.5.0-preview1 → ruby-2.5.1-p57}/regenc.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.5.0-preview1 → ruby-2.5.1-p57}/regint.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.5.0-preview1 → ruby-2.5.1-p57}/regparse.h +0 -0
- data/lib/debase/ruby_core_source/ruby-2.5.1-p57/revision.h +1 -0
- data/lib/debase/ruby_core_source/{ruby-2.5.0-preview1 → ruby-2.5.1-p57}/ruby_assert.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.5.0-preview1 → ruby-2.5.1-p57}/ruby_atomic.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.5.0-preview1 → ruby-2.5.1-p57}/siphash.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.5.0-preview1 → ruby-2.5.1-p57}/symbol.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.5.0-preview1 → ruby-2.5.1-p57}/thread_pthread.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.5.0-preview1 → ruby-2.5.1-p57}/thread_win32.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.5.0-preview1 → ruby-2.5.1-p57}/timev.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.5.0-preview1 → ruby-2.5.1-p57}/transcode_data.h +0 -0
- data/lib/debase/ruby_core_source/ruby-2.5.1-p57/version.h +73 -0
- data/lib/debase/ruby_core_source/{ruby-2.5.0-rc1 → ruby-2.5.1-p57}/vm.inc +13 -13
- data/lib/debase/ruby_core_source/{ruby-2.5.0-rc1 → ruby-2.5.1-p57}/vm_call_iseq_optimized.inc +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.5.0-rc1 → ruby-2.5.1-p57}/vm_core.h +3 -4
- data/lib/debase/ruby_core_source/{ruby-2.5.0-preview1 → ruby-2.5.1-p57}/vm_debug.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.5.0-rc1 → ruby-2.5.1-p57}/vm_exec.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.5.0-rc1 → ruby-2.5.1-p57}/vm_insnhelper.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.5.0-rc1 → ruby-2.5.1-p57}/vm_opts.h +1 -2
- data/lib/debase/ruby_core_source/{ruby-2.5.0-rc1 → ruby-2.5.1-p57}/vmtc.inc +2 -2
- data/lib/debase/ruby_core_source/{ruby-2.5.0-rc1 → ruby-2.6.0-p0}/addr2line.h +1 -1
- data/lib/debase/ruby_core_source/{ruby-2.5.0-rc1 → ruby-2.6.0-p0}/ccan/build_assert/build_assert.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.5.0-rc1 → ruby-2.6.0-p0}/ccan/check_type/check_type.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.5.0-rc1 → ruby-2.6.0-p0}/ccan/container_of/container_of.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.5.0-rc1 → ruby-2.6.0-p0}/ccan/list/list.h +20 -5
- data/lib/debase/ruby_core_source/{ruby-2.5.0-rc1 → ruby-2.6.0-p0}/ccan/str/str.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.5.0-rc1 → ruby-2.6.0-p0}/constant.h +1 -0
- data/lib/debase/ruby_core_source/ruby-2.6.0-p0/debug_counter.h +283 -0
- data/lib/debase/ruby_core_source/{ruby-2.5.0-rc1 → ruby-2.6.0-p0}/dln.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.5.0-rc1 → ruby-2.6.0-p0}/encindex.h +2 -0
- data/lib/debase/ruby_core_source/{ruby-2.5.0-preview1 → ruby-2.6.0-p0}/eval_intern.h +45 -53
- data/lib/debase/ruby_core_source/{ruby-2.5.0-preview1 → ruby-2.6.0-p0}/gc.h +2 -3
- data/lib/debase/ruby_core_source/ruby-2.6.0-p0/hrtime.h +168 -0
- data/lib/debase/ruby_core_source/{ruby-2.5.0-rc1 → ruby-2.6.0-p0}/id.h +4 -2
- data/lib/debase/ruby_core_source/{ruby-2.5.0-rc1 → ruby-2.6.0-p0}/id_table.h +0 -0
- data/lib/debase/ruby_core_source/ruby-2.6.0-p0/insns.inc +249 -0
- data/lib/debase/ruby_core_source/ruby-2.6.0-p0/insns_info.inc +9374 -0
- data/lib/debase/ruby_core_source/{ruby-2.5.0-preview1 → ruby-2.6.0-p0}/internal.h +608 -100
- data/lib/debase/ruby_core_source/{ruby-2.5.0-preview1 → ruby-2.6.0-p0}/iseq.h +127 -91
- data/lib/debase/ruby_core_source/{ruby-2.5.0-rc1 → ruby-2.6.0-p0}/known_errors.inc +477 -432
- data/lib/debase/ruby_core_source/{ruby-2.5.0-preview1 → ruby-2.6.0-p0}/method.h +28 -15
- data/lib/debase/ruby_core_source/ruby-2.6.0-p0/mjit.h +148 -0
- data/lib/debase/ruby_core_source/ruby-2.6.0-p0/mjit_compile.inc +4224 -0
- data/lib/debase/ruby_core_source/ruby-2.6.0-p0/node.h +449 -0
- data/lib/debase/ruby_core_source/{ruby-2.5.0-preview1 → ruby-2.6.0-p0}/node_name.inc +6 -18
- data/lib/debase/ruby_core_source/ruby-2.6.0-p0/opt_sc.inc +109 -0
- data/lib/debase/ruby_core_source/ruby-2.6.0-p0/optinsn.inc +128 -0
- data/lib/debase/ruby_core_source/ruby-2.6.0-p0/optunifs.inc +43 -0
- data/lib/debase/ruby_core_source/ruby-2.6.0-p0/parse.h +210 -0
- data/lib/debase/ruby_core_source/ruby-2.6.0-p0/probes_helper.h +42 -0
- data/lib/debase/ruby_core_source/{ruby-2.5.0-rc1 → ruby-2.6.0-p0}/regenc.h +1 -1
- data/lib/debase/ruby_core_source/{ruby-2.5.0-rc1 → ruby-2.6.0-p0}/regint.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.5.0-rc1 → ruby-2.6.0-p0}/regparse.h +1 -1
- data/lib/debase/ruby_core_source/ruby-2.6.0-p0/revision.h +1 -0
- data/lib/debase/ruby_core_source/{ruby-2.5.0-rc1 → ruby-2.6.0-p0}/ruby_assert.h +6 -0
- data/lib/debase/ruby_core_source/{ruby-2.5.0-rc1 → ruby-2.6.0-p0}/ruby_atomic.h +14 -3
- data/lib/debase/ruby_core_source/{ruby-2.5.0-rc1 → ruby-2.6.0-p0}/siphash.h +1 -1
- data/lib/debase/ruby_core_source/{ruby-2.5.0-rc1 → ruby-2.6.0-p0}/symbol.h +1 -1
- data/lib/debase/ruby_core_source/ruby-2.6.0-p0/thread_pthread.h +75 -0
- data/lib/debase/ruby_core_source/{ruby-2.5.0-rc1 → ruby-2.6.0-p0}/thread_win32.h +0 -0
- data/lib/debase/ruby_core_source/ruby-2.6.0-p0/timev.h +53 -0
- data/lib/debase/ruby_core_source/{ruby-2.5.0-rc1 → ruby-2.6.0-p0}/transcode_data.h +0 -0
- data/lib/debase/ruby_core_source/ruby-2.6.0-p0/transient_heap.h +60 -0
- data/lib/debase/ruby_core_source/{ruby-2.5.0-rc1 → ruby-2.6.0-p0}/version.h +7 -7
- data/lib/debase/ruby_core_source/ruby-2.6.0-p0/vm.inc +4502 -0
- data/lib/debase/ruby_core_source/ruby-2.6.0-p0/vm_call_iseq_optimized.inc +213 -0
- data/lib/debase/ruby_core_source/{ruby-2.5.0-preview1 → ruby-2.6.0-p0}/vm_core.h +385 -182
- data/lib/debase/ruby_core_source/{ruby-2.5.0-rc1 → ruby-2.6.0-p0}/vm_debug.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.5.0-preview1 → ruby-2.6.0-p0}/vm_exec.h +33 -13
- data/lib/debase/ruby_core_source/ruby-2.6.0-p0/vm_insnhelper.h +316 -0
- data/lib/debase/ruby_core_source/{ruby-2.5.0-preview1 → ruby-2.6.0-p0}/vm_opts.h +18 -5
- data/lib/debase/ruby_core_source/ruby-2.6.0-p0/vmtc.inc +243 -0
- data/lib/debase/ruby_core_source/ruby-2.6.5-p114/addr2line.h +21 -0
- data/lib/debase/ruby_core_source/ruby-2.6.5-p114/ccan/build_assert/build_assert.h +40 -0
- data/lib/debase/ruby_core_source/ruby-2.6.5-p114/ccan/check_type/check_type.h +63 -0
- data/lib/debase/ruby_core_source/ruby-2.6.5-p114/ccan/container_of/container_of.h +142 -0
- data/lib/debase/ruby_core_source/ruby-2.6.5-p114/ccan/list/list.h +788 -0
- data/lib/debase/ruby_core_source/ruby-2.6.5-p114/ccan/str/str.h +16 -0
- data/lib/debase/ruby_core_source/ruby-2.6.5-p114/constant.h +51 -0
- data/lib/debase/ruby_core_source/ruby-2.6.5-p114/debug_counter.h +283 -0
- data/lib/debase/ruby_core_source/ruby-2.6.5-p114/dln.h +51 -0
- data/lib/debase/ruby_core_source/ruby-2.6.5-p114/encindex.h +69 -0
- data/lib/debase/ruby_core_source/ruby-2.6.5-p114/eval_intern.h +333 -0
- data/lib/debase/ruby_core_source/ruby-2.6.5-p114/gc.h +116 -0
- data/lib/debase/ruby_core_source/ruby-2.6.5-p114/hrtime.h +168 -0
- data/lib/debase/ruby_core_source/ruby-2.6.5-p114/id.h +252 -0
- data/lib/debase/ruby_core_source/ruby-2.6.5-p114/id_table.h +31 -0
- data/lib/debase/ruby_core_source/ruby-2.6.5-p114/insns.inc +249 -0
- data/lib/debase/ruby_core_source/ruby-2.6.5-p114/insns_info.inc +9374 -0
- data/lib/debase/ruby_core_source/ruby-2.6.5-p114/internal.h +2470 -0
- data/lib/debase/ruby_core_source/ruby-2.6.5-p114/iseq.h +304 -0
- data/lib/debase/ruby_core_source/ruby-2.6.5-p114/known_errors.inc +791 -0
- data/lib/debase/ruby_core_source/ruby-2.6.5-p114/method.h +229 -0
- data/lib/debase/ruby_core_source/ruby-2.6.5-p114/mjit.h +148 -0
- data/lib/debase/ruby_core_source/ruby-2.6.5-p114/mjit_compile.inc +4226 -0
- data/lib/debase/ruby_core_source/ruby-2.6.5-p114/node.h +449 -0
- data/lib/debase/ruby_core_source/ruby-2.6.5-p114/node_name.inc +200 -0
- data/lib/debase/ruby_core_source/ruby-2.6.5-p114/opt_sc.inc +109 -0
- data/lib/debase/ruby_core_source/ruby-2.6.5-p114/optinsn.inc +128 -0
- data/lib/debase/ruby_core_source/ruby-2.6.5-p114/optunifs.inc +43 -0
- data/lib/debase/ruby_core_source/{ruby-2.5.0-preview1 → ruby-2.6.5-p114}/parse.h +47 -31
- data/lib/debase/ruby_core_source/ruby-2.6.5-p114/probes_helper.h +42 -0
- data/lib/debase/ruby_core_source/ruby-2.6.5-p114/regenc.h +254 -0
- data/lib/debase/ruby_core_source/ruby-2.6.5-p114/regint.h +938 -0
- data/lib/debase/ruby_core_source/ruby-2.6.5-p114/regparse.h +370 -0
- data/lib/debase/ruby_core_source/ruby-2.6.5-p114/revision.h +1 -0
- data/lib/debase/ruby_core_source/ruby-2.6.5-p114/ruby_assert.h +60 -0
- data/lib/debase/ruby_core_source/ruby-2.6.5-p114/ruby_atomic.h +244 -0
- data/lib/debase/ruby_core_source/ruby-2.6.5-p114/siphash.h +48 -0
- data/lib/debase/ruby_core_source/ruby-2.6.5-p114/symbol.h +112 -0
- data/lib/debase/ruby_core_source/ruby-2.6.5-p114/thread_pthread.h +75 -0
- data/lib/debase/ruby_core_source/ruby-2.6.5-p114/thread_win32.h +36 -0
- data/lib/debase/ruby_core_source/ruby-2.6.5-p114/timev.h +53 -0
- data/lib/debase/ruby_core_source/ruby-2.6.5-p114/transcode_data.h +139 -0
- data/lib/debase/ruby_core_source/ruby-2.6.5-p114/transient_heap.h +60 -0
- data/lib/debase/ruby_core_source/{ruby-2.5.0-preview1 → ruby-2.6.5-p114}/version.h +7 -7
- data/lib/debase/ruby_core_source/ruby-2.6.5-p114/vm.inc +4504 -0
- data/lib/debase/ruby_core_source/ruby-2.6.5-p114/vm_call_iseq_optimized.inc +213 -0
- data/lib/debase/ruby_core_source/ruby-2.6.5-p114/vm_core.h +1910 -0
- data/lib/debase/ruby_core_source/ruby-2.6.5-p114/vm_debug.h +37 -0
- data/lib/debase/ruby_core_source/ruby-2.6.5-p114/vm_exec.h +202 -0
- data/lib/debase/ruby_core_source/ruby-2.6.5-p114/vm_insnhelper.h +316 -0
- data/lib/debase/ruby_core_source/ruby-2.6.5-p114/vm_opts.h +70 -0
- data/lib/debase/ruby_core_source/ruby-2.6.5-p114/vmtc.inc +243 -0
- data/lib/debase/ruby_core_source/ruby-2.7.0-p0/addr2line.h +21 -0
- data/lib/debase/ruby_core_source/ruby-2.7.0-p0/builtin.h +78 -0
- data/lib/debase/ruby_core_source/ruby-2.7.0-p0/ccan/build_assert/build_assert.h +40 -0
- data/lib/debase/ruby_core_source/ruby-2.7.0-p0/ccan/check_type/check_type.h +63 -0
- data/lib/debase/ruby_core_source/ruby-2.7.0-p0/ccan/container_of/container_of.h +142 -0
- data/lib/debase/ruby_core_source/ruby-2.7.0-p0/ccan/list/list.h +788 -0
- data/lib/debase/ruby_core_source/ruby-2.7.0-p0/ccan/str/str.h +16 -0
- data/lib/debase/ruby_core_source/ruby-2.7.0-p0/constant.h +50 -0
- data/lib/debase/ruby_core_source/ruby-2.7.0-p0/debug_counter.h +390 -0
- data/lib/debase/ruby_core_source/ruby-2.7.0-p0/dln.h +51 -0
- data/lib/debase/ruby_core_source/ruby-2.7.0-p0/encindex.h +69 -0
- data/lib/debase/ruby_core_source/ruby-2.7.0-p0/eval_intern.h +312 -0
- data/lib/debase/ruby_core_source/ruby-2.7.0-p0/gc.h +131 -0
- data/lib/debase/ruby_core_source/ruby-2.7.0-p0/hrtime.h +168 -0
- data/lib/debase/ruby_core_source/ruby-2.7.0-p0/id.h +290 -0
- data/lib/debase/ruby_core_source/ruby-2.7.0-p0/id_table.h +34 -0
- data/lib/debase/ruby_core_source/ruby-2.7.0-p0/insns.inc +253 -0
- data/lib/debase/ruby_core_source/ruby-2.7.0-p0/insns_info.inc +9197 -0
- data/lib/debase/ruby_core_source/ruby-2.7.0-p0/internal.h +2697 -0
- data/lib/debase/ruby_core_source/ruby-2.7.0-p0/iseq.h +312 -0
- data/lib/debase/ruby_core_source/ruby-2.7.0-p0/known_errors.inc +791 -0
- data/lib/debase/ruby_core_source/ruby-2.7.0-p0/method.h +229 -0
- data/lib/debase/ruby_core_source/ruby-2.7.0-p0/mjit.h +177 -0
- data/lib/debase/ruby_core_source/ruby-2.7.0-p0/mjit_compile.inc +7779 -0
- data/lib/debase/ruby_core_source/ruby-2.7.0-p0/node.h +476 -0
- data/lib/debase/ruby_core_source/ruby-2.7.0-p0/node_name.inc +208 -0
- data/lib/debase/ruby_core_source/ruby-2.7.0-p0/opt_sc.inc +109 -0
- data/lib/debase/ruby_core_source/ruby-2.7.0-p0/optinsn.inc +128 -0
- data/lib/debase/ruby_core_source/ruby-2.7.0-p0/optunifs.inc +43 -0
- data/lib/debase/ruby_core_source/ruby-2.7.0-p0/parse.h +210 -0
- data/lib/debase/ruby_core_source/ruby-2.7.0-p0/probes_helper.h +42 -0
- data/lib/debase/ruby_core_source/ruby-2.7.0-p0/regenc.h +254 -0
- data/lib/debase/ruby_core_source/ruby-2.7.0-p0/regint.h +938 -0
- data/lib/debase/ruby_core_source/ruby-2.7.0-p0/regparse.h +370 -0
- data/lib/debase/ruby_core_source/ruby-2.7.0-p0/revision.h +2 -0
- data/lib/debase/ruby_core_source/ruby-2.7.0-p0/ruby_assert.h +15 -0
- data/lib/debase/ruby_core_source/ruby-2.7.0-p0/ruby_atomic.h +244 -0
- data/lib/debase/ruby_core_source/ruby-2.7.0-p0/siphash.h +48 -0
- data/lib/debase/ruby_core_source/ruby-2.7.0-p0/symbol.h +119 -0
- data/lib/debase/ruby_core_source/ruby-2.7.0-p0/thread_pthread.h +75 -0
- data/lib/debase/ruby_core_source/ruby-2.7.0-p0/thread_win32.h +36 -0
- data/lib/debase/ruby_core_source/ruby-2.7.0-p0/timev.h +56 -0
- data/lib/debase/ruby_core_source/ruby-2.7.0-p0/transcode_data.h +139 -0
- data/lib/debase/ruby_core_source/ruby-2.7.0-p0/transient_heap.h +62 -0
- data/lib/debase/ruby_core_source/ruby-2.7.0-p0/variable.h +9 -0
- data/lib/debase/ruby_core_source/ruby-2.7.0-p0/version.h +77 -0
- data/lib/debase/ruby_core_source/ruby-2.7.0-p0/vm.inc +5466 -0
- data/lib/debase/ruby_core_source/ruby-2.7.0-p0/vm_call_iseq_optimized.inc +237 -0
- data/lib/debase/ruby_core_source/ruby-2.7.0-p0/vm_core.h +1968 -0
- data/lib/debase/ruby_core_source/ruby-2.7.0-p0/vm_debug.h +34 -0
- data/lib/debase/ruby_core_source/ruby-2.7.0-p0/vm_exec.h +193 -0
- data/lib/debase/ruby_core_source/{ruby-2.5.0-preview1 → ruby-2.7.0-p0}/vm_insnhelper.h +81 -64
- data/lib/debase/ruby_core_source/ruby-2.7.0-p0/vm_opts.h +72 -0
- data/lib/debase/ruby_core_source/ruby-2.7.0-p0/vmtc.inc +247 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/addr2line.h +20 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/builtin.h +83 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/ccan/build_assert/build_assert.h +40 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/ccan/check_type/check_type.h +63 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/ccan/container_of/container_of.h +142 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/ccan/list/list.h +788 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/ccan/str/str.h +16 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/constant.h +55 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/debug_counter.h +423 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/dln.h +36 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/encindex.h +70 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/eval_intern.h +312 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/gc.h +140 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/hrtime.h +168 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/id.h +290 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/id_table.h +36 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/insns.inc +249 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/insns_info.inc +8979 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/internal.h +107 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/internal/array.h +114 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/internal/bignum.h +246 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/internal/bits.h +566 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/internal/class.h +168 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/internal/compar.h +50 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/internal/compile.h +32 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/internal/compilers.h +108 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/internal/complex.h +29 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/internal/cont.h +25 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/internal/dir.h +17 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/internal/enc.h +20 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/internal/encoding.h +28 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/internal/enum.h +19 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/internal/enumerator.h +22 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/internal/error.h +131 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/internal/eval.h +33 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/internal/file.h +39 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/internal/fixnum.h +185 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/internal/gc.h +154 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/internal/hash.h +240 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/internal/imemo.h +243 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/internal/inits.h +51 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/internal/io.h +35 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/internal/load.h +19 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/internal/loadpath.h +17 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/internal/math.h +24 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/internal/missing.h +19 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/internal/mjit.h +29 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/internal/numeric.h +252 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/internal/object.h +83 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/internal/parse.h +23 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/internal/proc.h +32 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/internal/process.h +136 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/internal/random.h +17 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/internal/range.h +37 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/internal/rational.h +69 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/internal/re.h +29 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/internal/sanitizers.h +191 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/internal/scheduler.h +35 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/internal/serial.h +24 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/internal/signal.h +22 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/internal/static_assert.h +17 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/internal/string.h +135 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/internal/struct.h +154 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/internal/symbol.h +41 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/internal/thread.h +60 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/internal/time.h +35 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/internal/transcode.h +21 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/internal/util.h +31 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/internal/variable.h +83 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/internal/vm.h +135 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/internal/warnings.h +17 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/iseq.h +304 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/known_errors.inc +791 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/method.h +245 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/mjit.h +197 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/mjit_compile.inc +8082 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/node.h +484 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/node_name.inc +210 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/opt_sc.inc +109 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/optinsn.inc +128 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/optunifs.inc +43 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/parse.h +211 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/probes_helper.h +44 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/ractor.h +271 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/ractor_pub.h +50 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/regenc.h +254 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/regint.h +938 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/regparse.h +370 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/revision.h +2 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/ruby_assert.h +15 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/ruby_atomic.h +236 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/siphash.h +48 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/symbol.h +119 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/thread_pthread.h +106 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/thread_win32.h +66 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/timev.h +57 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/transcode_data.h +138 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/transient_heap.h +61 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/variable.h +21 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/version.h +89 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/vm.inc +5360 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/vm_call_iseq_optimized.inc +244 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/vm_callinfo.h +457 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/vm_core.h +1952 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/vm_debug.h +116 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/vm_exec.h +196 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/vm_insnhelper.h +260 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/vm_opts.h +73 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/vm_sync.h +97 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-preview1/vmtc.inc +243 -0
- data/lib/debase/ruby_core_source/version.rb +1 -1
- metadata +335 -102
- data/lib/debase/ruby_core_source/ruby-2.5.0-preview1/insns.inc +0 -118
- data/lib/debase/ruby_core_source/ruby-2.5.0-preview1/insns_info.inc +0 -827
- data/lib/debase/ruby_core_source/ruby-2.5.0-preview1/node.h +0 -523
- data/lib/debase/ruby_core_source/ruby-2.5.0-preview1/opt_sc.inc +0 -809
- data/lib/debase/ruby_core_source/ruby-2.5.0-preview1/optinsn.inc +0 -77
- data/lib/debase/ruby_core_source/ruby-2.5.0-preview1/optunifs.inc +0 -49
- data/lib/debase/ruby_core_source/ruby-2.5.0-preview1/probes_helper.h +0 -43
- data/lib/debase/ruby_core_source/ruby-2.5.0-preview1/revision.h +0 -1
- data/lib/debase/ruby_core_source/ruby-2.5.0-preview1/vm.inc +0 -2935
- data/lib/debase/ruby_core_source/ruby-2.5.0-preview1/vm_call_iseq_optimized.inc +0 -212
- data/lib/debase/ruby_core_source/ruby-2.5.0-preview1/vmtc.inc +0 -115
- data/lib/debase/ruby_core_source/ruby-2.5.0-rc1/debug_counter.h +0 -109
- data/lib/debase/ruby_core_source/ruby-2.5.0-rc1/revision.h +0 -1
- data/lib/debase/ruby_core_source/ruby-2.5.0-rc1/thread_pthread.h +0 -54
- data/lib/debase/ruby_core_source/ruby-2.5.0-rc1/timev.h +0 -42
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
/* -*- c -*- */
|
|
2
|
+
#if 1 /* enable or disable this optimization */
|
|
3
|
+
|
|
4
|
+
/* DO NOT EDIT THIS FILE DIRECTLY
|
|
5
|
+
*
|
|
6
|
+
* This file is generated by tool/mk_call_iseq_optimized.rb
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
static VALUE
|
|
10
|
+
vm_call_iseq_setup_normal_0start_0params_0locals(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, const struct rb_call_info *ci, struct rb_call_cache *cc)
|
|
11
|
+
{
|
|
12
|
+
return vm_call_iseq_setup_normal(ec, cfp, calling, cc->me, 0, 0, 0);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
static VALUE
|
|
16
|
+
vm_call_iseq_setup_normal_0start_0params_1locals(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, const struct rb_call_info *ci, struct rb_call_cache *cc)
|
|
17
|
+
{
|
|
18
|
+
return vm_call_iseq_setup_normal(ec, cfp, calling, cc->me, 0, 0, 1);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
static VALUE
|
|
22
|
+
vm_call_iseq_setup_normal_0start_0params_2locals(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, const struct rb_call_info *ci, struct rb_call_cache *cc)
|
|
23
|
+
{
|
|
24
|
+
return vm_call_iseq_setup_normal(ec, cfp, calling, cc->me, 0, 0, 2);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
static VALUE
|
|
28
|
+
vm_call_iseq_setup_normal_0start_0params_3locals(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, const struct rb_call_info *ci, struct rb_call_cache *cc)
|
|
29
|
+
{
|
|
30
|
+
return vm_call_iseq_setup_normal(ec, cfp, calling, cc->me, 0, 0, 3);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
static VALUE
|
|
34
|
+
vm_call_iseq_setup_normal_0start_0params_4locals(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, const struct rb_call_info *ci, struct rb_call_cache *cc)
|
|
35
|
+
{
|
|
36
|
+
return vm_call_iseq_setup_normal(ec, cfp, calling, cc->me, 0, 0, 4);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
static VALUE
|
|
40
|
+
vm_call_iseq_setup_normal_0start_0params_5locals(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, const struct rb_call_info *ci, struct rb_call_cache *cc)
|
|
41
|
+
{
|
|
42
|
+
return vm_call_iseq_setup_normal(ec, cfp, calling, cc->me, 0, 0, 5);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
static VALUE
|
|
46
|
+
vm_call_iseq_setup_normal_0start_1params_0locals(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, const struct rb_call_info *ci, struct rb_call_cache *cc)
|
|
47
|
+
{
|
|
48
|
+
return vm_call_iseq_setup_normal(ec, cfp, calling, cc->me, 0, 1, 0);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
static VALUE
|
|
52
|
+
vm_call_iseq_setup_normal_0start_1params_1locals(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, const struct rb_call_info *ci, struct rb_call_cache *cc)
|
|
53
|
+
{
|
|
54
|
+
return vm_call_iseq_setup_normal(ec, cfp, calling, cc->me, 0, 1, 1);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
static VALUE
|
|
58
|
+
vm_call_iseq_setup_normal_0start_1params_2locals(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, const struct rb_call_info *ci, struct rb_call_cache *cc)
|
|
59
|
+
{
|
|
60
|
+
return vm_call_iseq_setup_normal(ec, cfp, calling, cc->me, 0, 1, 2);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
static VALUE
|
|
64
|
+
vm_call_iseq_setup_normal_0start_1params_3locals(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, const struct rb_call_info *ci, struct rb_call_cache *cc)
|
|
65
|
+
{
|
|
66
|
+
return vm_call_iseq_setup_normal(ec, cfp, calling, cc->me, 0, 1, 3);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
static VALUE
|
|
70
|
+
vm_call_iseq_setup_normal_0start_1params_4locals(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, const struct rb_call_info *ci, struct rb_call_cache *cc)
|
|
71
|
+
{
|
|
72
|
+
return vm_call_iseq_setup_normal(ec, cfp, calling, cc->me, 0, 1, 4);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
static VALUE
|
|
76
|
+
vm_call_iseq_setup_normal_0start_1params_5locals(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, const struct rb_call_info *ci, struct rb_call_cache *cc)
|
|
77
|
+
{
|
|
78
|
+
return vm_call_iseq_setup_normal(ec, cfp, calling, cc->me, 0, 1, 5);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
static VALUE
|
|
82
|
+
vm_call_iseq_setup_normal_0start_2params_0locals(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, const struct rb_call_info *ci, struct rb_call_cache *cc)
|
|
83
|
+
{
|
|
84
|
+
return vm_call_iseq_setup_normal(ec, cfp, calling, cc->me, 0, 2, 0);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
static VALUE
|
|
88
|
+
vm_call_iseq_setup_normal_0start_2params_1locals(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, const struct rb_call_info *ci, struct rb_call_cache *cc)
|
|
89
|
+
{
|
|
90
|
+
return vm_call_iseq_setup_normal(ec, cfp, calling, cc->me, 0, 2, 1);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
static VALUE
|
|
94
|
+
vm_call_iseq_setup_normal_0start_2params_2locals(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, const struct rb_call_info *ci, struct rb_call_cache *cc)
|
|
95
|
+
{
|
|
96
|
+
return vm_call_iseq_setup_normal(ec, cfp, calling, cc->me, 0, 2, 2);
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
static VALUE
|
|
100
|
+
vm_call_iseq_setup_normal_0start_2params_3locals(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, const struct rb_call_info *ci, struct rb_call_cache *cc)
|
|
101
|
+
{
|
|
102
|
+
return vm_call_iseq_setup_normal(ec, cfp, calling, cc->me, 0, 2, 3);
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
static VALUE
|
|
106
|
+
vm_call_iseq_setup_normal_0start_2params_4locals(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, const struct rb_call_info *ci, struct rb_call_cache *cc)
|
|
107
|
+
{
|
|
108
|
+
return vm_call_iseq_setup_normal(ec, cfp, calling, cc->me, 0, 2, 4);
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
static VALUE
|
|
112
|
+
vm_call_iseq_setup_normal_0start_2params_5locals(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, const struct rb_call_info *ci, struct rb_call_cache *cc)
|
|
113
|
+
{
|
|
114
|
+
return vm_call_iseq_setup_normal(ec, cfp, calling, cc->me, 0, 2, 5);
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
static VALUE
|
|
118
|
+
vm_call_iseq_setup_normal_0start_3params_0locals(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, const struct rb_call_info *ci, struct rb_call_cache *cc)
|
|
119
|
+
{
|
|
120
|
+
return vm_call_iseq_setup_normal(ec, cfp, calling, cc->me, 0, 3, 0);
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
static VALUE
|
|
124
|
+
vm_call_iseq_setup_normal_0start_3params_1locals(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, const struct rb_call_info *ci, struct rb_call_cache *cc)
|
|
125
|
+
{
|
|
126
|
+
return vm_call_iseq_setup_normal(ec, cfp, calling, cc->me, 0, 3, 1);
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
static VALUE
|
|
130
|
+
vm_call_iseq_setup_normal_0start_3params_2locals(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, const struct rb_call_info *ci, struct rb_call_cache *cc)
|
|
131
|
+
{
|
|
132
|
+
return vm_call_iseq_setup_normal(ec, cfp, calling, cc->me, 0, 3, 2);
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
static VALUE
|
|
136
|
+
vm_call_iseq_setup_normal_0start_3params_3locals(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, const struct rb_call_info *ci, struct rb_call_cache *cc)
|
|
137
|
+
{
|
|
138
|
+
return vm_call_iseq_setup_normal(ec, cfp, calling, cc->me, 0, 3, 3);
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
static VALUE
|
|
142
|
+
vm_call_iseq_setup_normal_0start_3params_4locals(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, const struct rb_call_info *ci, struct rb_call_cache *cc)
|
|
143
|
+
{
|
|
144
|
+
return vm_call_iseq_setup_normal(ec, cfp, calling, cc->me, 0, 3, 4);
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
static VALUE
|
|
148
|
+
vm_call_iseq_setup_normal_0start_3params_5locals(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, const struct rb_call_info *ci, struct rb_call_cache *cc)
|
|
149
|
+
{
|
|
150
|
+
return vm_call_iseq_setup_normal(ec, cfp, calling, cc->me, 0, 3, 5);
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
/* vm_call_iseq_handlers[param][local] */
|
|
154
|
+
static const vm_call_handler vm_call_iseq_handlers[][6] = {
|
|
155
|
+
{vm_call_iseq_setup_normal_0start_0params_0locals,
|
|
156
|
+
vm_call_iseq_setup_normal_0start_0params_1locals,
|
|
157
|
+
vm_call_iseq_setup_normal_0start_0params_2locals,
|
|
158
|
+
vm_call_iseq_setup_normal_0start_0params_3locals,
|
|
159
|
+
vm_call_iseq_setup_normal_0start_0params_4locals,
|
|
160
|
+
vm_call_iseq_setup_normal_0start_0params_5locals},
|
|
161
|
+
{vm_call_iseq_setup_normal_0start_1params_0locals,
|
|
162
|
+
vm_call_iseq_setup_normal_0start_1params_1locals,
|
|
163
|
+
vm_call_iseq_setup_normal_0start_1params_2locals,
|
|
164
|
+
vm_call_iseq_setup_normal_0start_1params_3locals,
|
|
165
|
+
vm_call_iseq_setup_normal_0start_1params_4locals,
|
|
166
|
+
vm_call_iseq_setup_normal_0start_1params_5locals},
|
|
167
|
+
{vm_call_iseq_setup_normal_0start_2params_0locals,
|
|
168
|
+
vm_call_iseq_setup_normal_0start_2params_1locals,
|
|
169
|
+
vm_call_iseq_setup_normal_0start_2params_2locals,
|
|
170
|
+
vm_call_iseq_setup_normal_0start_2params_3locals,
|
|
171
|
+
vm_call_iseq_setup_normal_0start_2params_4locals,
|
|
172
|
+
vm_call_iseq_setup_normal_0start_2params_5locals},
|
|
173
|
+
{vm_call_iseq_setup_normal_0start_3params_0locals,
|
|
174
|
+
vm_call_iseq_setup_normal_0start_3params_1locals,
|
|
175
|
+
vm_call_iseq_setup_normal_0start_3params_2locals,
|
|
176
|
+
vm_call_iseq_setup_normal_0start_3params_3locals,
|
|
177
|
+
vm_call_iseq_setup_normal_0start_3params_4locals,
|
|
178
|
+
vm_call_iseq_setup_normal_0start_3params_5locals}
|
|
179
|
+
};
|
|
180
|
+
|
|
181
|
+
static inline vm_call_handler
|
|
182
|
+
vm_call_iseq_setup_func(const struct rb_call_info *ci, const int param_size, const int local_size)
|
|
183
|
+
{
|
|
184
|
+
if (UNLIKELY(ci->flag & VM_CALL_TAILCALL)) {
|
|
185
|
+
return &vm_call_iseq_setup_tailcall_0start;
|
|
186
|
+
}
|
|
187
|
+
else if (0) { /* to disable optimize */
|
|
188
|
+
return &vm_call_iseq_setup_normal_0start;
|
|
189
|
+
}
|
|
190
|
+
else {
|
|
191
|
+
if (param_size <= 3 &&
|
|
192
|
+
local_size <= 5) {
|
|
193
|
+
VM_ASSERT(local_size >= 0);
|
|
194
|
+
return vm_call_iseq_handlers[param_size][local_size];
|
|
195
|
+
}
|
|
196
|
+
return &vm_call_iseq_setup_normal_0start;
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
#else
|
|
201
|
+
|
|
202
|
+
|
|
203
|
+
static inline vm_call_handler
|
|
204
|
+
vm_call_iseq_setup_func(const struct rb_call_info *ci, struct rb_call_cache *cc)
|
|
205
|
+
{
|
|
206
|
+
if (UNLIKELY(ci->flag & VM_CALL_TAILCALL)) {
|
|
207
|
+
return &vm_call_iseq_setup_tailcall_0start;
|
|
208
|
+
}
|
|
209
|
+
else {
|
|
210
|
+
return &vm_call_iseq_setup_normal_0start;
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
#endif
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
vm_core.h -
|
|
4
4
|
|
|
5
|
-
$Author:
|
|
5
|
+
$Author: ko1 $
|
|
6
6
|
created at: 04/01/01 19:41:38 JST
|
|
7
7
|
|
|
8
8
|
Copyright (C) 2004-2007 Koichi Sasada
|
|
@@ -56,11 +56,20 @@
|
|
|
56
56
|
|
|
57
57
|
#define RUBY_VM_THREAD_MODEL 2
|
|
58
58
|
|
|
59
|
+
/*
|
|
60
|
+
* implementation selector of get_insn_info algorithm
|
|
61
|
+
* 0: linear search
|
|
62
|
+
* 1: binary search
|
|
63
|
+
* 2: succinct bitvector
|
|
64
|
+
*/
|
|
65
|
+
#ifndef VM_INSN_INFO_TABLE_IMPL
|
|
66
|
+
# define VM_INSN_INFO_TABLE_IMPL 2
|
|
67
|
+
#endif
|
|
68
|
+
|
|
59
69
|
#include "ruby/ruby.h"
|
|
60
70
|
#include "ruby/st.h"
|
|
61
71
|
|
|
62
72
|
#include "node.h"
|
|
63
|
-
#include "vm_debug.h"
|
|
64
73
|
#include "vm_opts.h"
|
|
65
74
|
#include "id.h"
|
|
66
75
|
#include "method.h"
|
|
@@ -74,28 +83,43 @@
|
|
|
74
83
|
#include "thread_pthread.h"
|
|
75
84
|
#endif
|
|
76
85
|
|
|
77
|
-
#ifndef ENABLE_VM_OBJSPACE
|
|
78
|
-
#ifdef _WIN32
|
|
79
|
-
/*
|
|
80
|
-
* TODO: object space independent st_table.
|
|
81
|
-
* socklist and conlist will be freed exit_handler(), after object
|
|
82
|
-
* space destruction.
|
|
83
|
-
*/
|
|
84
|
-
#define ENABLE_VM_OBJSPACE 0
|
|
85
|
-
#else
|
|
86
|
-
#define ENABLE_VM_OBJSPACE 1
|
|
87
|
-
#endif
|
|
88
|
-
#endif
|
|
89
|
-
|
|
90
86
|
#include <setjmp.h>
|
|
91
87
|
#include <signal.h>
|
|
92
88
|
|
|
93
|
-
#
|
|
94
|
-
#
|
|
89
|
+
#if defined(NSIG_MAX) /* POSIX issue 8 */
|
|
90
|
+
# undef NSIG
|
|
91
|
+
# define NSIG NSIG_MAX
|
|
92
|
+
#elif defined(_SIG_MAXSIG) /* FreeBSD */
|
|
93
|
+
# undef NSIG
|
|
94
|
+
# define NSIG _SIG_MAXSIG
|
|
95
|
+
#elif defined(_SIGMAX) /* QNX */
|
|
96
|
+
# define NSIG (_SIGMAX + 1)
|
|
97
|
+
#elif defined(NSIG) /* 99% of everything else */
|
|
98
|
+
# /* take it */
|
|
99
|
+
#else /* Last resort */
|
|
100
|
+
# define NSIG (sizeof(sigset_t) * CHAR_BIT + 1)
|
|
95
101
|
#endif
|
|
96
102
|
|
|
97
103
|
#define RUBY_NSIG NSIG
|
|
98
104
|
|
|
105
|
+
#if defined(SIGCLD)
|
|
106
|
+
# define RUBY_SIGCHLD (SIGCLD)
|
|
107
|
+
#elif defined(SIGCHLD)
|
|
108
|
+
# define RUBY_SIGCHLD (SIGCHLD)
|
|
109
|
+
#else
|
|
110
|
+
# define RUBY_SIGCHLD (0)
|
|
111
|
+
#endif
|
|
112
|
+
|
|
113
|
+
/* platforms with broken or non-existent SIGCHLD work by polling */
|
|
114
|
+
#if defined(__APPLE__)
|
|
115
|
+
# define SIGCHLD_LOSSY (1)
|
|
116
|
+
#else
|
|
117
|
+
# define SIGCHLD_LOSSY (0)
|
|
118
|
+
#endif
|
|
119
|
+
|
|
120
|
+
/* define to 0 to test old code path */
|
|
121
|
+
#define WAITPID_USE_SIGCHLD (RUBY_SIGCHLD || SIGCHLD_LOSSY)
|
|
122
|
+
|
|
99
123
|
#ifdef HAVE_STDARG_PROTOTYPES
|
|
100
124
|
#include <stdarg.h>
|
|
101
125
|
#define va_init_list(a,b) va_start((a),(b))
|
|
@@ -105,7 +129,15 @@
|
|
|
105
129
|
#endif
|
|
106
130
|
|
|
107
131
|
#if defined(SIGSEGV) && defined(HAVE_SIGALTSTACK) && defined(SA_SIGINFO) && !defined(__NetBSD__)
|
|
108
|
-
#define USE_SIGALTSTACK
|
|
132
|
+
# define USE_SIGALTSTACK
|
|
133
|
+
void *rb_register_sigaltstack(void);
|
|
134
|
+
# define RB_ALTSTACK_INIT(var) var = rb_register_sigaltstack()
|
|
135
|
+
# define RB_ALTSTACK_FREE(var) xfree(var)
|
|
136
|
+
# define RB_ALTSTACK(var) var
|
|
137
|
+
#else /* noop */
|
|
138
|
+
# define RB_ALTSTACK_INIT(var)
|
|
139
|
+
# define RB_ALTSTACK_FREE(var)
|
|
140
|
+
# define RB_ALTSTACK(var) (0)
|
|
109
141
|
#endif
|
|
110
142
|
|
|
111
143
|
/*****************/
|
|
@@ -132,10 +164,6 @@
|
|
|
132
164
|
#endif
|
|
133
165
|
#endif
|
|
134
166
|
|
|
135
|
-
#ifdef __native_client__
|
|
136
|
-
#undef OPT_DIRECT_THREADED_CODE
|
|
137
|
-
#endif
|
|
138
|
-
|
|
139
167
|
/* call threaded code */
|
|
140
168
|
#if OPT_CALL_THREADED_CODE
|
|
141
169
|
#if OPT_DIRECT_THREADED_CODE
|
|
@@ -146,7 +174,9 @@
|
|
|
146
174
|
#endif /* OPT_STACK_CACHING */
|
|
147
175
|
#endif /* OPT_CALL_THREADED_CODE */
|
|
148
176
|
|
|
177
|
+
void rb_vm_encoded_insn_data_table_init(void);
|
|
149
178
|
typedef unsigned long rb_num_t;
|
|
179
|
+
typedef signed long rb_snum_t;
|
|
150
180
|
|
|
151
181
|
enum ruby_tag_type {
|
|
152
182
|
RUBY_TAG_NONE = 0x0,
|
|
@@ -174,7 +204,6 @@ enum ruby_tag_type {
|
|
|
174
204
|
|
|
175
205
|
enum ruby_vm_throw_flags {
|
|
176
206
|
VM_THROW_NO_ESCAPE_FLAG = 0x8000,
|
|
177
|
-
VM_THROW_LEVEL_SHIFT = 16,
|
|
178
207
|
VM_THROW_STATE_MASK = 0xff
|
|
179
208
|
};
|
|
180
209
|
|
|
@@ -237,7 +266,8 @@ struct rb_calling_info {
|
|
|
237
266
|
};
|
|
238
267
|
|
|
239
268
|
struct rb_call_cache;
|
|
240
|
-
|
|
269
|
+
struct rb_execution_context_struct;
|
|
270
|
+
typedef VALUE (*vm_call_handler)(struct rb_execution_context_struct *ec, struct rb_control_frame_struct *cfp, struct rb_calling_info *calling, const struct rb_call_info *ci, struct rb_call_cache *cc);
|
|
241
271
|
|
|
242
272
|
struct rb_call_cache {
|
|
243
273
|
/* inline cache: keys */
|
|
@@ -268,6 +298,8 @@ typedef struct rb_iseq_location_struct {
|
|
|
268
298
|
VALUE base_label; /* String */
|
|
269
299
|
VALUE label; /* String */
|
|
270
300
|
VALUE first_lineno; /* TODO: may be unsigned short */
|
|
301
|
+
int node_id;
|
|
302
|
+
rb_code_location_t code_location;
|
|
271
303
|
} rb_iseq_location_t;
|
|
272
304
|
|
|
273
305
|
#define PATHOBJ_PATH 0
|
|
@@ -297,6 +329,9 @@ pathobj_realpath(VALUE pathobj)
|
|
|
297
329
|
}
|
|
298
330
|
}
|
|
299
331
|
|
|
332
|
+
/* Forward declarations */
|
|
333
|
+
struct rb_mjit_unit;
|
|
334
|
+
|
|
300
335
|
struct rb_iseq_constant_body {
|
|
301
336
|
enum iseq_type {
|
|
302
337
|
ISEQ_TYPE_TOP,
|
|
@@ -307,7 +342,7 @@ struct rb_iseq_constant_body {
|
|
|
307
342
|
ISEQ_TYPE_ENSURE,
|
|
308
343
|
ISEQ_TYPE_EVAL,
|
|
309
344
|
ISEQ_TYPE_MAIN,
|
|
310
|
-
|
|
345
|
+
ISEQ_TYPE_PLAIN
|
|
311
346
|
} type; /* instruction sequence type */
|
|
312
347
|
|
|
313
348
|
unsigned int iseq_size;
|
|
@@ -386,7 +421,14 @@ struct rb_iseq_constant_body {
|
|
|
386
421
|
rb_iseq_location_t location;
|
|
387
422
|
|
|
388
423
|
/* insn info, must be freed */
|
|
389
|
-
|
|
424
|
+
struct iseq_insn_info {
|
|
425
|
+
const struct iseq_insn_info_entry *body;
|
|
426
|
+
unsigned int *positions;
|
|
427
|
+
unsigned int size;
|
|
428
|
+
#if VM_INSN_INFO_TABLE_IMPL == 2
|
|
429
|
+
struct succ_index_table *succ_index_table;
|
|
430
|
+
#endif
|
|
431
|
+
} insns_info;
|
|
390
432
|
|
|
391
433
|
const ID *local_table; /* must free */
|
|
392
434
|
|
|
@@ -403,24 +445,38 @@ struct rb_iseq_constant_body {
|
|
|
403
445
|
* So that:
|
|
404
446
|
* struct rb_call_info_with_kwarg *cikw_entries = &body->ci_entries[ci_size];
|
|
405
447
|
*/
|
|
406
|
-
struct rb_call_cache *cc_entries; /* size is ci_size
|
|
448
|
+
struct rb_call_cache *cc_entries; /* size is ci_size + ci_kw_size */
|
|
407
449
|
|
|
408
|
-
|
|
450
|
+
struct {
|
|
451
|
+
rb_snum_t flip_count;
|
|
452
|
+
VALUE coverage;
|
|
453
|
+
VALUE pc2branchindex;
|
|
454
|
+
VALUE *original_iseq;
|
|
455
|
+
} variable;
|
|
409
456
|
|
|
410
457
|
unsigned int local_table_size;
|
|
411
458
|
unsigned int is_size;
|
|
412
459
|
unsigned int ci_size;
|
|
413
460
|
unsigned int ci_kw_size;
|
|
414
|
-
unsigned int line_info_size;
|
|
415
461
|
unsigned int stack_max; /* for stack overflow check */
|
|
462
|
+
|
|
463
|
+
#if USE_MJIT
|
|
464
|
+
/* The following fields are MJIT related info. */
|
|
465
|
+
VALUE (*jit_func)(struct rb_execution_context_struct *,
|
|
466
|
+
struct rb_control_frame_struct *); /* function pointer for loaded native code */
|
|
467
|
+
long unsigned total_calls; /* number of total calls with `mjit_exec()` */
|
|
468
|
+
struct rb_mjit_unit *jit_unit;
|
|
469
|
+
#endif
|
|
470
|
+
char catch_except_p; /* If a frame of this ISeq may catch exception, set TRUE */
|
|
416
471
|
};
|
|
417
472
|
|
|
418
473
|
/* T_IMEMO/iseq */
|
|
419
474
|
/* typedef rb_iseq_t is in method.h */
|
|
420
475
|
struct rb_iseq_struct {
|
|
421
|
-
VALUE flags;
|
|
422
|
-
VALUE
|
|
423
|
-
|
|
476
|
+
VALUE flags; /* 1 */
|
|
477
|
+
VALUE wrapper; /* 2 */
|
|
478
|
+
|
|
479
|
+
struct rb_iseq_constant_body *body; /* 3 */
|
|
424
480
|
|
|
425
481
|
union { /* 4, 5 words */
|
|
426
482
|
struct iseq_compile_data *compile_data; /* used at compile time */
|
|
@@ -429,6 +485,11 @@ struct rb_iseq_struct {
|
|
|
429
485
|
VALUE obj;
|
|
430
486
|
int index;
|
|
431
487
|
} loader;
|
|
488
|
+
|
|
489
|
+
struct {
|
|
490
|
+
struct rb_hook_list_struct *local_hooks;
|
|
491
|
+
rb_event_flag_t global_trace_events;
|
|
492
|
+
} exec;
|
|
432
493
|
} aux;
|
|
433
494
|
};
|
|
434
495
|
|
|
@@ -451,6 +512,15 @@ rb_iseq_check(const rb_iseq_t *iseq)
|
|
|
451
512
|
return iseq;
|
|
452
513
|
}
|
|
453
514
|
|
|
515
|
+
static inline const rb_iseq_t *
|
|
516
|
+
def_iseq_ptr(rb_method_definition_t *def)
|
|
517
|
+
{
|
|
518
|
+
#if VM_CHECK_MODE > 0
|
|
519
|
+
if (def->type != VM_METHOD_TYPE_ISEQ) rb_bug("def_iseq_ptr: not iseq (%d)", def->type);
|
|
520
|
+
#endif
|
|
521
|
+
return rb_iseq_check(def->body.iseq.iseqptr);
|
|
522
|
+
}
|
|
523
|
+
|
|
454
524
|
enum ruby_special_exceptions {
|
|
455
525
|
ruby_error_reenter,
|
|
456
526
|
ruby_error_nomemory,
|
|
@@ -486,6 +556,9 @@ enum ruby_basic_operators {
|
|
|
486
556
|
BOP_UMINUS,
|
|
487
557
|
BOP_MAX,
|
|
488
558
|
BOP_MIN,
|
|
559
|
+
BOP_CALL,
|
|
560
|
+
BOP_AND,
|
|
561
|
+
BOP_OR,
|
|
489
562
|
|
|
490
563
|
BOP_LAST_
|
|
491
564
|
};
|
|
@@ -508,28 +581,39 @@ void rb_objspace_free(struct rb_objspace *);
|
|
|
508
581
|
typedef struct rb_hook_list_struct {
|
|
509
582
|
struct rb_event_hook_struct *hooks;
|
|
510
583
|
rb_event_flag_t events;
|
|
511
|
-
int need_clean;
|
|
584
|
+
unsigned int need_clean;
|
|
585
|
+
unsigned int running;
|
|
512
586
|
} rb_hook_list_t;
|
|
513
587
|
|
|
514
588
|
typedef struct rb_vm_struct {
|
|
515
589
|
VALUE self;
|
|
516
590
|
|
|
517
591
|
rb_global_vm_lock_t gvl;
|
|
518
|
-
rb_nativethread_lock_t thread_destruct_lock;
|
|
519
592
|
|
|
520
593
|
struct rb_thread_struct *main_thread;
|
|
521
|
-
struct rb_thread_struct *running_thread;
|
|
522
594
|
|
|
595
|
+
/* persists across uncontended GVL release/acquire for time slice */
|
|
596
|
+
const struct rb_thread_struct *running_thread;
|
|
597
|
+
|
|
598
|
+
#ifdef USE_SIGALTSTACK
|
|
599
|
+
void *main_altstack;
|
|
600
|
+
#endif
|
|
601
|
+
|
|
602
|
+
rb_serial_t fork_gen;
|
|
603
|
+
rb_nativethread_lock_t waitpid_lock;
|
|
604
|
+
struct list_head waiting_pids; /* PID > 0: <=> struct waitpid_state */
|
|
605
|
+
struct list_head waiting_grps; /* PID <= 0: <=> struct waitpid_state */
|
|
523
606
|
struct list_head waiting_fds; /* <=> struct waiting_fd */
|
|
524
607
|
struct list_head living_threads;
|
|
525
|
-
size_t living_thread_num;
|
|
526
608
|
VALUE thgroup_default;
|
|
609
|
+
int living_thread_num;
|
|
527
610
|
|
|
528
611
|
unsigned int running: 1;
|
|
529
612
|
unsigned int thread_abort_on_exception: 1;
|
|
530
613
|
unsigned int thread_report_on_exception: 1;
|
|
531
|
-
|
|
532
|
-
|
|
614
|
+
|
|
615
|
+
unsigned int safe_level_: 1;
|
|
616
|
+
int sleeper;
|
|
533
617
|
|
|
534
618
|
/* object management */
|
|
535
619
|
VALUE mark_object_ary;
|
|
@@ -553,17 +637,21 @@ typedef struct rb_vm_struct {
|
|
|
553
637
|
} trap_list;
|
|
554
638
|
|
|
555
639
|
/* hook */
|
|
556
|
-
rb_hook_list_t
|
|
640
|
+
rb_hook_list_t global_hooks;
|
|
557
641
|
|
|
558
642
|
/* relation table of ensure - rollback for callcc */
|
|
559
643
|
struct st_table *ensure_rollback_table;
|
|
560
644
|
|
|
561
|
-
/* postponed_job */
|
|
645
|
+
/* postponed_job (async-signal-safe, NOT thread-safe) */
|
|
562
646
|
struct rb_postponed_job_struct *postponed_job_buffer;
|
|
563
647
|
int postponed_job_index;
|
|
564
648
|
|
|
565
649
|
int src_encoding_index;
|
|
566
650
|
|
|
651
|
+
/* workqueue (thread-safe, NOT async-signal-safe) */
|
|
652
|
+
struct list_head workqueue; /* <=> rb_workqueue_job.jnode */
|
|
653
|
+
rb_nativethread_lock_t workqueue_lock;
|
|
654
|
+
|
|
567
655
|
VALUE verbose, debug, orig_progname, progname;
|
|
568
656
|
VALUE coverages;
|
|
569
657
|
int coverage_mode;
|
|
@@ -600,7 +688,11 @@ typedef struct rb_vm_struct {
|
|
|
600
688
|
#define RUBY_VM_FIBER_VM_STACK_SIZE ( 16 * 1024 * sizeof(VALUE)) /* 64 KB or 128 KB */
|
|
601
689
|
#define RUBY_VM_FIBER_VM_STACK_SIZE_MIN ( 2 * 1024 * sizeof(VALUE)) /* 8 KB or 16 KB */
|
|
602
690
|
#define RUBY_VM_FIBER_MACHINE_STACK_SIZE ( 64 * 1024 * sizeof(VALUE)) /* 256 KB or 512 KB */
|
|
691
|
+
#if defined(__powerpc64__)
|
|
692
|
+
#define RUBY_VM_FIBER_MACHINE_STACK_SIZE_MIN ( 32 * 1024 * sizeof(VALUE)) /* 128 KB or 256 KB */
|
|
693
|
+
#else
|
|
603
694
|
#define RUBY_VM_FIBER_MACHINE_STACK_SIZE_MIN ( 16 * 1024 * sizeof(VALUE)) /* 64 KB or 128 KB */
|
|
695
|
+
#endif
|
|
604
696
|
|
|
605
697
|
/* optimize insn */
|
|
606
698
|
#define INTEGER_REDEFINED_OP_FLAG (1 << 0)
|
|
@@ -615,6 +707,7 @@ typedef struct rb_vm_struct {
|
|
|
615
707
|
#define NIL_REDEFINED_OP_FLAG (1 << 9)
|
|
616
708
|
#define TRUE_REDEFINED_OP_FLAG (1 << 10)
|
|
617
709
|
#define FALSE_REDEFINED_OP_FLAG (1 << 11)
|
|
710
|
+
#define PROC_REDEFINED_OP_FLAG (1 << 12)
|
|
618
711
|
|
|
619
712
|
#define BASIC_OP_UNREDEFINED_P(op, klass) (LIKELY((GET_VM()->redefined_flag[(op)]&(klass)) == 0))
|
|
620
713
|
|
|
@@ -666,9 +759,10 @@ typedef struct rb_control_frame_struct {
|
|
|
666
759
|
VALUE self; /* cfp[3] / block[0] */
|
|
667
760
|
const VALUE *ep; /* cfp[4] / block[1] */
|
|
668
761
|
const void *block_code; /* cfp[5] / block[2] */ /* iseq or ifunc */
|
|
762
|
+
const VALUE *bp; /* cfp[6] */
|
|
669
763
|
|
|
670
764
|
#if VM_DEBUG_BP_CHECK
|
|
671
|
-
VALUE *bp_check; /* cfp[
|
|
765
|
+
VALUE *bp_check; /* cfp[7] */
|
|
672
766
|
#endif
|
|
673
767
|
} rb_control_frame_t;
|
|
674
768
|
|
|
@@ -690,7 +784,7 @@ enum rb_thread_status {
|
|
|
690
784
|
typedef RUBY_JMP_BUF rb_jmpbuf_t;
|
|
691
785
|
|
|
692
786
|
/*
|
|
693
|
-
the members which are written in
|
|
787
|
+
the members which are written in EC_PUSH_TAG() should be placed at
|
|
694
788
|
the beginning and the end, so that entire region is accessible.
|
|
695
789
|
*/
|
|
696
790
|
struct rb_vm_tag {
|
|
@@ -745,11 +839,13 @@ typedef struct rb_execution_context_struct {
|
|
|
745
839
|
|
|
746
840
|
struct rb_vm_tag *tag;
|
|
747
841
|
struct rb_vm_protect_tag *protect_tag;
|
|
748
|
-
int safe_level;
|
|
749
|
-
int raised_flag;
|
|
750
842
|
|
|
751
|
-
/*
|
|
752
|
-
|
|
843
|
+
/* interrupt flags */
|
|
844
|
+
rb_atomic_t interrupt_flag;
|
|
845
|
+
rb_atomic_t interrupt_mask; /* size should match flag */
|
|
846
|
+
|
|
847
|
+
rb_fiber_t *fiber_ptr;
|
|
848
|
+
struct rb_thread_struct *thread_ptr;
|
|
753
849
|
|
|
754
850
|
/* storage (ec (fiber) local) */
|
|
755
851
|
st_table *local_storage;
|
|
@@ -760,13 +856,22 @@ typedef struct rb_execution_context_struct {
|
|
|
760
856
|
const VALUE *root_lep;
|
|
761
857
|
VALUE root_svar;
|
|
762
858
|
|
|
859
|
+
/* ensure & callcc */
|
|
860
|
+
rb_ensure_list_t *ensure_list;
|
|
861
|
+
|
|
763
862
|
/* trace information */
|
|
764
863
|
struct rb_trace_arg_struct *trace_arg;
|
|
765
864
|
|
|
766
|
-
/*
|
|
767
|
-
|
|
865
|
+
/* temporary places */
|
|
866
|
+
VALUE errinfo;
|
|
867
|
+
VALUE passed_block_handler; /* for rb_iterate */
|
|
768
868
|
|
|
769
|
-
|
|
869
|
+
uint8_t raised_flag; /* only 3 bits needed */
|
|
870
|
+
|
|
871
|
+
/* n.b. only 7 bits needed, really: */
|
|
872
|
+
BITFIELD(enum method_missing_reason, method_missing_reason, 8);
|
|
873
|
+
|
|
874
|
+
VALUE private_const_reference;
|
|
770
875
|
|
|
771
876
|
/* for GC */
|
|
772
877
|
struct {
|
|
@@ -778,25 +883,21 @@ typedef struct rb_execution_context_struct {
|
|
|
778
883
|
VALUE *register_stack_end;
|
|
779
884
|
size_t register_stack_maxsize;
|
|
780
885
|
#endif
|
|
781
|
-
jmp_buf regs;
|
|
886
|
+
RUBY_ALIGNAS(SIZEOF_VALUE) jmp_buf regs;
|
|
782
887
|
} machine;
|
|
783
888
|
} rb_execution_context_t;
|
|
784
889
|
|
|
890
|
+
void rb_ec_set_vm_stack(rb_execution_context_t *ec, VALUE *stack, size_t size);
|
|
891
|
+
|
|
785
892
|
typedef struct rb_thread_struct {
|
|
786
893
|
struct list_node vmlt_node;
|
|
787
894
|
VALUE self;
|
|
788
895
|
rb_vm_t *vm;
|
|
789
896
|
|
|
790
|
-
rb_execution_context_t ec;
|
|
897
|
+
rb_execution_context_t *ec;
|
|
791
898
|
|
|
792
899
|
VALUE last_status; /* $? */
|
|
793
900
|
|
|
794
|
-
/* for rb_iterate */
|
|
795
|
-
VALUE passed_block_handler;
|
|
796
|
-
|
|
797
|
-
/* for bmethod */
|
|
798
|
-
const rb_callable_method_entry_t *passed_bmethod_me;
|
|
799
|
-
|
|
800
901
|
/* for cfunc */
|
|
801
902
|
struct rb_calling_info *calling;
|
|
802
903
|
|
|
@@ -809,9 +910,14 @@ typedef struct rb_thread_struct {
|
|
|
809
910
|
#ifdef NON_SCALAR_THREAD_ID
|
|
810
911
|
rb_thread_id_string_t thread_id_string;
|
|
811
912
|
#endif
|
|
812
|
-
enum rb_thread_status status;
|
|
813
|
-
|
|
814
|
-
int
|
|
913
|
+
BITFIELD(enum rb_thread_status, status, 2);
|
|
914
|
+
/* bit flags */
|
|
915
|
+
unsigned int to_kill : 1;
|
|
916
|
+
unsigned int abort_on_exception: 1;
|
|
917
|
+
unsigned int report_on_exception: 1;
|
|
918
|
+
unsigned int pending_interrupt_queue_checked: 1;
|
|
919
|
+
int8_t priority; /* -3 .. 3 (RUBY_THREAD_PRIORITY_{MIN,MAX}) */
|
|
920
|
+
uint32_t running_time_us; /* 12500..800000 */
|
|
815
921
|
|
|
816
922
|
native_thread_data_t native_thread_data;
|
|
817
923
|
void *blocking_region_buffer;
|
|
@@ -827,10 +933,8 @@ typedef struct rb_thread_struct {
|
|
|
827
933
|
/* async errinfo queue */
|
|
828
934
|
VALUE pending_interrupt_queue;
|
|
829
935
|
VALUE pending_interrupt_mask_stack;
|
|
830
|
-
int pending_interrupt_queue_checked;
|
|
831
936
|
|
|
832
|
-
|
|
833
|
-
unsigned long interrupt_mask;
|
|
937
|
+
/* interrupt management */
|
|
834
938
|
rb_nativethread_lock_t interrupt_lock;
|
|
835
939
|
struct rb_unblock_callback unblock;
|
|
836
940
|
VALUE locking_mutex;
|
|
@@ -838,29 +942,33 @@ typedef struct rb_thread_struct {
|
|
|
838
942
|
|
|
839
943
|
rb_thread_list_t *join_list;
|
|
840
944
|
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
945
|
+
union {
|
|
946
|
+
struct {
|
|
947
|
+
VALUE proc;
|
|
948
|
+
VALUE args;
|
|
949
|
+
} proc;
|
|
950
|
+
struct {
|
|
951
|
+
VALUE (*func)(ANYARGS);
|
|
952
|
+
void *arg;
|
|
953
|
+
} func;
|
|
954
|
+
} invoke_arg;
|
|
955
|
+
|
|
956
|
+
enum {
|
|
957
|
+
thread_invoke_type_none = 0,
|
|
958
|
+
thread_invoke_type_proc,
|
|
959
|
+
thread_invoke_type_func
|
|
960
|
+
} invoke_type;
|
|
844
961
|
|
|
845
962
|
/* statistics data for profiler */
|
|
846
963
|
VALUE stat_insn_usage;
|
|
847
964
|
|
|
848
|
-
/* tracer */
|
|
849
|
-
rb_hook_list_t event_hooks;
|
|
850
|
-
|
|
851
965
|
/* fiber */
|
|
852
966
|
rb_fiber_t *root_fiber;
|
|
853
967
|
rb_jmpbuf_t root_jmpbuf;
|
|
854
968
|
|
|
855
969
|
/* misc */
|
|
856
|
-
enum method_missing_reason method_missing_reason: 8;
|
|
857
|
-
unsigned int abort_on_exception: 1;
|
|
858
|
-
unsigned int report_on_exception: 1;
|
|
859
|
-
#ifdef USE_SIGALTSTACK
|
|
860
|
-
void *altstack;
|
|
861
|
-
#endif
|
|
862
|
-
uint32_t running_time_us; /* 12500..800000 */
|
|
863
970
|
VALUE name;
|
|
971
|
+
|
|
864
972
|
} rb_thread_t;
|
|
865
973
|
|
|
866
974
|
typedef enum {
|
|
@@ -882,11 +990,13 @@ typedef enum {
|
|
|
882
990
|
RUBY_SYMBOL_EXPORT_BEGIN
|
|
883
991
|
|
|
884
992
|
/* node -> iseq */
|
|
885
|
-
rb_iseq_t *rb_iseq_new (
|
|
886
|
-
rb_iseq_t *rb_iseq_new_top (
|
|
887
|
-
rb_iseq_t *rb_iseq_new_main (
|
|
888
|
-
rb_iseq_t *rb_iseq_new_with_opt(
|
|
993
|
+
rb_iseq_t *rb_iseq_new (const rb_ast_body_t *ast, VALUE name, VALUE path, VALUE realpath, const rb_iseq_t *parent, enum iseq_type);
|
|
994
|
+
rb_iseq_t *rb_iseq_new_top (const rb_ast_body_t *ast, VALUE name, VALUE path, VALUE realpath, const rb_iseq_t *parent);
|
|
995
|
+
rb_iseq_t *rb_iseq_new_main (const rb_ast_body_t *ast, VALUE path, VALUE realpath, const rb_iseq_t *parent);
|
|
996
|
+
rb_iseq_t *rb_iseq_new_with_opt(const rb_ast_body_t *ast, VALUE name, VALUE path, VALUE realpath, VALUE first_lineno,
|
|
889
997
|
const rb_iseq_t *parent, enum iseq_type, const rb_compile_option_t*);
|
|
998
|
+
rb_iseq_t *rb_iseq_new_ifunc(const struct vm_ifunc *ifunc, VALUE name, VALUE path, VALUE realpath, VALUE first_lineno,
|
|
999
|
+
const rb_iseq_t *parent, enum iseq_type, const rb_compile_option_t*);
|
|
890
1000
|
|
|
891
1001
|
/* src -> iseq */
|
|
892
1002
|
rb_iseq_t *rb_iseq_compile(VALUE src, VALUE file, VALUE line);
|
|
@@ -909,9 +1019,8 @@ RUBY_SYMBOL_EXPORT_END
|
|
|
909
1019
|
|
|
910
1020
|
typedef struct {
|
|
911
1021
|
const struct rb_block block;
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
int8_t is_lambda; /* bool */
|
|
1022
|
+
unsigned int is_from_method: 1; /* bool */
|
|
1023
|
+
unsigned int is_lambda: 1; /* bool */
|
|
915
1024
|
} rb_proc_t;
|
|
916
1025
|
|
|
917
1026
|
typedef struct {
|
|
@@ -955,6 +1064,7 @@ enum vm_call_flag_bits {
|
|
|
955
1064
|
VM_CALL_KW_SPLAT_bit, /* m(**opts) */
|
|
956
1065
|
VM_CALL_TAILCALL_bit, /* located at tail position */
|
|
957
1066
|
VM_CALL_SUPER_bit, /* super */
|
|
1067
|
+
VM_CALL_ZSUPER_bit, /* zsuper */
|
|
958
1068
|
VM_CALL_OPT_SEND_bit, /* internal flag */
|
|
959
1069
|
VM_CALL__END
|
|
960
1070
|
};
|
|
@@ -969,6 +1079,7 @@ enum vm_call_flag_bits {
|
|
|
969
1079
|
#define VM_CALL_KW_SPLAT (0x01 << VM_CALL_KW_SPLAT_bit)
|
|
970
1080
|
#define VM_CALL_TAILCALL (0x01 << VM_CALL_TAILCALL_bit)
|
|
971
1081
|
#define VM_CALL_SUPER (0x01 << VM_CALL_SUPER_bit)
|
|
1082
|
+
#define VM_CALL_ZSUPER (0x01 << VM_CALL_ZSUPER_bit)
|
|
972
1083
|
#define VM_CALL_OPT_SEND (0x01 << VM_CALL_OPT_SEND_bit)
|
|
973
1084
|
|
|
974
1085
|
enum vm_special_object_type {
|
|
@@ -987,6 +1098,7 @@ enum vm_svar_index {
|
|
|
987
1098
|
|
|
988
1099
|
/* inline cache */
|
|
989
1100
|
typedef struct iseq_inline_cache_entry *IC;
|
|
1101
|
+
typedef union iseq_inline_storage_entry *ISE;
|
|
990
1102
|
typedef struct rb_call_info *CALL_INFO;
|
|
991
1103
|
typedef struct rb_call_cache *CALL_CACHE;
|
|
992
1104
|
|
|
@@ -999,7 +1111,7 @@ typedef VALUE CDHASH;
|
|
|
999
1111
|
#endif
|
|
1000
1112
|
|
|
1001
1113
|
typedef rb_control_frame_t *
|
|
1002
|
-
(FUNC_FASTCALL(*rb_insn_func_t))(
|
|
1114
|
+
(FUNC_FASTCALL(*rb_insn_func_t))(rb_execution_context_t *, rb_control_frame_t *);
|
|
1003
1115
|
|
|
1004
1116
|
#define VM_TAGGED_PTR_SET(p, tag) ((VALUE)(p) | (tag))
|
|
1005
1117
|
#define VM_TAGGED_PTR_REF(v, mask) ((void *)((v) & ~mask))
|
|
@@ -1015,7 +1127,7 @@ enum {
|
|
|
1015
1127
|
* X : tag for GC marking (It seems as Fixnum)
|
|
1016
1128
|
* EEE : 3 bits Env flags
|
|
1017
1129
|
* FF..: 6 bits Frame flags
|
|
1018
|
-
* MM..:
|
|
1130
|
+
* MM..: 15 bits frame magic (to check frame corruption)
|
|
1019
1131
|
*/
|
|
1020
1132
|
|
|
1021
1133
|
/* frame types */
|
|
@@ -1026,10 +1138,10 @@ enum {
|
|
|
1026
1138
|
VM_FRAME_MAGIC_CFUNC = 0x55550001,
|
|
1027
1139
|
VM_FRAME_MAGIC_IFUNC = 0x66660001,
|
|
1028
1140
|
VM_FRAME_MAGIC_EVAL = 0x77770001,
|
|
1029
|
-
VM_FRAME_MAGIC_RESCUE =
|
|
1030
|
-
VM_FRAME_MAGIC_DUMMY =
|
|
1141
|
+
VM_FRAME_MAGIC_RESCUE = 0x78880001,
|
|
1142
|
+
VM_FRAME_MAGIC_DUMMY = 0x79990001,
|
|
1031
1143
|
|
|
1032
|
-
VM_FRAME_MAGIC_MASK =
|
|
1144
|
+
VM_FRAME_MAGIC_MASK = 0x7fff0001,
|
|
1033
1145
|
|
|
1034
1146
|
/* frame flag */
|
|
1035
1147
|
VM_FRAME_FLAG_PASSED = 0x0010,
|
|
@@ -1037,6 +1149,7 @@ enum {
|
|
|
1037
1149
|
VM_FRAME_FLAG_BMETHOD = 0x0040,
|
|
1038
1150
|
VM_FRAME_FLAG_CFRAME = 0x0080,
|
|
1039
1151
|
VM_FRAME_FLAG_LAMBDA = 0x0100,
|
|
1152
|
+
VM_FRAME_FLAG_MODIFIED_BLOCK_PARAM = 0x0200,
|
|
1040
1153
|
|
|
1041
1154
|
/* env flag */
|
|
1042
1155
|
VM_ENV_FLAG_LOCAL = 0x0002,
|
|
@@ -1050,7 +1163,6 @@ enum {
|
|
|
1050
1163
|
#define VM_ENV_DATA_INDEX_SPECVAL (-1) /* ep[-1] */
|
|
1051
1164
|
#define VM_ENV_DATA_INDEX_FLAGS ( 0) /* ep[ 0] */
|
|
1052
1165
|
#define VM_ENV_DATA_INDEX_ENV ( 1) /* ep[ 1] */
|
|
1053
|
-
#define VM_ENV_DATA_INDEX_ENV_PROC ( 2) /* ep[ 2] */
|
|
1054
1166
|
|
|
1055
1167
|
#define VM_ENV_INDEX_LAST_LVAR (-VM_ENV_DATA_SIZE)
|
|
1056
1168
|
|
|
@@ -1189,16 +1301,6 @@ VM_ENV_ENVVAL_PTR(const VALUE *ep)
|
|
|
1189
1301
|
return (const rb_env_t *)VM_ENV_ENVVAL(ep);
|
|
1190
1302
|
}
|
|
1191
1303
|
|
|
1192
|
-
static inline VALUE
|
|
1193
|
-
VM_ENV_PROCVAL(const VALUE *ep)
|
|
1194
|
-
{
|
|
1195
|
-
VM_ASSERT(VM_ENV_ESCAPED_P(ep));
|
|
1196
|
-
VM_ASSERT(VM_ENV_LOCAL_P(ep));
|
|
1197
|
-
VM_ASSERT(VM_ENV_BLOCK_HANDLER(ep) != VM_BLOCK_HANDLER_NONE);
|
|
1198
|
-
|
|
1199
|
-
return ep[VM_ENV_DATA_INDEX_ENV_PROC];
|
|
1200
|
-
}
|
|
1201
|
-
|
|
1202
1304
|
static inline const rb_env_t *
|
|
1203
1305
|
vm_env_new(VALUE *env_ep, VALUE *env_body, unsigned int env_size, const rb_iseq_t *iseq)
|
|
1204
1306
|
{
|
|
@@ -1237,12 +1339,21 @@ VALUE rb_vm_frame_block_handler(const rb_control_frame_t *cfp);
|
|
|
1237
1339
|
|
|
1238
1340
|
#define RUBY_VM_PREVIOUS_CONTROL_FRAME(cfp) ((cfp)+1)
|
|
1239
1341
|
#define RUBY_VM_NEXT_CONTROL_FRAME(cfp) ((cfp)-1)
|
|
1240
|
-
|
|
1241
|
-
((rb_control_frame_t *)((th)->ec.vm_stack + (th)->ec.vm_stack_size))
|
|
1342
|
+
|
|
1242
1343
|
#define RUBY_VM_VALID_CONTROL_FRAME_P(cfp, ecfp) \
|
|
1243
1344
|
((void *)(ecfp) > (void *)(cfp))
|
|
1244
|
-
|
|
1245
|
-
|
|
1345
|
+
|
|
1346
|
+
static inline const rb_control_frame_t *
|
|
1347
|
+
RUBY_VM_END_CONTROL_FRAME(const rb_execution_context_t *ec)
|
|
1348
|
+
{
|
|
1349
|
+
return (rb_control_frame_t *)(ec->vm_stack + ec->vm_stack_size);
|
|
1350
|
+
}
|
|
1351
|
+
|
|
1352
|
+
static inline int
|
|
1353
|
+
RUBY_VM_CONTROL_FRAME_STACK_OVERFLOW_P(const rb_execution_context_t *ec, const rb_control_frame_t *cfp)
|
|
1354
|
+
{
|
|
1355
|
+
return !RUBY_VM_VALID_CONTROL_FRAME_P(cfp, RUBY_VM_END_CONTROL_FRAME(ec));
|
|
1356
|
+
}
|
|
1246
1357
|
|
|
1247
1358
|
static inline int
|
|
1248
1359
|
VM_BH_ISEQ_BLOCK_P(VALUE block_handler)
|
|
@@ -1462,16 +1573,17 @@ VM_BH_FROM_PROC(VALUE procval)
|
|
|
1462
1573
|
|
|
1463
1574
|
/* VM related object allocate functions */
|
|
1464
1575
|
VALUE rb_thread_alloc(VALUE klass);
|
|
1465
|
-
VALUE rb_proc_alloc(VALUE klass);
|
|
1466
1576
|
VALUE rb_binding_alloc(VALUE klass);
|
|
1577
|
+
VALUE rb_proc_alloc(VALUE klass);
|
|
1578
|
+
VALUE rb_proc_dup(VALUE self);
|
|
1467
1579
|
|
|
1468
1580
|
/* for debug */
|
|
1469
|
-
extern void rb_vmdebug_stack_dump_raw(
|
|
1470
|
-
extern void rb_vmdebug_debug_print_pre(
|
|
1471
|
-
extern void rb_vmdebug_debug_print_post(
|
|
1581
|
+
extern void rb_vmdebug_stack_dump_raw(const rb_execution_context_t *ec, const rb_control_frame_t *cfp);
|
|
1582
|
+
extern void rb_vmdebug_debug_print_pre(const rb_execution_context_t *ec, const rb_control_frame_t *cfp, const VALUE *_pc);
|
|
1583
|
+
extern void rb_vmdebug_debug_print_post(const rb_execution_context_t *ec, const rb_control_frame_t *cfp);
|
|
1472
1584
|
|
|
1473
|
-
#define SDR() rb_vmdebug_stack_dump_raw(
|
|
1474
|
-
#define SDR2(cfp) rb_vmdebug_stack_dump_raw(
|
|
1585
|
+
#define SDR() rb_vmdebug_stack_dump_raw(GET_EC(), GET_EC()->cfp)
|
|
1586
|
+
#define SDR2(cfp) rb_vmdebug_stack_dump_raw(GET_EC(), (cfp))
|
|
1475
1587
|
void rb_vm_bugreport(const void *);
|
|
1476
1588
|
NORETURN(void rb_bug_context(const void *, const char *fmt, ...));
|
|
1477
1589
|
|
|
@@ -1486,30 +1598,46 @@ RUBY_SYMBOL_EXPORT_END
|
|
|
1486
1598
|
VALUE rb_iseq_pathobj_new(VALUE path, VALUE realpath);
|
|
1487
1599
|
void rb_iseq_pathobj_set(const rb_iseq_t *iseq, VALUE path, VALUE realpath);
|
|
1488
1600
|
|
|
1489
|
-
int
|
|
1601
|
+
int rb_ec_frame_method_id_and_class(const rb_execution_context_t *ec, ID *idp, ID *called_idp, VALUE *klassp);
|
|
1602
|
+
void rb_ec_setup_exception(const rb_execution_context_t *ec, VALUE mesg, VALUE cause);
|
|
1490
1603
|
|
|
1491
|
-
VALUE rb_vm_invoke_proc(
|
|
1492
|
-
|
|
1493
|
-
VALUE
|
|
1494
|
-
|
|
1604
|
+
VALUE rb_vm_invoke_proc(rb_execution_context_t *ec, rb_proc_t *proc, int argc, const VALUE *argv, VALUE block_handler);
|
|
1605
|
+
|
|
1606
|
+
VALUE rb_vm_make_proc_lambda(const rb_execution_context_t *ec, const struct rb_captured_block *captured, VALUE klass, int8_t is_lambda);
|
|
1607
|
+
static inline VALUE
|
|
1608
|
+
rb_vm_make_proc(const rb_execution_context_t *ec, const struct rb_captured_block *captured, VALUE klass)
|
|
1609
|
+
{
|
|
1610
|
+
return rb_vm_make_proc_lambda(ec, captured, klass, 0);
|
|
1611
|
+
}
|
|
1612
|
+
|
|
1613
|
+
static inline VALUE
|
|
1614
|
+
rb_vm_make_lambda(const rb_execution_context_t *ec, const struct rb_captured_block *captured, VALUE klass)
|
|
1615
|
+
{
|
|
1616
|
+
return rb_vm_make_proc_lambda(ec, captured, klass, 1);
|
|
1617
|
+
}
|
|
1618
|
+
|
|
1619
|
+
VALUE rb_vm_make_binding(const rb_execution_context_t *ec, const rb_control_frame_t *src_cfp);
|
|
1495
1620
|
VALUE rb_vm_env_local_variables(const rb_env_t *env);
|
|
1496
1621
|
const rb_env_t *rb_vm_env_prev_env(const rb_env_t *env);
|
|
1497
1622
|
const VALUE *rb_binding_add_dynavars(VALUE bindval, rb_binding_t *bind, int dyncount, const ID *dynvars);
|
|
1498
1623
|
void rb_vm_inc_const_missing_count(void);
|
|
1499
1624
|
void rb_vm_gvl_destroy(rb_vm_t *vm);
|
|
1500
|
-
VALUE rb_vm_call(
|
|
1625
|
+
VALUE rb_vm_call(rb_execution_context_t *ec, VALUE recv, VALUE id, int argc,
|
|
1501
1626
|
const VALUE *argv, const rb_callable_method_entry_t *me);
|
|
1502
|
-
void rb_vm_pop_frame(
|
|
1627
|
+
MJIT_STATIC void rb_vm_pop_frame(rb_execution_context_t *ec);
|
|
1503
1628
|
|
|
1504
1629
|
void rb_thread_start_timer_thread(void);
|
|
1505
1630
|
void rb_thread_stop_timer_thread(void);
|
|
1506
1631
|
void rb_thread_reset_timer_thread(void);
|
|
1507
|
-
void rb_thread_wakeup_timer_thread(
|
|
1632
|
+
void rb_thread_wakeup_timer_thread(int);
|
|
1508
1633
|
|
|
1509
1634
|
static inline void
|
|
1510
1635
|
rb_vm_living_threads_init(rb_vm_t *vm)
|
|
1511
1636
|
{
|
|
1512
1637
|
list_head_init(&vm->waiting_fds);
|
|
1638
|
+
list_head_init(&vm->waiting_pids);
|
|
1639
|
+
list_head_init(&vm->workqueue);
|
|
1640
|
+
list_head_init(&vm->waiting_grps);
|
|
1513
1641
|
list_head_init(&vm->living_threads);
|
|
1514
1642
|
vm->living_thread_num = 0;
|
|
1515
1643
|
}
|
|
@@ -1529,14 +1657,15 @@ rb_vm_living_threads_remove(rb_vm_t *vm, rb_thread_t *th)
|
|
|
1529
1657
|
}
|
|
1530
1658
|
|
|
1531
1659
|
typedef int rb_backtrace_iter_func(void *, VALUE, int, VALUE);
|
|
1532
|
-
rb_control_frame_t *rb_vm_get_ruby_level_next_cfp(const
|
|
1533
|
-
rb_control_frame_t *rb_vm_get_binding_creatable_next_cfp(const
|
|
1660
|
+
rb_control_frame_t *rb_vm_get_ruby_level_next_cfp(const rb_execution_context_t *ec, const rb_control_frame_t *cfp);
|
|
1661
|
+
rb_control_frame_t *rb_vm_get_binding_creatable_next_cfp(const rb_execution_context_t *ec, const rb_control_frame_t *cfp);
|
|
1534
1662
|
int rb_vm_get_sourceline(const rb_control_frame_t *);
|
|
1535
1663
|
VALUE rb_name_err_mesg_new(VALUE mesg, VALUE recv, VALUE method);
|
|
1536
|
-
void rb_vm_stack_to_heap(
|
|
1664
|
+
void rb_vm_stack_to_heap(rb_execution_context_t *ec);
|
|
1537
1665
|
void ruby_thread_init_stack(rb_thread_t *th);
|
|
1538
1666
|
int rb_vm_control_frame_id_and_class(const rb_control_frame_t *cfp, ID *idp, ID *called_idp, VALUE *klassp);
|
|
1539
|
-
void rb_vm_rewind_cfp(
|
|
1667
|
+
void rb_vm_rewind_cfp(rb_execution_context_t *ec, rb_control_frame_t *cfp);
|
|
1668
|
+
MJIT_STATIC VALUE rb_vm_bh_to_procval(const rb_execution_context_t *ec, VALUE block_handler);
|
|
1540
1669
|
|
|
1541
1670
|
void rb_vm_register_special_exception_str(enum ruby_special_exceptions sp, VALUE exception_class, VALUE mesg);
|
|
1542
1671
|
|
|
@@ -1545,11 +1674,9 @@ void rb_vm_register_special_exception_str(enum ruby_special_exceptions sp, VALUE
|
|
|
1545
1674
|
|
|
1546
1675
|
void rb_gc_mark_machine_stack(const rb_execution_context_t *ec);
|
|
1547
1676
|
|
|
1548
|
-
int rb_autoloading_value(VALUE mod, ID id, VALUE* value);
|
|
1549
|
-
|
|
1550
1677
|
void rb_vm_rewrite_cref(rb_cref_t *node, VALUE old_klass, VALUE new_klass, rb_cref_t **new_cref_ptr);
|
|
1551
1678
|
|
|
1552
|
-
const rb_callable_method_entry_t *rb_vm_frame_method_entry(const rb_control_frame_t *cfp);
|
|
1679
|
+
MJIT_STATIC const rb_callable_method_entry_t *rb_vm_frame_method_entry(const rb_control_frame_t *cfp);
|
|
1553
1680
|
|
|
1554
1681
|
#define sysstack_error GET_VM()->special_exceptions[ruby_error_sysstack]
|
|
1555
1682
|
|
|
@@ -1570,21 +1697,76 @@ VALUE rb_catch_protect(VALUE t, rb_block_call_func *func, VALUE data, enum ruby_
|
|
|
1570
1697
|
/* for thread */
|
|
1571
1698
|
|
|
1572
1699
|
#if RUBY_VM_THREAD_MODEL == 2
|
|
1573
|
-
|
|
1574
|
-
extern rb_vm_t *ruby_current_vm;
|
|
1575
|
-
extern rb_event_flag_t ruby_vm_event_flags;
|
|
1700
|
+
RUBY_SYMBOL_EXPORT_BEGIN
|
|
1576
1701
|
|
|
1577
|
-
|
|
1578
|
-
|
|
1702
|
+
RUBY_EXTERN rb_vm_t *ruby_current_vm_ptr;
|
|
1703
|
+
RUBY_EXTERN rb_execution_context_t *ruby_current_execution_context_ptr;
|
|
1704
|
+
RUBY_EXTERN rb_event_flag_t ruby_vm_event_flags;
|
|
1705
|
+
RUBY_EXTERN rb_event_flag_t ruby_vm_event_enabled_global_flags;
|
|
1706
|
+
RUBY_EXTERN unsigned int ruby_vm_event_local_num;
|
|
1579
1707
|
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1708
|
+
RUBY_SYMBOL_EXPORT_END
|
|
1709
|
+
|
|
1710
|
+
#define GET_VM() rb_current_vm()
|
|
1711
|
+
#define GET_THREAD() rb_current_thread()
|
|
1712
|
+
#define GET_EC() rb_current_execution_context()
|
|
1713
|
+
|
|
1714
|
+
static inline rb_thread_t *
|
|
1715
|
+
rb_ec_thread_ptr(const rb_execution_context_t *ec)
|
|
1716
|
+
{
|
|
1717
|
+
return ec->thread_ptr;
|
|
1718
|
+
}
|
|
1719
|
+
|
|
1720
|
+
static inline rb_vm_t *
|
|
1721
|
+
rb_ec_vm_ptr(const rb_execution_context_t *ec)
|
|
1722
|
+
{
|
|
1723
|
+
const rb_thread_t *th = rb_ec_thread_ptr(ec);
|
|
1724
|
+
if (th) {
|
|
1725
|
+
return th->vm;
|
|
1726
|
+
}
|
|
1727
|
+
else {
|
|
1728
|
+
return NULL;
|
|
1729
|
+
}
|
|
1730
|
+
}
|
|
1731
|
+
|
|
1732
|
+
static inline rb_execution_context_t *
|
|
1733
|
+
rb_current_execution_context(void)
|
|
1734
|
+
{
|
|
1735
|
+
return ruby_current_execution_context_ptr;
|
|
1736
|
+
}
|
|
1737
|
+
|
|
1738
|
+
static inline rb_thread_t *
|
|
1739
|
+
rb_current_thread(void)
|
|
1740
|
+
{
|
|
1741
|
+
const rb_execution_context_t *ec = GET_EC();
|
|
1742
|
+
return rb_ec_thread_ptr(ec);
|
|
1743
|
+
}
|
|
1744
|
+
|
|
1745
|
+
static inline rb_vm_t *
|
|
1746
|
+
rb_current_vm(void)
|
|
1747
|
+
{
|
|
1748
|
+
VM_ASSERT(ruby_current_vm_ptr == NULL ||
|
|
1749
|
+
ruby_current_execution_context_ptr == NULL ||
|
|
1750
|
+
rb_ec_thread_ptr(GET_EC()) == NULL ||
|
|
1751
|
+
rb_ec_vm_ptr(GET_EC()) == ruby_current_vm_ptr);
|
|
1752
|
+
return ruby_current_vm_ptr;
|
|
1753
|
+
}
|
|
1754
|
+
|
|
1755
|
+
static inline void
|
|
1756
|
+
rb_thread_set_current_raw(const rb_thread_t *th)
|
|
1757
|
+
{
|
|
1758
|
+
ruby_current_execution_context_ptr = th->ec;
|
|
1759
|
+
}
|
|
1760
|
+
|
|
1761
|
+
static inline void
|
|
1762
|
+
rb_thread_set_current(rb_thread_t *th)
|
|
1763
|
+
{
|
|
1764
|
+
if (th->vm->running_thread != th) {
|
|
1765
|
+
th->running_time_us = 0;
|
|
1766
|
+
}
|
|
1767
|
+
rb_thread_set_current_raw(th);
|
|
1768
|
+
th->vm->running_thread = th;
|
|
1769
|
+
}
|
|
1588
1770
|
|
|
1589
1771
|
#else
|
|
1590
1772
|
#error "unsupported thread model"
|
|
@@ -1597,42 +1779,46 @@ enum {
|
|
|
1597
1779
|
TRAP_INTERRUPT_MASK = 0x08
|
|
1598
1780
|
};
|
|
1599
1781
|
|
|
1600
|
-
#define RUBY_VM_SET_TIMER_INTERRUPT(
|
|
1601
|
-
#define RUBY_VM_SET_INTERRUPT(
|
|
1602
|
-
#define RUBY_VM_SET_POSTPONED_JOB_INTERRUPT(
|
|
1603
|
-
#define RUBY_VM_SET_TRAP_INTERRUPT(
|
|
1604
|
-
#define RUBY_VM_INTERRUPTED(
|
|
1605
|
-
|
|
1782
|
+
#define RUBY_VM_SET_TIMER_INTERRUPT(ec) ATOMIC_OR((ec)->interrupt_flag, TIMER_INTERRUPT_MASK)
|
|
1783
|
+
#define RUBY_VM_SET_INTERRUPT(ec) ATOMIC_OR((ec)->interrupt_flag, PENDING_INTERRUPT_MASK)
|
|
1784
|
+
#define RUBY_VM_SET_POSTPONED_JOB_INTERRUPT(ec) ATOMIC_OR((ec)->interrupt_flag, POSTPONED_JOB_INTERRUPT_MASK)
|
|
1785
|
+
#define RUBY_VM_SET_TRAP_INTERRUPT(ec) ATOMIC_OR((ec)->interrupt_flag, TRAP_INTERRUPT_MASK)
|
|
1786
|
+
#define RUBY_VM_INTERRUPTED(ec) ((ec)->interrupt_flag & ~(ec)->interrupt_mask & \
|
|
1787
|
+
(PENDING_INTERRUPT_MASK|TRAP_INTERRUPT_MASK))
|
|
1788
|
+
#define RUBY_VM_INTERRUPTED_ANY(ec) ((ec)->interrupt_flag & ~(ec)->interrupt_mask)
|
|
1606
1789
|
|
|
1607
1790
|
VALUE rb_exc_set_backtrace(VALUE exc, VALUE bt);
|
|
1608
1791
|
int rb_signal_buff_size(void);
|
|
1609
|
-
|
|
1792
|
+
int rb_signal_exec(rb_thread_t *th, int sig);
|
|
1610
1793
|
void rb_threadptr_check_signal(rb_thread_t *mth);
|
|
1611
1794
|
void rb_threadptr_signal_raise(rb_thread_t *th, int sig);
|
|
1612
1795
|
void rb_threadptr_signal_exit(rb_thread_t *th);
|
|
1613
|
-
|
|
1796
|
+
int rb_threadptr_execute_interrupts(rb_thread_t *, int);
|
|
1614
1797
|
void rb_threadptr_interrupt(rb_thread_t *th);
|
|
1615
1798
|
void rb_threadptr_unlock_all_locking_mutexes(rb_thread_t *th);
|
|
1616
1799
|
void rb_threadptr_pending_interrupt_clear(rb_thread_t *th);
|
|
1617
1800
|
void rb_threadptr_pending_interrupt_enque(rb_thread_t *th, VALUE v);
|
|
1618
|
-
|
|
1619
|
-
void rb_threadptr_error_print(rb_thread_t *volatile th, volatile VALUE errinfo);
|
|
1801
|
+
void rb_ec_error_print(rb_execution_context_t * volatile ec, volatile VALUE errinfo);
|
|
1620
1802
|
void rb_execution_context_mark(const rb_execution_context_t *ec);
|
|
1803
|
+
void rb_fiber_close(rb_fiber_t *fib);
|
|
1804
|
+
void Init_native_thread(rb_thread_t *th);
|
|
1621
1805
|
|
|
1622
|
-
#define RUBY_VM_CHECK_INTS(
|
|
1806
|
+
#define RUBY_VM_CHECK_INTS(ec) rb_vm_check_ints(ec)
|
|
1623
1807
|
static inline void
|
|
1624
|
-
|
|
1808
|
+
rb_vm_check_ints(rb_execution_context_t *ec)
|
|
1625
1809
|
{
|
|
1626
|
-
|
|
1627
|
-
|
|
1810
|
+
VM_ASSERT(ec == GET_EC());
|
|
1811
|
+
if (UNLIKELY(RUBY_VM_INTERRUPTED_ANY(ec))) {
|
|
1812
|
+
rb_threadptr_execute_interrupts(rb_ec_thread_ptr(ec), 0);
|
|
1628
1813
|
}
|
|
1629
1814
|
}
|
|
1630
1815
|
|
|
1631
1816
|
/* tracer */
|
|
1817
|
+
|
|
1632
1818
|
struct rb_trace_arg_struct {
|
|
1633
1819
|
rb_event_flag_t event;
|
|
1634
|
-
|
|
1635
|
-
rb_control_frame_t *cfp;
|
|
1820
|
+
rb_execution_context_t *ec;
|
|
1821
|
+
const rb_control_frame_t *cfp;
|
|
1636
1822
|
VALUE self;
|
|
1637
1823
|
ID id;
|
|
1638
1824
|
ID called_id;
|
|
@@ -1646,50 +1832,67 @@ struct rb_trace_arg_struct {
|
|
|
1646
1832
|
VALUE path;
|
|
1647
1833
|
};
|
|
1648
1834
|
|
|
1649
|
-
void
|
|
1650
|
-
void
|
|
1835
|
+
void rb_hook_list_mark(rb_hook_list_t *hooks);
|
|
1836
|
+
void rb_hook_list_free(rb_hook_list_t *hooks);
|
|
1837
|
+
void rb_hook_list_connect_tracepoint(VALUE target, rb_hook_list_t *list, VALUE tpval, unsigned int target_line);
|
|
1838
|
+
void rb_hook_list_remove_tracepoint(rb_hook_list_t *list, VALUE tpval);
|
|
1839
|
+
|
|
1840
|
+
void rb_exec_event_hooks(struct rb_trace_arg_struct *trace_arg, rb_hook_list_t *hooks, int pop_p);
|
|
1651
1841
|
|
|
1652
|
-
#define EXEC_EVENT_HOOK_ORIG(
|
|
1842
|
+
#define EXEC_EVENT_HOOK_ORIG(ec_, hooks_, flag_, self_, id_, called_id_, klass_, data_, pop_p_) do { \
|
|
1653
1843
|
const rb_event_flag_t flag_arg_ = (flag_); \
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1844
|
+
rb_hook_list_t *hooks_arg_ = (hooks_); \
|
|
1845
|
+
if (UNLIKELY((hooks_arg_)->events & (flag_arg_))) { \
|
|
1846
|
+
/* defer evaluating the other arguments */ \
|
|
1847
|
+
rb_exec_event_hook_orig(ec_, hooks_arg_, flag_arg_, self_, id_, called_id_, klass_, data_, pop_p_); \
|
|
1657
1848
|
} \
|
|
1658
1849
|
} while (0)
|
|
1659
1850
|
|
|
1660
1851
|
static inline void
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
{
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1852
|
+
rb_exec_event_hook_orig(rb_execution_context_t *ec, rb_hook_list_t *hooks, rb_event_flag_t flag,
|
|
1853
|
+
VALUE self, ID id, ID called_id, VALUE klass, VALUE data, int pop_p)
|
|
1854
|
+
{
|
|
1855
|
+
struct rb_trace_arg_struct trace_arg;
|
|
1856
|
+
|
|
1857
|
+
VM_ASSERT((hooks->events & flag) != 0);
|
|
1858
|
+
|
|
1859
|
+
trace_arg.event = flag;
|
|
1860
|
+
trace_arg.ec = ec;
|
|
1861
|
+
trace_arg.cfp = ec->cfp;
|
|
1862
|
+
trace_arg.self = self;
|
|
1863
|
+
trace_arg.id = id;
|
|
1864
|
+
trace_arg.called_id = called_id;
|
|
1865
|
+
trace_arg.klass = klass;
|
|
1866
|
+
trace_arg.data = data;
|
|
1867
|
+
trace_arg.path = Qundef;
|
|
1868
|
+
trace_arg.klass_solved = 0;
|
|
1869
|
+
|
|
1870
|
+
rb_exec_event_hooks(&trace_arg, hooks, pop_p);
|
|
1679
1871
|
}
|
|
1680
1872
|
|
|
1681
|
-
|
|
1682
|
-
|
|
1873
|
+
static inline rb_hook_list_t *
|
|
1874
|
+
rb_vm_global_hooks(const rb_execution_context_t *ec)
|
|
1875
|
+
{
|
|
1876
|
+
return &rb_ec_vm_ptr(ec)->global_hooks;
|
|
1877
|
+
}
|
|
1683
1878
|
|
|
1684
|
-
#define
|
|
1685
|
-
EXEC_EVENT_HOOK_ORIG(
|
|
1879
|
+
#define EXEC_EVENT_HOOK(ec_, flag_, self_, id_, called_id_, klass_, data_) \
|
|
1880
|
+
EXEC_EVENT_HOOK_ORIG(ec_, rb_vm_global_hooks(ec_), flag_, self_, id_, called_id_, klass_, data_, 0)
|
|
1881
|
+
|
|
1882
|
+
#define EXEC_EVENT_HOOK_AND_POP_FRAME(ec_, flag_, self_, id_, called_id_, klass_, data_) \
|
|
1883
|
+
EXEC_EVENT_HOOK_ORIG(ec_, rb_vm_global_hooks(ec_), flag_, self_, id_, called_id_, klass_, data_, 1)
|
|
1686
1884
|
|
|
1687
1885
|
RUBY_SYMBOL_EXPORT_BEGIN
|
|
1688
1886
|
|
|
1689
1887
|
int rb_thread_check_trap_pending(void);
|
|
1690
1888
|
|
|
1889
|
+
/* #define RUBY_EVENT_RESERVED_FOR_INTERNAL_USE 0x030000 */ /* from vm_core.h */
|
|
1890
|
+
#define RUBY_EVENT_COVERAGE_LINE 0x010000
|
|
1891
|
+
#define RUBY_EVENT_COVERAGE_BRANCH 0x020000
|
|
1892
|
+
|
|
1691
1893
|
extern VALUE rb_get_coverages(void);
|
|
1692
|
-
extern void rb_set_coverages(VALUE, int);
|
|
1894
|
+
extern void rb_set_coverages(VALUE, int, VALUE);
|
|
1895
|
+
extern void rb_clear_coverages(void);
|
|
1693
1896
|
extern void rb_reset_coverages(void);
|
|
1694
1897
|
|
|
1695
1898
|
void rb_postponed_job_flush(rb_vm_t *vm);
|