mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
compile.c: add opt_aset instruction for faster Hash#[]= and Array#[]=
* compile.c (iseq_specialized_instruction): emit opt_aset instruction to optimize Hash#[]= and Array#[]= when called with Fixnum argument. [Bug #9227] [ruby-core:58956] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44136 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
3e6cae687c
commit
bd892d05ed
2 changed files with 11 additions and 0 deletions
|
@ -1,3 +1,9 @@
|
||||||
|
Wed Dec 11 15:36:15 2013 Aman Gupta <ruby@tmm1.net>
|
||||||
|
|
||||||
|
* compile.c (iseq_specialized_instruction): emit opt_aset instruction
|
||||||
|
to optimize Hash#[]= and Array#[]= when called with Fixnum argument.
|
||||||
|
[Bug #9227] [ruby-core:58956]
|
||||||
|
|
||||||
Wed Dec 11 12:38:17 2013 Koichi Sasada <ko1@atdot.net>
|
Wed Dec 11 12:38:17 2013 Koichi Sasada <ko1@atdot.net>
|
||||||
|
|
||||||
* eval.c (rb_raise_jump): pop frame after setup exception.
|
* eval.c (rb_raise_jump): pop frame after setup exception.
|
||||||
|
|
|
@ -1955,6 +1955,11 @@ iseq_specialized_instruction(rb_iseq_t *iseq, INSN *iobj)
|
||||||
case idAREF: SP_INSN(aref); return COMPILE_OK;
|
case idAREF: SP_INSN(aref); return COMPILE_OK;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case 2:
|
||||||
|
switch (ci->mid) {
|
||||||
|
case idASET: SP_INSN(aset); return COMPILE_OK;
|
||||||
|
}
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (ci->flag & VM_CALL_ARGS_SKIP_SETUP) {
|
if (ci->flag & VM_CALL_ARGS_SKIP_SETUP) {
|
||||||
|
|
Loading…
Reference in a new issue