Revision: 6365
Author: [email protected]
Date: Tue Jan 18 06:25:05 2011
Log: 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.

Review URL: http://codereview.chromium.org/6368003
http://code.google.com/p/v8/source/detail?r=6365

Modified:
 /branches/bleeding_edge/src/ia32/lithium-codegen-ia32.cc
 /branches/bleeding_edge/src/ia32/lithium-ia32.cc
 /branches/bleeding_edge/src/ia32/lithium-ia32.h

=======================================
--- /branches/bleeding_edge/src/ia32/lithium-codegen-ia32.cc Mon Jan 17 04:22:31 2011 +++ /branches/bleeding_edge/src/ia32/lithium-codegen-ia32.cc Tue Jan 18 06:25:05 2011
@@ -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);
=======================================
--- /branches/bleeding_edge/src/ia32/lithium-ia32.cc Mon Jan 17 04:54:52 2011 +++ /branches/bleeding_edge/src/ia32/lithium-ia32.cc Tue Jan 18 06:25:05 2011
@@ -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);
 }


=======================================
--- /branches/bleeding_edge/src/ia32/lithium-ia32.h     Mon Jan 17 04:54:52 2011
+++ /branches/bleeding_edge/src/ia32/lithium-ia32.h     Tue Jan 18 06:25:05 2011
@@ -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

Reply via email to