Chromium Code Reviews| Index: src/x64/full-codegen-x64.cc | 
| diff --git a/src/x64/full-codegen-x64.cc b/src/x64/full-codegen-x64.cc | 
| index 33d668d4f20a41ababd7e208df6d4a4151083e02..5c32916a589cbe5db3c809cb781d3c3b5cee5fb0 100644 | 
| --- a/src/x64/full-codegen-x64.cc | 
| +++ b/src/x64/full-codegen-x64.cc | 
| @@ -153,10 +153,25 @@ void FullCodeGenerator::Generate() { | 
| FrameScope frame_scope(masm_, StackFrame::MANUAL); | 
| info->set_prologue_offset(masm_->pc_offset()); | 
| - __ push(rbp); // Caller's frame pointer. | 
| - __ movq(rbp, rsp); | 
| - __ push(rsi); // Callee's context. | 
| - __ push(rdi); // Callee's JS Function. | 
| + { | 
| + PredictableCodeSizeScope predictible_code_size_scope( | 
| + masm_, kNoCodeAgeSequenceLength); | 
| + if (FLAG_optimize_for_size && FLAG_age_code) { | 
| + // Pre-age the code. | 
| + __ Call(isolate()->builtins()->MarkCodeAsExecutedOnce(), | 
| + RelocInfo::CODE_AGE_SEQUENCE); | 
| + for (int i = Assembler::kShortCallInstructionLength; | 
| + i < kNoCodeAgeSequenceLength; | 
| + i++) { | 
| + __ nop(); | 
| + } | 
| + } else { | 
| + __ push(rbp); // Caller's frame pointer. | 
| + __ movq(rbp, rsp); | 
| + __ push(rsi); // Callee's context. | 
| + __ push(rdi); // Callee's JS Function. | 
| + } | 
| + } | 
| info->AddNoFrameRange(0, masm_->pc_offset()); | 
| { Comment cmnt(masm_, "[ Allocate locals"); | 
| @@ -191,6 +206,7 @@ void FullCodeGenerator::Generate() { | 
| __ CallRuntime(Runtime::kNewFunctionContext, 1); | 
| } | 
| function_in_register = false; | 
| + | 
| 
 
danno
2013/10/04 16:30:09
nit: remove whitespace change
 
rmcilroy
2013/10/07 10:56:13
Done.
 
 | 
| // Context is returned in both rax and rsi. It replaces the context | 
| // passed to us. It's saved in the stack and kept live in rsi. | 
| __ movq(Operand(rbp, StandardFrameConstants::kContextOffset), rsi); |