diff --git a/ChangeLog b/ChangeLog index b20cc172e2..edeab0d141 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +Wed Dec 11 15:36:15 2013 Aman Gupta + + * 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 * eval.c (rb_raise_jump): pop frame after setup exception. diff --git a/compile.c b/compile.c index af11bafb9e..25e3652187 100644 --- a/compile.c +++ b/compile.c @@ -1955,6 +1955,11 @@ iseq_specialized_instruction(rb_iseq_t *iseq, INSN *iobj) case idAREF: SP_INSN(aref); return COMPILE_OK; } break; + case 2: + switch (ci->mid) { + case idASET: SP_INSN(aset); return COMPILE_OK; + } + break; } } if (ci->flag & VM_CALL_ARGS_SKIP_SETUP) {