Revision: 18150
Author:   [email protected]
Date:     Fri Nov 29 09:47:40 2013 UTC
Log:      Fix context register allocation in LTransitionElementsKind.

[email protected]
BUG=chromium:324306
LOG=N

Review URL: https://codereview.chromium.org/95293003
http://code.google.com/p/v8/source/detail?r=18150

Modified:
 /branches/bleeding_edge/src/deoptimizer.cc
 /branches/bleeding_edge/src/ia32/lithium-codegen-ia32.cc
 /branches/bleeding_edge/src/ia32/lithium-ia32.cc
 /branches/bleeding_edge/src/ia32/macro-assembler-ia32.cc
 /branches/bleeding_edge/src/x64/lithium-codegen-x64.cc
 /branches/bleeding_edge/src/x64/lithium-x64.cc

=======================================
--- /branches/bleeding_edge/src/deoptimizer.cc  Fri Nov 22 10:21:47 2013 UTC
+++ /branches/bleeding_edge/src/deoptimizer.cc  Fri Nov 29 09:47:40 2013 UTC
@@ -1522,6 +1522,7 @@
   output_frame->SetRegister(context_reg.code(), value);
   output_frame_offset -= kPointerSize;
   output_frame->SetFrameSlot(output_frame_offset, value);
+  ASSERT(reinterpret_cast<Object*>(value)->IsContext());
   if (trace_scope_ != NULL) {
     PrintF(trace_scope_->file(),
            "    0x%08" V8PRIxPTR ": [top + %d] <- 0x%08"
=======================================
--- /branches/bleeding_edge/src/ia32/lithium-codegen-ia32.cc Fri Nov 22 11:35:39 2013 UTC +++ /branches/bleeding_edge/src/ia32/lithium-codegen-ia32.cc Fri Nov 29 09:47:40 2013 UTC
@@ -4845,13 +4845,10 @@
                          ToRegister(instr->temp()),
                          kDontSaveFPRegs);
   } else {
+    ASSERT(ToRegister(instr->context()).is(esi));
     PushSafepointRegistersScope scope(this);
     if (!object_reg.is(eax)) {
-      __ push(object_reg);
-    }
-    LoadContextFromDeferred(instr->context());
-    if (!object_reg.is(eax)) {
-      __ pop(eax);
+      __ mov(eax, object_reg);
     }
     __ mov(ebx, to_map);
     TransitionElementsKindStub stub(from_kind, to_kind);
=======================================
--- /branches/bleeding_edge/src/ia32/lithium-ia32.cc Mon Nov 25 14:41:46 2013 UTC +++ /branches/bleeding_edge/src/ia32/lithium-ia32.cc Fri Nov 29 09:47:40 2013 UTC
@@ -2420,7 +2420,7 @@
                                             new_map_reg, temp_reg);
     return result;
   } else {
-    LOperand* context = UseRegister(instr->context());
+    LOperand* context = UseFixed(instr->context(), esi);
     LTransitionElementsKind* result =
         new(zone()) LTransitionElementsKind(object, context, NULL, NULL);
     return AssignPointerMap(result);
=======================================
--- /branches/bleeding_edge/src/ia32/macro-assembler-ia32.cc Fri Nov 29 09:02:00 2013 UTC +++ /branches/bleeding_edge/src/ia32/macro-assembler-ia32.cc Fri Nov 29 09:47:40 2013 UTC
@@ -1107,10 +1107,8 @@
   push(Immediate(CodeObject()));  // Accessed from ExitFrame::code_slot.

   // Save the frame pointer and the context in top.
-  ExternalReference c_entry_fp_address(Isolate::kCEntryFPAddress,
-                                       isolate());
-  ExternalReference context_address(Isolate::kContextAddress,
-                                    isolate());
+ ExternalReference c_entry_fp_address(Isolate::kCEntryFPAddress, isolate());
+  ExternalReference context_address(Isolate::kContextAddress, isolate());
   mov(Operand::StaticVariable(c_entry_fp_address), ebp);
   mov(Operand::StaticVariable(context_address), esi);
 }
=======================================
--- /branches/bleeding_edge/src/x64/lithium-codegen-x64.cc Mon Nov 25 14:41:46 2013 UTC +++ /branches/bleeding_edge/src/x64/lithium-codegen-x64.cc Fri Nov 29 09:47:40 2013 UTC
@@ -4363,11 +4363,11 @@
     __ RecordWriteField(object_reg, HeapObject::kMapOffset, new_map_reg,
                         ToRegister(instr->temp()), kDontSaveFPRegs);
   } else {
+    ASSERT(ToRegister(instr->context()).is(rsi));
     PushSafepointRegistersScope scope(this);
     if (!object_reg.is(rax)) {
       __ movq(rax, object_reg);
     }
-    LoadContextFromDeferred(instr->context());
     __ Move(rbx, to_map);
     TransitionElementsKindStub stub(from_kind, to_kind);
     __ CallStub(&stub);
=======================================
--- /branches/bleeding_edge/src/x64/lithium-x64.cc Mon Nov 25 14:41:46 2013 UTC +++ /branches/bleeding_edge/src/x64/lithium-x64.cc Fri Nov 29 09:47:40 2013 UTC
@@ -2266,7 +2266,7 @@
         object, NULL, new_map_reg, temp_reg);
     return result;
   } else {
-    LOperand* context = UseAny(instr->context());
+    LOperand* context = UseFixed(instr->context(), rsi);
     LTransitionElementsKind* result =
         new(zone()) LTransitionElementsKind(object, context, NULL, NULL);
     return AssignPointerMap(result);

--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to