X87: Reland "Merge cellspace into old pointer space".
authorchunyang.dai <chunyang.dai@intel.com>
Mon, 13 Apr 2015 09:35:59 +0000 (02:35 -0700)
committerCommit bot <commit-bot@chromium.org>
Mon, 13 Apr 2015 09:36:00 +0000 (09:36 +0000)
port 4bd9bdbb28c0f4004b113534bf6082ec4d3385b9 (r27751)

original commit message:

BUG=

Review URL: https://codereview.chromium.org/1051323003

Cr-Commit-Position: refs/heads/master@{#27778}

src/x87/assembler-x87-inl.h
src/x87/code-stubs-x87.cc

index 800ead2..4f5768e 100644 (file)
@@ -205,6 +205,7 @@ Cell* RelocInfo::target_cell() {
 void RelocInfo::set_target_cell(Cell* cell,
                                 WriteBarrierMode write_barrier_mode,
                                 ICacheFlushMode icache_flush_mode) {
+  DCHECK(cell->IsCell());
   DCHECK(rmode_ == RelocInfo::CELL);
   Address address = cell->address() + Cell::kValueOffset;
   Memory::Address_at(pc_) = address;
index 1a21569..cba6734 100644 (file)
@@ -2452,6 +2452,12 @@ void InstanceofStub::Generate(MacroAssembler* masm) {
     }
     __ mov(scratch, Operand(scratch, kDeltaToCmpImmediate));
     __ mov(Operand(scratch, 0), map);
+    __ push(map);
+    // Scratch points at the cell payload. Calculate the start of the object.
+    __ sub(scratch, Immediate(Cell::kValueOffset - 1));
+    __ RecordWriteField(scratch, Cell::kValueOffset, map, function,
+                        kDontSaveFPRegs, OMIT_REMEMBERED_SET, OMIT_SMI_CHECK);
+    __ pop(map);
   }
 
   // Loop through the prototype chain of the object looking for the function