From a7cdc10f154a5ab0c250b8b010da267e00c5ad38 Mon Sep 17 00:00:00 2001 From: "rodolph.perfetta" Date: Thu, 19 Mar 2015 07:01:36 -0700 Subject: [PATCH] [arm64] serialize internal references via object visitor BUG= Review URL: https://codereview.chromium.org/1020863003 Cr-Commit-Position: refs/heads/master@{#27311} --- src/arm64/assembler-arm64-inl.h | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/src/arm64/assembler-arm64-inl.h b/src/arm64/assembler-arm64-inl.h index e27ad4fe0..da540c5b0 100644 --- a/src/arm64/assembler-arm64-inl.h +++ b/src/arm64/assembler-arm64-inl.h @@ -661,7 +661,7 @@ void Assembler::deserialization_set_special_target_at( void Assembler::deserialization_set_target_internal_reference_at( Address pc, Address target) { - UNIMPLEMENTED(); // ARM64 does not use internal references. + Memory::Address_at(pc) = target; } @@ -752,15 +752,13 @@ Address RelocInfo::target_external_reference() { Address RelocInfo::target_internal_reference() { DCHECK(rmode_ == INTERNAL_REFERENCE); - UNIMPLEMENTED(); // ARM64 does not use internal references. - return NULL; + return Memory::Address_at(pc_); } Address RelocInfo::target_internal_reference_address() { DCHECK(rmode_ == INTERNAL_REFERENCE); - UNIMPLEMENTED(); // ARM64 does not use internal references. - return NULL; + return reinterpret_cast
(pc_); } @@ -855,7 +853,7 @@ void RelocInfo::WipeOut() { IsRuntimeEntry(rmode_) || IsExternalReference(rmode_) || IsInternalReference(rmode_)); if (IsInternalReference(rmode_)) { - UNIMPLEMENTED(); // ARM64 does not use internal references. + Memory::Address_at(pc_) = NULL; } else { Assembler::set_target_address_at(pc_, host_, NULL); } @@ -891,7 +889,7 @@ void RelocInfo::Visit(Isolate* isolate, ObjectVisitor* visitor) { } else if (mode == RelocInfo::EXTERNAL_REFERENCE) { visitor->VisitExternalReference(this); } else if (mode == RelocInfo::INTERNAL_REFERENCE) { - UNIMPLEMENTED(); // ARM64 does not use internal references. + visitor->VisitInternalReference(this); } else if (((RelocInfo::IsJSReturn(mode) && IsPatchedReturnSequence()) || (RelocInfo::IsDebugBreakSlot(mode) && @@ -916,7 +914,7 @@ void RelocInfo::Visit(Heap* heap) { } else if (mode == RelocInfo::EXTERNAL_REFERENCE) { StaticVisitor::VisitExternalReference(this); } else if (mode == RelocInfo::INTERNAL_REFERENCE) { - UNIMPLEMENTED(); // ARM64 does not use internal references. + StaticVisitor::VisitInternalReference(this); } else if (heap->isolate()->debug()->has_break_points() && ((RelocInfo::IsJSReturn(mode) && IsPatchedReturnSequence()) || -- 2.34.1