debase-ruby_core_source 0.10.14 → 0.10.17
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +32 -0
- data/debase-ruby_core_source.gemspec +2 -2
- data/lib/debase/ruby_core_source/{ruby-1.9.3-p550 → ruby-2.5.4-p155}/addr2line.h +1 -1
- data/lib/debase/ruby_core_source/ruby-2.5.4-p155/ccan/build_assert/build_assert.h +40 -0
- data/lib/debase/ruby_core_source/ruby-2.5.4-p155/ccan/check_type/check_type.h +63 -0
- data/lib/debase/ruby_core_source/ruby-2.5.4-p155/ccan/container_of/container_of.h +142 -0
- data/lib/debase/ruby_core_source/ruby-2.5.4-p155/ccan/list/list.h +773 -0
- data/lib/debase/ruby_core_source/ruby-2.5.4-p155/ccan/str/str.h +16 -0
- data/lib/debase/ruby_core_source/ruby-2.5.4-p155/constant.h +51 -0
- data/lib/debase/ruby_core_source/ruby-2.5.4-p155/debug_counter.h +109 -0
- data/lib/debase/ruby_core_source/{ruby-1.9.3-p550 → ruby-2.5.4-p155}/dln.h +10 -9
- data/lib/debase/ruby_core_source/ruby-2.5.4-p155/encindex.h +69 -0
- data/lib/debase/ruby_core_source/ruby-2.5.4-p155/eval_intern.h +334 -0
- data/lib/debase/ruby_core_source/{ruby-1.9.3-p550 → ruby-2.5.4-p155}/gc.h +27 -10
- data/lib/debase/ruby_core_source/ruby-2.5.4-p155/id.h +250 -0
- data/lib/debase/ruby_core_source/ruby-2.5.4-p155/id_table.h +31 -0
- data/lib/debase/ruby_core_source/ruby-2.5.4-p155/insns.inc +217 -0
- data/lib/debase/ruby_core_source/ruby-2.5.4-p155/insns_info.inc +1570 -0
- data/lib/debase/ruby_core_source/ruby-2.5.4-p155/internal.h +2036 -0
- data/lib/debase/ruby_core_source/ruby-2.5.4-p155/iseq.h +308 -0
- data/lib/debase/ruby_core_source/{ruby-1.9.3-p550 → ruby-2.5.4-p155}/known_errors.inc +16 -1
- data/lib/debase/ruby_core_source/ruby-2.5.4-p155/method.h +218 -0
- data/lib/debase/ruby_core_source/{ruby-1.9.3-p550 → ruby-2.5.4-p155}/node.h +115 -79
- data/lib/debase/ruby_core_source/{ruby-1.9.3-p550 → ruby-2.5.4-p155}/node_name.inc +12 -22
- data/lib/debase/ruby_core_source/ruby-2.5.4-p155/opt_sc.inc +1601 -0
- data/lib/debase/ruby_core_source/ruby-2.5.4-p155/optinsn.inc +103 -0
- data/lib/debase/ruby_core_source/{ruby-1.9.3-p550 → ruby-2.5.4-p155}/optunifs.inc +28 -83
- data/lib/debase/ruby_core_source/{ruby-1.9.3-p550 → ruby-2.5.4-p155}/parse.h +74 -60
- data/lib/debase/ruby_core_source/ruby-2.5.4-p155/probes_helper.h +43 -0
- data/lib/debase/ruby_core_source/ruby-2.5.4-p155/regenc.h +254 -0
- data/lib/debase/ruby_core_source/{ruby-1.9.3-p550 → ruby-2.5.4-p155}/regint.h +299 -211
- data/lib/debase/ruby_core_source/{ruby-1.9.3-p550 → ruby-2.5.4-p155}/regparse.h +45 -37
- data/lib/debase/ruby_core_source/ruby-2.5.4-p155/revision.h +1 -0
- data/lib/debase/ruby_core_source/ruby-2.5.4-p155/ruby_assert.h +54 -0
- data/lib/debase/ruby_core_source/{ruby-1.9.3-p550 → ruby-2.5.4-p155}/ruby_atomic.h +84 -26
- data/lib/debase/ruby_core_source/{ruby-1.9.3-p550 → ruby-2.5.4-p155}/siphash.h +1 -1
- data/lib/debase/ruby_core_source/ruby-2.5.4-p155/symbol.h +108 -0
- data/lib/debase/ruby_core_source/{ruby-1.9.3-p550 → ruby-2.5.4-p155}/thread_pthread.h +14 -11
- data/lib/debase/ruby_core_source/{ruby-1.9.3-p550 → ruby-2.5.4-p155}/thread_win32.h +2 -6
- data/lib/debase/ruby_core_source/ruby-2.5.4-p155/timev.h +42 -0
- data/lib/debase/ruby_core_source/{ruby-1.9.3-p550 → ruby-2.5.4-p155}/transcode_data.h +34 -12
- data/lib/debase/ruby_core_source/ruby-2.5.4-p155/version.h +73 -0
- data/lib/debase/ruby_core_source/ruby-2.5.4-p155/vm.inc +3667 -0
- data/lib/debase/ruby_core_source/ruby-2.5.4-p155/vm_call_iseq_optimized.inc +213 -0
- data/lib/debase/ruby_core_source/ruby-2.5.4-p155/vm_core.h +1768 -0
- data/lib/debase/ruby_core_source/{ruby-1.9.3-p550/debug.h → ruby-2.5.4-p155/vm_debug.h} +4 -8
- data/lib/debase/ruby_core_source/{ruby-1.9.3-p550 → ruby-2.5.4-p155}/vm_exec.h +38 -30
- data/lib/debase/ruby_core_source/ruby-2.5.4-p155/vm_insnhelper.h +255 -0
- data/lib/debase/ruby_core_source/{ruby-1.9.3-p550 → ruby-2.5.4-p155}/vm_opts.h +14 -9
- data/lib/debase/ruby_core_source/ruby-2.5.4-p155/vmtc.inc +214 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/addr2line.h +20 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/builtin.h +84 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/ccan/build_assert/build_assert.h +40 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/ccan/check_type/check_type.h +63 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/ccan/container_of/container_of.h +142 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/ccan/list/list.h +789 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/ccan/str/str.h +17 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/constant.h +55 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/darray.h +226 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/debug_counter.h +469 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/dln.h +31 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/encindex.h +70 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/eval_intern.h +339 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/gc.h +143 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/hrtime.h +216 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/id.h +295 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/id_table.h +36 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/insns.inc +249 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/insns_info.inc +9064 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/array.h +113 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/bignum.h +246 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/bits.h +565 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/class.h +211 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/cmdlineopt.h +61 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/compar.h +49 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/compile.h +35 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/compilers.h +107 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/complex.h +29 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/cont.h +24 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/dir.h +16 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/enc.h +19 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/encoding.h +30 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/enum.h +18 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/enumerator.h +21 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/error.h +191 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/eval.h +32 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/file.h +38 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/fixnum.h +184 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/gc.h +188 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/hash.h +243 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/imemo.h +243 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/inits.h +50 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/io.h +38 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/load.h +18 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/loadpath.h +16 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/math.h +23 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/missing.h +18 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/numeric.h +271 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/object.h +83 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/parse.h +23 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/proc.h +32 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/process.h +137 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/ractor.h +6 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/random.h +16 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/range.h +40 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/rational.h +72 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/re.h +30 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/sanitizers.h +190 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/serial.h +23 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/signal.h +21 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/static_assert.h +16 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/string.h +141 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/struct.h +153 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/symbol.h +41 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/thread.h +53 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/time.h +34 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/transcode.h +20 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/util.h +27 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/variable.h +83 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/vm.h +134 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/warnings.h +16 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal.h +109 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/iseq.h +325 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/known_errors.inc +791 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/method.h +254 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/mjit.h +231 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/mjit_compile.inc +8333 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/node.h +510 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/node_name.inc +208 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/opt_sc.inc +109 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/optinsn.inc +128 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/optunifs.inc +43 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/parse.h +214 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/probes_helper.h +44 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/ractor_core.h +346 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/regenc.h +255 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/regint.h +957 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/regparse.h +370 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/revision.h +2 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/ruby_assert.h +14 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/ruby_atomic.h +23 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/siphash.h +48 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/symbol.h +119 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/thread_none.h +17 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/thread_pthread.h +115 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/thread_win32.h +61 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/timev.h +57 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/transcode_data.h +138 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/transient_heap.h +65 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/variable.h +21 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/version.h +91 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/vm.inc +5481 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/vm_call_iseq_optimized.inc +244 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/vm_callinfo.h +502 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/vm_core.h +2089 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/vm_debug.h +113 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/vm_exec.h +197 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/vm_insnhelper.h +262 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/vm_opts.h +73 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/vm_sync.h +137 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/vmtc.inc +243 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/yjit.h +73 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/yjit_asm.h +408 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/yjit_codegen.h +23 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/yjit_core.h +307 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/yjit_iface.h +38 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/addr2line.h +20 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/builtin.h +121 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/ccan/build_assert/build_assert.h +40 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/ccan/check_type/check_type.h +63 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/ccan/container_of/container_of.h +142 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/ccan/list/list.h +789 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/ccan/str/str.h +17 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/constant.h +55 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/darray.h +179 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/debug_counter.h +469 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/dln.h +31 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/encindex.h +70 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/eval_intern.h +339 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/gc.h +143 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/hrtime.h +226 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/id.h +295 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/id_table.h +36 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/insns.inc +249 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/insns_info.inc +9061 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/internal/array.h +162 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/internal/bignum.h +246 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/internal/bits.h +565 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/internal/class.h +212 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/internal/cmdlineopt.h +58 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/internal/compar.h +49 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/internal/compile.h +35 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/internal/compilers.h +107 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/internal/complex.h +29 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/internal/cont.h +26 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/internal/dir.h +16 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/internal/enc.h +19 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/internal/encoding.h +30 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/internal/enum.h +18 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/internal/enumerator.h +21 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/internal/error.h +191 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/internal/eval.h +32 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/internal/file.h +38 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/internal/fixnum.h +184 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/internal/gc.h +188 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/internal/hash.h +243 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/internal/imemo.h +242 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/internal/inits.h +50 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/internal/io.h +38 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/internal/load.h +18 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/internal/loadpath.h +16 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/internal/math.h +23 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/internal/missing.h +18 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/internal/numeric.h +271 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/internal/object.h +83 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/internal/parse.h +23 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/internal/proc.h +32 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/internal/process.h +137 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/internal/ractor.h +6 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/internal/random.h +16 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/internal/range.h +40 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/internal/rational.h +72 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/internal/re.h +30 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/internal/sanitizers.h +190 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/internal/serial.h +23 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/internal/signal.h +21 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/internal/static_assert.h +16 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/internal/string.h +146 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/internal/struct.h +153 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/internal/symbol.h +42 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/internal/thread.h +54 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/internal/time.h +34 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/internal/transcode.h +20 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/internal/util.h +27 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/internal/variable.h +83 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/internal/vm.h +134 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/internal/warnings.h +16 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/internal.h +113 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/iseq.h +328 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/known_errors.inc +791 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/method.h +253 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/mjit.h +136 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/mjit_compile_attr.inc +430 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/mjit_compiler.h +58 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/mjit_unit.h +29 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/node.h +510 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/node_name.inc +208 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/opt_sc.inc +109 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/optinsn.inc +128 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/optunifs.inc +43 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/parse.h +214 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/probes_helper.h +44 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/ractor_core.h +341 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/regenc.h +255 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/regint.h +957 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/regparse.h +370 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/revision.h +2 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/ruby_assert.h +14 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/ruby_atomic.h +23 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/siphash.h +48 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/symbol.h +119 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/thread_none.h +20 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/thread_pthread.h +132 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/thread_win32.h +63 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/timev.h +57 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/transcode_data.h +138 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/transient_heap.h +65 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/variable.h +21 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/version.h +68 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/vm.inc +5476 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/vm_call_iseq_optimized.inc +244 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/vm_callinfo.h +522 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/vm_core.h +2130 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/vm_debug.h +122 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/vm_exec.h +197 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/vm_insnhelper.h +269 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/vm_opts.h +73 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/vm_sync.h +137 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/vmtc.inc +243 -0
- data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/yjit.h +72 -0
- data/lib/debase/ruby_core_source/version.rb +1 -1
- metadata +284 -44
- data/lib/debase/ruby_core_source/ruby-1.9.3-p550/constant.h +0 -34
- data/lib/debase/ruby_core_source/ruby-1.9.3-p550/encdb.h +0 -167
- data/lib/debase/ruby_core_source/ruby-1.9.3-p550/eval_intern.h +0 -234
- data/lib/debase/ruby_core_source/ruby-1.9.3-p550/id.h +0 -177
- data/lib/debase/ruby_core_source/ruby-1.9.3-p550/insns.inc +0 -179
- data/lib/debase/ruby_core_source/ruby-1.9.3-p550/insns_info.inc +0 -695
- data/lib/debase/ruby_core_source/ruby-1.9.3-p550/internal.h +0 -242
- data/lib/debase/ruby_core_source/ruby-1.9.3-p550/iseq.h +0 -126
- data/lib/debase/ruby_core_source/ruby-1.9.3-p550/method.h +0 -105
- data/lib/debase/ruby_core_source/ruby-1.9.3-p550/opt_sc.inc +0 -670
- data/lib/debase/ruby_core_source/ruby-1.9.3-p550/optinsn.inc +0 -30
- data/lib/debase/ruby_core_source/ruby-1.9.3-p550/regenc.h +0 -219
- data/lib/debase/ruby_core_source/ruby-1.9.3-p550/revision.h +0 -1
- data/lib/debase/ruby_core_source/ruby-1.9.3-p550/timev.h +0 -21
- data/lib/debase/ruby_core_source/ruby-1.9.3-p550/transdb.h +0 -189
- data/lib/debase/ruby_core_source/ruby-1.9.3-p550/version.h +0 -52
- data/lib/debase/ruby_core_source/ruby-1.9.3-p550/vm.inc +0 -3054
- data/lib/debase/ruby_core_source/ruby-1.9.3-p550/vm_core.h +0 -763
- data/lib/debase/ruby_core_source/ruby-1.9.3-p550/vm_insnhelper.h +0 -220
- data/lib/debase/ruby_core_source/ruby-1.9.3-p550/vmtc.inc +0 -97
@@ -1,3054 +0,0 @@
|
|
1
|
-
/* -*-c-*- *********************************************************/
|
2
|
-
/*******************************************************************/
|
3
|
-
/*******************************************************************/
|
4
|
-
/**
|
5
|
-
This file is VM main loop.
|
6
|
-
|
7
|
-
----
|
8
|
-
This file is auto generated by insns2vm.rb
|
9
|
-
DO NOT TOUCH!
|
10
|
-
|
11
|
-
If you want to fix something, you must edit 'insns.c'
|
12
|
-
*/
|
13
|
-
|
14
|
-
|
15
|
-
INSN_ENTRY(nop){
|
16
|
-
{
|
17
|
-
|
18
|
-
|
19
|
-
DEBUG_ENTER_INSN("nop");
|
20
|
-
ADD_PC(1+0);
|
21
|
-
PREFETCH(GET_PC());
|
22
|
-
#define CURRENT_INSN_nop 1
|
23
|
-
#define INSN_IS_SC() 0
|
24
|
-
#define INSN_LABEL(lab) LABEL_nop_##lab
|
25
|
-
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
26
|
-
USAGE_ANALYSIS_INSN(BIN(nop));
|
27
|
-
{
|
28
|
-
#line 40 "insns.def"
|
29
|
-
/* none */
|
30
|
-
|
31
|
-
#line 32 "vm.inc"
|
32
|
-
#undef CURRENT_INSN_nop
|
33
|
-
#undef INSN_IS_SC
|
34
|
-
#undef INSN_LABEL
|
35
|
-
#undef LABEL_IS_SC
|
36
|
-
END_INSN(nop);}}}
|
37
|
-
INSN_ENTRY(getlocal){
|
38
|
-
{
|
39
|
-
VALUE val;
|
40
|
-
lindex_t idx = (lindex_t)GET_OPERAND(1);
|
41
|
-
|
42
|
-
DEBUG_ENTER_INSN("getlocal");
|
43
|
-
ADD_PC(1+1);
|
44
|
-
PREFETCH(GET_PC());
|
45
|
-
#define CURRENT_INSN_getlocal 1
|
46
|
-
#define INSN_IS_SC() 0
|
47
|
-
#define INSN_LABEL(lab) LABEL_getlocal_##lab
|
48
|
-
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
49
|
-
USAGE_ANALYSIS_INSN(BIN(getlocal));
|
50
|
-
USAGE_ANALYSIS_OPERAND(BIN(getlocal), 0, idx);
|
51
|
-
{
|
52
|
-
#line 58 "insns.def"
|
53
|
-
val = *(GET_LFP() - idx);
|
54
|
-
|
55
|
-
#line 56 "vm.inc"
|
56
|
-
CHECK_STACK_OVERFLOW(REG_CFP, 1);
|
57
|
-
PUSH(val);
|
58
|
-
#undef CURRENT_INSN_getlocal
|
59
|
-
#undef INSN_IS_SC
|
60
|
-
#undef INSN_LABEL
|
61
|
-
#undef LABEL_IS_SC
|
62
|
-
END_INSN(getlocal);}}}
|
63
|
-
INSN_ENTRY(setlocal){
|
64
|
-
{
|
65
|
-
lindex_t idx = (lindex_t)GET_OPERAND(1);
|
66
|
-
VALUE val = TOPN(0);
|
67
|
-
DEBUG_ENTER_INSN("setlocal");
|
68
|
-
ADD_PC(1+1);
|
69
|
-
PREFETCH(GET_PC());
|
70
|
-
POPN(1);
|
71
|
-
#define CURRENT_INSN_setlocal 1
|
72
|
-
#define INSN_IS_SC() 0
|
73
|
-
#define INSN_LABEL(lab) LABEL_setlocal_##lab
|
74
|
-
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
75
|
-
USAGE_ANALYSIS_INSN(BIN(setlocal));
|
76
|
-
USAGE_ANALYSIS_OPERAND(BIN(setlocal), 0, idx);
|
77
|
-
{
|
78
|
-
#line 72 "insns.def"
|
79
|
-
(*(GET_LFP() - idx)) = val;
|
80
|
-
|
81
|
-
#line 82 "vm.inc"
|
82
|
-
#undef CURRENT_INSN_setlocal
|
83
|
-
#undef INSN_IS_SC
|
84
|
-
#undef INSN_LABEL
|
85
|
-
#undef LABEL_IS_SC
|
86
|
-
END_INSN(setlocal);}}}
|
87
|
-
INSN_ENTRY(getspecial){
|
88
|
-
{
|
89
|
-
VALUE val;
|
90
|
-
rb_num_t type = (rb_num_t)GET_OPERAND(2);
|
91
|
-
rb_num_t key = (rb_num_t)GET_OPERAND(1);
|
92
|
-
|
93
|
-
DEBUG_ENTER_INSN("getspecial");
|
94
|
-
ADD_PC(1+2);
|
95
|
-
PREFETCH(GET_PC());
|
96
|
-
#define CURRENT_INSN_getspecial 1
|
97
|
-
#define INSN_IS_SC() 0
|
98
|
-
#define INSN_LABEL(lab) LABEL_getspecial_##lab
|
99
|
-
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
100
|
-
USAGE_ANALYSIS_INSN(BIN(getspecial));
|
101
|
-
USAGE_ANALYSIS_OPERAND(BIN(getspecial), 0, key);
|
102
|
-
USAGE_ANALYSIS_OPERAND(BIN(getspecial), 1, type);
|
103
|
-
{
|
104
|
-
#line 86 "insns.def"
|
105
|
-
val = vm_getspecial(th, GET_LFP(), key, type);
|
106
|
-
|
107
|
-
#line 108 "vm.inc"
|
108
|
-
CHECK_STACK_OVERFLOW(REG_CFP, 1);
|
109
|
-
PUSH(val);
|
110
|
-
#undef CURRENT_INSN_getspecial
|
111
|
-
#undef INSN_IS_SC
|
112
|
-
#undef INSN_LABEL
|
113
|
-
#undef LABEL_IS_SC
|
114
|
-
END_INSN(getspecial);}}}
|
115
|
-
INSN_ENTRY(setspecial){
|
116
|
-
{
|
117
|
-
rb_num_t key = (rb_num_t)GET_OPERAND(1);
|
118
|
-
VALUE obj = TOPN(0);
|
119
|
-
DEBUG_ENTER_INSN("setspecial");
|
120
|
-
ADD_PC(1+1);
|
121
|
-
PREFETCH(GET_PC());
|
122
|
-
POPN(1);
|
123
|
-
#define CURRENT_INSN_setspecial 1
|
124
|
-
#define INSN_IS_SC() 0
|
125
|
-
#define INSN_LABEL(lab) LABEL_setspecial_##lab
|
126
|
-
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
127
|
-
USAGE_ANALYSIS_INSN(BIN(setspecial));
|
128
|
-
USAGE_ANALYSIS_OPERAND(BIN(setspecial), 0, key);
|
129
|
-
{
|
130
|
-
#line 100 "insns.def"
|
131
|
-
lfp_svar_set(th, GET_LFP(), key, obj);
|
132
|
-
|
133
|
-
#line 134 "vm.inc"
|
134
|
-
#undef CURRENT_INSN_setspecial
|
135
|
-
#undef INSN_IS_SC
|
136
|
-
#undef INSN_LABEL
|
137
|
-
#undef LABEL_IS_SC
|
138
|
-
END_INSN(setspecial);}}}
|
139
|
-
INSN_ENTRY(getdynamic){
|
140
|
-
{
|
141
|
-
VALUE val;
|
142
|
-
rb_num_t level = (rb_num_t)GET_OPERAND(2);
|
143
|
-
dindex_t idx = (dindex_t)GET_OPERAND(1);
|
144
|
-
|
145
|
-
DEBUG_ENTER_INSN("getdynamic");
|
146
|
-
ADD_PC(1+2);
|
147
|
-
PREFETCH(GET_PC());
|
148
|
-
#define CURRENT_INSN_getdynamic 1
|
149
|
-
#define INSN_IS_SC() 0
|
150
|
-
#define INSN_LABEL(lab) LABEL_getdynamic_##lab
|
151
|
-
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
152
|
-
USAGE_ANALYSIS_INSN(BIN(getdynamic));
|
153
|
-
USAGE_ANALYSIS_OPERAND(BIN(getdynamic), 0, idx);
|
154
|
-
USAGE_ANALYSIS_OPERAND(BIN(getdynamic), 1, level);
|
155
|
-
{
|
156
|
-
#line 116 "insns.def"
|
157
|
-
rb_num_t i;
|
158
|
-
VALUE *dfp2 = GET_DFP();
|
159
|
-
for (i = 0; i < level; i++) {
|
160
|
-
dfp2 = GET_PREV_DFP(dfp2);
|
161
|
-
}
|
162
|
-
val = *(dfp2 - idx);
|
163
|
-
|
164
|
-
#line 165 "vm.inc"
|
165
|
-
CHECK_STACK_OVERFLOW(REG_CFP, 1);
|
166
|
-
PUSH(val);
|
167
|
-
#undef CURRENT_INSN_getdynamic
|
168
|
-
#undef INSN_IS_SC
|
169
|
-
#undef INSN_LABEL
|
170
|
-
#undef LABEL_IS_SC
|
171
|
-
END_INSN(getdynamic);}}}
|
172
|
-
INSN_ENTRY(setdynamic){
|
173
|
-
{
|
174
|
-
rb_num_t level = (rb_num_t)GET_OPERAND(2);
|
175
|
-
dindex_t idx = (dindex_t)GET_OPERAND(1);
|
176
|
-
VALUE val = TOPN(0);
|
177
|
-
DEBUG_ENTER_INSN("setdynamic");
|
178
|
-
ADD_PC(1+2);
|
179
|
-
PREFETCH(GET_PC());
|
180
|
-
POPN(1);
|
181
|
-
#define CURRENT_INSN_setdynamic 1
|
182
|
-
#define INSN_IS_SC() 0
|
183
|
-
#define INSN_LABEL(lab) LABEL_setdynamic_##lab
|
184
|
-
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
185
|
-
USAGE_ANALYSIS_INSN(BIN(setdynamic));
|
186
|
-
USAGE_ANALYSIS_OPERAND(BIN(setdynamic), 0, idx);
|
187
|
-
USAGE_ANALYSIS_OPERAND(BIN(setdynamic), 1, level);
|
188
|
-
{
|
189
|
-
#line 137 "insns.def"
|
190
|
-
rb_num_t i;
|
191
|
-
VALUE *dfp2 = GET_DFP();
|
192
|
-
for (i = 0; i < level; i++) {
|
193
|
-
dfp2 = GET_PREV_DFP(dfp2);
|
194
|
-
}
|
195
|
-
*(dfp2 - idx) = val;
|
196
|
-
|
197
|
-
#line 198 "vm.inc"
|
198
|
-
#undef CURRENT_INSN_setdynamic
|
199
|
-
#undef INSN_IS_SC
|
200
|
-
#undef INSN_LABEL
|
201
|
-
#undef LABEL_IS_SC
|
202
|
-
END_INSN(setdynamic);}}}
|
203
|
-
INSN_ENTRY(getinstancevariable){
|
204
|
-
{
|
205
|
-
VALUE val;
|
206
|
-
IC ic = (IC)GET_OPERAND(2);
|
207
|
-
ID id = (ID)GET_OPERAND(1);
|
208
|
-
|
209
|
-
DEBUG_ENTER_INSN("getinstancevariable");
|
210
|
-
ADD_PC(1+2);
|
211
|
-
PREFETCH(GET_PC());
|
212
|
-
#define CURRENT_INSN_getinstancevariable 1
|
213
|
-
#define INSN_IS_SC() 0
|
214
|
-
#define INSN_LABEL(lab) LABEL_getinstancevariable_##lab
|
215
|
-
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
216
|
-
USAGE_ANALYSIS_INSN(BIN(getinstancevariable));
|
217
|
-
USAGE_ANALYSIS_OPERAND(BIN(getinstancevariable), 0, id);
|
218
|
-
USAGE_ANALYSIS_OPERAND(BIN(getinstancevariable), 1, ic);
|
219
|
-
{
|
220
|
-
#line 157 "insns.def"
|
221
|
-
val = vm_getivar(GET_SELF(), id, ic);
|
222
|
-
|
223
|
-
#line 224 "vm.inc"
|
224
|
-
CHECK_STACK_OVERFLOW(REG_CFP, 1);
|
225
|
-
PUSH(val);
|
226
|
-
#undef CURRENT_INSN_getinstancevariable
|
227
|
-
#undef INSN_IS_SC
|
228
|
-
#undef INSN_LABEL
|
229
|
-
#undef LABEL_IS_SC
|
230
|
-
END_INSN(getinstancevariable);}}}
|
231
|
-
INSN_ENTRY(setinstancevariable){
|
232
|
-
{
|
233
|
-
IC ic = (IC)GET_OPERAND(2);
|
234
|
-
ID id = (ID)GET_OPERAND(1);
|
235
|
-
VALUE val = TOPN(0);
|
236
|
-
DEBUG_ENTER_INSN("setinstancevariable");
|
237
|
-
ADD_PC(1+2);
|
238
|
-
PREFETCH(GET_PC());
|
239
|
-
POPN(1);
|
240
|
-
#define CURRENT_INSN_setinstancevariable 1
|
241
|
-
#define INSN_IS_SC() 0
|
242
|
-
#define INSN_LABEL(lab) LABEL_setinstancevariable_##lab
|
243
|
-
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
244
|
-
USAGE_ANALYSIS_INSN(BIN(setinstancevariable));
|
245
|
-
USAGE_ANALYSIS_OPERAND(BIN(setinstancevariable), 0, id);
|
246
|
-
USAGE_ANALYSIS_OPERAND(BIN(setinstancevariable), 1, ic);
|
247
|
-
{
|
248
|
-
#line 172 "insns.def"
|
249
|
-
vm_setivar(GET_SELF(), id, val, ic);
|
250
|
-
|
251
|
-
#line 252 "vm.inc"
|
252
|
-
#undef CURRENT_INSN_setinstancevariable
|
253
|
-
#undef INSN_IS_SC
|
254
|
-
#undef INSN_LABEL
|
255
|
-
#undef LABEL_IS_SC
|
256
|
-
END_INSN(setinstancevariable);}}}
|
257
|
-
INSN_ENTRY(getclassvariable){
|
258
|
-
{
|
259
|
-
VALUE val;
|
260
|
-
ID id = (ID)GET_OPERAND(1);
|
261
|
-
|
262
|
-
DEBUG_ENTER_INSN("getclassvariable");
|
263
|
-
ADD_PC(1+1);
|
264
|
-
PREFETCH(GET_PC());
|
265
|
-
#define CURRENT_INSN_getclassvariable 1
|
266
|
-
#define INSN_IS_SC() 0
|
267
|
-
#define INSN_LABEL(lab) LABEL_getclassvariable_##lab
|
268
|
-
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
269
|
-
USAGE_ANALYSIS_INSN(BIN(getclassvariable));
|
270
|
-
USAGE_ANALYSIS_OPERAND(BIN(getclassvariable), 0, id);
|
271
|
-
{
|
272
|
-
#line 186 "insns.def"
|
273
|
-
NODE * const cref = vm_get_cref(GET_ISEQ(), GET_LFP(), GET_DFP());
|
274
|
-
val = rb_cvar_get(vm_get_cvar_base(cref), id);
|
275
|
-
|
276
|
-
#line 277 "vm.inc"
|
277
|
-
CHECK_STACK_OVERFLOW(REG_CFP, 1);
|
278
|
-
PUSH(val);
|
279
|
-
#undef CURRENT_INSN_getclassvariable
|
280
|
-
#undef INSN_IS_SC
|
281
|
-
#undef INSN_LABEL
|
282
|
-
#undef LABEL_IS_SC
|
283
|
-
END_INSN(getclassvariable);}}}
|
284
|
-
INSN_ENTRY(setclassvariable){
|
285
|
-
{
|
286
|
-
ID id = (ID)GET_OPERAND(1);
|
287
|
-
VALUE val = TOPN(0);
|
288
|
-
DEBUG_ENTER_INSN("setclassvariable");
|
289
|
-
ADD_PC(1+1);
|
290
|
-
PREFETCH(GET_PC());
|
291
|
-
POPN(1);
|
292
|
-
#define CURRENT_INSN_setclassvariable 1
|
293
|
-
#define INSN_IS_SC() 0
|
294
|
-
#define INSN_LABEL(lab) LABEL_setclassvariable_##lab
|
295
|
-
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
296
|
-
USAGE_ANALYSIS_INSN(BIN(setclassvariable));
|
297
|
-
USAGE_ANALYSIS_OPERAND(BIN(setclassvariable), 0, id);
|
298
|
-
{
|
299
|
-
#line 201 "insns.def"
|
300
|
-
NODE * const cref = vm_get_cref(GET_ISEQ(), GET_LFP(), GET_DFP());
|
301
|
-
rb_cvar_set(vm_get_cvar_base(cref), id, val);
|
302
|
-
|
303
|
-
#line 304 "vm.inc"
|
304
|
-
#undef CURRENT_INSN_setclassvariable
|
305
|
-
#undef INSN_IS_SC
|
306
|
-
#undef INSN_LABEL
|
307
|
-
#undef LABEL_IS_SC
|
308
|
-
END_INSN(setclassvariable);}}}
|
309
|
-
INSN_ENTRY(getconstant){
|
310
|
-
{
|
311
|
-
VALUE val;
|
312
|
-
ID id = (ID)GET_OPERAND(1);
|
313
|
-
VALUE klass = TOPN(0);
|
314
|
-
DEBUG_ENTER_INSN("getconstant");
|
315
|
-
ADD_PC(1+1);
|
316
|
-
PREFETCH(GET_PC());
|
317
|
-
POPN(1);
|
318
|
-
#define CURRENT_INSN_getconstant 1
|
319
|
-
#define INSN_IS_SC() 0
|
320
|
-
#define INSN_LABEL(lab) LABEL_getconstant_##lab
|
321
|
-
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
322
|
-
USAGE_ANALYSIS_INSN(BIN(getconstant));
|
323
|
-
USAGE_ANALYSIS_OPERAND(BIN(getconstant), 0, id);
|
324
|
-
{
|
325
|
-
#line 223 "insns.def"
|
326
|
-
val = vm_get_ev_const(th, GET_ISEQ(), klass, id, 0);
|
327
|
-
|
328
|
-
#line 329 "vm.inc"
|
329
|
-
CHECK_STACK_OVERFLOW(REG_CFP, 1);
|
330
|
-
PUSH(val);
|
331
|
-
#undef CURRENT_INSN_getconstant
|
332
|
-
#undef INSN_IS_SC
|
333
|
-
#undef INSN_LABEL
|
334
|
-
#undef LABEL_IS_SC
|
335
|
-
END_INSN(getconstant);}}}
|
336
|
-
INSN_ENTRY(setconstant){
|
337
|
-
{
|
338
|
-
ID id = (ID)GET_OPERAND(1);
|
339
|
-
VALUE val = TOPN(1);
|
340
|
-
VALUE cbase = TOPN(0);
|
341
|
-
DEBUG_ENTER_INSN("setconstant");
|
342
|
-
ADD_PC(1+1);
|
343
|
-
PREFETCH(GET_PC());
|
344
|
-
POPN(2);
|
345
|
-
#define CURRENT_INSN_setconstant 1
|
346
|
-
#define INSN_IS_SC() 0
|
347
|
-
#define INSN_LABEL(lab) LABEL_setconstant_##lab
|
348
|
-
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
349
|
-
USAGE_ANALYSIS_INSN(BIN(setconstant));
|
350
|
-
USAGE_ANALYSIS_OPERAND(BIN(setconstant), 0, id);
|
351
|
-
{
|
352
|
-
#line 245 "insns.def"
|
353
|
-
vm_check_if_namespace(cbase);
|
354
|
-
rb_const_set(cbase, id, val);
|
355
|
-
INC_VM_STATE_VERSION();
|
356
|
-
|
357
|
-
#line 358 "vm.inc"
|
358
|
-
#undef CURRENT_INSN_setconstant
|
359
|
-
#undef INSN_IS_SC
|
360
|
-
#undef INSN_LABEL
|
361
|
-
#undef LABEL_IS_SC
|
362
|
-
END_INSN(setconstant);}}}
|
363
|
-
INSN_ENTRY(getglobal){
|
364
|
-
{
|
365
|
-
VALUE val;
|
366
|
-
GENTRY entry = (GENTRY)GET_OPERAND(1);
|
367
|
-
|
368
|
-
DEBUG_ENTER_INSN("getglobal");
|
369
|
-
ADD_PC(1+1);
|
370
|
-
PREFETCH(GET_PC());
|
371
|
-
#define CURRENT_INSN_getglobal 1
|
372
|
-
#define INSN_IS_SC() 0
|
373
|
-
#define INSN_LABEL(lab) LABEL_getglobal_##lab
|
374
|
-
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
375
|
-
USAGE_ANALYSIS_INSN(BIN(getglobal));
|
376
|
-
USAGE_ANALYSIS_OPERAND(BIN(getglobal), 0, entry);
|
377
|
-
{
|
378
|
-
#line 261 "insns.def"
|
379
|
-
val = GET_GLOBAL((VALUE)entry);
|
380
|
-
|
381
|
-
#line 382 "vm.inc"
|
382
|
-
CHECK_STACK_OVERFLOW(REG_CFP, 1);
|
383
|
-
PUSH(val);
|
384
|
-
#undef CURRENT_INSN_getglobal
|
385
|
-
#undef INSN_IS_SC
|
386
|
-
#undef INSN_LABEL
|
387
|
-
#undef LABEL_IS_SC
|
388
|
-
END_INSN(getglobal);}}}
|
389
|
-
INSN_ENTRY(setglobal){
|
390
|
-
{
|
391
|
-
GENTRY entry = (GENTRY)GET_OPERAND(1);
|
392
|
-
VALUE val = TOPN(0);
|
393
|
-
DEBUG_ENTER_INSN("setglobal");
|
394
|
-
ADD_PC(1+1);
|
395
|
-
PREFETCH(GET_PC());
|
396
|
-
POPN(1);
|
397
|
-
#define CURRENT_INSN_setglobal 1
|
398
|
-
#define INSN_IS_SC() 0
|
399
|
-
#define INSN_LABEL(lab) LABEL_setglobal_##lab
|
400
|
-
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
401
|
-
USAGE_ANALYSIS_INSN(BIN(setglobal));
|
402
|
-
USAGE_ANALYSIS_OPERAND(BIN(setglobal), 0, entry);
|
403
|
-
{
|
404
|
-
#line 275 "insns.def"
|
405
|
-
SET_GLOBAL((VALUE)entry, val);
|
406
|
-
|
407
|
-
#line 408 "vm.inc"
|
408
|
-
#undef CURRENT_INSN_setglobal
|
409
|
-
#undef INSN_IS_SC
|
410
|
-
#undef INSN_LABEL
|
411
|
-
#undef LABEL_IS_SC
|
412
|
-
END_INSN(setglobal);}}}
|
413
|
-
INSN_ENTRY(putnil){
|
414
|
-
{
|
415
|
-
VALUE val;
|
416
|
-
|
417
|
-
|
418
|
-
DEBUG_ENTER_INSN("putnil");
|
419
|
-
ADD_PC(1+0);
|
420
|
-
PREFETCH(GET_PC());
|
421
|
-
#define CURRENT_INSN_putnil 1
|
422
|
-
#define INSN_IS_SC() 0
|
423
|
-
#define INSN_LABEL(lab) LABEL_putnil_##lab
|
424
|
-
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
425
|
-
USAGE_ANALYSIS_INSN(BIN(putnil));
|
426
|
-
{
|
427
|
-
#line 294 "insns.def"
|
428
|
-
val = Qnil;
|
429
|
-
|
430
|
-
#line 431 "vm.inc"
|
431
|
-
CHECK_STACK_OVERFLOW(REG_CFP, 1);
|
432
|
-
PUSH(val);
|
433
|
-
#undef CURRENT_INSN_putnil
|
434
|
-
#undef INSN_IS_SC
|
435
|
-
#undef INSN_LABEL
|
436
|
-
#undef LABEL_IS_SC
|
437
|
-
END_INSN(putnil);}}}
|
438
|
-
INSN_ENTRY(putself){
|
439
|
-
{
|
440
|
-
VALUE val;
|
441
|
-
|
442
|
-
|
443
|
-
DEBUG_ENTER_INSN("putself");
|
444
|
-
ADD_PC(1+0);
|
445
|
-
PREFETCH(GET_PC());
|
446
|
-
#define CURRENT_INSN_putself 1
|
447
|
-
#define INSN_IS_SC() 0
|
448
|
-
#define INSN_LABEL(lab) LABEL_putself_##lab
|
449
|
-
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
450
|
-
USAGE_ANALYSIS_INSN(BIN(putself));
|
451
|
-
{
|
452
|
-
#line 308 "insns.def"
|
453
|
-
val = GET_SELF();
|
454
|
-
|
455
|
-
#line 456 "vm.inc"
|
456
|
-
CHECK_STACK_OVERFLOW(REG_CFP, 1);
|
457
|
-
PUSH(val);
|
458
|
-
#undef CURRENT_INSN_putself
|
459
|
-
#undef INSN_IS_SC
|
460
|
-
#undef INSN_LABEL
|
461
|
-
#undef LABEL_IS_SC
|
462
|
-
END_INSN(putself);}}}
|
463
|
-
INSN_ENTRY(putobject){
|
464
|
-
{
|
465
|
-
VALUE val = (VALUE)GET_OPERAND(1);
|
466
|
-
|
467
|
-
DEBUG_ENTER_INSN("putobject");
|
468
|
-
ADD_PC(1+1);
|
469
|
-
PREFETCH(GET_PC());
|
470
|
-
#define CURRENT_INSN_putobject 1
|
471
|
-
#define INSN_IS_SC() 0
|
472
|
-
#define INSN_LABEL(lab) LABEL_putobject_##lab
|
473
|
-
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
474
|
-
USAGE_ANALYSIS_INSN(BIN(putobject));
|
475
|
-
USAGE_ANALYSIS_OPERAND(BIN(putobject), 0, val);
|
476
|
-
{
|
477
|
-
#line 324 "insns.def"
|
478
|
-
/* */
|
479
|
-
|
480
|
-
#line 481 "vm.inc"
|
481
|
-
CHECK_STACK_OVERFLOW(REG_CFP, 1);
|
482
|
-
PUSH(val);
|
483
|
-
#undef CURRENT_INSN_putobject
|
484
|
-
#undef INSN_IS_SC
|
485
|
-
#undef INSN_LABEL
|
486
|
-
#undef LABEL_IS_SC
|
487
|
-
END_INSN(putobject);}}}
|
488
|
-
INSN_ENTRY(putspecialobject){
|
489
|
-
{
|
490
|
-
VALUE val;
|
491
|
-
rb_num_t value_type = (rb_num_t)GET_OPERAND(1);
|
492
|
-
|
493
|
-
DEBUG_ENTER_INSN("putspecialobject");
|
494
|
-
ADD_PC(1+1);
|
495
|
-
PREFETCH(GET_PC());
|
496
|
-
#define CURRENT_INSN_putspecialobject 1
|
497
|
-
#define INSN_IS_SC() 0
|
498
|
-
#define INSN_LABEL(lab) LABEL_putspecialobject_##lab
|
499
|
-
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
500
|
-
USAGE_ANALYSIS_INSN(BIN(putspecialobject));
|
501
|
-
USAGE_ANALYSIS_OPERAND(BIN(putspecialobject), 0, value_type);
|
502
|
-
{
|
503
|
-
#line 339 "insns.def"
|
504
|
-
enum vm_special_object_type type = (enum vm_special_object_type)value_type;
|
505
|
-
|
506
|
-
switch (type) {
|
507
|
-
case VM_SPECIAL_OBJECT_VMCORE:
|
508
|
-
val = rb_mRubyVMFrozenCore;
|
509
|
-
break;
|
510
|
-
case VM_SPECIAL_OBJECT_CBASE:
|
511
|
-
val = vm_get_cbase(GET_ISEQ(), GET_LFP(), GET_DFP());
|
512
|
-
break;
|
513
|
-
case VM_SPECIAL_OBJECT_CONST_BASE:
|
514
|
-
val = vm_get_const_base(GET_ISEQ(), GET_LFP(), GET_DFP());
|
515
|
-
break;
|
516
|
-
default:
|
517
|
-
rb_bug("putspecialobject insn: unknown value_type");
|
518
|
-
}
|
519
|
-
|
520
|
-
#line 521 "vm.inc"
|
521
|
-
CHECK_STACK_OVERFLOW(REG_CFP, 1);
|
522
|
-
PUSH(val);
|
523
|
-
#undef CURRENT_INSN_putspecialobject
|
524
|
-
#undef INSN_IS_SC
|
525
|
-
#undef INSN_LABEL
|
526
|
-
#undef LABEL_IS_SC
|
527
|
-
END_INSN(putspecialobject);}}}
|
528
|
-
INSN_ENTRY(putiseq){
|
529
|
-
{
|
530
|
-
VALUE ret;
|
531
|
-
ISEQ iseq = (ISEQ)GET_OPERAND(1);
|
532
|
-
|
533
|
-
DEBUG_ENTER_INSN("putiseq");
|
534
|
-
ADD_PC(1+1);
|
535
|
-
PREFETCH(GET_PC());
|
536
|
-
#define CURRENT_INSN_putiseq 1
|
537
|
-
#define INSN_IS_SC() 0
|
538
|
-
#define INSN_LABEL(lab) LABEL_putiseq_##lab
|
539
|
-
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
540
|
-
USAGE_ANALYSIS_INSN(BIN(putiseq));
|
541
|
-
USAGE_ANALYSIS_OPERAND(BIN(putiseq), 0, iseq);
|
542
|
-
{
|
543
|
-
#line 367 "insns.def"
|
544
|
-
ret = iseq->self;
|
545
|
-
|
546
|
-
#line 547 "vm.inc"
|
547
|
-
CHECK_STACK_OVERFLOW(REG_CFP, 1);
|
548
|
-
PUSH(ret);
|
549
|
-
#undef CURRENT_INSN_putiseq
|
550
|
-
#undef INSN_IS_SC
|
551
|
-
#undef INSN_LABEL
|
552
|
-
#undef LABEL_IS_SC
|
553
|
-
END_INSN(putiseq);}}}
|
554
|
-
INSN_ENTRY(putstring){
|
555
|
-
{
|
556
|
-
VALUE val;
|
557
|
-
VALUE str = (VALUE)GET_OPERAND(1);
|
558
|
-
|
559
|
-
DEBUG_ENTER_INSN("putstring");
|
560
|
-
ADD_PC(1+1);
|
561
|
-
PREFETCH(GET_PC());
|
562
|
-
#define CURRENT_INSN_putstring 1
|
563
|
-
#define INSN_IS_SC() 0
|
564
|
-
#define INSN_LABEL(lab) LABEL_putstring_##lab
|
565
|
-
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
566
|
-
USAGE_ANALYSIS_INSN(BIN(putstring));
|
567
|
-
USAGE_ANALYSIS_OPERAND(BIN(putstring), 0, str);
|
568
|
-
{
|
569
|
-
#line 381 "insns.def"
|
570
|
-
val = rb_str_resurrect(str);
|
571
|
-
|
572
|
-
#line 573 "vm.inc"
|
573
|
-
CHECK_STACK_OVERFLOW(REG_CFP, 1);
|
574
|
-
PUSH(val);
|
575
|
-
#undef CURRENT_INSN_putstring
|
576
|
-
#undef INSN_IS_SC
|
577
|
-
#undef INSN_LABEL
|
578
|
-
#undef LABEL_IS_SC
|
579
|
-
END_INSN(putstring);}}}
|
580
|
-
INSN_ENTRY(concatstrings){
|
581
|
-
{
|
582
|
-
VALUE val;
|
583
|
-
rb_num_t num = (rb_num_t)GET_OPERAND(1);
|
584
|
-
|
585
|
-
DEBUG_ENTER_INSN("concatstrings");
|
586
|
-
ADD_PC(1+1);
|
587
|
-
PREFETCH(GET_PC());
|
588
|
-
#define CURRENT_INSN_concatstrings 1
|
589
|
-
#define INSN_IS_SC() 0
|
590
|
-
#define INSN_LABEL(lab) LABEL_concatstrings_##lab
|
591
|
-
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
592
|
-
USAGE_ANALYSIS_INSN(BIN(concatstrings));
|
593
|
-
USAGE_ANALYSIS_OPERAND(BIN(concatstrings), 0, num);
|
594
|
-
{
|
595
|
-
#line 395 "insns.def"
|
596
|
-
rb_num_t i = num - 1;
|
597
|
-
|
598
|
-
val = rb_str_resurrect(TOPN(i));
|
599
|
-
while (i-- > 0) {
|
600
|
-
const VALUE v = TOPN(i);
|
601
|
-
rb_str_append(val, v);
|
602
|
-
}
|
603
|
-
POPN(num);
|
604
|
-
|
605
|
-
#line 606 "vm.inc"
|
606
|
-
CHECK_STACK_OVERFLOW(REG_CFP, 1);
|
607
|
-
PUSH(val);
|
608
|
-
#undef CURRENT_INSN_concatstrings
|
609
|
-
#undef INSN_IS_SC
|
610
|
-
#undef INSN_LABEL
|
611
|
-
#undef LABEL_IS_SC
|
612
|
-
END_INSN(concatstrings);}}}
|
613
|
-
INSN_ENTRY(tostring){
|
614
|
-
{
|
615
|
-
|
616
|
-
VALUE val = TOPN(0);
|
617
|
-
DEBUG_ENTER_INSN("tostring");
|
618
|
-
ADD_PC(1+0);
|
619
|
-
PREFETCH(GET_PC());
|
620
|
-
POPN(1);
|
621
|
-
#define CURRENT_INSN_tostring 1
|
622
|
-
#define INSN_IS_SC() 0
|
623
|
-
#define INSN_LABEL(lab) LABEL_tostring_##lab
|
624
|
-
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
625
|
-
USAGE_ANALYSIS_INSN(BIN(tostring));
|
626
|
-
{
|
627
|
-
#line 416 "insns.def"
|
628
|
-
val = rb_obj_as_string(val);
|
629
|
-
|
630
|
-
#line 631 "vm.inc"
|
631
|
-
CHECK_STACK_OVERFLOW(REG_CFP, 1);
|
632
|
-
PUSH(val);
|
633
|
-
#undef CURRENT_INSN_tostring
|
634
|
-
#undef INSN_IS_SC
|
635
|
-
#undef INSN_LABEL
|
636
|
-
#undef LABEL_IS_SC
|
637
|
-
END_INSN(tostring);}}}
|
638
|
-
INSN_ENTRY(toregexp){
|
639
|
-
{
|
640
|
-
VALUE val;
|
641
|
-
rb_num_t cnt = (rb_num_t)GET_OPERAND(2);
|
642
|
-
rb_num_t opt = (rb_num_t)GET_OPERAND(1);
|
643
|
-
|
644
|
-
DEBUG_ENTER_INSN("toregexp");
|
645
|
-
ADD_PC(1+2);
|
646
|
-
PREFETCH(GET_PC());
|
647
|
-
#define CURRENT_INSN_toregexp 1
|
648
|
-
#define INSN_IS_SC() 0
|
649
|
-
#define INSN_LABEL(lab) LABEL_toregexp_##lab
|
650
|
-
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
651
|
-
USAGE_ANALYSIS_INSN(BIN(toregexp));
|
652
|
-
USAGE_ANALYSIS_OPERAND(BIN(toregexp), 0, opt);
|
653
|
-
USAGE_ANALYSIS_OPERAND(BIN(toregexp), 1, cnt);
|
654
|
-
{
|
655
|
-
#line 431 "insns.def"
|
656
|
-
VALUE rb_reg_new_ary(VALUE ary, int options);
|
657
|
-
rb_num_t i;
|
658
|
-
const VALUE ary = rb_ary_tmp_new(cnt);
|
659
|
-
for (i = 0; i < cnt; i++) {
|
660
|
-
rb_ary_store(ary, cnt-i-1, TOPN(i));
|
661
|
-
}
|
662
|
-
POPN(cnt);
|
663
|
-
val = rb_reg_new_ary(ary, (int)opt);
|
664
|
-
rb_ary_clear(ary);
|
665
|
-
|
666
|
-
#line 667 "vm.inc"
|
667
|
-
CHECK_STACK_OVERFLOW(REG_CFP, 1);
|
668
|
-
PUSH(val);
|
669
|
-
#undef CURRENT_INSN_toregexp
|
670
|
-
#undef INSN_IS_SC
|
671
|
-
#undef INSN_LABEL
|
672
|
-
#undef LABEL_IS_SC
|
673
|
-
END_INSN(toregexp);}}}
|
674
|
-
INSN_ENTRY(newarray){
|
675
|
-
{
|
676
|
-
VALUE val;
|
677
|
-
rb_num_t num = (rb_num_t)GET_OPERAND(1);
|
678
|
-
|
679
|
-
DEBUG_ENTER_INSN("newarray");
|
680
|
-
ADD_PC(1+1);
|
681
|
-
PREFETCH(GET_PC());
|
682
|
-
#define CURRENT_INSN_newarray 1
|
683
|
-
#define INSN_IS_SC() 0
|
684
|
-
#define INSN_LABEL(lab) LABEL_newarray_##lab
|
685
|
-
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
686
|
-
USAGE_ANALYSIS_INSN(BIN(newarray));
|
687
|
-
USAGE_ANALYSIS_OPERAND(BIN(newarray), 0, num);
|
688
|
-
{
|
689
|
-
#line 453 "insns.def"
|
690
|
-
val = rb_ary_new4((long)num, STACK_ADDR_FROM_TOP(num));
|
691
|
-
POPN(num);
|
692
|
-
|
693
|
-
#line 694 "vm.inc"
|
694
|
-
CHECK_STACK_OVERFLOW(REG_CFP, 1);
|
695
|
-
PUSH(val);
|
696
|
-
#undef CURRENT_INSN_newarray
|
697
|
-
#undef INSN_IS_SC
|
698
|
-
#undef INSN_LABEL
|
699
|
-
#undef LABEL_IS_SC
|
700
|
-
END_INSN(newarray);}}}
|
701
|
-
INSN_ENTRY(duparray){
|
702
|
-
{
|
703
|
-
VALUE val;
|
704
|
-
VALUE ary = (VALUE)GET_OPERAND(1);
|
705
|
-
|
706
|
-
DEBUG_ENTER_INSN("duparray");
|
707
|
-
ADD_PC(1+1);
|
708
|
-
PREFETCH(GET_PC());
|
709
|
-
#define CURRENT_INSN_duparray 1
|
710
|
-
#define INSN_IS_SC() 0
|
711
|
-
#define INSN_LABEL(lab) LABEL_duparray_##lab
|
712
|
-
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
713
|
-
USAGE_ANALYSIS_INSN(BIN(duparray));
|
714
|
-
USAGE_ANALYSIS_OPERAND(BIN(duparray), 0, ary);
|
715
|
-
{
|
716
|
-
#line 468 "insns.def"
|
717
|
-
val = rb_ary_resurrect(ary);
|
718
|
-
|
719
|
-
#line 720 "vm.inc"
|
720
|
-
CHECK_STACK_OVERFLOW(REG_CFP, 1);
|
721
|
-
PUSH(val);
|
722
|
-
#undef CURRENT_INSN_duparray
|
723
|
-
#undef INSN_IS_SC
|
724
|
-
#undef INSN_LABEL
|
725
|
-
#undef LABEL_IS_SC
|
726
|
-
END_INSN(duparray);}}}
|
727
|
-
INSN_ENTRY(expandarray){
|
728
|
-
{
|
729
|
-
rb_num_t flag = (rb_num_t)GET_OPERAND(2);
|
730
|
-
rb_num_t num = (rb_num_t)GET_OPERAND(1);
|
731
|
-
VALUE ary = TOPN(0);
|
732
|
-
DEBUG_ENTER_INSN("expandarray");
|
733
|
-
ADD_PC(1+2);
|
734
|
-
PREFETCH(GET_PC());
|
735
|
-
POPN(1);
|
736
|
-
#define CURRENT_INSN_expandarray 1
|
737
|
-
#define INSN_IS_SC() 0
|
738
|
-
#define INSN_LABEL(lab) LABEL_expandarray_##lab
|
739
|
-
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
740
|
-
USAGE_ANALYSIS_INSN(BIN(expandarray));
|
741
|
-
USAGE_ANALYSIS_OPERAND(BIN(expandarray), 0, num);
|
742
|
-
USAGE_ANALYSIS_OPERAND(BIN(expandarray), 1, flag);
|
743
|
-
{
|
744
|
-
#line 489 "insns.def"
|
745
|
-
vm_expandarray(GET_CFP(), ary, num, (int)flag);
|
746
|
-
|
747
|
-
#line 748 "vm.inc"
|
748
|
-
#undef CURRENT_INSN_expandarray
|
749
|
-
#undef INSN_IS_SC
|
750
|
-
#undef INSN_LABEL
|
751
|
-
#undef LABEL_IS_SC
|
752
|
-
END_INSN(expandarray);}}}
|
753
|
-
INSN_ENTRY(concatarray){
|
754
|
-
{
|
755
|
-
VALUE ary;
|
756
|
-
|
757
|
-
VALUE ary1 = TOPN(1);
|
758
|
-
VALUE ary2st = TOPN(0);
|
759
|
-
DEBUG_ENTER_INSN("concatarray");
|
760
|
-
ADD_PC(1+0);
|
761
|
-
PREFETCH(GET_PC());
|
762
|
-
POPN(2);
|
763
|
-
#define CURRENT_INSN_concatarray 1
|
764
|
-
#define INSN_IS_SC() 0
|
765
|
-
#define INSN_LABEL(lab) LABEL_concatarray_##lab
|
766
|
-
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
767
|
-
USAGE_ANALYSIS_INSN(BIN(concatarray));
|
768
|
-
{
|
769
|
-
#line 503 "insns.def"
|
770
|
-
const VALUE ary2 = ary2st;
|
771
|
-
VALUE tmp1 = rb_check_convert_type(ary1, T_ARRAY, "Array", "to_a");
|
772
|
-
VALUE tmp2 = rb_check_convert_type(ary2, T_ARRAY, "Array", "to_a");
|
773
|
-
|
774
|
-
if (NIL_P(tmp1)) {
|
775
|
-
tmp1 = rb_ary_new3(1, ary1);
|
776
|
-
}
|
777
|
-
|
778
|
-
if (NIL_P(tmp2)) {
|
779
|
-
tmp2 = rb_ary_new3(1, ary2);
|
780
|
-
}
|
781
|
-
|
782
|
-
if (tmp1 == ary1) {
|
783
|
-
tmp1 = rb_ary_dup(ary1);
|
784
|
-
}
|
785
|
-
ary = rb_ary_concat(tmp1, tmp2);
|
786
|
-
|
787
|
-
#line 788 "vm.inc"
|
788
|
-
CHECK_STACK_OVERFLOW(REG_CFP, 1);
|
789
|
-
PUSH(ary);
|
790
|
-
#undef CURRENT_INSN_concatarray
|
791
|
-
#undef INSN_IS_SC
|
792
|
-
#undef INSN_LABEL
|
793
|
-
#undef LABEL_IS_SC
|
794
|
-
END_INSN(concatarray);}}}
|
795
|
-
INSN_ENTRY(splatarray){
|
796
|
-
{
|
797
|
-
VALUE obj;
|
798
|
-
VALUE flag = (VALUE)GET_OPERAND(1);
|
799
|
-
VALUE ary = TOPN(0);
|
800
|
-
DEBUG_ENTER_INSN("splatarray");
|
801
|
-
ADD_PC(1+1);
|
802
|
-
PREFETCH(GET_PC());
|
803
|
-
POPN(1);
|
804
|
-
#define CURRENT_INSN_splatarray 1
|
805
|
-
#define INSN_IS_SC() 0
|
806
|
-
#define INSN_LABEL(lab) LABEL_splatarray_##lab
|
807
|
-
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
808
|
-
USAGE_ANALYSIS_INSN(BIN(splatarray));
|
809
|
-
USAGE_ANALYSIS_OPERAND(BIN(splatarray), 0, flag);
|
810
|
-
{
|
811
|
-
#line 532 "insns.def"
|
812
|
-
VALUE tmp = rb_check_convert_type(ary, T_ARRAY, "Array", "to_a");
|
813
|
-
if (NIL_P(tmp)) {
|
814
|
-
tmp = rb_ary_new3(1, ary);
|
815
|
-
}
|
816
|
-
else if (RTEST(flag)) {
|
817
|
-
tmp = rb_ary_dup(tmp);
|
818
|
-
}
|
819
|
-
obj = tmp;
|
820
|
-
|
821
|
-
#line 822 "vm.inc"
|
822
|
-
CHECK_STACK_OVERFLOW(REG_CFP, 1);
|
823
|
-
PUSH(obj);
|
824
|
-
#undef CURRENT_INSN_splatarray
|
825
|
-
#undef INSN_IS_SC
|
826
|
-
#undef INSN_LABEL
|
827
|
-
#undef LABEL_IS_SC
|
828
|
-
END_INSN(splatarray);}}}
|
829
|
-
INSN_ENTRY(checkincludearray){
|
830
|
-
{
|
831
|
-
VALUE result;
|
832
|
-
VALUE flag = (VALUE)GET_OPERAND(1);
|
833
|
-
VALUE obj = TOPN(1);
|
834
|
-
VALUE ary = TOPN(0);
|
835
|
-
DEBUG_ENTER_INSN("checkincludearray");
|
836
|
-
ADD_PC(1+1);
|
837
|
-
PREFETCH(GET_PC());
|
838
|
-
POPN(2);
|
839
|
-
#define CURRENT_INSN_checkincludearray 1
|
840
|
-
#define INSN_IS_SC() 0
|
841
|
-
#define INSN_LABEL(lab) LABEL_checkincludearray_##lab
|
842
|
-
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
843
|
-
USAGE_ANALYSIS_INSN(BIN(checkincludearray));
|
844
|
-
USAGE_ANALYSIS_OPERAND(BIN(checkincludearray), 0, flag);
|
845
|
-
{
|
846
|
-
#line 553 "insns.def"
|
847
|
-
int i;
|
848
|
-
result = Qfalse;
|
849
|
-
|
850
|
-
if (TYPE(ary) != T_ARRAY) {
|
851
|
-
ary = rb_Array(ary);
|
852
|
-
}
|
853
|
-
|
854
|
-
if (flag == Qtrue) {
|
855
|
-
/* NODE_CASE */
|
856
|
-
for (i = 0; i < RARRAY_LEN(ary); i++) {
|
857
|
-
/* TODO: fix me (use another method dispatch) */
|
858
|
-
if (RTEST(rb_funcall2(RARRAY_PTR(ary)[i], idEqq, 1, &obj))) {
|
859
|
-
result = Qtrue;
|
860
|
-
break;
|
861
|
-
}
|
862
|
-
}
|
863
|
-
}
|
864
|
-
else {
|
865
|
-
obj = Qfalse;
|
866
|
-
/* NODE_WHEN */
|
867
|
-
for (i = 0; i < RARRAY_LEN(ary); i++) {
|
868
|
-
if (RTEST(RARRAY_PTR(ary)[i])) {
|
869
|
-
obj = result = Qtrue;
|
870
|
-
break;
|
871
|
-
}
|
872
|
-
}
|
873
|
-
}
|
874
|
-
|
875
|
-
#line 876 "vm.inc"
|
876
|
-
CHECK_STACK_OVERFLOW(REG_CFP, 2);
|
877
|
-
PUSH(obj);
|
878
|
-
PUSH(result);
|
879
|
-
#undef CURRENT_INSN_checkincludearray
|
880
|
-
#undef INSN_IS_SC
|
881
|
-
#undef INSN_LABEL
|
882
|
-
#undef LABEL_IS_SC
|
883
|
-
END_INSN(checkincludearray);}}}
|
884
|
-
INSN_ENTRY(newhash){
|
885
|
-
{
|
886
|
-
VALUE val;
|
887
|
-
rb_num_t num = (rb_num_t)GET_OPERAND(1);
|
888
|
-
|
889
|
-
DEBUG_ENTER_INSN("newhash");
|
890
|
-
ADD_PC(1+1);
|
891
|
-
PREFETCH(GET_PC());
|
892
|
-
#define CURRENT_INSN_newhash 1
|
893
|
-
#define INSN_IS_SC() 0
|
894
|
-
#define INSN_LABEL(lab) LABEL_newhash_##lab
|
895
|
-
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
896
|
-
USAGE_ANALYSIS_INSN(BIN(newhash));
|
897
|
-
USAGE_ANALYSIS_OPERAND(BIN(newhash), 0, num);
|
898
|
-
{
|
899
|
-
#line 594 "insns.def"
|
900
|
-
rb_num_t i;
|
901
|
-
val = rb_hash_new();
|
902
|
-
|
903
|
-
for (i = num; i > 0; i -= 2) {
|
904
|
-
const VALUE v = TOPN(i - 2);
|
905
|
-
const VALUE k = TOPN(i - 1);
|
906
|
-
rb_hash_aset(val, k, v);
|
907
|
-
}
|
908
|
-
POPN(num);
|
909
|
-
|
910
|
-
#line 911 "vm.inc"
|
911
|
-
CHECK_STACK_OVERFLOW(REG_CFP, 1);
|
912
|
-
PUSH(val);
|
913
|
-
#undef CURRENT_INSN_newhash
|
914
|
-
#undef INSN_IS_SC
|
915
|
-
#undef INSN_LABEL
|
916
|
-
#undef LABEL_IS_SC
|
917
|
-
END_INSN(newhash);}}}
|
918
|
-
INSN_ENTRY(newrange){
|
919
|
-
{
|
920
|
-
VALUE val;
|
921
|
-
rb_num_t flag = (rb_num_t)GET_OPERAND(1);
|
922
|
-
VALUE low = TOPN(1);
|
923
|
-
VALUE high = TOPN(0);
|
924
|
-
DEBUG_ENTER_INSN("newrange");
|
925
|
-
ADD_PC(1+1);
|
926
|
-
PREFETCH(GET_PC());
|
927
|
-
POPN(2);
|
928
|
-
#define CURRENT_INSN_newrange 1
|
929
|
-
#define INSN_IS_SC() 0
|
930
|
-
#define INSN_LABEL(lab) LABEL_newrange_##lab
|
931
|
-
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
932
|
-
USAGE_ANALYSIS_INSN(BIN(newrange));
|
933
|
-
USAGE_ANALYSIS_OPERAND(BIN(newrange), 0, flag);
|
934
|
-
{
|
935
|
-
#line 616 "insns.def"
|
936
|
-
val = rb_range_new(low, high, (int)flag);
|
937
|
-
|
938
|
-
#line 939 "vm.inc"
|
939
|
-
CHECK_STACK_OVERFLOW(REG_CFP, 1);
|
940
|
-
PUSH(val);
|
941
|
-
#undef CURRENT_INSN_newrange
|
942
|
-
#undef INSN_IS_SC
|
943
|
-
#undef INSN_LABEL
|
944
|
-
#undef LABEL_IS_SC
|
945
|
-
END_INSN(newrange);}}}
|
946
|
-
INSN_ENTRY(pop){
|
947
|
-
{
|
948
|
-
|
949
|
-
VALUE val = TOPN(0);
|
950
|
-
DEBUG_ENTER_INSN("pop");
|
951
|
-
ADD_PC(1+0);
|
952
|
-
PREFETCH(GET_PC());
|
953
|
-
POPN(1);
|
954
|
-
#define CURRENT_INSN_pop 1
|
955
|
-
#define INSN_IS_SC() 0
|
956
|
-
#define INSN_LABEL(lab) LABEL_pop_##lab
|
957
|
-
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
958
|
-
USAGE_ANALYSIS_INSN(BIN(pop));
|
959
|
-
{
|
960
|
-
#line 634 "insns.def"
|
961
|
-
(void)val;
|
962
|
-
/* none */
|
963
|
-
|
964
|
-
#line 965 "vm.inc"
|
965
|
-
#undef CURRENT_INSN_pop
|
966
|
-
#undef INSN_IS_SC
|
967
|
-
#undef INSN_LABEL
|
968
|
-
#undef LABEL_IS_SC
|
969
|
-
END_INSN(pop);}}}
|
970
|
-
INSN_ENTRY(dup){
|
971
|
-
{
|
972
|
-
VALUE val2;
|
973
|
-
VALUE val1;
|
974
|
-
|
975
|
-
VALUE val = TOPN(0);
|
976
|
-
DEBUG_ENTER_INSN("dup");
|
977
|
-
ADD_PC(1+0);
|
978
|
-
PREFETCH(GET_PC());
|
979
|
-
POPN(1);
|
980
|
-
#define CURRENT_INSN_dup 1
|
981
|
-
#define INSN_IS_SC() 0
|
982
|
-
#define INSN_LABEL(lab) LABEL_dup_##lab
|
983
|
-
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
984
|
-
USAGE_ANALYSIS_INSN(BIN(dup));
|
985
|
-
{
|
986
|
-
#line 649 "insns.def"
|
987
|
-
val1 = val2 = val;
|
988
|
-
|
989
|
-
#line 990 "vm.inc"
|
990
|
-
CHECK_STACK_OVERFLOW(REG_CFP, 2);
|
991
|
-
PUSH(val1);
|
992
|
-
PUSH(val2);
|
993
|
-
#undef CURRENT_INSN_dup
|
994
|
-
#undef INSN_IS_SC
|
995
|
-
#undef INSN_LABEL
|
996
|
-
#undef LABEL_IS_SC
|
997
|
-
END_INSN(dup);}}}
|
998
|
-
INSN_ENTRY(dupn){
|
999
|
-
{
|
1000
|
-
rb_num_t n = (rb_num_t)GET_OPERAND(1);
|
1001
|
-
|
1002
|
-
DEBUG_ENTER_INSN("dupn");
|
1003
|
-
ADD_PC(1+1);
|
1004
|
-
PREFETCH(GET_PC());
|
1005
|
-
#define CURRENT_INSN_dupn 1
|
1006
|
-
#define INSN_IS_SC() 0
|
1007
|
-
#define INSN_LABEL(lab) LABEL_dupn_##lab
|
1008
|
-
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
1009
|
-
USAGE_ANALYSIS_INSN(BIN(dupn));
|
1010
|
-
USAGE_ANALYSIS_OPERAND(BIN(dupn), 0, n);
|
1011
|
-
{
|
1012
|
-
#line 663 "insns.def"
|
1013
|
-
rb_num_t i;
|
1014
|
-
VALUE *sp = STACK_ADDR_FROM_TOP(n);
|
1015
|
-
for (i = 0; i < n; i++) {
|
1016
|
-
GET_SP()[i] = sp[i];
|
1017
|
-
}
|
1018
|
-
INC_SP(n);
|
1019
|
-
|
1020
|
-
#line 1021 "vm.inc"
|
1021
|
-
#undef CURRENT_INSN_dupn
|
1022
|
-
#undef INSN_IS_SC
|
1023
|
-
#undef INSN_LABEL
|
1024
|
-
#undef LABEL_IS_SC
|
1025
|
-
END_INSN(dupn);}}}
|
1026
|
-
INSN_ENTRY(swap){
|
1027
|
-
{
|
1028
|
-
|
1029
|
-
VALUE val = TOPN(1);
|
1030
|
-
VALUE obj = TOPN(0);
|
1031
|
-
DEBUG_ENTER_INSN("swap");
|
1032
|
-
ADD_PC(1+0);
|
1033
|
-
PREFETCH(GET_PC());
|
1034
|
-
POPN(2);
|
1035
|
-
#define CURRENT_INSN_swap 1
|
1036
|
-
#define INSN_IS_SC() 0
|
1037
|
-
#define INSN_LABEL(lab) LABEL_swap_##lab
|
1038
|
-
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
1039
|
-
USAGE_ANALYSIS_INSN(BIN(swap));
|
1040
|
-
{
|
1041
|
-
#line 683 "insns.def"
|
1042
|
-
/* none */
|
1043
|
-
|
1044
|
-
#line 1045 "vm.inc"
|
1045
|
-
CHECK_STACK_OVERFLOW(REG_CFP, 2);
|
1046
|
-
PUSH(obj);
|
1047
|
-
PUSH(val);
|
1048
|
-
#undef CURRENT_INSN_swap
|
1049
|
-
#undef INSN_IS_SC
|
1050
|
-
#undef INSN_LABEL
|
1051
|
-
#undef LABEL_IS_SC
|
1052
|
-
END_INSN(swap);}}}
|
1053
|
-
INSN_ENTRY(reput){
|
1054
|
-
{
|
1055
|
-
|
1056
|
-
VALUE val = TOPN(0);
|
1057
|
-
DEBUG_ENTER_INSN("reput");
|
1058
|
-
ADD_PC(1+0);
|
1059
|
-
PREFETCH(GET_PC());
|
1060
|
-
POPN(1);
|
1061
|
-
#define CURRENT_INSN_reput 1
|
1062
|
-
#define INSN_IS_SC() 0
|
1063
|
-
#define INSN_LABEL(lab) LABEL_reput_##lab
|
1064
|
-
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
1065
|
-
USAGE_ANALYSIS_INSN(BIN(reput));
|
1066
|
-
{
|
1067
|
-
#line 697 "insns.def"
|
1068
|
-
/* none */
|
1069
|
-
|
1070
|
-
#line 1071 "vm.inc"
|
1071
|
-
CHECK_STACK_OVERFLOW(REG_CFP, 1);
|
1072
|
-
PUSH(val);
|
1073
|
-
#undef CURRENT_INSN_reput
|
1074
|
-
#undef INSN_IS_SC
|
1075
|
-
#undef INSN_LABEL
|
1076
|
-
#undef LABEL_IS_SC
|
1077
|
-
END_INSN(reput);}}}
|
1078
|
-
INSN_ENTRY(topn){
|
1079
|
-
{
|
1080
|
-
VALUE val;
|
1081
|
-
rb_num_t n = (rb_num_t)GET_OPERAND(1);
|
1082
|
-
|
1083
|
-
DEBUG_ENTER_INSN("topn");
|
1084
|
-
ADD_PC(1+1);
|
1085
|
-
PREFETCH(GET_PC());
|
1086
|
-
#define CURRENT_INSN_topn 1
|
1087
|
-
#define INSN_IS_SC() 0
|
1088
|
-
#define INSN_LABEL(lab) LABEL_topn_##lab
|
1089
|
-
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
1090
|
-
USAGE_ANALYSIS_INSN(BIN(topn));
|
1091
|
-
USAGE_ANALYSIS_OPERAND(BIN(topn), 0, n);
|
1092
|
-
{
|
1093
|
-
#line 711 "insns.def"
|
1094
|
-
val = TOPN(n);
|
1095
|
-
|
1096
|
-
#line 1097 "vm.inc"
|
1097
|
-
CHECK_STACK_OVERFLOW(REG_CFP, 1);
|
1098
|
-
PUSH(val);
|
1099
|
-
#undef CURRENT_INSN_topn
|
1100
|
-
#undef INSN_IS_SC
|
1101
|
-
#undef INSN_LABEL
|
1102
|
-
#undef LABEL_IS_SC
|
1103
|
-
END_INSN(topn);}}}
|
1104
|
-
INSN_ENTRY(setn){
|
1105
|
-
{
|
1106
|
-
rb_num_t n = (rb_num_t)GET_OPERAND(1);
|
1107
|
-
VALUE val = TOPN(0);
|
1108
|
-
DEBUG_ENTER_INSN("setn");
|
1109
|
-
ADD_PC(1+1);
|
1110
|
-
PREFETCH(GET_PC());
|
1111
|
-
POPN(1);
|
1112
|
-
#define CURRENT_INSN_setn 1
|
1113
|
-
#define INSN_IS_SC() 0
|
1114
|
-
#define INSN_LABEL(lab) LABEL_setn_##lab
|
1115
|
-
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
1116
|
-
USAGE_ANALYSIS_INSN(BIN(setn));
|
1117
|
-
USAGE_ANALYSIS_OPERAND(BIN(setn), 0, n);
|
1118
|
-
{
|
1119
|
-
#line 725 "insns.def"
|
1120
|
-
TOPN(n-1) = val;
|
1121
|
-
|
1122
|
-
#line 1123 "vm.inc"
|
1123
|
-
CHECK_STACK_OVERFLOW(REG_CFP, 1);
|
1124
|
-
PUSH(val);
|
1125
|
-
#undef CURRENT_INSN_setn
|
1126
|
-
#undef INSN_IS_SC
|
1127
|
-
#undef INSN_LABEL
|
1128
|
-
#undef LABEL_IS_SC
|
1129
|
-
END_INSN(setn);}}}
|
1130
|
-
INSN_ENTRY(adjuststack){
|
1131
|
-
{
|
1132
|
-
rb_num_t n = (rb_num_t)GET_OPERAND(1);
|
1133
|
-
|
1134
|
-
DEBUG_ENTER_INSN("adjuststack");
|
1135
|
-
ADD_PC(1+1);
|
1136
|
-
PREFETCH(GET_PC());
|
1137
|
-
#define CURRENT_INSN_adjuststack 1
|
1138
|
-
#define INSN_IS_SC() 0
|
1139
|
-
#define INSN_LABEL(lab) LABEL_adjuststack_##lab
|
1140
|
-
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
1141
|
-
USAGE_ANALYSIS_INSN(BIN(adjuststack));
|
1142
|
-
USAGE_ANALYSIS_OPERAND(BIN(adjuststack), 0, n);
|
1143
|
-
{
|
1144
|
-
#line 739 "insns.def"
|
1145
|
-
DEC_SP(n);
|
1146
|
-
|
1147
|
-
#line 1148 "vm.inc"
|
1148
|
-
#undef CURRENT_INSN_adjuststack
|
1149
|
-
#undef INSN_IS_SC
|
1150
|
-
#undef INSN_LABEL
|
1151
|
-
#undef LABEL_IS_SC
|
1152
|
-
END_INSN(adjuststack);}}}
|
1153
|
-
INSN_ENTRY(defined){
|
1154
|
-
{
|
1155
|
-
VALUE val;
|
1156
|
-
VALUE needstr = (VALUE)GET_OPERAND(3);
|
1157
|
-
VALUE obj = (VALUE)GET_OPERAND(2);
|
1158
|
-
rb_num_t op_type = (rb_num_t)GET_OPERAND(1);
|
1159
|
-
VALUE v = TOPN(0);
|
1160
|
-
DEBUG_ENTER_INSN("defined");
|
1161
|
-
ADD_PC(1+3);
|
1162
|
-
PREFETCH(GET_PC());
|
1163
|
-
POPN(1);
|
1164
|
-
#define CURRENT_INSN_defined 1
|
1165
|
-
#define INSN_IS_SC() 0
|
1166
|
-
#define INSN_LABEL(lab) LABEL_defined_##lab
|
1167
|
-
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
1168
|
-
USAGE_ANALYSIS_INSN(BIN(defined));
|
1169
|
-
USAGE_ANALYSIS_OPERAND(BIN(defined), 0, op_type);
|
1170
|
-
USAGE_ANALYSIS_OPERAND(BIN(defined), 1, obj);
|
1171
|
-
USAGE_ANALYSIS_OPERAND(BIN(defined), 2, needstr);
|
1172
|
-
{
|
1173
|
-
#line 758 "insns.def"
|
1174
|
-
VALUE klass;
|
1175
|
-
const char *expr_type = 0;
|
1176
|
-
enum defined_type type = (enum defined_type)op_type;
|
1177
|
-
|
1178
|
-
val = Qnil;
|
1179
|
-
|
1180
|
-
switch (type) {
|
1181
|
-
case DEFINED_IVAR:
|
1182
|
-
if (rb_ivar_defined(GET_SELF(), SYM2ID(obj))) {
|
1183
|
-
expr_type = "instance-variable";
|
1184
|
-
}
|
1185
|
-
break;
|
1186
|
-
case DEFINED_IVAR2:
|
1187
|
-
klass = vm_get_cbase(GET_ISEQ(), GET_LFP(), GET_DFP());
|
1188
|
-
break;
|
1189
|
-
case DEFINED_GVAR:
|
1190
|
-
if (rb_gvar_defined(rb_global_entry(SYM2ID(obj)))) {
|
1191
|
-
expr_type = "global-variable";
|
1192
|
-
}
|
1193
|
-
break;
|
1194
|
-
case DEFINED_CVAR:
|
1195
|
-
{
|
1196
|
-
NODE *cref = vm_get_cref(GET_ISEQ(), GET_LFP(), GET_DFP());
|
1197
|
-
klass = vm_get_cvar_base(cref);
|
1198
|
-
if (rb_cvar_defined(klass, SYM2ID(obj))) {
|
1199
|
-
expr_type = "class variable";
|
1200
|
-
}
|
1201
|
-
break;
|
1202
|
-
}
|
1203
|
-
case DEFINED_CONST:
|
1204
|
-
klass = v;
|
1205
|
-
if (vm_get_ev_const(th, GET_ISEQ(), klass, SYM2ID(obj), 1)) {
|
1206
|
-
expr_type = "constant";
|
1207
|
-
}
|
1208
|
-
break;
|
1209
|
-
case DEFINED_FUNC:
|
1210
|
-
klass = CLASS_OF(v);
|
1211
|
-
if (rb_method_boundp(klass, SYM2ID(obj), 0)) {
|
1212
|
-
expr_type = "method";
|
1213
|
-
}
|
1214
|
-
break;
|
1215
|
-
case DEFINED_METHOD:{
|
1216
|
-
VALUE klass = CLASS_OF(v);
|
1217
|
-
const rb_method_entry_t *me = rb_method_entry(klass, SYM2ID(obj));
|
1218
|
-
|
1219
|
-
if (me) {
|
1220
|
-
if (!(me->flag & NOEX_PRIVATE)) {
|
1221
|
-
if (!((me->flag & NOEX_PROTECTED) &&
|
1222
|
-
!rb_obj_is_kind_of(GET_SELF(),
|
1223
|
-
rb_class_real(klass)))) {
|
1224
|
-
expr_type = "method";
|
1225
|
-
}
|
1226
|
-
}
|
1227
|
-
}
|
1228
|
-
{
|
1229
|
-
VALUE args[2];
|
1230
|
-
VALUE r;
|
1231
|
-
|
1232
|
-
args[0] = obj; args[1] = Qfalse;
|
1233
|
-
r = rb_check_funcall(v, rb_intern("respond_to_missing?"), 2, args);
|
1234
|
-
if (r != Qundef && RTEST(r))
|
1235
|
-
expr_type = "method";
|
1236
|
-
}
|
1237
|
-
break;
|
1238
|
-
}
|
1239
|
-
case DEFINED_YIELD:
|
1240
|
-
if (GET_BLOCK_PTR()) {
|
1241
|
-
expr_type = "yield";
|
1242
|
-
}
|
1243
|
-
break;
|
1244
|
-
case DEFINED_ZSUPER:{
|
1245
|
-
rb_iseq_t *iseq = GET_ISEQ();
|
1246
|
-
while (iseq) {
|
1247
|
-
if (iseq->defined_method_id) {
|
1248
|
-
break;
|
1249
|
-
}
|
1250
|
-
iseq = iseq->parent_iseq;
|
1251
|
-
}
|
1252
|
-
if (iseq) {
|
1253
|
-
VALUE klass = vm_search_normal_superclass(iseq->klass, GET_SELF());
|
1254
|
-
if (rb_method_boundp(klass, iseq->defined_method_id, 0)) {
|
1255
|
-
expr_type = "super";
|
1256
|
-
}
|
1257
|
-
}
|
1258
|
-
break;
|
1259
|
-
}
|
1260
|
-
case DEFINED_REF:{
|
1261
|
-
val = vm_getspecial(th, GET_LFP(), Qfalse, FIX2INT(obj));
|
1262
|
-
if (val != Qnil) {
|
1263
|
-
expr_type = "global-variable";
|
1264
|
-
}
|
1265
|
-
break;
|
1266
|
-
}
|
1267
|
-
default:
|
1268
|
-
rb_bug("unimplemented defined? type (VM)");
|
1269
|
-
break;
|
1270
|
-
}
|
1271
|
-
if (expr_type != 0) {
|
1272
|
-
if (needstr != Qfalse) {
|
1273
|
-
val = rb_str_new2(expr_type);
|
1274
|
-
}
|
1275
|
-
else {
|
1276
|
-
val = Qtrue;
|
1277
|
-
}
|
1278
|
-
}
|
1279
|
-
|
1280
|
-
#line 1281 "vm.inc"
|
1281
|
-
CHECK_STACK_OVERFLOW(REG_CFP, 1);
|
1282
|
-
PUSH(val);
|
1283
|
-
#undef CURRENT_INSN_defined
|
1284
|
-
#undef INSN_IS_SC
|
1285
|
-
#undef INSN_LABEL
|
1286
|
-
#undef LABEL_IS_SC
|
1287
|
-
END_INSN(defined);}}}
|
1288
|
-
INSN_ENTRY(trace){
|
1289
|
-
{
|
1290
|
-
rb_num_t nf = (rb_num_t)GET_OPERAND(1);
|
1291
|
-
|
1292
|
-
DEBUG_ENTER_INSN("trace");
|
1293
|
-
ADD_PC(1+1);
|
1294
|
-
PREFETCH(GET_PC());
|
1295
|
-
#define CURRENT_INSN_trace 1
|
1296
|
-
#define INSN_IS_SC() 0
|
1297
|
-
#define INSN_LABEL(lab) LABEL_trace_##lab
|
1298
|
-
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
1299
|
-
USAGE_ANALYSIS_INSN(BIN(trace));
|
1300
|
-
USAGE_ANALYSIS_OPERAND(BIN(trace), 0, nf);
|
1301
|
-
{
|
1302
|
-
#line 876 "insns.def"
|
1303
|
-
rb_event_flag_t flag = (rb_event_flag_t)nf;
|
1304
|
-
|
1305
|
-
EXEC_EVENT_HOOK(th, flag, GET_SELF(), 0, 0 /* TODO: id, klass */);
|
1306
|
-
|
1307
|
-
#line 1308 "vm.inc"
|
1308
|
-
#undef CURRENT_INSN_trace
|
1309
|
-
#undef INSN_IS_SC
|
1310
|
-
#undef INSN_LABEL
|
1311
|
-
#undef LABEL_IS_SC
|
1312
|
-
END_INSN(trace);}}}
|
1313
|
-
INSN_ENTRY(defineclass){
|
1314
|
-
{
|
1315
|
-
VALUE val;
|
1316
|
-
rb_num_t define_type = (rb_num_t)GET_OPERAND(3);
|
1317
|
-
ISEQ class_iseq = (ISEQ)GET_OPERAND(2);
|
1318
|
-
ID id = (ID)GET_OPERAND(1);
|
1319
|
-
VALUE cbase = TOPN(1);
|
1320
|
-
VALUE super = TOPN(0);
|
1321
|
-
DEBUG_ENTER_INSN("defineclass");
|
1322
|
-
ADD_PC(1+3);
|
1323
|
-
PREFETCH(GET_PC());
|
1324
|
-
POPN(2);
|
1325
|
-
#define CURRENT_INSN_defineclass 1
|
1326
|
-
#define INSN_IS_SC() 0
|
1327
|
-
#define INSN_LABEL(lab) LABEL_defineclass_##lab
|
1328
|
-
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
1329
|
-
USAGE_ANALYSIS_INSN(BIN(defineclass));
|
1330
|
-
USAGE_ANALYSIS_OPERAND(BIN(defineclass), 0, id);
|
1331
|
-
USAGE_ANALYSIS_OPERAND(BIN(defineclass), 1, class_iseq);
|
1332
|
-
USAGE_ANALYSIS_OPERAND(BIN(defineclass), 2, define_type);
|
1333
|
-
{
|
1334
|
-
#line 900 "insns.def"
|
1335
|
-
VALUE klass;
|
1336
|
-
|
1337
|
-
switch ((int)define_type) {
|
1338
|
-
case 0: /* scoped: class Foo::Bar */
|
1339
|
-
case 3: /* no scope: class Bar */
|
1340
|
-
/* val is dummy. classdef returns class scope value */
|
1341
|
-
|
1342
|
-
if (super == Qnil) {
|
1343
|
-
super = rb_cObject;
|
1344
|
-
}
|
1345
|
-
|
1346
|
-
vm_check_if_namespace(cbase);
|
1347
|
-
|
1348
|
-
/* find klass */
|
1349
|
-
rb_autoload_load(cbase, id);
|
1350
|
-
if ((klass = vm_search_const_defined_class(cbase, id)) != 0) {
|
1351
|
-
/* already exist */
|
1352
|
-
klass = define_type == 0 ? rb_public_const_get_at(klass, id) : rb_const_get_at(klass, id);
|
1353
|
-
if (TYPE(klass) != T_CLASS) {
|
1354
|
-
rb_raise(rb_eTypeError, "%s is not a class", rb_id2name(id));
|
1355
|
-
}
|
1356
|
-
|
1357
|
-
if (super != rb_cObject) {
|
1358
|
-
VALUE tmp;
|
1359
|
-
tmp = rb_class_real(RCLASS_SUPER(klass));
|
1360
|
-
|
1361
|
-
if (tmp != super) {
|
1362
|
-
rb_raise(rb_eTypeError, "superclass mismatch for class %s",
|
1363
|
-
rb_id2name(id));
|
1364
|
-
}
|
1365
|
-
}
|
1366
|
-
}
|
1367
|
-
else {
|
1368
|
-
/* new class declaration */
|
1369
|
-
klass = rb_define_class_id(id, super);
|
1370
|
-
rb_set_class_path_string(klass, cbase, rb_id2str(id));
|
1371
|
-
rb_const_set(cbase, id, klass);
|
1372
|
-
rb_class_inherited(super, klass);
|
1373
|
-
}
|
1374
|
-
break;
|
1375
|
-
case 1:
|
1376
|
-
/* val is dummy. classdef returns class scope value */
|
1377
|
-
/* super is dummy */
|
1378
|
-
klass = rb_singleton_class(cbase);
|
1379
|
-
break;
|
1380
|
-
case 2: /* scoped: module Foo::Bar or module ::Bar */
|
1381
|
-
case 5: /* no scope: module Bar */
|
1382
|
-
/* val is dummy. classdef returns class scope value */
|
1383
|
-
/* super is dummy */
|
1384
|
-
|
1385
|
-
vm_check_if_namespace(cbase);
|
1386
|
-
|
1387
|
-
/* find klass */
|
1388
|
-
if ((klass = vm_search_const_defined_class(cbase, id)) != 0) {
|
1389
|
-
klass = define_type == 2 ? rb_public_const_get_at(klass, id) : rb_const_get_at(klass, id);
|
1390
|
-
/* already exist */
|
1391
|
-
if (TYPE(klass) != T_MODULE) {
|
1392
|
-
rb_raise(rb_eTypeError, "%s is not a module", rb_id2name(id));
|
1393
|
-
}
|
1394
|
-
}
|
1395
|
-
else {
|
1396
|
-
/* new module declaration */
|
1397
|
-
klass = rb_define_module_id(id);
|
1398
|
-
rb_set_class_path_string(klass, cbase, rb_id2str(id));
|
1399
|
-
rb_const_set(cbase, id, klass);
|
1400
|
-
}
|
1401
|
-
break;
|
1402
|
-
default:
|
1403
|
-
rb_bug("unknown defineclass type: %d", (int)define_type);
|
1404
|
-
}
|
1405
|
-
|
1406
|
-
COPY_CREF(class_iseq->cref_stack, vm_cref_push(th, klass, NOEX_PUBLIC, NULL));
|
1407
|
-
|
1408
|
-
/* enter scope */
|
1409
|
-
vm_push_frame(th, class_iseq,
|
1410
|
-
VM_FRAME_MAGIC_CLASS, klass, (VALUE) GET_BLOCK_PTR(),
|
1411
|
-
class_iseq->iseq_encoded, GET_SP(), 0,
|
1412
|
-
class_iseq->local_size);
|
1413
|
-
RESTORE_REGS();
|
1414
|
-
|
1415
|
-
INC_VM_STATE_VERSION();
|
1416
|
-
NEXT_INSN();
|
1417
|
-
|
1418
|
-
#line 1419 "vm.inc"
|
1419
|
-
CHECK_STACK_OVERFLOW(REG_CFP, 1);
|
1420
|
-
PUSH(val);
|
1421
|
-
#undef CURRENT_INSN_defineclass
|
1422
|
-
#undef INSN_IS_SC
|
1423
|
-
#undef INSN_LABEL
|
1424
|
-
#undef LABEL_IS_SC
|
1425
|
-
END_INSN(defineclass);}}}
|
1426
|
-
INSN_ENTRY(send){
|
1427
|
-
{
|
1428
|
-
VALUE val;
|
1429
|
-
IC ic = (IC)GET_OPERAND(5);
|
1430
|
-
rb_num_t op_flag = (rb_num_t)GET_OPERAND(4);
|
1431
|
-
ISEQ blockiseq = (ISEQ)GET_OPERAND(3);
|
1432
|
-
rb_num_t op_argc = (rb_num_t)GET_OPERAND(2);
|
1433
|
-
ID op_id = (ID)GET_OPERAND(1);
|
1434
|
-
|
1435
|
-
DEBUG_ENTER_INSN("send");
|
1436
|
-
ADD_PC(1+5);
|
1437
|
-
PREFETCH(GET_PC());
|
1438
|
-
#define CURRENT_INSN_send 1
|
1439
|
-
#define INSN_IS_SC() 0
|
1440
|
-
#define INSN_LABEL(lab) LABEL_send_##lab
|
1441
|
-
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
1442
|
-
USAGE_ANALYSIS_INSN(BIN(send));
|
1443
|
-
USAGE_ANALYSIS_OPERAND(BIN(send), 0, op_id);
|
1444
|
-
USAGE_ANALYSIS_OPERAND(BIN(send), 1, op_argc);
|
1445
|
-
USAGE_ANALYSIS_OPERAND(BIN(send), 2, blockiseq);
|
1446
|
-
USAGE_ANALYSIS_OPERAND(BIN(send), 3, op_flag);
|
1447
|
-
USAGE_ANALYSIS_OPERAND(BIN(send), 4, ic);
|
1448
|
-
{
|
1449
|
-
#line 1006 "insns.def"
|
1450
|
-
const rb_method_entry_t *me;
|
1451
|
-
VALUE recv, klass;
|
1452
|
-
rb_block_t *blockptr = 0;
|
1453
|
-
VALUE flag = op_flag;
|
1454
|
-
int num = caller_setup_args(th, GET_CFP(), flag, (int)op_argc,
|
1455
|
-
(rb_iseq_t *)blockiseq, &blockptr);
|
1456
|
-
ID id = op_id;
|
1457
|
-
|
1458
|
-
/* get receiver */
|
1459
|
-
recv = TOPN(num);
|
1460
|
-
klass = CLASS_OF(recv);
|
1461
|
-
me = vm_method_search(id, klass, ic);
|
1462
|
-
CALL_METHOD(num, blockptr, flag, id, me, recv);
|
1463
|
-
|
1464
|
-
#line 1465 "vm.inc"
|
1465
|
-
CHECK_STACK_OVERFLOW(REG_CFP, 1);
|
1466
|
-
PUSH(val);
|
1467
|
-
#undef CURRENT_INSN_send
|
1468
|
-
#undef INSN_IS_SC
|
1469
|
-
#undef INSN_LABEL
|
1470
|
-
#undef LABEL_IS_SC
|
1471
|
-
END_INSN(send);}}}
|
1472
|
-
INSN_ENTRY(invokesuper){
|
1473
|
-
{
|
1474
|
-
VALUE val;
|
1475
|
-
rb_num_t op_flag = (rb_num_t)GET_OPERAND(3);
|
1476
|
-
ISEQ blockiseq = (ISEQ)GET_OPERAND(2);
|
1477
|
-
rb_num_t op_argc = (rb_num_t)GET_OPERAND(1);
|
1478
|
-
|
1479
|
-
DEBUG_ENTER_INSN("invokesuper");
|
1480
|
-
ADD_PC(1+3);
|
1481
|
-
PREFETCH(GET_PC());
|
1482
|
-
#define CURRENT_INSN_invokesuper 1
|
1483
|
-
#define INSN_IS_SC() 0
|
1484
|
-
#define INSN_LABEL(lab) LABEL_invokesuper_##lab
|
1485
|
-
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
1486
|
-
USAGE_ANALYSIS_INSN(BIN(invokesuper));
|
1487
|
-
USAGE_ANALYSIS_OPERAND(BIN(invokesuper), 0, op_argc);
|
1488
|
-
USAGE_ANALYSIS_OPERAND(BIN(invokesuper), 1, blockiseq);
|
1489
|
-
USAGE_ANALYSIS_OPERAND(BIN(invokesuper), 2, op_flag);
|
1490
|
-
{
|
1491
|
-
#line 1034 "insns.def"
|
1492
|
-
rb_block_t *blockptr = !(op_flag & VM_CALL_ARGS_BLOCKARG_BIT) ? GET_BLOCK_PTR() : 0;
|
1493
|
-
VALUE flag = op_flag;
|
1494
|
-
int num = caller_setup_args(th, GET_CFP(), flag,
|
1495
|
-
(int)op_argc, blockiseq, &blockptr);
|
1496
|
-
VALUE recv, klass;
|
1497
|
-
ID id;
|
1498
|
-
const rb_method_entry_t *me;
|
1499
|
-
|
1500
|
-
flag = VM_CALL_SUPER_BIT | VM_CALL_FCALL_BIT;
|
1501
|
-
|
1502
|
-
recv = GET_SELF();
|
1503
|
-
vm_search_superclass(GET_CFP(), GET_ISEQ(), recv, TOPN(num), &id, &klass);
|
1504
|
-
|
1505
|
-
/* temporary measure for [Bug #2402] [Bug #2502] [Bug #3136] */
|
1506
|
-
if (!rb_obj_is_kind_of(recv, klass)) {
|
1507
|
-
rb_raise(rb_eNotImpError, "super from singleton method that is defined to multiple classes is not supported; this will be fixed in 1.9.3 or later");
|
1508
|
-
}
|
1509
|
-
|
1510
|
-
me = rb_method_entry(klass, id);
|
1511
|
-
|
1512
|
-
CALL_METHOD(num, blockptr, flag, id, me, recv);
|
1513
|
-
|
1514
|
-
#line 1515 "vm.inc"
|
1515
|
-
CHECK_STACK_OVERFLOW(REG_CFP, 1);
|
1516
|
-
PUSH(val);
|
1517
|
-
#undef CURRENT_INSN_invokesuper
|
1518
|
-
#undef INSN_IS_SC
|
1519
|
-
#undef INSN_LABEL
|
1520
|
-
#undef LABEL_IS_SC
|
1521
|
-
END_INSN(invokesuper);}}}
|
1522
|
-
INSN_ENTRY(invokeblock){
|
1523
|
-
{
|
1524
|
-
VALUE val;
|
1525
|
-
rb_num_t flag = (rb_num_t)GET_OPERAND(2);
|
1526
|
-
rb_num_t num = (rb_num_t)GET_OPERAND(1);
|
1527
|
-
|
1528
|
-
DEBUG_ENTER_INSN("invokeblock");
|
1529
|
-
ADD_PC(1+2);
|
1530
|
-
PREFETCH(GET_PC());
|
1531
|
-
#define CURRENT_INSN_invokeblock 1
|
1532
|
-
#define INSN_IS_SC() 0
|
1533
|
-
#define INSN_LABEL(lab) LABEL_invokeblock_##lab
|
1534
|
-
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
1535
|
-
USAGE_ANALYSIS_INSN(BIN(invokeblock));
|
1536
|
-
USAGE_ANALYSIS_OPERAND(BIN(invokeblock), 0, num);
|
1537
|
-
USAGE_ANALYSIS_OPERAND(BIN(invokeblock), 1, flag);
|
1538
|
-
{
|
1539
|
-
#line 1069 "insns.def"
|
1540
|
-
val = vm_invoke_block(th, GET_CFP(), num, flag);
|
1541
|
-
if (val == Qundef) {
|
1542
|
-
RESTORE_REGS();
|
1543
|
-
NEXT_INSN();
|
1544
|
-
}
|
1545
|
-
|
1546
|
-
#line 1547 "vm.inc"
|
1547
|
-
CHECK_STACK_OVERFLOW(REG_CFP, 1);
|
1548
|
-
PUSH(val);
|
1549
|
-
#undef CURRENT_INSN_invokeblock
|
1550
|
-
#undef INSN_IS_SC
|
1551
|
-
#undef INSN_LABEL
|
1552
|
-
#undef LABEL_IS_SC
|
1553
|
-
END_INSN(invokeblock);}}}
|
1554
|
-
INSN_ENTRY(leave){
|
1555
|
-
{
|
1556
|
-
|
1557
|
-
VALUE val = TOPN(0);
|
1558
|
-
DEBUG_ENTER_INSN("leave");
|
1559
|
-
ADD_PC(1+0);
|
1560
|
-
PREFETCH(GET_PC());
|
1561
|
-
POPN(1);
|
1562
|
-
#define CURRENT_INSN_leave 1
|
1563
|
-
#define INSN_IS_SC() 0
|
1564
|
-
#define INSN_LABEL(lab) LABEL_leave_##lab
|
1565
|
-
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
1566
|
-
USAGE_ANALYSIS_INSN(BIN(leave));
|
1567
|
-
{
|
1568
|
-
#line 1087 "insns.def"
|
1569
|
-
if (OPT_CHECKED_RUN) {
|
1570
|
-
if (reg_cfp->sp != reg_cfp->bp) {
|
1571
|
-
rb_bug("Stack consistency error (sp: %"PRIdPTRDIFF", bp: %"PRIdPTRDIFF")",
|
1572
|
-
VM_SP_CNT(th, reg_cfp->sp), VM_SP_CNT(th, reg_cfp->bp));
|
1573
|
-
}
|
1574
|
-
}
|
1575
|
-
|
1576
|
-
RUBY_VM_CHECK_INTS();
|
1577
|
-
vm_pop_frame(th);
|
1578
|
-
RESTORE_REGS();
|
1579
|
-
|
1580
|
-
#line 1581 "vm.inc"
|
1581
|
-
CHECK_STACK_OVERFLOW(REG_CFP, 1);
|
1582
|
-
PUSH(val);
|
1583
|
-
#undef CURRENT_INSN_leave
|
1584
|
-
#undef INSN_IS_SC
|
1585
|
-
#undef INSN_LABEL
|
1586
|
-
#undef LABEL_IS_SC
|
1587
|
-
END_INSN(leave);}}}
|
1588
|
-
INSN_ENTRY(finish){
|
1589
|
-
{
|
1590
|
-
|
1591
|
-
VALUE val = TOPN(0);
|
1592
|
-
DEBUG_ENTER_INSN("finish");
|
1593
|
-
ADD_PC(1+0);
|
1594
|
-
PREFETCH(GET_PC());
|
1595
|
-
POPN(1);
|
1596
|
-
#define CURRENT_INSN_finish 1
|
1597
|
-
#define INSN_IS_SC() 0
|
1598
|
-
#define INSN_LABEL(lab) LABEL_finish_##lab
|
1599
|
-
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
1600
|
-
USAGE_ANALYSIS_INSN(BIN(finish));
|
1601
|
-
{
|
1602
|
-
#line 1110 "insns.def"
|
1603
|
-
#if OPT_CALL_THREADED_CODE
|
1604
|
-
rb_bug("unused instruction on OPT_CALL_THREADED_CODE");
|
1605
|
-
#else
|
1606
|
-
th->cfp++;
|
1607
|
-
return val;
|
1608
|
-
#endif
|
1609
|
-
|
1610
|
-
#line 1611 "vm.inc"
|
1611
|
-
CHECK_STACK_OVERFLOW(REG_CFP, 1);
|
1612
|
-
PUSH(val);
|
1613
|
-
#undef CURRENT_INSN_finish
|
1614
|
-
#undef INSN_IS_SC
|
1615
|
-
#undef INSN_LABEL
|
1616
|
-
#undef LABEL_IS_SC
|
1617
|
-
END_INSN(finish);}}}
|
1618
|
-
INSN_ENTRY(throw){
|
1619
|
-
{
|
1620
|
-
VALUE val;
|
1621
|
-
rb_num_t throw_state = (rb_num_t)GET_OPERAND(1);
|
1622
|
-
VALUE throwobj = TOPN(0);
|
1623
|
-
DEBUG_ENTER_INSN("throw");
|
1624
|
-
ADD_PC(1+1);
|
1625
|
-
PREFETCH(GET_PC());
|
1626
|
-
POPN(1);
|
1627
|
-
#define CURRENT_INSN_throw 1
|
1628
|
-
#define INSN_IS_SC() 0
|
1629
|
-
#define INSN_LABEL(lab) LABEL_throw_##lab
|
1630
|
-
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
1631
|
-
USAGE_ANALYSIS_INSN(BIN(throw));
|
1632
|
-
USAGE_ANALYSIS_OPERAND(BIN(throw), 0, throw_state);
|
1633
|
-
{
|
1634
|
-
#line 1133 "insns.def"
|
1635
|
-
RUBY_VM_CHECK_INTS();
|
1636
|
-
val = vm_throw(th, GET_CFP(), throw_state, throwobj);
|
1637
|
-
THROW_EXCEPTION(val);
|
1638
|
-
/* unreachable */
|
1639
|
-
|
1640
|
-
#line 1641 "vm.inc"
|
1641
|
-
CHECK_STACK_OVERFLOW(REG_CFP, 1);
|
1642
|
-
PUSH(val);
|
1643
|
-
#undef CURRENT_INSN_throw
|
1644
|
-
#undef INSN_IS_SC
|
1645
|
-
#undef INSN_LABEL
|
1646
|
-
#undef LABEL_IS_SC
|
1647
|
-
END_INSN(throw);}}}
|
1648
|
-
INSN_ENTRY(jump){
|
1649
|
-
{
|
1650
|
-
OFFSET dst = (OFFSET)GET_OPERAND(1);
|
1651
|
-
|
1652
|
-
DEBUG_ENTER_INSN("jump");
|
1653
|
-
ADD_PC(1+1);
|
1654
|
-
PREFETCH(GET_PC());
|
1655
|
-
#define CURRENT_INSN_jump 1
|
1656
|
-
#define INSN_IS_SC() 0
|
1657
|
-
#define INSN_LABEL(lab) LABEL_jump_##lab
|
1658
|
-
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
1659
|
-
USAGE_ANALYSIS_INSN(BIN(jump));
|
1660
|
-
USAGE_ANALYSIS_OPERAND(BIN(jump), 0, dst);
|
1661
|
-
{
|
1662
|
-
#line 1154 "insns.def"
|
1663
|
-
RUBY_VM_CHECK_INTS();
|
1664
|
-
JUMP(dst);
|
1665
|
-
|
1666
|
-
#line 1667 "vm.inc"
|
1667
|
-
#undef CURRENT_INSN_jump
|
1668
|
-
#undef INSN_IS_SC
|
1669
|
-
#undef INSN_LABEL
|
1670
|
-
#undef LABEL_IS_SC
|
1671
|
-
END_INSN(jump);}}}
|
1672
|
-
INSN_ENTRY(branchif){
|
1673
|
-
{
|
1674
|
-
OFFSET dst = (OFFSET)GET_OPERAND(1);
|
1675
|
-
VALUE val = TOPN(0);
|
1676
|
-
DEBUG_ENTER_INSN("branchif");
|
1677
|
-
ADD_PC(1+1);
|
1678
|
-
PREFETCH(GET_PC());
|
1679
|
-
POPN(1);
|
1680
|
-
#define CURRENT_INSN_branchif 1
|
1681
|
-
#define INSN_IS_SC() 0
|
1682
|
-
#define INSN_LABEL(lab) LABEL_branchif_##lab
|
1683
|
-
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
1684
|
-
USAGE_ANALYSIS_INSN(BIN(branchif));
|
1685
|
-
USAGE_ANALYSIS_OPERAND(BIN(branchif), 0, dst);
|
1686
|
-
{
|
1687
|
-
#line 1169 "insns.def"
|
1688
|
-
if (RTEST(val)) {
|
1689
|
-
RUBY_VM_CHECK_INTS();
|
1690
|
-
JUMP(dst);
|
1691
|
-
}
|
1692
|
-
|
1693
|
-
#line 1694 "vm.inc"
|
1694
|
-
#undef CURRENT_INSN_branchif
|
1695
|
-
#undef INSN_IS_SC
|
1696
|
-
#undef INSN_LABEL
|
1697
|
-
#undef LABEL_IS_SC
|
1698
|
-
END_INSN(branchif);}}}
|
1699
|
-
INSN_ENTRY(branchunless){
|
1700
|
-
{
|
1701
|
-
OFFSET dst = (OFFSET)GET_OPERAND(1);
|
1702
|
-
VALUE val = TOPN(0);
|
1703
|
-
DEBUG_ENTER_INSN("branchunless");
|
1704
|
-
ADD_PC(1+1);
|
1705
|
-
PREFETCH(GET_PC());
|
1706
|
-
POPN(1);
|
1707
|
-
#define CURRENT_INSN_branchunless 1
|
1708
|
-
#define INSN_IS_SC() 0
|
1709
|
-
#define INSN_LABEL(lab) LABEL_branchunless_##lab
|
1710
|
-
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
1711
|
-
USAGE_ANALYSIS_INSN(BIN(branchunless));
|
1712
|
-
USAGE_ANALYSIS_OPERAND(BIN(branchunless), 0, dst);
|
1713
|
-
{
|
1714
|
-
#line 1186 "insns.def"
|
1715
|
-
if (!RTEST(val)) {
|
1716
|
-
RUBY_VM_CHECK_INTS();
|
1717
|
-
JUMP(dst);
|
1718
|
-
}
|
1719
|
-
|
1720
|
-
#line 1721 "vm.inc"
|
1721
|
-
#undef CURRENT_INSN_branchunless
|
1722
|
-
#undef INSN_IS_SC
|
1723
|
-
#undef INSN_LABEL
|
1724
|
-
#undef LABEL_IS_SC
|
1725
|
-
END_INSN(branchunless);}}}
|
1726
|
-
INSN_ENTRY(getinlinecache){
|
1727
|
-
{
|
1728
|
-
VALUE val;
|
1729
|
-
IC ic = (IC)GET_OPERAND(2);
|
1730
|
-
OFFSET dst = (OFFSET)GET_OPERAND(1);
|
1731
|
-
|
1732
|
-
DEBUG_ENTER_INSN("getinlinecache");
|
1733
|
-
ADD_PC(1+2);
|
1734
|
-
PREFETCH(GET_PC());
|
1735
|
-
#define CURRENT_INSN_getinlinecache 1
|
1736
|
-
#define INSN_IS_SC() 0
|
1737
|
-
#define INSN_LABEL(lab) LABEL_getinlinecache_##lab
|
1738
|
-
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
1739
|
-
USAGE_ANALYSIS_INSN(BIN(getinlinecache));
|
1740
|
-
USAGE_ANALYSIS_OPERAND(BIN(getinlinecache), 0, dst);
|
1741
|
-
USAGE_ANALYSIS_OPERAND(BIN(getinlinecache), 1, ic);
|
1742
|
-
{
|
1743
|
-
#line 1208 "insns.def"
|
1744
|
-
if (ic->ic_vmstat == GET_VM_STATE_VERSION()) {
|
1745
|
-
val = ic->ic_value.value;
|
1746
|
-
JUMP(dst);
|
1747
|
-
}
|
1748
|
-
else {
|
1749
|
-
/* none */
|
1750
|
-
val = Qnil;
|
1751
|
-
}
|
1752
|
-
|
1753
|
-
#line 1754 "vm.inc"
|
1754
|
-
CHECK_STACK_OVERFLOW(REG_CFP, 1);
|
1755
|
-
PUSH(val);
|
1756
|
-
#undef CURRENT_INSN_getinlinecache
|
1757
|
-
#undef INSN_IS_SC
|
1758
|
-
#undef INSN_LABEL
|
1759
|
-
#undef LABEL_IS_SC
|
1760
|
-
END_INSN(getinlinecache);}}}
|
1761
|
-
INSN_ENTRY(onceinlinecache){
|
1762
|
-
{
|
1763
|
-
VALUE val;
|
1764
|
-
IC ic = (IC)GET_OPERAND(2);
|
1765
|
-
OFFSET dst = (OFFSET)GET_OPERAND(1);
|
1766
|
-
|
1767
|
-
DEBUG_ENTER_INSN("onceinlinecache");
|
1768
|
-
ADD_PC(1+2);
|
1769
|
-
PREFETCH(GET_PC());
|
1770
|
-
#define CURRENT_INSN_onceinlinecache 1
|
1771
|
-
#define INSN_IS_SC() 0
|
1772
|
-
#define INSN_LABEL(lab) LABEL_onceinlinecache_##lab
|
1773
|
-
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
1774
|
-
USAGE_ANALYSIS_INSN(BIN(onceinlinecache));
|
1775
|
-
USAGE_ANALYSIS_OPERAND(BIN(onceinlinecache), 0, dst);
|
1776
|
-
USAGE_ANALYSIS_OPERAND(BIN(onceinlinecache), 1, ic);
|
1777
|
-
{
|
1778
|
-
#line 1229 "insns.def"
|
1779
|
-
retry:
|
1780
|
-
if (ic->ic_vmstat) {
|
1781
|
-
val = ic->ic_value.value;
|
1782
|
-
JUMP(dst);
|
1783
|
-
}
|
1784
|
-
else if (ic->ic_value.value == Qundef)
|
1785
|
-
{
|
1786
|
-
RUBY_VM_CHECK_INTS();
|
1787
|
-
rb_thread_schedule();
|
1788
|
-
goto retry;
|
1789
|
-
}
|
1790
|
-
else {
|
1791
|
-
/* none */
|
1792
|
-
ic->ic_value.value = Qundef;
|
1793
|
-
val = Qnil;
|
1794
|
-
}
|
1795
|
-
|
1796
|
-
#line 1797 "vm.inc"
|
1797
|
-
CHECK_STACK_OVERFLOW(REG_CFP, 1);
|
1798
|
-
PUSH(val);
|
1799
|
-
#undef CURRENT_INSN_onceinlinecache
|
1800
|
-
#undef INSN_IS_SC
|
1801
|
-
#undef INSN_LABEL
|
1802
|
-
#undef LABEL_IS_SC
|
1803
|
-
END_INSN(onceinlinecache);}}}
|
1804
|
-
INSN_ENTRY(setinlinecache){
|
1805
|
-
{
|
1806
|
-
IC ic = (IC)GET_OPERAND(1);
|
1807
|
-
VALUE val = TOPN(0);
|
1808
|
-
DEBUG_ENTER_INSN("setinlinecache");
|
1809
|
-
ADD_PC(1+1);
|
1810
|
-
PREFETCH(GET_PC());
|
1811
|
-
POPN(1);
|
1812
|
-
#define CURRENT_INSN_setinlinecache 1
|
1813
|
-
#define INSN_IS_SC() 0
|
1814
|
-
#define INSN_LABEL(lab) LABEL_setinlinecache_##lab
|
1815
|
-
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
1816
|
-
USAGE_ANALYSIS_INSN(BIN(setinlinecache));
|
1817
|
-
USAGE_ANALYSIS_OPERAND(BIN(setinlinecache), 0, ic);
|
1818
|
-
{
|
1819
|
-
#line 1258 "insns.def"
|
1820
|
-
if (ic->ic_value.value == Qundef) {
|
1821
|
-
rb_ary_push(GET_ISEQ()->mark_ary, val);
|
1822
|
-
}
|
1823
|
-
ic->ic_value.value = val;
|
1824
|
-
ic->ic_vmstat = GET_VM_STATE_VERSION() - ruby_vm_const_missing_count;
|
1825
|
-
ruby_vm_const_missing_count = 0;
|
1826
|
-
|
1827
|
-
#line 1828 "vm.inc"
|
1828
|
-
CHECK_STACK_OVERFLOW(REG_CFP, 1);
|
1829
|
-
PUSH(val);
|
1830
|
-
#undef CURRENT_INSN_setinlinecache
|
1831
|
-
#undef INSN_IS_SC
|
1832
|
-
#undef INSN_LABEL
|
1833
|
-
#undef LABEL_IS_SC
|
1834
|
-
END_INSN(setinlinecache);}}}
|
1835
|
-
INSN_ENTRY(opt_case_dispatch){
|
1836
|
-
{
|
1837
|
-
OFFSET else_offset = (OFFSET)GET_OPERAND(2);
|
1838
|
-
CDHASH hash = (CDHASH)GET_OPERAND(1);
|
1839
|
-
VALUE key = TOPN(0);
|
1840
|
-
DEBUG_ENTER_INSN("opt_case_dispatch");
|
1841
|
-
ADD_PC(1+2);
|
1842
|
-
PREFETCH(GET_PC());
|
1843
|
-
POPN(1);
|
1844
|
-
#define CURRENT_INSN_opt_case_dispatch 1
|
1845
|
-
#define INSN_IS_SC() 0
|
1846
|
-
#define INSN_LABEL(lab) LABEL_opt_case_dispatch_##lab
|
1847
|
-
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
1848
|
-
USAGE_ANALYSIS_INSN(BIN(opt_case_dispatch));
|
1849
|
-
USAGE_ANALYSIS_OPERAND(BIN(opt_case_dispatch), 0, hash);
|
1850
|
-
USAGE_ANALYSIS_OPERAND(BIN(opt_case_dispatch), 1, else_offset);
|
1851
|
-
{
|
1852
|
-
#line 1277 "insns.def"
|
1853
|
-
switch(TYPE(key)) {
|
1854
|
-
case T_FLOAT: {
|
1855
|
-
double ival;
|
1856
|
-
if (modf(RFLOAT_VALUE(key), &ival) == 0.0) {
|
1857
|
-
key = FIXABLE(ival) ? LONG2FIX((long)ival) : rb_dbl2big(ival);
|
1858
|
-
}
|
1859
|
-
}
|
1860
|
-
case T_SYMBOL: /* fall through */
|
1861
|
-
case T_FIXNUM:
|
1862
|
-
case T_BIGNUM:
|
1863
|
-
case T_STRING:
|
1864
|
-
if (BASIC_OP_UNREDEFINED_P(BOP_EQQ)) {
|
1865
|
-
st_data_t val;
|
1866
|
-
if (st_lookup(RHASH_TBL(hash), key, &val)) {
|
1867
|
-
JUMP(FIX2INT((VALUE)val));
|
1868
|
-
}
|
1869
|
-
else {
|
1870
|
-
JUMP(else_offset);
|
1871
|
-
}
|
1872
|
-
break;
|
1873
|
-
}
|
1874
|
-
default:
|
1875
|
-
break;
|
1876
|
-
}
|
1877
|
-
|
1878
|
-
#line 1879 "vm.inc"
|
1879
|
-
#undef CURRENT_INSN_opt_case_dispatch
|
1880
|
-
#undef INSN_IS_SC
|
1881
|
-
#undef INSN_LABEL
|
1882
|
-
#undef LABEL_IS_SC
|
1883
|
-
END_INSN(opt_case_dispatch);}}}
|
1884
|
-
INSN_ENTRY(opt_checkenv){
|
1885
|
-
{
|
1886
|
-
|
1887
|
-
|
1888
|
-
DEBUG_ENTER_INSN("opt_checkenv");
|
1889
|
-
ADD_PC(1+0);
|
1890
|
-
PREFETCH(GET_PC());
|
1891
|
-
#define CURRENT_INSN_opt_checkenv 1
|
1892
|
-
#define INSN_IS_SC() 0
|
1893
|
-
#define INSN_LABEL(lab) LABEL_opt_checkenv_##lab
|
1894
|
-
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
1895
|
-
USAGE_ANALYSIS_INSN(BIN(opt_checkenv));
|
1896
|
-
{
|
1897
|
-
#line 1314 "insns.def"
|
1898
|
-
if (GET_CFP()->bp != GET_DFP() + 1) {
|
1899
|
-
VALUE *new_dfp = GET_CFP()->bp - 1;
|
1900
|
-
/* TODO: copy env and clean stack at creating env? */
|
1901
|
-
*new_dfp = *GET_DFP();
|
1902
|
-
SET_DFP(new_dfp);
|
1903
|
-
}
|
1904
|
-
|
1905
|
-
#line 1906 "vm.inc"
|
1906
|
-
#undef CURRENT_INSN_opt_checkenv
|
1907
|
-
#undef INSN_IS_SC
|
1908
|
-
#undef INSN_LABEL
|
1909
|
-
#undef LABEL_IS_SC
|
1910
|
-
END_INSN(opt_checkenv);}}}
|
1911
|
-
INSN_ENTRY(opt_plus){
|
1912
|
-
{
|
1913
|
-
VALUE val;
|
1914
|
-
IC ic = (IC)GET_OPERAND(1);
|
1915
|
-
VALUE recv = TOPN(1);
|
1916
|
-
VALUE obj = TOPN(0);
|
1917
|
-
DEBUG_ENTER_INSN("opt_plus");
|
1918
|
-
ADD_PC(1+1);
|
1919
|
-
PREFETCH(GET_PC());
|
1920
|
-
POPN(2);
|
1921
|
-
#define CURRENT_INSN_opt_plus 1
|
1922
|
-
#define INSN_IS_SC() 0
|
1923
|
-
#define INSN_LABEL(lab) LABEL_opt_plus_##lab
|
1924
|
-
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
1925
|
-
USAGE_ANALYSIS_INSN(BIN(opt_plus));
|
1926
|
-
USAGE_ANALYSIS_OPERAND(BIN(opt_plus), 0, ic);
|
1927
|
-
{
|
1928
|
-
#line 1336 "insns.def"
|
1929
|
-
if (0) {
|
1930
|
-
|
1931
|
-
}
|
1932
|
-
#if 1
|
1933
|
-
else if (FIXNUM_2_P(recv, obj) &&
|
1934
|
-
BASIC_OP_UNREDEFINED_P(BOP_PLUS)) {
|
1935
|
-
/* fixnum + fixnum */
|
1936
|
-
#ifndef LONG_LONG_VALUE
|
1937
|
-
val = (recv + (obj & (~1)));
|
1938
|
-
if ((~(recv ^ obj) & (recv ^ val)) &
|
1939
|
-
((VALUE)0x01 << ((sizeof(VALUE) * CHAR_BIT) - 1))) {
|
1940
|
-
val = rb_big_plus(rb_int2big(FIX2LONG(recv)),
|
1941
|
-
rb_int2big(FIX2LONG(obj)));
|
1942
|
-
}
|
1943
|
-
#else
|
1944
|
-
long a, b, c;
|
1945
|
-
a = FIX2LONG(recv);
|
1946
|
-
b = FIX2LONG(obj);
|
1947
|
-
c = a + b;
|
1948
|
-
if (FIXABLE(c)) {
|
1949
|
-
val = LONG2FIX(c);
|
1950
|
-
}
|
1951
|
-
else {
|
1952
|
-
val = rb_big_plus(rb_int2big(a), rb_int2big(b));
|
1953
|
-
}
|
1954
|
-
#endif
|
1955
|
-
}
|
1956
|
-
#endif
|
1957
|
-
|
1958
|
-
else if (!SPECIAL_CONST_P(recv) && !SPECIAL_CONST_P(obj)) {
|
1959
|
-
if (0) {
|
1960
|
-
}
|
1961
|
-
#if 1
|
1962
|
-
else if (HEAP_CLASS_OF(recv) == rb_cFloat &&
|
1963
|
-
HEAP_CLASS_OF(obj) == rb_cFloat &&
|
1964
|
-
BASIC_OP_UNREDEFINED_P(BOP_PLUS)) {
|
1965
|
-
val = DBL2NUM(RFLOAT_VALUE(recv) + RFLOAT_VALUE(obj));
|
1966
|
-
}
|
1967
|
-
#endif
|
1968
|
-
|
1969
|
-
#if 1
|
1970
|
-
else if (HEAP_CLASS_OF(recv) == rb_cString &&
|
1971
|
-
HEAP_CLASS_OF(obj) == rb_cString &&
|
1972
|
-
BASIC_OP_UNREDEFINED_P(BOP_PLUS)) {
|
1973
|
-
val = rb_str_plus(recv, obj);
|
1974
|
-
}
|
1975
|
-
#endif
|
1976
|
-
#if 1
|
1977
|
-
else if (HEAP_CLASS_OF(recv) == rb_cArray &&
|
1978
|
-
BASIC_OP_UNREDEFINED_P(BOP_PLUS)) {
|
1979
|
-
val = rb_ary_plus(recv, obj);
|
1980
|
-
}
|
1981
|
-
#endif
|
1982
|
-
else {
|
1983
|
-
goto INSN_LABEL(normal_dispatch);
|
1984
|
-
}
|
1985
|
-
}
|
1986
|
-
else {
|
1987
|
-
INSN_LABEL(normal_dispatch):
|
1988
|
-
PUSH(recv);
|
1989
|
-
PUSH(obj);
|
1990
|
-
CALL_SIMPLE_METHOD(1, idPLUS, recv);
|
1991
|
-
}
|
1992
|
-
|
1993
|
-
#line 1994 "vm.inc"
|
1994
|
-
CHECK_STACK_OVERFLOW(REG_CFP, 1);
|
1995
|
-
PUSH(val);
|
1996
|
-
#undef CURRENT_INSN_opt_plus
|
1997
|
-
#undef INSN_IS_SC
|
1998
|
-
#undef INSN_LABEL
|
1999
|
-
#undef LABEL_IS_SC
|
2000
|
-
END_INSN(opt_plus);}}}
|
2001
|
-
INSN_ENTRY(opt_minus){
|
2002
|
-
{
|
2003
|
-
VALUE val;
|
2004
|
-
IC ic = (IC)GET_OPERAND(1);
|
2005
|
-
VALUE recv = TOPN(1);
|
2006
|
-
VALUE obj = TOPN(0);
|
2007
|
-
DEBUG_ENTER_INSN("opt_minus");
|
2008
|
-
ADD_PC(1+1);
|
2009
|
-
PREFETCH(GET_PC());
|
2010
|
-
POPN(2);
|
2011
|
-
#define CURRENT_INSN_opt_minus 1
|
2012
|
-
#define INSN_IS_SC() 0
|
2013
|
-
#define INSN_LABEL(lab) LABEL_opt_minus_##lab
|
2014
|
-
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
2015
|
-
USAGE_ANALYSIS_INSN(BIN(opt_minus));
|
2016
|
-
USAGE_ANALYSIS_OPERAND(BIN(opt_minus), 0, ic);
|
2017
|
-
{
|
2018
|
-
#line 1412 "insns.def"
|
2019
|
-
if (FIXNUM_2_P(recv, obj) &&
|
2020
|
-
BASIC_OP_UNREDEFINED_P(BOP_MINUS)) {
|
2021
|
-
long a, b, c;
|
2022
|
-
|
2023
|
-
a = FIX2LONG(recv);
|
2024
|
-
b = FIX2LONG(obj);
|
2025
|
-
c = a - b;
|
2026
|
-
|
2027
|
-
if (FIXABLE(c)) {
|
2028
|
-
val = LONG2FIX(c);
|
2029
|
-
}
|
2030
|
-
else {
|
2031
|
-
val = rb_big_minus(rb_int2big(a), rb_int2big(b));
|
2032
|
-
}
|
2033
|
-
}
|
2034
|
-
else if (!SPECIAL_CONST_P(recv) && !SPECIAL_CONST_P(obj)) {
|
2035
|
-
if (0) {
|
2036
|
-
}
|
2037
|
-
#if 1
|
2038
|
-
else if (HEAP_CLASS_OF(recv) == rb_cFloat &&
|
2039
|
-
HEAP_CLASS_OF(obj) == rb_cFloat &&
|
2040
|
-
BASIC_OP_UNREDEFINED_P(BOP_MINUS)) {
|
2041
|
-
val = DBL2NUM(RFLOAT_VALUE(recv) - RFLOAT_VALUE(obj));
|
2042
|
-
}
|
2043
|
-
#endif
|
2044
|
-
else {
|
2045
|
-
goto INSN_LABEL(normal_dispatch);
|
2046
|
-
}
|
2047
|
-
}
|
2048
|
-
else {
|
2049
|
-
/* other */
|
2050
|
-
INSN_LABEL(normal_dispatch):
|
2051
|
-
PUSH(recv);
|
2052
|
-
PUSH(obj);
|
2053
|
-
CALL_SIMPLE_METHOD(1, idMINUS, recv);
|
2054
|
-
}
|
2055
|
-
|
2056
|
-
#line 2057 "vm.inc"
|
2057
|
-
CHECK_STACK_OVERFLOW(REG_CFP, 1);
|
2058
|
-
PUSH(val);
|
2059
|
-
#undef CURRENT_INSN_opt_minus
|
2060
|
-
#undef INSN_IS_SC
|
2061
|
-
#undef INSN_LABEL
|
2062
|
-
#undef LABEL_IS_SC
|
2063
|
-
END_INSN(opt_minus);}}}
|
2064
|
-
INSN_ENTRY(opt_mult){
|
2065
|
-
{
|
2066
|
-
VALUE val;
|
2067
|
-
IC ic = (IC)GET_OPERAND(1);
|
2068
|
-
VALUE recv = TOPN(1);
|
2069
|
-
VALUE obj = TOPN(0);
|
2070
|
-
DEBUG_ENTER_INSN("opt_mult");
|
2071
|
-
ADD_PC(1+1);
|
2072
|
-
PREFETCH(GET_PC());
|
2073
|
-
POPN(2);
|
2074
|
-
#define CURRENT_INSN_opt_mult 1
|
2075
|
-
#define INSN_IS_SC() 0
|
2076
|
-
#define INSN_LABEL(lab) LABEL_opt_mult_##lab
|
2077
|
-
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
2078
|
-
USAGE_ANALYSIS_INSN(BIN(opt_mult));
|
2079
|
-
USAGE_ANALYSIS_OPERAND(BIN(opt_mult), 0, ic);
|
2080
|
-
{
|
2081
|
-
#line 1461 "insns.def"
|
2082
|
-
if (FIXNUM_2_P(recv, obj) &&
|
2083
|
-
BASIC_OP_UNREDEFINED_P(BOP_MULT)) {
|
2084
|
-
long a, b;
|
2085
|
-
|
2086
|
-
a = FIX2LONG(recv);
|
2087
|
-
if (a == 0) {
|
2088
|
-
val = recv;
|
2089
|
-
}
|
2090
|
-
else {
|
2091
|
-
volatile long c;
|
2092
|
-
b = FIX2LONG(obj);
|
2093
|
-
c = a * b;
|
2094
|
-
|
2095
|
-
if (FIXABLE(c) && c / a == b) {
|
2096
|
-
val = LONG2FIX(c);
|
2097
|
-
}
|
2098
|
-
else {
|
2099
|
-
val = rb_big_mul(rb_int2big(a), rb_int2big(b));
|
2100
|
-
}
|
2101
|
-
}
|
2102
|
-
}
|
2103
|
-
else if (!SPECIAL_CONST_P(recv) && !SPECIAL_CONST_P(obj)) {
|
2104
|
-
if (0) {
|
2105
|
-
}
|
2106
|
-
#if 1
|
2107
|
-
else if (HEAP_CLASS_OF(recv) == rb_cFloat &&
|
2108
|
-
HEAP_CLASS_OF(obj) == rb_cFloat &&
|
2109
|
-
BASIC_OP_UNREDEFINED_P(BOP_MULT)) {
|
2110
|
-
val = DBL2NUM(RFLOAT_VALUE(recv) * RFLOAT_VALUE(obj));
|
2111
|
-
}
|
2112
|
-
#endif
|
2113
|
-
else {
|
2114
|
-
goto INSN_LABEL(normal_dispatch);
|
2115
|
-
}
|
2116
|
-
}
|
2117
|
-
else {
|
2118
|
-
INSN_LABEL(normal_dispatch):
|
2119
|
-
PUSH(recv);
|
2120
|
-
PUSH(obj);
|
2121
|
-
CALL_SIMPLE_METHOD(1, idMULT, recv);
|
2122
|
-
}
|
2123
|
-
|
2124
|
-
#line 2125 "vm.inc"
|
2125
|
-
CHECK_STACK_OVERFLOW(REG_CFP, 1);
|
2126
|
-
PUSH(val);
|
2127
|
-
#undef CURRENT_INSN_opt_mult
|
2128
|
-
#undef INSN_IS_SC
|
2129
|
-
#undef INSN_LABEL
|
2130
|
-
#undef LABEL_IS_SC
|
2131
|
-
END_INSN(opt_mult);}}}
|
2132
|
-
INSN_ENTRY(opt_div){
|
2133
|
-
{
|
2134
|
-
VALUE val;
|
2135
|
-
IC ic = (IC)GET_OPERAND(1);
|
2136
|
-
VALUE recv = TOPN(1);
|
2137
|
-
VALUE obj = TOPN(0);
|
2138
|
-
DEBUG_ENTER_INSN("opt_div");
|
2139
|
-
ADD_PC(1+1);
|
2140
|
-
PREFETCH(GET_PC());
|
2141
|
-
POPN(2);
|
2142
|
-
#define CURRENT_INSN_opt_div 1
|
2143
|
-
#define INSN_IS_SC() 0
|
2144
|
-
#define INSN_LABEL(lab) LABEL_opt_div_##lab
|
2145
|
-
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
2146
|
-
USAGE_ANALYSIS_INSN(BIN(opt_div));
|
2147
|
-
USAGE_ANALYSIS_OPERAND(BIN(opt_div), 0, ic);
|
2148
|
-
{
|
2149
|
-
#line 1515 "insns.def"
|
2150
|
-
if (FIXNUM_2_P(recv, obj) &&
|
2151
|
-
BASIC_OP_UNREDEFINED_P(BOP_DIV)) {
|
2152
|
-
long x, y, div;
|
2153
|
-
|
2154
|
-
x = FIX2LONG(recv);
|
2155
|
-
y = FIX2LONG(obj);
|
2156
|
-
{
|
2157
|
-
/* copied from numeric.c#fixdivmod */
|
2158
|
-
long mod;
|
2159
|
-
if (y == 0)
|
2160
|
-
goto INSN_LABEL(normal_dispatch);
|
2161
|
-
if (y < 0) {
|
2162
|
-
if (x < 0)
|
2163
|
-
div = -x / -y;
|
2164
|
-
else
|
2165
|
-
div = -(x / -y);
|
2166
|
-
}
|
2167
|
-
else {
|
2168
|
-
if (x < 0)
|
2169
|
-
div = -(-x / y);
|
2170
|
-
else
|
2171
|
-
div = x / y;
|
2172
|
-
}
|
2173
|
-
mod = x - div * y;
|
2174
|
-
if ((mod < 0 && y > 0) || (mod > 0 && y < 0)) {
|
2175
|
-
mod += y;
|
2176
|
-
div -= 1;
|
2177
|
-
}
|
2178
|
-
}
|
2179
|
-
val = LONG2NUM(div);
|
2180
|
-
}
|
2181
|
-
else if (!SPECIAL_CONST_P(recv) && !SPECIAL_CONST_P(obj)) {
|
2182
|
-
if (0) {
|
2183
|
-
}
|
2184
|
-
#if 1
|
2185
|
-
else if (HEAP_CLASS_OF(recv) == rb_cFloat &&
|
2186
|
-
HEAP_CLASS_OF(obj) == rb_cFloat &&
|
2187
|
-
BASIC_OP_UNREDEFINED_P(BOP_DIV)) {
|
2188
|
-
val = DBL2NUM(RFLOAT_VALUE(recv) / RFLOAT_VALUE(obj));
|
2189
|
-
}
|
2190
|
-
#endif
|
2191
|
-
else {
|
2192
|
-
goto INSN_LABEL(normal_dispatch);
|
2193
|
-
}
|
2194
|
-
}
|
2195
|
-
else {
|
2196
|
-
INSN_LABEL(normal_dispatch):
|
2197
|
-
PUSH(recv);
|
2198
|
-
PUSH(obj);
|
2199
|
-
CALL_SIMPLE_METHOD(1, idDIV, recv);
|
2200
|
-
}
|
2201
|
-
|
2202
|
-
#line 2203 "vm.inc"
|
2203
|
-
CHECK_STACK_OVERFLOW(REG_CFP, 1);
|
2204
|
-
PUSH(val);
|
2205
|
-
#undef CURRENT_INSN_opt_div
|
2206
|
-
#undef INSN_IS_SC
|
2207
|
-
#undef INSN_LABEL
|
2208
|
-
#undef LABEL_IS_SC
|
2209
|
-
END_INSN(opt_div);}}}
|
2210
|
-
INSN_ENTRY(opt_mod){
|
2211
|
-
{
|
2212
|
-
VALUE val;
|
2213
|
-
IC ic = (IC)GET_OPERAND(1);
|
2214
|
-
VALUE recv = TOPN(1);
|
2215
|
-
VALUE obj = TOPN(0);
|
2216
|
-
DEBUG_ENTER_INSN("opt_mod");
|
2217
|
-
ADD_PC(1+1);
|
2218
|
-
PREFETCH(GET_PC());
|
2219
|
-
POPN(2);
|
2220
|
-
#define CURRENT_INSN_opt_mod 1
|
2221
|
-
#define INSN_IS_SC() 0
|
2222
|
-
#define INSN_LABEL(lab) LABEL_opt_mod_##lab
|
2223
|
-
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
2224
|
-
USAGE_ANALYSIS_INSN(BIN(opt_mod));
|
2225
|
-
USAGE_ANALYSIS_OPERAND(BIN(opt_mod), 0, ic);
|
2226
|
-
{
|
2227
|
-
#line 1579 "insns.def"
|
2228
|
-
if (FIXNUM_2_P(recv, obj) &&
|
2229
|
-
BASIC_OP_UNREDEFINED_P(BOP_MOD)) {
|
2230
|
-
long x, y, mod;
|
2231
|
-
|
2232
|
-
x = FIX2LONG(recv);
|
2233
|
-
y = FIX2LONG(obj);
|
2234
|
-
{
|
2235
|
-
/* copied from numeric.c#fixdivmod */
|
2236
|
-
long div;
|
2237
|
-
|
2238
|
-
if (y == 0)
|
2239
|
-
rb_num_zerodiv();
|
2240
|
-
if (y < 0) {
|
2241
|
-
if (x < 0)
|
2242
|
-
div = -x / -y;
|
2243
|
-
else
|
2244
|
-
div = -(x / -y);
|
2245
|
-
}
|
2246
|
-
else {
|
2247
|
-
if (x < 0)
|
2248
|
-
div = -(-x / y);
|
2249
|
-
else
|
2250
|
-
div = x / y;
|
2251
|
-
}
|
2252
|
-
mod = x - div * y;
|
2253
|
-
if ((mod < 0 && y > 0) || (mod > 0 && y < 0)) {
|
2254
|
-
mod += y;
|
2255
|
-
div -= 1;
|
2256
|
-
}
|
2257
|
-
}
|
2258
|
-
val = LONG2FIX(mod);
|
2259
|
-
}
|
2260
|
-
else if (!SPECIAL_CONST_P(recv) && !SPECIAL_CONST_P(obj)) {
|
2261
|
-
if (0) {
|
2262
|
-
}
|
2263
|
-
else if (HEAP_CLASS_OF(recv) == rb_cFloat &&
|
2264
|
-
HEAP_CLASS_OF(obj) == rb_cFloat &&
|
2265
|
-
BASIC_OP_UNREDEFINED_P(BOP_MOD)) {
|
2266
|
-
val = DBL2NUM(ruby_float_mod(RFLOAT_VALUE(recv), RFLOAT_VALUE(obj)));
|
2267
|
-
}
|
2268
|
-
else {
|
2269
|
-
goto INSN_LABEL(normal_dispatch);
|
2270
|
-
}
|
2271
|
-
}
|
2272
|
-
else {
|
2273
|
-
INSN_LABEL(normal_dispatch):
|
2274
|
-
PUSH(recv);
|
2275
|
-
PUSH(obj);
|
2276
|
-
CALL_SIMPLE_METHOD(1, idMOD, recv);
|
2277
|
-
}
|
2278
|
-
|
2279
|
-
#line 2280 "vm.inc"
|
2280
|
-
CHECK_STACK_OVERFLOW(REG_CFP, 1);
|
2281
|
-
PUSH(val);
|
2282
|
-
#undef CURRENT_INSN_opt_mod
|
2283
|
-
#undef INSN_IS_SC
|
2284
|
-
#undef INSN_LABEL
|
2285
|
-
#undef LABEL_IS_SC
|
2286
|
-
END_INSN(opt_mod);}}}
|
2287
|
-
INSN_ENTRY(opt_eq){
|
2288
|
-
{
|
2289
|
-
VALUE val;
|
2290
|
-
IC ic = (IC)GET_OPERAND(1);
|
2291
|
-
VALUE recv = TOPN(1);
|
2292
|
-
VALUE obj = TOPN(0);
|
2293
|
-
DEBUG_ENTER_INSN("opt_eq");
|
2294
|
-
ADD_PC(1+1);
|
2295
|
-
PREFETCH(GET_PC());
|
2296
|
-
POPN(2);
|
2297
|
-
#define CURRENT_INSN_opt_eq 1
|
2298
|
-
#define INSN_IS_SC() 0
|
2299
|
-
#define INSN_LABEL(lab) LABEL_opt_eq_##lab
|
2300
|
-
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
2301
|
-
USAGE_ANALYSIS_INSN(BIN(opt_eq));
|
2302
|
-
USAGE_ANALYSIS_OPERAND(BIN(opt_eq), 0, ic);
|
2303
|
-
{
|
2304
|
-
#line 1642 "insns.def"
|
2305
|
-
val = opt_eq_func(recv, obj, ic);
|
2306
|
-
|
2307
|
-
if (val == Qundef) {
|
2308
|
-
/* other */
|
2309
|
-
PUSH(recv);
|
2310
|
-
PUSH(obj);
|
2311
|
-
CALL_SIMPLE_METHOD(1, idEq, recv);
|
2312
|
-
}
|
2313
|
-
|
2314
|
-
#line 2315 "vm.inc"
|
2315
|
-
CHECK_STACK_OVERFLOW(REG_CFP, 1);
|
2316
|
-
PUSH(val);
|
2317
|
-
#undef CURRENT_INSN_opt_eq
|
2318
|
-
#undef INSN_IS_SC
|
2319
|
-
#undef INSN_LABEL
|
2320
|
-
#undef LABEL_IS_SC
|
2321
|
-
END_INSN(opt_eq);}}}
|
2322
|
-
INSN_ENTRY(opt_neq){
|
2323
|
-
{
|
2324
|
-
VALUE val;
|
2325
|
-
IC ic_eq = (IC)GET_OPERAND(2);
|
2326
|
-
IC ic = (IC)GET_OPERAND(1);
|
2327
|
-
VALUE recv = TOPN(1);
|
2328
|
-
VALUE obj = TOPN(0);
|
2329
|
-
DEBUG_ENTER_INSN("opt_neq");
|
2330
|
-
ADD_PC(1+2);
|
2331
|
-
PREFETCH(GET_PC());
|
2332
|
-
POPN(2);
|
2333
|
-
#define CURRENT_INSN_opt_neq 1
|
2334
|
-
#define INSN_IS_SC() 0
|
2335
|
-
#define INSN_LABEL(lab) LABEL_opt_neq_##lab
|
2336
|
-
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
2337
|
-
USAGE_ANALYSIS_INSN(BIN(opt_neq));
|
2338
|
-
USAGE_ANALYSIS_OPERAND(BIN(opt_neq), 0, ic);
|
2339
|
-
USAGE_ANALYSIS_OPERAND(BIN(opt_neq), 1, ic_eq);
|
2340
|
-
{
|
2341
|
-
#line 1663 "insns.def"
|
2342
|
-
extern VALUE rb_obj_not_equal(VALUE obj1, VALUE obj2);
|
2343
|
-
const rb_method_entry_t *me = vm_method_search(idNeq, CLASS_OF(recv), ic);
|
2344
|
-
val = Qundef;
|
2345
|
-
|
2346
|
-
if (check_cfunc(me, rb_obj_not_equal)) {
|
2347
|
-
val = opt_eq_func(recv, obj, ic_eq);
|
2348
|
-
|
2349
|
-
if (val != Qundef) {
|
2350
|
-
val = RTEST(val) ? Qfalse : Qtrue;
|
2351
|
-
}
|
2352
|
-
}
|
2353
|
-
|
2354
|
-
if (val == Qundef) {
|
2355
|
-
/* other */
|
2356
|
-
PUSH(recv);
|
2357
|
-
PUSH(obj);
|
2358
|
-
CALL_SIMPLE_METHOD(1, idNeq, recv);
|
2359
|
-
}
|
2360
|
-
|
2361
|
-
#line 2362 "vm.inc"
|
2362
|
-
CHECK_STACK_OVERFLOW(REG_CFP, 1);
|
2363
|
-
PUSH(val);
|
2364
|
-
#undef CURRENT_INSN_opt_neq
|
2365
|
-
#undef INSN_IS_SC
|
2366
|
-
#undef INSN_LABEL
|
2367
|
-
#undef LABEL_IS_SC
|
2368
|
-
END_INSN(opt_neq);}}}
|
2369
|
-
INSN_ENTRY(opt_lt){
|
2370
|
-
{
|
2371
|
-
VALUE val;
|
2372
|
-
IC ic = (IC)GET_OPERAND(1);
|
2373
|
-
VALUE recv = TOPN(1);
|
2374
|
-
VALUE obj = TOPN(0);
|
2375
|
-
DEBUG_ENTER_INSN("opt_lt");
|
2376
|
-
ADD_PC(1+1);
|
2377
|
-
PREFETCH(GET_PC());
|
2378
|
-
POPN(2);
|
2379
|
-
#define CURRENT_INSN_opt_lt 1
|
2380
|
-
#define INSN_IS_SC() 0
|
2381
|
-
#define INSN_LABEL(lab) LABEL_opt_lt_##lab
|
2382
|
-
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
2383
|
-
USAGE_ANALYSIS_INSN(BIN(opt_lt));
|
2384
|
-
USAGE_ANALYSIS_OPERAND(BIN(opt_lt), 0, ic);
|
2385
|
-
{
|
2386
|
-
#line 1694 "insns.def"
|
2387
|
-
if (FIXNUM_2_P(recv, obj) &&
|
2388
|
-
BASIC_OP_UNREDEFINED_P(BOP_LT)) {
|
2389
|
-
SIGNED_VALUE a = recv, b = obj;
|
2390
|
-
|
2391
|
-
if (a < b) {
|
2392
|
-
val = Qtrue;
|
2393
|
-
}
|
2394
|
-
else {
|
2395
|
-
val = Qfalse;
|
2396
|
-
}
|
2397
|
-
}
|
2398
|
-
else if (!SPECIAL_CONST_P(recv) && !SPECIAL_CONST_P(obj)) {
|
2399
|
-
if (0) {
|
2400
|
-
}
|
2401
|
-
#if 1
|
2402
|
-
else if (HEAP_CLASS_OF(recv) == rb_cFloat &&
|
2403
|
-
HEAP_CLASS_OF(obj) == rb_cFloat &&
|
2404
|
-
BASIC_OP_UNREDEFINED_P(BOP_LT)) {
|
2405
|
-
double a = RFLOAT_VALUE(recv);
|
2406
|
-
double b = RFLOAT_VALUE(obj);
|
2407
|
-
#if defined(_MSC_VER) && _MSC_VER < 1300
|
2408
|
-
if (isnan(a) || isnan(b)) val = Qfalse;
|
2409
|
-
else
|
2410
|
-
#endif
|
2411
|
-
val = a < b ? Qtrue : Qfalse;
|
2412
|
-
}
|
2413
|
-
#endif
|
2414
|
-
else {
|
2415
|
-
goto INSN_LABEL(normal_dispatch);
|
2416
|
-
}
|
2417
|
-
}
|
2418
|
-
else {
|
2419
|
-
INSN_LABEL(normal_dispatch):
|
2420
|
-
PUSH(recv);
|
2421
|
-
PUSH(obj);
|
2422
|
-
CALL_SIMPLE_METHOD(1, idLT, recv);
|
2423
|
-
}
|
2424
|
-
|
2425
|
-
#line 2426 "vm.inc"
|
2426
|
-
CHECK_STACK_OVERFLOW(REG_CFP, 1);
|
2427
|
-
PUSH(val);
|
2428
|
-
#undef CURRENT_INSN_opt_lt
|
2429
|
-
#undef INSN_IS_SC
|
2430
|
-
#undef INSN_LABEL
|
2431
|
-
#undef LABEL_IS_SC
|
2432
|
-
END_INSN(opt_lt);}}}
|
2433
|
-
INSN_ENTRY(opt_le){
|
2434
|
-
{
|
2435
|
-
VALUE val;
|
2436
|
-
IC ic = (IC)GET_OPERAND(1);
|
2437
|
-
VALUE recv = TOPN(1);
|
2438
|
-
VALUE obj = TOPN(0);
|
2439
|
-
DEBUG_ENTER_INSN("opt_le");
|
2440
|
-
ADD_PC(1+1);
|
2441
|
-
PREFETCH(GET_PC());
|
2442
|
-
POPN(2);
|
2443
|
-
#define CURRENT_INSN_opt_le 1
|
2444
|
-
#define INSN_IS_SC() 0
|
2445
|
-
#define INSN_LABEL(lab) LABEL_opt_le_##lab
|
2446
|
-
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
2447
|
-
USAGE_ANALYSIS_INSN(BIN(opt_le));
|
2448
|
-
USAGE_ANALYSIS_OPERAND(BIN(opt_le), 0, ic);
|
2449
|
-
{
|
2450
|
-
#line 1744 "insns.def"
|
2451
|
-
if (FIXNUM_2_P(recv, obj) &&
|
2452
|
-
BASIC_OP_UNREDEFINED_P(BOP_LE)) {
|
2453
|
-
SIGNED_VALUE a = recv, b = obj;
|
2454
|
-
|
2455
|
-
if (a <= b) {
|
2456
|
-
val = Qtrue;
|
2457
|
-
}
|
2458
|
-
else {
|
2459
|
-
val = Qfalse;
|
2460
|
-
}
|
2461
|
-
}
|
2462
|
-
else {
|
2463
|
-
/* other */
|
2464
|
-
PUSH(recv);
|
2465
|
-
PUSH(obj);
|
2466
|
-
CALL_SIMPLE_METHOD(1, idLE, recv);
|
2467
|
-
}
|
2468
|
-
|
2469
|
-
#line 2470 "vm.inc"
|
2470
|
-
CHECK_STACK_OVERFLOW(REG_CFP, 1);
|
2471
|
-
PUSH(val);
|
2472
|
-
#undef CURRENT_INSN_opt_le
|
2473
|
-
#undef INSN_IS_SC
|
2474
|
-
#undef INSN_LABEL
|
2475
|
-
#undef LABEL_IS_SC
|
2476
|
-
END_INSN(opt_le);}}}
|
2477
|
-
INSN_ENTRY(opt_gt){
|
2478
|
-
{
|
2479
|
-
VALUE val;
|
2480
|
-
IC ic = (IC)GET_OPERAND(1);
|
2481
|
-
VALUE recv = TOPN(1);
|
2482
|
-
VALUE obj = TOPN(0);
|
2483
|
-
DEBUG_ENTER_INSN("opt_gt");
|
2484
|
-
ADD_PC(1+1);
|
2485
|
-
PREFETCH(GET_PC());
|
2486
|
-
POPN(2);
|
2487
|
-
#define CURRENT_INSN_opt_gt 1
|
2488
|
-
#define INSN_IS_SC() 0
|
2489
|
-
#define INSN_LABEL(lab) LABEL_opt_gt_##lab
|
2490
|
-
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
2491
|
-
USAGE_ANALYSIS_INSN(BIN(opt_gt));
|
2492
|
-
USAGE_ANALYSIS_OPERAND(BIN(opt_gt), 0, ic);
|
2493
|
-
{
|
2494
|
-
#line 1774 "insns.def"
|
2495
|
-
if (FIXNUM_2_P(recv, obj) &&
|
2496
|
-
BASIC_OP_UNREDEFINED_P(BOP_GT)) {
|
2497
|
-
SIGNED_VALUE a = recv, b = obj;
|
2498
|
-
|
2499
|
-
if (a > b) {
|
2500
|
-
val = Qtrue;
|
2501
|
-
}
|
2502
|
-
else {
|
2503
|
-
val = Qfalse;
|
2504
|
-
}
|
2505
|
-
}
|
2506
|
-
else if (!SPECIAL_CONST_P(recv) && !SPECIAL_CONST_P(obj)) {
|
2507
|
-
if (0) {
|
2508
|
-
}
|
2509
|
-
#if 1
|
2510
|
-
else if (HEAP_CLASS_OF(recv) == rb_cFloat &&
|
2511
|
-
HEAP_CLASS_OF(obj) == rb_cFloat &&
|
2512
|
-
BASIC_OP_UNREDEFINED_P(BOP_GT)) {
|
2513
|
-
double a = RFLOAT_VALUE(recv);
|
2514
|
-
double b = RFLOAT_VALUE(obj);
|
2515
|
-
#if defined(_MSC_VER) && _MSC_VER < 1300
|
2516
|
-
if (isnan(a) || isnan(b)) val = Qfalse;
|
2517
|
-
else
|
2518
|
-
#endif
|
2519
|
-
val = a > b ? Qtrue : Qfalse;
|
2520
|
-
}
|
2521
|
-
#endif
|
2522
|
-
else {
|
2523
|
-
goto INSN_LABEL(normal_dispatch);
|
2524
|
-
}
|
2525
|
-
}
|
2526
|
-
else {
|
2527
|
-
INSN_LABEL(normal_dispatch):
|
2528
|
-
PUSH(recv);
|
2529
|
-
PUSH(obj);
|
2530
|
-
CALL_SIMPLE_METHOD(1, idGT, recv);
|
2531
|
-
}
|
2532
|
-
|
2533
|
-
#line 2534 "vm.inc"
|
2534
|
-
CHECK_STACK_OVERFLOW(REG_CFP, 1);
|
2535
|
-
PUSH(val);
|
2536
|
-
#undef CURRENT_INSN_opt_gt
|
2537
|
-
#undef INSN_IS_SC
|
2538
|
-
#undef INSN_LABEL
|
2539
|
-
#undef LABEL_IS_SC
|
2540
|
-
END_INSN(opt_gt);}}}
|
2541
|
-
INSN_ENTRY(opt_ge){
|
2542
|
-
{
|
2543
|
-
VALUE val;
|
2544
|
-
IC ic = (IC)GET_OPERAND(1);
|
2545
|
-
VALUE recv = TOPN(1);
|
2546
|
-
VALUE obj = TOPN(0);
|
2547
|
-
DEBUG_ENTER_INSN("opt_ge");
|
2548
|
-
ADD_PC(1+1);
|
2549
|
-
PREFETCH(GET_PC());
|
2550
|
-
POPN(2);
|
2551
|
-
#define CURRENT_INSN_opt_ge 1
|
2552
|
-
#define INSN_IS_SC() 0
|
2553
|
-
#define INSN_LABEL(lab) LABEL_opt_ge_##lab
|
2554
|
-
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
2555
|
-
USAGE_ANALYSIS_INSN(BIN(opt_ge));
|
2556
|
-
USAGE_ANALYSIS_OPERAND(BIN(opt_ge), 0, ic);
|
2557
|
-
{
|
2558
|
-
#line 1824 "insns.def"
|
2559
|
-
if (FIXNUM_2_P(recv, obj) &&
|
2560
|
-
BASIC_OP_UNREDEFINED_P(BOP_GE)) {
|
2561
|
-
SIGNED_VALUE a = recv, b = obj;
|
2562
|
-
|
2563
|
-
if (a >= b) {
|
2564
|
-
val = Qtrue;
|
2565
|
-
}
|
2566
|
-
else {
|
2567
|
-
val = Qfalse;
|
2568
|
-
}
|
2569
|
-
}
|
2570
|
-
else {
|
2571
|
-
PUSH(recv);
|
2572
|
-
PUSH(obj);
|
2573
|
-
CALL_SIMPLE_METHOD(1, idGE, recv);
|
2574
|
-
}
|
2575
|
-
|
2576
|
-
#line 2577 "vm.inc"
|
2577
|
-
CHECK_STACK_OVERFLOW(REG_CFP, 1);
|
2578
|
-
PUSH(val);
|
2579
|
-
#undef CURRENT_INSN_opt_ge
|
2580
|
-
#undef INSN_IS_SC
|
2581
|
-
#undef INSN_LABEL
|
2582
|
-
#undef LABEL_IS_SC
|
2583
|
-
END_INSN(opt_ge);}}}
|
2584
|
-
INSN_ENTRY(opt_ltlt){
|
2585
|
-
{
|
2586
|
-
VALUE val;
|
2587
|
-
IC ic = (IC)GET_OPERAND(1);
|
2588
|
-
VALUE recv = TOPN(1);
|
2589
|
-
VALUE obj = TOPN(0);
|
2590
|
-
DEBUG_ENTER_INSN("opt_ltlt");
|
2591
|
-
ADD_PC(1+1);
|
2592
|
-
PREFETCH(GET_PC());
|
2593
|
-
POPN(2);
|
2594
|
-
#define CURRENT_INSN_opt_ltlt 1
|
2595
|
-
#define INSN_IS_SC() 0
|
2596
|
-
#define INSN_LABEL(lab) LABEL_opt_ltlt_##lab
|
2597
|
-
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
2598
|
-
USAGE_ANALYSIS_INSN(BIN(opt_ltlt));
|
2599
|
-
USAGE_ANALYSIS_OPERAND(BIN(opt_ltlt), 0, ic);
|
2600
|
-
{
|
2601
|
-
#line 1853 "insns.def"
|
2602
|
-
if (!SPECIAL_CONST_P(recv)) {
|
2603
|
-
if (0) {
|
2604
|
-
}
|
2605
|
-
else if (HEAP_CLASS_OF(recv) == rb_cString &&
|
2606
|
-
BASIC_OP_UNREDEFINED_P(BOP_LTLT)) {
|
2607
|
-
val = rb_str_concat(recv, obj);
|
2608
|
-
}
|
2609
|
-
else if (HEAP_CLASS_OF(recv) == rb_cArray &&
|
2610
|
-
BASIC_OP_UNREDEFINED_P(BOP_LTLT)) {
|
2611
|
-
val = rb_ary_push(recv, obj);
|
2612
|
-
}
|
2613
|
-
else {
|
2614
|
-
goto INSN_LABEL(normal_dispatch);
|
2615
|
-
}
|
2616
|
-
}
|
2617
|
-
else {
|
2618
|
-
INSN_LABEL(normal_dispatch):
|
2619
|
-
PUSH(recv);
|
2620
|
-
PUSH(obj);
|
2621
|
-
CALL_SIMPLE_METHOD(1, idLTLT, recv);
|
2622
|
-
}
|
2623
|
-
|
2624
|
-
#line 2625 "vm.inc"
|
2625
|
-
CHECK_STACK_OVERFLOW(REG_CFP, 1);
|
2626
|
-
PUSH(val);
|
2627
|
-
#undef CURRENT_INSN_opt_ltlt
|
2628
|
-
#undef INSN_IS_SC
|
2629
|
-
#undef INSN_LABEL
|
2630
|
-
#undef LABEL_IS_SC
|
2631
|
-
END_INSN(opt_ltlt);}}}
|
2632
|
-
INSN_ENTRY(opt_aref){
|
2633
|
-
{
|
2634
|
-
VALUE val;
|
2635
|
-
IC ic = (IC)GET_OPERAND(1);
|
2636
|
-
VALUE recv = TOPN(1);
|
2637
|
-
VALUE obj = TOPN(0);
|
2638
|
-
DEBUG_ENTER_INSN("opt_aref");
|
2639
|
-
ADD_PC(1+1);
|
2640
|
-
PREFETCH(GET_PC());
|
2641
|
-
POPN(2);
|
2642
|
-
#define CURRENT_INSN_opt_aref 1
|
2643
|
-
#define INSN_IS_SC() 0
|
2644
|
-
#define INSN_LABEL(lab) LABEL_opt_aref_##lab
|
2645
|
-
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
2646
|
-
USAGE_ANALYSIS_INSN(BIN(opt_aref));
|
2647
|
-
USAGE_ANALYSIS_OPERAND(BIN(opt_aref), 0, ic);
|
2648
|
-
{
|
2649
|
-
#line 1887 "insns.def"
|
2650
|
-
if (!SPECIAL_CONST_P(recv) && BASIC_OP_UNREDEFINED_P(BOP_AREF)) {
|
2651
|
-
if (HEAP_CLASS_OF(recv) == rb_cArray && FIXNUM_P(obj)) {
|
2652
|
-
val = rb_ary_entry(recv, FIX2LONG(obj));
|
2653
|
-
}
|
2654
|
-
else if (HEAP_CLASS_OF(recv) == rb_cHash) {
|
2655
|
-
val = rb_hash_aref(recv, obj);
|
2656
|
-
}
|
2657
|
-
else {
|
2658
|
-
goto INSN_LABEL(normal_dispatch);
|
2659
|
-
}
|
2660
|
-
}
|
2661
|
-
else {
|
2662
|
-
INSN_LABEL(normal_dispatch):
|
2663
|
-
PUSH(recv);
|
2664
|
-
PUSH(obj);
|
2665
|
-
CALL_SIMPLE_METHOD(1, idAREF, recv);
|
2666
|
-
}
|
2667
|
-
|
2668
|
-
#line 2669 "vm.inc"
|
2669
|
-
CHECK_STACK_OVERFLOW(REG_CFP, 1);
|
2670
|
-
PUSH(val);
|
2671
|
-
#undef CURRENT_INSN_opt_aref
|
2672
|
-
#undef INSN_IS_SC
|
2673
|
-
#undef INSN_LABEL
|
2674
|
-
#undef LABEL_IS_SC
|
2675
|
-
END_INSN(opt_aref);}}}
|
2676
|
-
INSN_ENTRY(opt_aset){
|
2677
|
-
{
|
2678
|
-
VALUE val;
|
2679
|
-
IC ic = (IC)GET_OPERAND(1);
|
2680
|
-
VALUE recv = TOPN(2);
|
2681
|
-
VALUE obj = TOPN(1);
|
2682
|
-
VALUE set = TOPN(0);
|
2683
|
-
DEBUG_ENTER_INSN("opt_aset");
|
2684
|
-
ADD_PC(1+1);
|
2685
|
-
PREFETCH(GET_PC());
|
2686
|
-
POPN(3);
|
2687
|
-
#define CURRENT_INSN_opt_aset 1
|
2688
|
-
#define INSN_IS_SC() 0
|
2689
|
-
#define INSN_LABEL(lab) LABEL_opt_aset_##lab
|
2690
|
-
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
2691
|
-
USAGE_ANALYSIS_INSN(BIN(opt_aset));
|
2692
|
-
USAGE_ANALYSIS_OPERAND(BIN(opt_aset), 0, ic);
|
2693
|
-
{
|
2694
|
-
#line 1917 "insns.def"
|
2695
|
-
if (!SPECIAL_CONST_P(recv) &&
|
2696
|
-
BASIC_OP_UNREDEFINED_P(BOP_ASET)) {
|
2697
|
-
if (HEAP_CLASS_OF(recv) == rb_cArray && FIXNUM_P(obj)) {
|
2698
|
-
rb_ary_store(recv, FIX2LONG(obj), set);
|
2699
|
-
val = set;
|
2700
|
-
}
|
2701
|
-
else if (HEAP_CLASS_OF(recv) == rb_cHash) {
|
2702
|
-
rb_hash_aset(recv, obj, set);
|
2703
|
-
val = set;
|
2704
|
-
}
|
2705
|
-
else {
|
2706
|
-
goto INSN_LABEL(normal_dispatch);
|
2707
|
-
}
|
2708
|
-
}
|
2709
|
-
else {
|
2710
|
-
INSN_LABEL(normal_dispatch):
|
2711
|
-
PUSH(recv);
|
2712
|
-
PUSH(obj);
|
2713
|
-
PUSH(set);
|
2714
|
-
CALL_SIMPLE_METHOD(2, idASET, recv);
|
2715
|
-
}
|
2716
|
-
|
2717
|
-
#line 2718 "vm.inc"
|
2718
|
-
CHECK_STACK_OVERFLOW(REG_CFP, 1);
|
2719
|
-
PUSH(val);
|
2720
|
-
#undef CURRENT_INSN_opt_aset
|
2721
|
-
#undef INSN_IS_SC
|
2722
|
-
#undef INSN_LABEL
|
2723
|
-
#undef LABEL_IS_SC
|
2724
|
-
END_INSN(opt_aset);}}}
|
2725
|
-
INSN_ENTRY(opt_length){
|
2726
|
-
{
|
2727
|
-
VALUE val;
|
2728
|
-
IC ic = (IC)GET_OPERAND(1);
|
2729
|
-
VALUE recv = TOPN(0);
|
2730
|
-
DEBUG_ENTER_INSN("opt_length");
|
2731
|
-
ADD_PC(1+1);
|
2732
|
-
PREFETCH(GET_PC());
|
2733
|
-
POPN(1);
|
2734
|
-
#define CURRENT_INSN_opt_length 1
|
2735
|
-
#define INSN_IS_SC() 0
|
2736
|
-
#define INSN_LABEL(lab) LABEL_opt_length_##lab
|
2737
|
-
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
2738
|
-
USAGE_ANALYSIS_INSN(BIN(opt_length));
|
2739
|
-
USAGE_ANALYSIS_OPERAND(BIN(opt_length), 0, ic);
|
2740
|
-
{
|
2741
|
-
#line 1951 "insns.def"
|
2742
|
-
if (LIKELY(!SPECIAL_CONST_P(recv) &&
|
2743
|
-
BASIC_OP_UNREDEFINED_P(BOP_LENGTH))) {
|
2744
|
-
if (HEAP_CLASS_OF(recv) == rb_cString) {
|
2745
|
-
val = rb_str_length(recv);
|
2746
|
-
}
|
2747
|
-
else if (HEAP_CLASS_OF(recv) == rb_cArray) {
|
2748
|
-
val = LONG2NUM(RARRAY_LEN(recv));
|
2749
|
-
}
|
2750
|
-
else if (HEAP_CLASS_OF(recv) == rb_cHash) {
|
2751
|
-
val = INT2FIX(RHASH_SIZE(recv));
|
2752
|
-
}
|
2753
|
-
else {
|
2754
|
-
goto INSN_LABEL(normal_dispatch);
|
2755
|
-
}
|
2756
|
-
}
|
2757
|
-
else {
|
2758
|
-
INSN_LABEL(normal_dispatch):
|
2759
|
-
PUSH(recv);
|
2760
|
-
CALL_SIMPLE_METHOD(0, idLength, recv);
|
2761
|
-
}
|
2762
|
-
|
2763
|
-
#line 2764 "vm.inc"
|
2764
|
-
CHECK_STACK_OVERFLOW(REG_CFP, 1);
|
2765
|
-
PUSH(val);
|
2766
|
-
#undef CURRENT_INSN_opt_length
|
2767
|
-
#undef INSN_IS_SC
|
2768
|
-
#undef INSN_LABEL
|
2769
|
-
#undef LABEL_IS_SC
|
2770
|
-
END_INSN(opt_length);}}}
|
2771
|
-
INSN_ENTRY(opt_size){
|
2772
|
-
{
|
2773
|
-
VALUE val;
|
2774
|
-
IC ic = (IC)GET_OPERAND(1);
|
2775
|
-
VALUE recv = TOPN(0);
|
2776
|
-
DEBUG_ENTER_INSN("opt_size");
|
2777
|
-
ADD_PC(1+1);
|
2778
|
-
PREFETCH(GET_PC());
|
2779
|
-
POPN(1);
|
2780
|
-
#define CURRENT_INSN_opt_size 1
|
2781
|
-
#define INSN_IS_SC() 0
|
2782
|
-
#define INSN_LABEL(lab) LABEL_opt_size_##lab
|
2783
|
-
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
2784
|
-
USAGE_ANALYSIS_INSN(BIN(opt_size));
|
2785
|
-
USAGE_ANALYSIS_OPERAND(BIN(opt_size), 0, ic);
|
2786
|
-
{
|
2787
|
-
#line 1984 "insns.def"
|
2788
|
-
if (LIKELY(BASIC_OP_UNREDEFINED_P(BOP_SIZE) &&
|
2789
|
-
!SPECIAL_CONST_P(recv))) {
|
2790
|
-
if (HEAP_CLASS_OF(recv) == rb_cString) {
|
2791
|
-
val = rb_str_length(recv);
|
2792
|
-
}
|
2793
|
-
else if (HEAP_CLASS_OF(recv) == rb_cArray) {
|
2794
|
-
val = LONG2NUM(RARRAY_LEN(recv));
|
2795
|
-
}
|
2796
|
-
else if (HEAP_CLASS_OF(recv) == rb_cHash) {
|
2797
|
-
val = INT2FIX(RHASH_SIZE(recv));
|
2798
|
-
}
|
2799
|
-
else {
|
2800
|
-
goto INSN_LABEL(normal_dispatch);
|
2801
|
-
}
|
2802
|
-
}
|
2803
|
-
else {
|
2804
|
-
INSN_LABEL(normal_dispatch):
|
2805
|
-
PUSH(recv);
|
2806
|
-
CALL_SIMPLE_METHOD(0, idSize, recv);
|
2807
|
-
}
|
2808
|
-
|
2809
|
-
#line 2810 "vm.inc"
|
2810
|
-
CHECK_STACK_OVERFLOW(REG_CFP, 1);
|
2811
|
-
PUSH(val);
|
2812
|
-
#undef CURRENT_INSN_opt_size
|
2813
|
-
#undef INSN_IS_SC
|
2814
|
-
#undef INSN_LABEL
|
2815
|
-
#undef LABEL_IS_SC
|
2816
|
-
END_INSN(opt_size);}}}
|
2817
|
-
INSN_ENTRY(opt_succ){
|
2818
|
-
{
|
2819
|
-
VALUE val;
|
2820
|
-
IC ic = (IC)GET_OPERAND(1);
|
2821
|
-
VALUE recv = TOPN(0);
|
2822
|
-
DEBUG_ENTER_INSN("opt_succ");
|
2823
|
-
ADD_PC(1+1);
|
2824
|
-
PREFETCH(GET_PC());
|
2825
|
-
POPN(1);
|
2826
|
-
#define CURRENT_INSN_opt_succ 1
|
2827
|
-
#define INSN_IS_SC() 0
|
2828
|
-
#define INSN_LABEL(lab) LABEL_opt_succ_##lab
|
2829
|
-
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
2830
|
-
USAGE_ANALYSIS_INSN(BIN(opt_succ));
|
2831
|
-
USAGE_ANALYSIS_OPERAND(BIN(opt_succ), 0, ic);
|
2832
|
-
{
|
2833
|
-
#line 2017 "insns.def"
|
2834
|
-
if (SPECIAL_CONST_P(recv)) {
|
2835
|
-
if (FIXNUM_P(recv) &&
|
2836
|
-
BASIC_OP_UNREDEFINED_P(BOP_SUCC)) {
|
2837
|
-
const VALUE obj = INT2FIX(1);
|
2838
|
-
/* fixnum + INT2FIX(1) */
|
2839
|
-
val = (recv + (obj & (~1)));
|
2840
|
-
if ((~(recv ^ obj) & (recv ^ val)) & ((unsigned long)LONG_MAX + 1)) {
|
2841
|
-
val = rb_big_plus(rb_int2big(FIX2LONG(recv)),
|
2842
|
-
rb_int2big(FIX2LONG(obj)));
|
2843
|
-
}
|
2844
|
-
}
|
2845
|
-
else {
|
2846
|
-
goto INSN_LABEL(normal_dispatch);
|
2847
|
-
}
|
2848
|
-
}
|
2849
|
-
else {
|
2850
|
-
if (HEAP_CLASS_OF(recv) == rb_cString &&
|
2851
|
-
BASIC_OP_UNREDEFINED_P(BOP_SUCC)) {
|
2852
|
-
val = rb_str_succ(recv);
|
2853
|
-
}
|
2854
|
-
else if (HEAP_CLASS_OF(recv) == rb_cTime &&
|
2855
|
-
BASIC_OP_UNREDEFINED_P(BOP_SUCC)) {
|
2856
|
-
val = rb_time_succ(recv);
|
2857
|
-
}
|
2858
|
-
else
|
2859
|
-
{
|
2860
|
-
goto INSN_LABEL(normal_dispatch);
|
2861
|
-
}
|
2862
|
-
}
|
2863
|
-
if (0) {
|
2864
|
-
INSN_LABEL(normal_dispatch):
|
2865
|
-
PUSH(recv);
|
2866
|
-
CALL_SIMPLE_METHOD(0, idSucc, recv);
|
2867
|
-
}
|
2868
|
-
|
2869
|
-
#line 2870 "vm.inc"
|
2870
|
-
CHECK_STACK_OVERFLOW(REG_CFP, 1);
|
2871
|
-
PUSH(val);
|
2872
|
-
#undef CURRENT_INSN_opt_succ
|
2873
|
-
#undef INSN_IS_SC
|
2874
|
-
#undef INSN_LABEL
|
2875
|
-
#undef LABEL_IS_SC
|
2876
|
-
END_INSN(opt_succ);}}}
|
2877
|
-
INSN_ENTRY(opt_not){
|
2878
|
-
{
|
2879
|
-
VALUE val;
|
2880
|
-
IC ic = (IC)GET_OPERAND(1);
|
2881
|
-
VALUE recv = TOPN(0);
|
2882
|
-
DEBUG_ENTER_INSN("opt_not");
|
2883
|
-
ADD_PC(1+1);
|
2884
|
-
PREFETCH(GET_PC());
|
2885
|
-
POPN(1);
|
2886
|
-
#define CURRENT_INSN_opt_not 1
|
2887
|
-
#define INSN_IS_SC() 0
|
2888
|
-
#define INSN_LABEL(lab) LABEL_opt_not_##lab
|
2889
|
-
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
2890
|
-
USAGE_ANALYSIS_INSN(BIN(opt_not));
|
2891
|
-
USAGE_ANALYSIS_OPERAND(BIN(opt_not), 0, ic);
|
2892
|
-
{
|
2893
|
-
#line 2064 "insns.def"
|
2894
|
-
extern VALUE rb_obj_not(VALUE obj);
|
2895
|
-
const rb_method_entry_t *me = vm_method_search(idNot, CLASS_OF(recv), ic);
|
2896
|
-
|
2897
|
-
if (check_cfunc(me, rb_obj_not)) {
|
2898
|
-
val = RTEST(recv) ? Qfalse : Qtrue;
|
2899
|
-
}
|
2900
|
-
else {
|
2901
|
-
PUSH(recv);
|
2902
|
-
CALL_SIMPLE_METHOD(0, idNot, recv);
|
2903
|
-
}
|
2904
|
-
|
2905
|
-
#line 2906 "vm.inc"
|
2906
|
-
CHECK_STACK_OVERFLOW(REG_CFP, 1);
|
2907
|
-
PUSH(val);
|
2908
|
-
#undef CURRENT_INSN_opt_not
|
2909
|
-
#undef INSN_IS_SC
|
2910
|
-
#undef INSN_LABEL
|
2911
|
-
#undef LABEL_IS_SC
|
2912
|
-
END_INSN(opt_not);}}}
|
2913
|
-
INSN_ENTRY(opt_regexpmatch1){
|
2914
|
-
{
|
2915
|
-
VALUE val;
|
2916
|
-
VALUE r = (VALUE)GET_OPERAND(1);
|
2917
|
-
VALUE obj = TOPN(0);
|
2918
|
-
DEBUG_ENTER_INSN("opt_regexpmatch1");
|
2919
|
-
ADD_PC(1+1);
|
2920
|
-
PREFETCH(GET_PC());
|
2921
|
-
POPN(1);
|
2922
|
-
#define CURRENT_INSN_opt_regexpmatch1 1
|
2923
|
-
#define INSN_IS_SC() 0
|
2924
|
-
#define INSN_LABEL(lab) LABEL_opt_regexpmatch1_##lab
|
2925
|
-
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
2926
|
-
USAGE_ANALYSIS_INSN(BIN(opt_regexpmatch1));
|
2927
|
-
USAGE_ANALYSIS_OPERAND(BIN(opt_regexpmatch1), 0, r);
|
2928
|
-
{
|
2929
|
-
#line 2088 "insns.def"
|
2930
|
-
val = rb_reg_match(r, obj);
|
2931
|
-
|
2932
|
-
#line 2933 "vm.inc"
|
2933
|
-
CHECK_STACK_OVERFLOW(REG_CFP, 1);
|
2934
|
-
PUSH(val);
|
2935
|
-
#undef CURRENT_INSN_opt_regexpmatch1
|
2936
|
-
#undef INSN_IS_SC
|
2937
|
-
#undef INSN_LABEL
|
2938
|
-
#undef LABEL_IS_SC
|
2939
|
-
END_INSN(opt_regexpmatch1);}}}
|
2940
|
-
INSN_ENTRY(opt_regexpmatch2){
|
2941
|
-
{
|
2942
|
-
VALUE val;
|
2943
|
-
|
2944
|
-
VALUE obj2 = TOPN(1);
|
2945
|
-
VALUE obj1 = TOPN(0);
|
2946
|
-
DEBUG_ENTER_INSN("opt_regexpmatch2");
|
2947
|
-
ADD_PC(1+0);
|
2948
|
-
PREFETCH(GET_PC());
|
2949
|
-
POPN(2);
|
2950
|
-
#define CURRENT_INSN_opt_regexpmatch2 1
|
2951
|
-
#define INSN_IS_SC() 0
|
2952
|
-
#define INSN_LABEL(lab) LABEL_opt_regexpmatch2_##lab
|
2953
|
-
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
2954
|
-
USAGE_ANALYSIS_INSN(BIN(opt_regexpmatch2));
|
2955
|
-
{
|
2956
|
-
#line 2102 "insns.def"
|
2957
|
-
if (TYPE(obj2) == T_STRING) {
|
2958
|
-
val = rb_reg_match(obj1, obj2);
|
2959
|
-
}
|
2960
|
-
else {
|
2961
|
-
val = rb_funcall(obj2, idEqTilde, 1, obj1);
|
2962
|
-
}
|
2963
|
-
|
2964
|
-
#line 2965 "vm.inc"
|
2965
|
-
CHECK_STACK_OVERFLOW(REG_CFP, 1);
|
2966
|
-
PUSH(val);
|
2967
|
-
#undef CURRENT_INSN_opt_regexpmatch2
|
2968
|
-
#undef INSN_IS_SC
|
2969
|
-
#undef INSN_LABEL
|
2970
|
-
#undef LABEL_IS_SC
|
2971
|
-
END_INSN(opt_regexpmatch2);}}}
|
2972
|
-
INSN_ENTRY(opt_call_c_function){
|
2973
|
-
{
|
2974
|
-
rb_insn_func_t funcptr = (rb_insn_func_t)GET_OPERAND(1);
|
2975
|
-
|
2976
|
-
DEBUG_ENTER_INSN("opt_call_c_function");
|
2977
|
-
ADD_PC(1+1);
|
2978
|
-
PREFETCH(GET_PC());
|
2979
|
-
#define CURRENT_INSN_opt_call_c_function 1
|
2980
|
-
#define INSN_IS_SC() 0
|
2981
|
-
#define INSN_LABEL(lab) LABEL_opt_call_c_function_##lab
|
2982
|
-
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
2983
|
-
USAGE_ANALYSIS_INSN(BIN(opt_call_c_function));
|
2984
|
-
USAGE_ANALYSIS_OPERAND(BIN(opt_call_c_function), 0, funcptr);
|
2985
|
-
{
|
2986
|
-
#line 2121 "insns.def"
|
2987
|
-
reg_cfp = (funcptr)(th, reg_cfp);
|
2988
|
-
|
2989
|
-
if (reg_cfp == 0) {
|
2990
|
-
VALUE err = th->errinfo;
|
2991
|
-
th->errinfo = Qnil;
|
2992
|
-
THROW_EXCEPTION(err);
|
2993
|
-
}
|
2994
|
-
|
2995
|
-
RESTORE_REGS();
|
2996
|
-
NEXT_INSN();
|
2997
|
-
|
2998
|
-
#line 2999 "vm.inc"
|
2999
|
-
#undef CURRENT_INSN_opt_call_c_function
|
3000
|
-
#undef INSN_IS_SC
|
3001
|
-
#undef INSN_LABEL
|
3002
|
-
#undef LABEL_IS_SC
|
3003
|
-
END_INSN(opt_call_c_function);}}}
|
3004
|
-
INSN_ENTRY(bitblt){
|
3005
|
-
{
|
3006
|
-
VALUE ret;
|
3007
|
-
|
3008
|
-
|
3009
|
-
DEBUG_ENTER_INSN("bitblt");
|
3010
|
-
ADD_PC(1+0);
|
3011
|
-
PREFETCH(GET_PC());
|
3012
|
-
#define CURRENT_INSN_bitblt 1
|
3013
|
-
#define INSN_IS_SC() 0
|
3014
|
-
#define INSN_LABEL(lab) LABEL_bitblt_##lab
|
3015
|
-
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
3016
|
-
USAGE_ANALYSIS_INSN(BIN(bitblt));
|
3017
|
-
{
|
3018
|
-
#line 2144 "insns.def"
|
3019
|
-
ret = rb_str_new2("a bit of bacon, lettuce and tomato");
|
3020
|
-
|
3021
|
-
#line 3022 "vm.inc"
|
3022
|
-
CHECK_STACK_OVERFLOW(REG_CFP, 1);
|
3023
|
-
PUSH(ret);
|
3024
|
-
#undef CURRENT_INSN_bitblt
|
3025
|
-
#undef INSN_IS_SC
|
3026
|
-
#undef INSN_LABEL
|
3027
|
-
#undef LABEL_IS_SC
|
3028
|
-
END_INSN(bitblt);}}}
|
3029
|
-
INSN_ENTRY(answer){
|
3030
|
-
{
|
3031
|
-
VALUE ret;
|
3032
|
-
|
3033
|
-
|
3034
|
-
DEBUG_ENTER_INSN("answer");
|
3035
|
-
ADD_PC(1+0);
|
3036
|
-
PREFETCH(GET_PC());
|
3037
|
-
#define CURRENT_INSN_answer 1
|
3038
|
-
#define INSN_IS_SC() 0
|
3039
|
-
#define INSN_LABEL(lab) LABEL_answer_##lab
|
3040
|
-
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
3041
|
-
USAGE_ANALYSIS_INSN(BIN(answer));
|
3042
|
-
{
|
3043
|
-
#line 2158 "insns.def"
|
3044
|
-
ret = INT2FIX(42);
|
3045
|
-
|
3046
|
-
#line 3047 "vm.inc"
|
3047
|
-
CHECK_STACK_OVERFLOW(REG_CFP, 1);
|
3048
|
-
PUSH(ret);
|
3049
|
-
#undef CURRENT_INSN_answer
|
3050
|
-
#undef INSN_IS_SC
|
3051
|
-
#undef INSN_LABEL
|
3052
|
-
#undef LABEL_IS_SC
|
3053
|
-
END_INSN(answer);}}}
|
3054
|
-
|