Index: src/x64/macro-assembler-x64.cc |
diff --git a/src/x64/macro-assembler-x64.cc b/src/x64/macro-assembler-x64.cc |
index 9dcb9d1689841bbb757e52b25da82ad1ad5f0130..289bb8f0286f1689cf580fc332f956ba00e2a5de 100644 |
--- a/src/x64/macro-assembler-x64.cc |
+++ b/src/x64/macro-assembler-x64.cc |
@@ -2664,7 +2664,8 @@ void MacroAssembler::Call(Handle<Code> code_object, |
#ifdef DEBUG |
int end_position = pc_offset() + CallSize(code_object); |
#endif |
- ASSERT(RelocInfo::IsCodeTarget(rmode)); |
+ ASSERT(RelocInfo::IsCodeTarget(rmode) || |
+ rmode == RelocInfo::CODE_AGE_SEQUENCE); |
call(code_object, rmode, ast_id); |
#ifdef DEBUG |
CHECK_EQ(end_position, pc_offset()); |
@@ -3678,6 +3679,30 @@ void MacroAssembler::InvokePrologue(const ParameterCount& expected, |
} |
+void MacroAssembler::Prologue(PrologueFrameMode frame_mode) { |
+ if (frame_mode == BUILD_STUB_FRAME) { |
+ push(rbp); // Caller's frame pointer. |
+ movq(rbp, rsp); |
+ push(rsi); // Callee's context. |
+ Push(Smi::FromInt(StackFrame::STUB)); |
+ } else { |
+ PredictableCodeSizeScope predictible_code_size_scope(this, |
+ kNoCodeAgeSequenceLength); |
+ if (FLAG_optimize_for_size && FLAG_age_code) { |
+ // Pre-age the code. |
+ Call(isolate()->builtins()->MarkCodeAsExecutedOnce(), |
+ RelocInfo::CODE_AGE_SEQUENCE); |
+ Nop(kNoCodeAgeSequenceLength - Assembler::kShortCallInstructionLength); |
+ } else { |
+ push(rbp); // Caller's frame pointer. |
+ movq(rbp, rsp); |
+ push(rsi); // Callee's context. |
+ push(rdi); // Callee's JS function. |
+ } |
+ } |
+} |
+ |
+ |
void MacroAssembler::EnterFrame(StackFrame::Type type) { |
push(rbp); |
movq(rbp, rsp); |