summaryrefslogtreecommitdiff
path: root/defs/id.def
AgeCommit message (Collapse)Author
2018-10-24introduce new YARV insn newhashfromarray.ko1
* insns.def (newhashfromarray): added to replace `core_hash_from_ary` method to eliminate method call overhead. On my environment, I got the following benchmark results: x = {x: 1} modified: 7864988.6 i/s trunk: 6004098.1 i/s - 1.31x slower x = {x: 1, y: 2} trunk: 6127338.4 i/s modified: 5232380.0 i/s - 1.17x slower x = {x: 1, y: 2, z: 3} modified: 6089553.1 i/s trunk: 5249333.5 i/s - 1.16x slower This trivial improvement should be reconsider because of usage of this instruction. * compile.c: ditto. * defs/id.def, vm.c: remove unused functions. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65343 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-26revert r64847, r64846 and r64839k0kubun
because r64849 seems to fix issues which we were confused about. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64850 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-26revert r64838 and r64839k0kubun
because some build failures persisted git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64846 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-25Revert "Revert r64824 to fix build failure on AppVeyor"k0kubun
This reverts commit r64829. I'll prepare another temporary fix, but I'll separately commit that to make it easier to revert that later. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64838 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-25Revert r64824 to fix build failure on AppVeyork0kubun
AppVeyor msys2/MinGW build started to fail like: https://ci.appveyor.com/project/ruby/ruby/build/9722/job/b94kixi004klmye3 Until I can investigate that, I revert this for now. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64829 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-24insns.def: optimize & and | of Integer [experimental]k0kubun
not optimizing Array#& and Array#| because vm_insnhelper.c can't easily inline it (large amount of array.c code would be needed in vm_insnhelper.c) and the method body is a little complicated compared to Integer's ones. So I thought only Integer#& and Integer#| have a significant impact, and eliminating unnecessary branches would contribute to JIT's performance. vm_insnhelper.c: ditto tool/transform_mjit_header.rb: make sure these instructions are inlined on JIT. compile.c: compile vm_opt_and and vm_opt_or. id.def: define id for them to be used in compile.c and vm*.c vm.c: track redefinition of Integer#& and Integer#| vm_core.h: allow detecting redefinition of & and | test/ruby/test_jit.rb: test new insns test/ruby/test_optimization.rb: ditto * Optcarrot benchmark This is a kind of experimental thing but I'm committing this since the performance impact is significant especially on Optcarrot with JIT. $ benchmark-driver benchmark.yml --rbenv 'before::before --disable-gems;before+JIT::before --disable-gems --jit;after::after --disable-gems;after+JIT::after --disable-gems --jit' -v --repeat-count 24 before: ruby 2.6.0dev (2018-09-24 trunk 64821) [x86_64-linux] before+JIT: ruby 2.6.0dev (2018-09-24 trunk 64821) +JIT [x86_64-linux] after: ruby 2.6.0dev (2018-09-24 opt_and 64821) [x86_64-linux] last_commit=opt_or after+JIT: ruby 2.6.0dev (2018-09-24 opt_and 64821) +JIT [x86_64-linux] last_commit=opt_or Calculating ------------------------------------- before before+JIT after after+JIT Optcarrot Lan_Master.nes 51.460 66.315 53.023 71.173 fps Comparison: Optcarrot Lan_Master.nes after+JIT: 71.2 fps before+JIT: 66.3 fps - 1.07x slower after: 53.0 fps - 1.34x slower before: 51.5 fps - 1.38x slower [close https://github.com/ruby/ruby/pull/1963] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64824 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-27defs/id.def: predefine to_f IDnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62593 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-14Improve performance of type conversion using to_rmrkn
* object.c: Add to_r in conv_method_tbl. * defs/id.def: add to_r. * benchmark/bm_int_quo.rb: added. * benchmark/bm_time_subsec.rb: added. [Bug #13426] [ruby-core:80665] [Fix GH-1582] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58347 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-12parse.y: logopnobu
* defs/id.def (predefined): add keywords `and` and `or`. * parse.y (log_op): unify parser and ripper, and use tokens instead of node types and symbols. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57610 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-12parse.y: call_uni_opnobu
* defs/id.def (predefined): add keyword `not`. * parse.y (call_uni_op): unify parser and ripper, and use IDs instead of tokens. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57607 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-09parse.y: fix idCOLON2nobu
* defs/id.def: remove idDSTAR and idCOLON3. * parse.y (tCOLON2): make same as id.h. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57578 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-03-17* compile.c (NODE_CALL): add optimization shortcut for Array#max/min.mame
Now `[x, y].max` is optimized so that a temporal array object is not created in some condition. * insns.def (opt_newarray_max, opt_newarray_min): added. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54153 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-02-17id.def: $~ and $_nobu
* defs/id.def (predefined): add idLASTLINE and idBACKREF for $~ and $_ respectively. * parse.y: use idLASTLINE and idBACKREF instead of rb_intern. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53856 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-20* compile.c (iseq_compile_each): add debug information to NODE_STRko1
strings as default. [Feature #11725] * insns.def (freezestring): add new instruction to support adding debug information for dynamically constracted strings. * compile.c (iseq_compile_each): support adding debug information for NODE_DSTR with freezestring instruction. * error.c (rb_error_frozen): change the debug information ID name id_debug_created_info and this field should have a 2 element array containing path and line information. * defs/id.def: ditto. * test/ruby/test_rubyoptions.rb: catch up this fix. * test/ruby/test_iseq.rb: now frozen strings are not same. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52688 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-10Rename DOTQ to ANDDOTnobu
* defs/id.def, parse.y: Switch internal token name to reflect current form of safe-call operator. [Fix GH-1090] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52525 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-06change DOTQnobu
* defs/id.def (token_ops), parse.y (parser_yylex): change DOTQ from ".?" to "&.". [ruby-core:71363] [Feature #11537] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52462 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-05id.def: token_opsnobu
* defs/id.def (token_ops): gather associations between IDs, operators, and parser tokens. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52458 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-27id.def: anonymous IDsnobu
* defs/id.def: enable anonymous IDs not to expose internal IDs for frozen-string-literal-debug by Marshal.dump. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52304 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-27id.def: internal IDsnobu
* defs/id.def: move internal IDs for frozen-string-literal-debug. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52300 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-16id.def: move IDs for exceptionnobu
* defs/id.def: add :mesg and :exception and move from other sources. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48457 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-14id.def: attrsetnobu
* defs/id.def: add attrset IDs, which no longer shares serial numbers with local name IDs. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48422 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-27parse.y: optimize IDs in rippernobu
* parse.y: optimize ripper_intern calls, ::, **, -@, +@, <=>, >=, <=, ==, ===, !=, =~, !~, <<, >>, and call. * parse.y: use initialized IDs, warn and warning. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48153 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-06-28eval.c: no method calls at stack overflownobu
* eval.c (setup_exception): get rid of method calls before raising stack overflow, not to cause stack overflow again. * defs/id.def: add IDs for backtraces. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46593 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-05-20id.def: predefine to_inobu
* defs/id.def: predefine `to_i` as well as `to_int`. * numeric.c (id_to_i): use predefined `idTo_i`. * object.c (conv_method_names): add `to_i` ID. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46030 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-05-20id.def: predefine conversion method IDsnobu
* defs/id.def: predefine conversion method name IDs. * object.c (conv_method_names): consitify with predefined IDs. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46026 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-09* compile.c (iseq_compile_each): emit opt_str_freeze if the #freezecharliesome
method is called on a static string literal with no arguments. * defs/id.def (firstline): add freeze so idFreeze is available * insns.def (opt_str_freeze): add opt_str_freeze instruction which pushes a frozen string literal without allocating a new object if String#freeze is not overriden * string.c (Init_String): define String#freeze * vm.c (vm_init_redefined_flag): define BOP_FREEZE on String class as a basic operation * vm_insnhelper.h: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43627 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-02id.def: predefined IDsnobu
* defs/id.def: add more predefined IDs used in core. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40556 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-01proc.c: use predefined IDsnobu
* defs/id.def (predefined): add "idProc". * proc.c (mnew, mproc, mlambda): use predefined IDs. * vm.c (Init_VM): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40530 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-27* def/id.def: use split(/^/) instead of String#lines to supportnaruse
Ruby 1.8.5 as BASERUBY. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38636 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-21id.h.tmpl: ID2ATTRSETnobu
* template/id.h.tmpl (ID2ATTRSET): compile time constant macro for ID_ATTRSET. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38523 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-21id.def: check duplicationnobu
* defs/id.def (KeywordError): check duplication. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38522 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-21id.def: other scope IDnobu
* defs/id.def: support for other scope IDs, ID_{INSTANCE,GLOBAL,CONST,CLASS}. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38521 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-04id.c: generatenobu
* common.mk, defs/id.def, template/id.c.tmpl: generate id.c as well as id.h. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38192 b2dd03c8-39d4-4d8f-98ff-823fe69b080e