summaryrefslogtreecommitdiff
path: root/compile.c
AgeCommit message (Collapse)Author
2018-04-16compile.c: align rangenobu
* compile.c (ibf_dump_object_struct): align range elements. [ruby-core:86548] [Bug #14689] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63167 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-04-13Add write barrier calls for direct marking objects.tenderlove
This commit adds write barriers for objects marked from `rb_iseq_mark`. r62851 introduced direct marking from iseqs to: * keyword arg default values * catch table iseqs * VALUEs embedded in encoded instructions This patch adds missing write barrier calls to those references. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63147 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-04-08compile.c: disable debug prints on sparcnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63120 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-04-08compile.c: fix an exception argumentnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63119 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-04-08compile.c: suppress warningsnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63118 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-04-08compile.c: align ibf_object_headernobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63117 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-04-08compile.c: debug prints in ibf_load_objectnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63116 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-04-08compile.c: align IBF dumped datanobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63113 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-04-07compile.c: refine debug printsnobu
* compile.c (ibf_load_iseq_complete): use alternate hexadecimal form for offset. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63111 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-04-05compile.c: fix positions encodenobu
* compile.c (ibf_load_iseq_each): iseq_size necessary to encode positions is set in ibf_load_code(). [Bug #14660] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63103 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-04-05compile.c: do not dump pointersnobu
* compile.c (ibf_dump_iseq_each): ensure succ_index_table pointer field to be 0. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63102 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-04-05compile.c: clear paddingnobu
* compile.c (IBF_ZERO): clear padding of struct not to include garbages in dumped binary data. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63101 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-04-05compile.c: do not dump pointersnobu
* compile.c (ibf_dump_iseq_each): do not dump succ_index_table pointer. positions are dumped as integer arrays. pointer values are meaningless outside the process. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63099 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-04-05compile.c: zero fillnobu
* compile.c (ibf_dump_align): fill padding with zero, instead of resizing only, not to leave garbages. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63098 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-03-31compile.c: compile_evstrnobu
* compile.c (compile_evstr): extract from iseq_compile_each. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63051 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-03-31compile.c: end_labelnobu
* compile.c (compile_if): branch to end_label is not used if else_seq is not used. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63050 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-03-30compile.c: do not dump unused callinfosnobu
* compile.c (compile_if): rewind callinfo indexes used in unreachable paths, to get rid of dumping unused callinfos. [ruby-core:86399] [Bug #14553] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63040 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-03-24compile.c: split add_insn_infonobu
* compile.c (add_insn_info, add_adjust_info): split for each list->type, to remove unnecessary repeated conditions and casts. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62908 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-03-24compile.c: suppress missing-noreturnnobu
* compile.c (add_insn_info): move return statement to suppress missing-noreturn warning. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62906 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-03-20node.c: predicates for special NODEsnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62861 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-03-20compile.c: fix ibf_load_codenobu
* compile.c (ibf_load_iseq_each): manage iseq_size to point loaded objects in iseq_encoded. now marking iseq scans iseq_encoded directly. * test/ruby/test_iseq.rb (test_to_binary_with_objects): skip for now, but fix argument order of assert_equal. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62856 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-03-19Reverting r62775, this should fix i686 buildstenderlove
We need to mark default values for kwarg methods. This also fixes Bootsnap. IBF iseq loading needed to mark iseqs as "having markable objects". git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62851 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-03-19compile.c: arg var indexnobu
* compile.c (iseq_set_arguments): determine argument variable indexes by the order, not by just IDs. arguments begin with `_` can be duplicate, so by-ID index may result in a wrong value. [ruby-core:86159] [Bug #14611] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62833 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-03-18compile.c: fix function name [ci skip]nobu
* compile.c (ibf_dump_object_object): fix a probable typo in the function name, s/lbf/ibf/. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62807 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-03-17compile.c: resize to align offsetsnobu
* compile.c (ibf_dump_align): resize the dump buffer. rb_str_modify_expand expands the buffer but not set the length. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62796 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-03-17debugging SEGV on Solaris11snobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62795 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-03-17compile.c: align offsetsnobu
* compile.c (ibf_dump_align): expand the buffer for alignment. * compile.c (ibf_dump_iseq_list, ibf_dump_object_list): align as ibf_offset_t. not all processors do not allow unaligned word, or larger, access. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62791 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-03-17debugging SEGV on Solaris11snobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62787 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-03-16debugging SEGV on Solaris11snobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62778 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-03-16debugging SEGV on Solaris11snobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62777 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-03-16Revert "Add direct marking on iseq operands"naruse
This reverts commit r62706. It causes SEGV on i686-linux (debian) and armv7l-linux-eabihf: http://www.rubyist.net/~akr/chkbuild/debian/ruby-trunk/log/20180309T204300Z.diff.html.gz http://rubyci.s3.amazonaws.com/scw-9d6766/ruby-trunk/log/20180309T211706Z.diff.html.gz git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62775 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-03-16Revert "Fix error: implicit conversion loses integer precision"naruse
This reverts commit r62708. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62774 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-03-16compile.c: fix load_from_binarynobu
* compile.c (ibf_load_iseq_each): realpath may be nil. follow up r59709. [fix https://github.com/Shopify/bootsnap/issues/132] From: nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62772 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-03-15Revert r62617 "compile.c: fix load_from_binary"naruse
It breaks Solaris: http://rubyci.s3.amazonaws.com/unstable11s/ruby-trunk/log/20180301T012502Z.diff.html.gz git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62769 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-03-10compile.c: mark all ISeq ancestors as catch_except_pk0kubun
This change assumes that continuously reading `parent_iseq` from block ISeq would reach non-block ISeq finally. test/ruby/test_jit.rb: add test that catches 2-depth exception Combination of r62654 and r62678 caused following error in this test. -e:12:in `wrapper': Stack consistency error (sp: 14, bp: 13) (fatal) == disasm: #<ISeq:wrapper@-e:10 (10,0)-(12,3)> (catch: FALSE)=========== local table (size: 2, argc: 2 [opts: 0, rest: -1, post: 0, block: -1, kw: -1@-1, kwrest: -1]) [ 2] paths<Arg> [ 1] prefixes<Arg> 0000 putself ( 11)[LiCa] 0001 getlocal_WC_0 paths 0003 getlocal_WC_0 prefixes 0005 opt_send_without_block <callinfo!mid:catch_true, argc:2, FCALL|ARGS_SIMPLE>, <callcache> 0008 leave ( 12)[Re] As you can see, it says `catch: FALSE`, but obviously it catches exception raised from `return path`. As of r62655, it was kind of intentional because I only cared about expiration of JIT-ed frame and I've thought calling `vm_exec` is only needed once for it. So r62654 was NOT actually checking if it may catch exception. But for r62678, obviously we should set catch_except_p=TRUE for all ISeqs which may catch exception. Otherwise catch table lookup would fail. With this bugfix, code generated by r62655 might be worse, but at least while loop can be marked as `catch: FALSE` as expected. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62717 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-03-10Fix error: implicit conversion loses integer precisionkazu
http://ci.rvm.jp/results/trunk_clang_50@silicon-docker/627906 ``` iseq.h:41:36: error: implicit conversion loses integer precision: 'rb_num_t' (aka 'unsigned long') to 'int' [-Werror,-Wshorten-64-to-32] int cnt = iseq->body->variable.flip_count; ~~~ ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~ ``` git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62708 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-03-09Add direct marking on iseq operandstenderlove
Directly marking iseq operands allows us to eliminate the "mark array" stored on ISEQ objects, which will reduce the amount of memory ISEQ objects consume. This patch changes the iseq mark function to: * Directly marks ISEQ operands * Iterate over and mark child ISEQs It also introduces two flags on the ISEQ object. In order to mark instruction operands, we have to disassemble the instructions and find the instruction parameters and types. Instructions may also be translated to jump addresses. Instruction sequences may get marked by the GC *while* they're mid flight (being compiled). The `ISEQ_TRANSLATED` flag is used to indicate whether or not the instructions have been translated to jump addresses so that when we decode the instructions we know whether or not we need to go from jump location back to original instruction or not. Not all ISEQ objects have any markable objects embedded in their instructions. We can detect whether or not an ISEQ has markable objects in the instructions at compile time. If the instructions contain markable objects, we set a flag `ISEQ_MARKABLE_ISEQ` on the ISEQ object. This means that during the mark phase, we can skip decompilation if the flag is *not* set. In other words, we can avoid decompilation of we know in advance there is nothing to mark. `once` instructions have an operand that contains the result of a one-time compilation of a regex. Before this patch, that operand was called an "inline cache", even though the struct was actually an "inline storage". This patch changes the operand to be an "inline storage" so that we can differentiate between caches that need marking (the inline storage) and caches that don't need marking (inline cache). [ruby-core:84909] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62706 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-03-04compile.c: set catch_except_p flagk0kubun
to be used for MJIT's optimization. It's not used for optimization in this commit yet. vm_core.h: added catch_except_p field. iseq.c: show the flag in ISeq disasm for debugging. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62654 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-03-01compile.c: raise on invalid inputnobu
* compile.c (ibf_load_object_unsupported, ibf_load_object_class): should raise an exception. rejection of invalid input is not a bug. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62622 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-03-01compile.c: do not truncate VALUE to longnobu
* compile.c (ibf_dump_object_regexp): do not truncate VALUE to long. it makes invalid VALUE on IL32LLP64 platforms where long is shorter than VALUE. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62621 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-03-01compile.c: fix load_from_binarynobu
* compile.c (ibf_load_iseq_each): realpath may be nil. follow up r59709. [fix https://github.com/Shopify/bootsnap/issues/132] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62617 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-28Revert r61936 "compile.c: use ALLOCV_N"nobu
* compile.c (ibf_dump_object_list): `dump->obj_list` is not fixed yet, as new objects are pushed by lbf_dump_object_object. fixes crash by buffer overflow. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62615 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-16compile.c: keep debug infonobu
* compile.c (iseq_peephole_optimize): keep freezestring insn with debug info. [Bug #14475] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62418 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-14compile.c: drop freezestring insn on String#-@normal
Followup to r62039 and remove the redundant freezestring insn which was preventing deduplication from String#-@ * compile.c (iseq_peephole_optimize): drop freezestring insn on String#-@ [ruby-core:85542] [Bug #14475] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62407 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-09compile.c: popped hashnobu
* compile.c (compile_array): skip creating new hash if preceeding elements are popped all. [ruby-core:85486] [Bug #14459] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62333 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-04mjit_compile.c: merge initial JIT compilerk0kubun
which has been developed by Takashi Kokubun <takashikkbn@gmail> as YARV-MJIT. Many of its bugs are fixed by wanabe <s.wanabe@gmail.com>. This JIT compiler is designed to be a safe migration path to introduce JIT compiler to MRI. So this commit does not include any bytecode changes or dynamic instruction modifications, which are done in original MJIT. This commit even strips off some aggressive optimizations from YARV-MJIT, and thus it's slower than YARV-MJIT too. But it's still fairly faster than Ruby 2.5 in some benchmarks (attached below). Note that this JIT compiler passes `make test`, `make test-all`, `make test-spec` without JIT, and even with JIT. Not only it's perfectly safe with JIT disabled because it does not replace VM instructions unlike MJIT, but also with JIT enabled it stably runs Ruby applications including Rails applications. I'm expecting this version as just "initial" JIT compiler. I have many optimization ideas which are skipped for initial merging, and you may easily replace this JIT compiler with a faster one by just replacing mjit_compile.c. `mjit_compile` interface is designed for the purpose. common.mk: update dependencies for mjit_compile.c. internal.h: declare `rb_vm_insn_addr2insn` for MJIT. vm.c: exclude some definitions if `-DMJIT_HEADER` is provided to compiler. This avoids to include some functions which take a long time to compile, e.g. vm_exec_core. Some of the purpose is achieved in transform_mjit_header.rb (see `IGNORED_FUNCTIONS`) but others are manually resolved for now. Load mjit_helper.h for MJIT header. mjit_helper.h: New. This is a file used only by JIT-ed code. I'll refactor `mjit_call_cfunc` later. vm_eval.c: add some #ifdef switches to skip compiling some functions like Init_vm_eval. win32/mkexports.rb: export thread/ec functions, which are used by MJIT. include/ruby/defines.h: add MJIT_FUNC_EXPORTED macro alis to clarify that a function is exported only for MJIT. array.c: export a function used by MJIT. bignum.c: ditto. class.c: ditto. compile.c: ditto. error.c: ditto. gc.c: ditto. hash.c: ditto. iseq.c: ditto. numeric.c: ditto. object.c: ditto. proc.c: ditto. re.c: ditto. st.c: ditto. string.c: ditto. thread.c: ditto. variable.c: ditto. vm_backtrace.c: ditto. vm_insnhelper.c: ditto. vm_method.c: ditto. I would like to improve maintainability of function exports, but I believe this way is acceptable as initial merging if we clarify the new exports are for MJIT (so that we can use them as TODO list to fix) and add unit tests to detect unresolved symbols. I'll add unit tests of JIT compilations in succeeding commits. Author: Takashi Kokubun <takashikkbn@gmail.com> Contributor: wanabe <s.wanabe@gmail.com> Part of [Feature #14235] --- * Known issues * Code generated by gcc is faster than clang. The benchmark may be worse in macOS. Following benchmark result is provided by gcc w/ Linux. * Performance is decreased when Google Chrome is running * JIT can work on MinGW, but it doesn't improve performance at least in short running benchmark. * Currently it doesn't perform well with Rails. We'll try to fix this before release. --- * Benchmark reslts Benchmarked with: Intel 4.0GHz i7-4790K with 16GB memory under x86-64 Ubuntu 8 Cores - 2.0.0-p0: Ruby 2.0.0-p0 - r62186: Ruby trunk (early 2.6.0), before MJIT changes - JIT off: On this commit, but without `--jit` option - JIT on: On this commit, and with `--jit` option ** Optcarrot fps Benchmark: https://github.com/mame/optcarrot | |2.0.0-p0 |r62186 |JIT off |JIT on | |:--------|:--------|:--------|:--------|:--------| |fps |37.32 |51.46 |51.31 |58.88 | |vs 2.0.0 |1.00x |1.38x |1.37x |1.58x | ** MJIT benchmarks Benchmark: https://github.com/benchmark-driver/mjit-benchmarks (Original: https://github.com/vnmakarov/ruby/tree/rtl_mjit_branch/MJIT-benchmarks) | |2.0.0-p0 |r62186 |JIT off |JIT on | |:----------|:--------|:--------|:--------|:--------| |aread |1.00 |1.09 |1.07 |2.19 | |aref |1.00 |1.13 |1.11 |2.22 | |aset |1.00 |1.50 |1.45 |2.64 | |awrite |1.00 |1.17 |1.13 |2.20 | |call |1.00 |1.29 |1.26 |2.02 | |const2 |1.00 |1.10 |1.10 |2.19 | |const |1.00 |1.11 |1.10 |2.19 | |fannk |1.00 |1.04 |1.02 |1.00 | |fib |1.00 |1.32 |1.31 |1.84 | |ivread |1.00 |1.13 |1.12 |2.43 | |ivwrite |1.00 |1.23 |1.21 |2.40 | |mandelbrot |1.00 |1.13 |1.16 |1.28 | |meteor |1.00 |2.97 |2.92 |3.17 | |nbody |1.00 |1.17 |1.15 |1.49 | |nest-ntimes|1.00 |1.22 |1.20 |1.39 | |nest-while |1.00 |1.10 |1.10 |1.37 | |norm |1.00 |1.18 |1.16 |1.24 | |nsvb |1.00 |1.16 |1.16 |1.17 | |red-black |1.00 |1.02 |0.99 |1.12 | |sieve |1.00 |1.30 |1.28 |1.62 | |trees |1.00 |1.14 |1.13 |1.19 | |while |1.00 |1.12 |1.11 |2.41 | ** Discourse's script/bench.rb Benchmark: https://github.com/discourse/discourse/blob/v1.8.7/script/bench.rb NOTE: Rails performance was somehow a little degraded with JIT for now. We should fix this. (At least I know opt_aref is performing badly in JIT and I have an idea to fix it. Please wait for the fix.) *** JIT off Your Results: (note for timings- percentile is first, duration is second in millisecs) categories_admin: 50: 17 75: 18 90: 22 99: 29 home_admin: 50: 21 75: 21 90: 27 99: 40 topic_admin: 50: 17 75: 18 90: 22 99: 32 categories: 50: 35 75: 41 90: 43 99: 77 home: 50: 39 75: 46 90: 49 99: 95 topic: 50: 46 75: 52 90: 56 99: 101 *** JIT on Your Results: (note for timings- percentile is first, duration is second in millisecs) categories_admin: 50: 19 75: 21 90: 25 99: 33 home_admin: 50: 24 75: 26 90: 30 99: 35 topic_admin: 50: 19 75: 20 90: 25 99: 30 categories: 50: 40 75: 44 90: 48 99: 76 home: 50: 42 75: 48 90: 51 99: 89 topic: 50: 49 75: 55 90: 58 99: 99 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62197 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-03compile.c: fix string Range optimization with FSLnormal
The optimization in [Feature #13355] needs to be detected differently to work with "frozen_string_literal: true" git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62177 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-01-29eliminate CALL_SIMPLE_METHODshyouhei
Arrange operands of several opt_something insns so that jumps to opt_send_without_block can be applied to them. This makes it possible to eliminate CALL_SIMPLE_METHOD macro at all. Results in binary size of vm_exec_core to change from 27,008 bytes to 26,016 bytes on my machine. [close GH-1779] Note however that PC can point somewhere non-instruction now. ----------------------------------------------------------- benchmark results: minimum results in each 3 measurements. Execution time (sec) name before after so_ackermann 0.450 0.426 so_array 0.789 0.824 so_binary_trees 5.760 5.635 so_concatenate 3.594 3.508 so_count_words 0.211 0.196 so_exception 0.256 0.244 so_fannkuch 1.049 1.044 so_fasta 1.485 1.472 so_k_nucleotide 1.195 1.216 so_lists 0.517 0.513 so_mandelbrot 2.264 2.394 so_matrix 0.501 0.468 so_meteor_contest 2.987 2.912 so_nbody 1.307 1.289 so_nested_loop 0.908 0.925 so_nsieve 1.679 1.614 so_nsieve_bits 2.131 2.092 so_object 0.620 0.625 so_partial_sums 1.623 1.675 so_pidigits 1.135 1.190 so_random 0.357 0.321 so_reverse_complement 0.619 0.583 so_sieve 0.493 0.496 so_spectralnorm 1.749 1.737 Speedup ratio: compare with the result of `before' (greater is better) name after so_ackermann 1.057 so_array 0.958 so_binary_trees 1.022 so_concatenate 1.024 so_count_words 1.077 so_exception 1.049 so_fannkuch 1.004 so_fasta 1.009 so_k_nucleotide 0.983 so_lists 1.007 so_mandelbrot 0.946 so_matrix 1.072 so_meteor_contest 1.026 so_nbody 1.013 so_nested_loop 0.982 so_nsieve 1.040 so_nsieve_bits 1.018 so_object 0.992 so_partial_sums 0.969 so_pidigits 0.954 so_random 1.111 so_reverse_complement 1.062 so_sieve 0.994 so_spectralnorm 1.007 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62089 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-01-27compile.c: try to convert in massign `for`nobu
* compile.c (compile_for_masgn): try to convert to an Array if an element of massign `for` is not an Array. [ruby-core:84931] [Bug #14374] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62073 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-01-25compile.c: check midnobu
* compile.c (iseq_peephole_optimize): check that method ID is +@. fix up r62039. http://d.hatena.ne.jp/nagachika/20180125/ruby_trunk_changes_62025_62039#r62039 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62041 b2dd03c8-39d4-4d8f-98ff-823fe69b080e