| Index: src/x64/lithium-codegen-x64.cc
|
| diff --git a/src/x64/lithium-codegen-x64.cc b/src/x64/lithium-codegen-x64.cc
|
| index 27d064d3b4bbbdf355b9d8ca667a7f13b4259429..bf0bc94fbc7bc6f7e510133fec055ad3c6110d6a 100644
|
| --- a/src/x64/lithium-codegen-x64.cc
|
| +++ b/src/x64/lithium-codegen-x64.cc
|
| @@ -164,13 +164,24 @@ 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);
|
| + for (int i = Assembler::kShortCallInstructionLength;
|
| + i < kNoCodeAgeSequenceLength;
|
| + i++) {
|
| + __ nop();
|
| + }
|
| } 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());
|
| }
|
|
|