Reviewers: Vyacheslav Egorov,
Description:
Fix operand type for keyed calls.
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.
Please review this at http://codereview.chromium.org/6368003/
SVN Base: http://v8.googlecode.com/svn/branches/bleeding_edge/
Affected files:
M src/ia32/lithium-codegen-ia32.cc
M src/ia32/lithium-ia32.h
M src/ia32/lithium-ia32.cc
Index: src/ia32/lithium-codegen-ia32.cc
===================================================================
--- src/ia32/lithium-codegen-ia32.cc (revision 6346)
+++ src/ia32/lithium-codegen-ia32.cc (working copy)
@@ -2506,6 +2506,7 @@
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);
Index: src/ia32/lithium-ia32.cc
===================================================================
--- src/ia32/lithium-ia32.cc (revision 6349)
+++ src/ia32/lithium-ia32.cc (working copy)
@@ -1166,8 +1166,8 @@
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);
}
Index: src/ia32/lithium-ia32.h
===================================================================
--- src/ia32/lithium-ia32.h (revision 6349)
+++ src/ia32/lithium-ia32.h (working copy)
@@ -1325,10 +1325,10 @@
};
-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")
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev