Revision: 10819
Author:   [email protected]
Date:     Fri Feb 24 02:31:16 2012
Log: Fix a performance bug in the register contraints for polymorphic loads.

The context is only needed in the esi register if there is a call to
the generic stub.
Review URL: https://chromiumcodereview.appspot.com/9467001
http://code.google.com/p/v8/source/detail?r=10819

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

=======================================
--- /branches/bleeding_edge/src/ia32/lithium-ia32.cc Wed Feb 22 04:47:42 2012 +++ /branches/bleeding_edge/src/ia32/lithium-ia32.cc Fri Feb 24 02:31:16 2012
@@ -1935,13 +1935,14 @@
 LInstruction* LChunkBuilder::DoLoadNamedFieldPolymorphic(
     HLoadNamedFieldPolymorphic* instr) {
   ASSERT(instr->representation().IsTagged());
-  LOperand* context = UseFixed(instr->context(), esi);
   if (instr->need_generic()) {
+    LOperand* context = UseFixed(instr->context(), esi);
     LOperand* obj = UseFixed(instr->object(), eax);
     LLoadNamedFieldPolymorphic* result =
         new(zone()) LLoadNamedFieldPolymorphic(context, obj);
     return MarkAsCall(DefineFixed(result, eax), instr);
   } else {
+    LOperand* context = UseAny(instr->context());  // Not actually used.
     LOperand* obj = UseRegisterAtStart(instr->object());
     LLoadNamedFieldPolymorphic* result =
         new(zone()) LLoadNamedFieldPolymorphic(context, obj);

--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to