Index: src/mips/assembler-mips-inl.h |
diff --git a/src/mips/assembler-mips-inl.h b/src/mips/assembler-mips-inl.h |
index 123e2928283e12700d4126f89422acbe3ac6f1b0..caf544f7c8b5366d590ab6797dfcf680fd8c4cea 100644 |
--- a/src/mips/assembler-mips-inl.h |
+++ b/src/mips/assembler-mips-inl.h |
@@ -1,3 +1,4 @@ |
+ |
// Copyright (c) 1994-2006 Sun Microsystems Inc. |
// All Rights Reserved. |
// |
@@ -231,6 +232,24 @@ void RelocInfo::set_target_cell(JSGlobalPropertyCell* cell, |
} |
+static const int kNoCodeAgeSequenceLength = 7; |
+ |
+Code* RelocInfo::code_age_stub() { |
+ ASSERT(rmode_ == RelocInfo::CODE_AGE_SEQUENCE); |
+ return Code::GetCodeFromTargetAddress( |
+ Memory::Address_at(pc_ + Assembler::kInstrSize * |
+ (kNoCodeAgeSequenceLength - 1))); |
+} |
+ |
+ |
+void RelocInfo::set_code_age_stub(Code* stub) { |
+ ASSERT(rmode_ == RelocInfo::CODE_AGE_SEQUENCE); |
+ Memory::Address_at(pc_ + Assembler::kInstrSize * |
+ (kNoCodeAgeSequenceLength - 1)) = |
+ stub->instruction_start(); |
+} |
+ |
+ |
Address RelocInfo::call_address() { |
ASSERT((IsJSReturn(rmode()) && IsPatchedReturnSequence()) || |
(IsDebugBreakSlot(rmode()) && IsPatchedDebugBreakSlotSequence())); |
@@ -292,17 +311,6 @@ bool RelocInfo::IsPatchedDebugBreakSlotSequence() { |
} |
-Code* RelocInfo::code_age_stub() { |
- UNIMPLEMENTED(); |
- return NULL; |
-} |
- |
- |
-void RelocInfo::set_code_age_stub(Code* stub) { |
- UNIMPLEMENTED(); |
-} |
- |
- |
void RelocInfo::Visit(ObjectVisitor* visitor) { |
RelocInfo::Mode mode = rmode(); |
if (mode == RelocInfo::EMBEDDED_OBJECT) { |
@@ -313,6 +321,8 @@ void RelocInfo::Visit(ObjectVisitor* visitor) { |
visitor->VisitGlobalPropertyCell(this); |
} else if (mode == RelocInfo::EXTERNAL_REFERENCE) { |
visitor->VisitExternalReference(this); |
+ } else if (RelocInfo::IsCodeAgeSequence(mode)) { |
+ visitor->VisitCodeAgeSequence(this); |
#ifdef ENABLE_DEBUGGER_SUPPORT |
// TODO(isolates): Get a cached isolate below. |
} else if (((RelocInfo::IsJSReturn(mode) && |
@@ -339,6 +349,8 @@ void RelocInfo::Visit(Heap* heap) { |
StaticVisitor::VisitGlobalPropertyCell(heap, this); |
} else if (mode == RelocInfo::EXTERNAL_REFERENCE) { |
StaticVisitor::VisitExternalReference(this); |
+ } else if (RelocInfo::IsCodeAgeSequence(mode)) { |
+ StaticVisitor::VisitCodeAgeSequence(heap, this); |
#ifdef ENABLE_DEBUGGER_SUPPORT |
} else if (heap->isolate()->debug()->has_break_points() && |
((RelocInfo::IsJSReturn(mode) && |