| Index: src/x64/assembler-x64-inl.h
|
| ===================================================================
|
| --- src/x64/assembler-x64-inl.h (revision 7889)
|
| +++ src/x64/assembler-x64-inl.h (working copy)
|
| @@ -238,10 +238,15 @@
|
| }
|
|
|
|
|
| -void RelocInfo::set_target_address(Address target) {
|
| +void RelocInfo::set_target_address(Address target, Code* code) {
|
| ASSERT(IsCodeTarget(rmode_) || rmode_ == RUNTIME_ENTRY);
|
| if (IsCodeTarget(rmode_)) {
|
| Assembler::set_target_address_at(pc_, target);
|
| + Object* target_code = Code::GetCodeFromTargetAddress(target);
|
| + if (code != NULL) {
|
| + code->GetHeap()->incremental_marking()->RecordWrite(
|
| + code, HeapObject::cast(target_code));
|
| + }
|
| } else {
|
| Memory::Address_at(pc_) = target;
|
| CPU::FlushICache(pc_, sizeof(Address));
|
| @@ -277,10 +282,14 @@
|
| }
|
|
|
|
|
| -void RelocInfo::set_target_object(Object* target) {
|
| +void RelocInfo::set_target_object(Object* target, Code* code) {
|
| ASSERT(IsCodeTarget(rmode_) || rmode_ == EMBEDDED_OBJECT);
|
| *reinterpret_cast<Object**>(pc_) = target;
|
| CPU::FlushICache(pc_, sizeof(Address));
|
| + if (code != NULL && target->IsHeapObject()) {
|
| + code->GetHeap()->incremental_marking()->RecordWrite(
|
| + code, HeapObject::cast(target));
|
| + }
|
| }
|
|
|
|
|
| @@ -301,11 +310,14 @@
|
| }
|
|
|
|
|
| -void RelocInfo::set_target_cell(JSGlobalPropertyCell* cell) {
|
| +void RelocInfo::set_target_cell(JSGlobalPropertyCell* cell, Code* code) {
|
| ASSERT(rmode_ == RelocInfo::GLOBAL_PROPERTY_CELL);
|
| Address address = cell->address() + JSGlobalPropertyCell::kValueOffset;
|
| Memory::Address_at(pc_) = address;
|
| CPU::FlushICache(pc_, sizeof(Address));
|
| + if (code != NULL) {
|
| + code->GetHeap()->incremental_marking()->RecordWrite(code, cell);
|
| + }
|
| }
|
|
|
|
|
|
|