| Index: src/x64/macro-assembler-x64.cc
|
| diff --git a/src/x64/macro-assembler-x64.cc b/src/x64/macro-assembler-x64.cc
|
| index b3336e6eabbce0f7b9d49033035e622b2150cc37..e5e4f52d006cc8aaf6a1f6065e737464f42d996f 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(bool is_stub) {
|
| + if (is_stub) {
|
| + 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 && !is_stub) {
|
| + // 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);
|
|
|