Commit 1547136c authored by hpayer's avatar hpayer Committed by Commit bot

Call RecordWriteIntoCode in RelocInfo::set_target_cell.

This currently works since we never call set_target_cell when we have to record slots for evacuation. It would break with black allocation.

BUG=chromium:561449
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#33575}
parent e2466bb5
...@@ -197,10 +197,8 @@ void RelocInfo::set_target_cell(Cell* cell, ...@@ -197,10 +197,8 @@ void RelocInfo::set_target_cell(Cell* cell,
Address address = cell->address() + Cell::kValueOffset; Address address = cell->address() + Cell::kValueOffset;
Memory::Address_at(pc_) = address; Memory::Address_at(pc_) = address;
if (write_barrier_mode == UPDATE_WRITE_BARRIER && host() != NULL) { if (write_barrier_mode == UPDATE_WRITE_BARRIER && host() != NULL) {
// TODO(1550) We are passing NULL as a slot because cell can never be on host()->GetHeap()->incremental_marking()->RecordWriteIntoCode(host(), this,
// evacuation candidate. cell);
host()->GetHeap()->incremental_marking()->RecordWrite(
host(), NULL, cell);
} }
} }
......
...@@ -128,8 +128,7 @@ void IncrementalMarking::RecordWriteIntoCodeSlow(HeapObject* obj, ...@@ -128,8 +128,7 @@ void IncrementalMarking::RecordWriteIntoCodeSlow(HeapObject* obj,
Object* value) { Object* value) {
if (BaseRecordWrite(obj, value)) { if (BaseRecordWrite(obj, value)) {
// Object is not going to be rescanned. We need to record the slot. // Object is not going to be rescanned. We need to record the slot.
heap_->mark_compact_collector()->RecordRelocSlot(rinfo, heap_->mark_compact_collector()->RecordRelocSlot(rinfo, value);
Code::cast(value));
} }
} }
......
...@@ -203,10 +203,8 @@ void RelocInfo::set_target_cell(Cell* cell, ...@@ -203,10 +203,8 @@ void RelocInfo::set_target_cell(Cell* cell,
Assembler::FlushICache(isolate_, pc_, sizeof(Address)); Assembler::FlushICache(isolate_, pc_, sizeof(Address));
} }
if (write_barrier_mode == UPDATE_WRITE_BARRIER && host() != NULL) { if (write_barrier_mode == UPDATE_WRITE_BARRIER && host() != NULL) {
// TODO(1550) We are passing NULL as a slot because cell can never be on host()->GetHeap()->incremental_marking()->RecordWriteIntoCode(host(), this,
// evacuation candidate. cell);
host()->GetHeap()->incremental_marking()->RecordWrite(
host(), NULL, cell);
} }
} }
......
...@@ -284,10 +284,8 @@ void RelocInfo::set_target_cell(Cell* cell, ...@@ -284,10 +284,8 @@ void RelocInfo::set_target_cell(Cell* cell,
Address address = cell->address() + Cell::kValueOffset; Address address = cell->address() + Cell::kValueOffset;
Memory::Address_at(pc_) = address; Memory::Address_at(pc_) = address;
if (write_barrier_mode == UPDATE_WRITE_BARRIER && host() != NULL) { if (write_barrier_mode == UPDATE_WRITE_BARRIER && host() != NULL) {
// TODO(1550) We are passing NULL as a slot because cell can never be on host()->GetHeap()->incremental_marking()->RecordWriteIntoCode(host(), this,
// evacuation candidate. cell);
host()->GetHeap()->incremental_marking()->RecordWrite(
host(), NULL, cell);
} }
} }
......
...@@ -282,10 +282,8 @@ void RelocInfo::set_target_cell(Cell* cell, ...@@ -282,10 +282,8 @@ void RelocInfo::set_target_cell(Cell* cell,
Address address = cell->address() + Cell::kValueOffset; Address address = cell->address() + Cell::kValueOffset;
Memory::Address_at(pc_) = address; Memory::Address_at(pc_) = address;
if (write_barrier_mode == UPDATE_WRITE_BARRIER && host() != NULL) { if (write_barrier_mode == UPDATE_WRITE_BARRIER && host() != NULL) {
// TODO(1550) We are passing NULL as a slot because cell can never be on host()->GetHeap()->incremental_marking()->RecordWriteIntoCode(host(), this,
// evacuation candidate. cell);
host()->GetHeap()->incremental_marking()->RecordWrite(
host(), NULL, cell);
} }
} }
......
...@@ -248,9 +248,8 @@ void RelocInfo::set_target_cell(Cell* cell, WriteBarrierMode write_barrier_mode, ...@@ -248,9 +248,8 @@ void RelocInfo::set_target_cell(Cell* cell, WriteBarrierMode write_barrier_mode,
Address address = cell->address() + Cell::kValueOffset; Address address = cell->address() + Cell::kValueOffset;
Memory::Address_at(pc_) = address; Memory::Address_at(pc_) = address;
if (write_barrier_mode == UPDATE_WRITE_BARRIER && host() != NULL) { if (write_barrier_mode == UPDATE_WRITE_BARRIER && host() != NULL) {
// TODO(1550) We are passing NULL as a slot because cell can never be on host()->GetHeap()->incremental_marking()->RecordWriteIntoCode(host(), this,
// evacuation candidate. cell);
host()->GetHeap()->incremental_marking()->RecordWrite(host(), NULL, cell);
} }
} }
......
...@@ -456,10 +456,8 @@ void RelocInfo::set_target_cell(Cell* cell, ...@@ -456,10 +456,8 @@ void RelocInfo::set_target_cell(Cell* cell,
} }
if (write_barrier_mode == UPDATE_WRITE_BARRIER && if (write_barrier_mode == UPDATE_WRITE_BARRIER &&
host() != NULL) { host() != NULL) {
// TODO(1550) We are passing NULL as a slot because cell can never be on host()->GetHeap()->incremental_marking()->RecordWriteIntoCode(host(), this,
// evacuation candidate. cell);
host()->GetHeap()->incremental_marking()->RecordWrite(
host(), NULL, cell);
} }
} }
......
...@@ -204,10 +204,8 @@ void RelocInfo::set_target_cell(Cell* cell, ...@@ -204,10 +204,8 @@ void RelocInfo::set_target_cell(Cell* cell,
Assembler::FlushICache(isolate_, pc_, sizeof(Address)); Assembler::FlushICache(isolate_, pc_, sizeof(Address));
} }
if (write_barrier_mode == UPDATE_WRITE_BARRIER && host() != NULL) { if (write_barrier_mode == UPDATE_WRITE_BARRIER && host() != NULL) {
// TODO(1550) We are passing NULL as a slot because cell can never be on host()->GetHeap()->incremental_marking()->RecordWriteIntoCode(host(), this,
// evacuation candidate. cell);
host()->GetHeap()->incremental_marking()->RecordWrite(
host(), NULL, cell);
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment