| Index: src/x64/lithium-codegen-x64.cc
|
| diff --git a/src/x64/lithium-codegen-x64.cc b/src/x64/lithium-codegen-x64.cc
|
| index 1c8bbbe28d05654e4d39de8d664e1d5fa17b9998..cd55b3d2acf5e9b3493ae6e24c27854755fc5145 100644
|
| --- a/src/x64/lithium-codegen-x64.cc
|
| +++ b/src/x64/lithium-codegen-x64.cc
|
| @@ -143,13 +143,20 @@ bool LCodeGen::GeneratePrologue() {
|
| if (NeedsEagerFrame()) {
|
| ASSERT(!frame_is_built_);
|
| frame_is_built_ = true;
|
| - __ push(rbp); // Caller's frame pointer.
|
| - __ movq(rbp, rsp);
|
| - __ push(rsi); // Callee's context.
|
| - if (info()->IsStub()) {
|
| - __ Push(Smi::FromInt(StackFrame::STUB));
|
| + if (FLAG_optimize_for_size && FLAG_age_code && !info()->IsStub()) {
|
| + // Pre-age the code.
|
| + __ Call(isolate()->builtins()->MarkCodeAsExecutedOnce(),
|
| + RelocInfo::CODE_AGE_SEQUENCE);
|
| + __ Nop(kNoCodeAgeSequenceLength - Assembler::kShortCallInstructionLength);
|
| } else {
|
| - __ push(rdi); // Callee's JS function.
|
| + __ push(rbp); // Caller's frame pointer.
|
| + __ movq(rbp, rsp);
|
| + __ push(rsi); // Callee's context.
|
| + if (info()->IsStub()) {
|
| + __ Push(Smi::FromInt(StackFrame::STUB));
|
| + } else {
|
| + __ push(rdi); // Callee's JS function.
|
| + }
|
| }
|
| info()->AddNoFrameRange(0, masm_->pc_offset());
|
| }
|
|
|