Chromium Code Reviews| Index: src/ia32/full-codegen-ia32.cc |
| diff --git a/src/ia32/full-codegen-ia32.cc b/src/ia32/full-codegen-ia32.cc |
| index d284f53ed603bbb696bdb0be0537b8f796c1b5ca..1b657c6e97fe6921c149b348afb65955edd2b636 100644 |
| --- a/src/ia32/full-codegen-ia32.cc |
| +++ b/src/ia32/full-codegen-ia32.cc |
| @@ -158,10 +158,25 @@ void FullCodeGenerator::Generate() { |
| FrameScope frame_scope(masm_, StackFrame::MANUAL); |
| info->set_prologue_offset(masm_->pc_offset()); |
| - __ push(ebp); // Caller's frame pointer. |
| - __ mov(ebp, esp); |
| - __ push(esi); // Callee's context. |
| - __ push(edi); // 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::kCallInstructionLength; |
| + i < kNoCodeAgeSequenceLength; |
| + i++) { |
| + __ nop(); |
|
danno
2013/10/04 16:30:09
Use __ Nop(padding_size) here, lithium and on x64.
rmcilroy
2013/10/07 10:56:13
Done. Also cleaned up codegen::PatchCodeAge.
|
| + } |
| + } else { |
| + __ push(ebp); // Caller's frame pointer. |
| + __ mov(ebp, esp); |
| + __ push(esi); // Callee's context. |
| + __ push(edi); // Callee's JS Function. |
| + } |
| + } |
| info->AddNoFrameRange(0, masm_->pc_offset()); |
| { Comment cmnt(masm_, "[ Allocate locals"); |