X64 Crankshaft: Fix bug in DoStoreContextSlot, and enable it.
authorwhesse@chromium.org <whesse@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Mon, 7 Mar 2011 10:28:37 +0000 (10:28 +0000)
committerwhesse@chromium.org <whesse@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Mon, 7 Mar 2011 10:28:37 +0000 (10:28 +0000)
Review URL: http://codereview.chromium.org/6627046

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7071 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

src/x64/lithium-x64.cc
src/x64/macro-assembler-x64.cc

index 7c26468..cab0bd4 100644 (file)
@@ -1726,7 +1726,6 @@ LInstruction* LChunkBuilder::DoLoadContextSlot(HLoadContextSlot* instr) {
 
 
 LInstruction* LChunkBuilder::DoStoreContextSlot(HStoreContextSlot* instr) {
-  Abort("Unimplemented: DoStoreContextSlot");  // Temporarily disabled (whesse).
   LOperand* context;
   LOperand* value;
   if (instr->NeedsWriteBarrier()) {
index b468e82..28e039c 100644 (file)
@@ -95,7 +95,13 @@ void MacroAssembler::RecordWriteHelper(Register object,
   if (FLAG_debug_code) {
     // Check that the object is not in new space.
     NearLabel not_in_new_space;
-    InNewSpace(object, scratch, not_equal, &not_in_new_space);
+    if (addr.is(kScratchRegister)) {
+      push(kScratchRegister);
+      InNewSpace(object, scratch, not_equal, &not_in_new_space);
+      pop(kScratchRegister);
+    } else {
+      InNewSpace(object, scratch, not_equal, &not_in_new_space);
+    }
     Abort("new-space object passed to RecordWriteHelper");
     bind(&not_in_new_space);
   }