Index: src/ia32/assembler-ia32-inl.h |
diff --git a/src/ia32/assembler-ia32-inl.h b/src/ia32/assembler-ia32-inl.h |
index 521ab4fab4e9f367c91496ff75fff4129b2299d4..20e3cc935fceb33345a385d8d0edb6925e99661d 100644 |
--- a/src/ia32/assembler-ia32-inl.h |
+++ b/src/ia32/assembler-ia32-inl.h |
@@ -166,9 +166,9 @@ Address RelocInfo::target_internal_reference() { |
} |
-void RelocInfo::set_target_internal_reference(Address target) { |
+Address RelocInfo::target_internal_reference_address() { |
DCHECK(rmode_ == INTERNAL_REFERENCE); |
- Memory::Address_at(pc_) = target; |
+ return reinterpret_cast<Address>(pc_); |
} |
@@ -280,7 +280,8 @@ Object** RelocInfo::call_object_address() { |
void RelocInfo::WipeOut() { |
- if (IsEmbeddedObject(rmode_) || IsExternalReference(rmode_)) { |
+ if (IsEmbeddedObject(rmode_) || IsExternalReference(rmode_) || |
+ IsInternalReference(rmode_)) { |
Memory::Address_at(pc_) = NULL; |
} else if (IsCodeTarget(rmode_) || IsRuntimeEntry(rmode_)) { |
// Effectively write zero into the relocation. |
@@ -312,7 +313,8 @@ void RelocInfo::Visit(Isolate* isolate, ObjectVisitor* visitor) { |
visitor->VisitCell(this); |
} else if (mode == RelocInfo::EXTERNAL_REFERENCE) { |
visitor->VisitExternalReference(this); |
- CpuFeatures::FlushICache(pc_, sizeof(Address)); |
+ } else if (mode == RelocInfo::INTERNAL_REFERENCE) { |
+ visitor->VisitInternalReference(this); |
} else if (RelocInfo::IsCodeAgeSequence(mode)) { |
visitor->VisitCodeAgeSequence(this); |
} else if (((RelocInfo::IsJSReturn(mode) && |
@@ -339,7 +341,8 @@ void RelocInfo::Visit(Heap* heap) { |
StaticVisitor::VisitCell(heap, this); |
} else if (mode == RelocInfo::EXTERNAL_REFERENCE) { |
StaticVisitor::VisitExternalReference(this); |
- CpuFeatures::FlushICache(pc_, sizeof(Address)); |
+ } else if (mode == RelocInfo::INTERNAL_REFERENCE) { |
+ StaticVisitor::VisitInternalReference(this); |
} else if (RelocInfo::IsCodeAgeSequence(mode)) { |
StaticVisitor::VisitCodeAgeSequence(heap, this); |
} else if (heap->isolate()->debug()->has_break_points() && |
@@ -528,6 +531,12 @@ void Assembler::emit_near_disp(Label* L) { |
} |
+void Assembler::deserialization_set_target_internal_reference_at( |
+ Address pc, Address target) { |
+ Memory::Address_at(pc) = target; |
+} |
+ |
+ |
void Operand::set_modrm(int mod, Register rm) { |
DCHECK((mod & -4) == 0); |
buf_[0] = mod << 6 | rm.code(); |