Issue #9227 has been updated by ko1 (Koichi Sasada).


OK. Please enable it.
----------------------------------------
Bug #9227: use opt_aset ?
https://bugs.ruby-lang.org/issues/9227#change-43597

Author: tmm1 (Aman Gupta)
Status: Open
Priority: Normal
Assignee: ko1 (Koichi Sasada)
Category: 
Target version: current: 2.1.0
ruby -v: trunk
Backport: 1.9.3: UNKNOWN, 2.0.0: UNKNOWN


I noticed we have an opt_aset instruction, but nothing is using it. Is there some reason?

diff --git a/compile.c b/compile.c
index 812f692..9d9f14f 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) {


-- 
http://bugs.ruby-lang.org/