Index: src/arm64/codegen-arm64.cc |
diff --git a/src/arm64/codegen-arm64.cc b/src/arm64/codegen-arm64.cc |
index 7276024e15939bed10e2e9926568bc00402e58ec..4bc552e5dafcf59708e9363402511a8060ed788d 100644 |
--- a/src/arm64/codegen-arm64.cc |
+++ b/src/arm64/codegen-arm64.cc |
@@ -350,14 +350,27 @@ void ElementsTransitionGenerator::GenerateDoubleToObject( |
} |
-bool Code::IsYoungSequence(byte* sequence) { |
- return MacroAssembler::IsYoungSequence(sequence); |
+NoCodeAgeSequence::NoCodeAgeSequence() { |
+ ASSERT(sequence_.length() == kNoCodeAgeSequenceLength); |
+ // The sequence of instructions that is patched out for aging code is the |
+ // following boilerplate stack-building prologue that is found both in |
+ // FUNCTION and OPTIMIZED_FUNCTION code: |
+ PatchingAssembler patcher(sequence_.start(), |
+ sequence_.length() / kInstructionSize); |
+ // The young sequence is the frame setup code for FUNCTION code types. It is |
+ // generated by FullCodeGenerator::Generate. |
+ MacroAssembler::EmitFrameSetupForCodeAgePatching(&patcher); |
} |
-void Code::GetCodeAgeAndParity(byte* sequence, Age* age, |
+bool Code::IsYoungSequence(Isolate* isolate, byte* sequence) { |
+ return MacroAssembler::IsYoungSequence(isolate, sequence); |
+} |
+ |
+ |
+void Code::GetCodeAgeAndParity(Isolate* isolate, byte* sequence, Age* age, |
MarkingParity* parity) { |
- if (IsYoungSequence(sequence)) { |
+ if (IsYoungSequence(isolate, sequence)) { |
*age = kNoAgeCodeAge; |
*parity = NO_MARKING_PARITY; |
} else { |
@@ -372,7 +385,8 @@ void Code::PatchPlatformCodeAge(Isolate* isolate, |
byte* sequence, |
Code::Age age, |
MarkingParity parity) { |
- PatchingAssembler patcher(sequence, kCodeAgeSequenceSize / kInstructionSize); |
+ PatchingAssembler patcher(sequence, |
+ kNoCodeAgeSequenceLength / kInstructionSize); |
if (age == kNoAgeCodeAge) { |
MacroAssembler::EmitFrameSetupForCodeAgePatching(&patcher); |
} else { |