Record the key as a input operand for keyed call instructions instead
of wrongly making it a temp operand.
This bug does currently not show up as a problem because the
uses are recorded only in the instruction summary.
Review URL: http://codereview.chromium.org/6368003
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6365
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
void LCodeGen::DoCallKeyed(LCallKeyed* instr) {
ASSERT(ToRegister(instr->result()).is(eax));
+ ASSERT(ToRegister(instr->InputAt(0)).is(ecx));
int arity = instr->arity();
Handle<Code> ic = StubCache::ComputeKeyedCallInitialize(arity, NOT_IN_LOOP);
LInstruction* LChunkBuilder::DoCallKeyed(HCallKeyed* instr) {
ASSERT(instr->key()->representation().IsTagged());
argument_count_ -= instr->argument_count();
- LOperand* temp = UseFixed(instr->key(), ecx);
- return MarkAsCall(DefineFixed(new LCallKeyed(temp), eax), instr);
+ LOperand* key = UseFixed(instr->key(), ecx);
+ return MarkAsCall(DefineFixed(new LCallKeyed(key), eax), instr);
}
};
-class LCallKeyed: public LTemplateInstruction<1, 0, 1> {
+class LCallKeyed: public LTemplateInstruction<1, 1, 0> {
public:
- explicit LCallKeyed(LOperand* temp) {
- temps_[0] = temp;
+ explicit LCallKeyed(LOperand* key) {
+ inputs_[0] = key;
}
DECLARE_CONCRETE_INSTRUCTION(CallKeyed, "call-keyed")