Chromium Code Reviews| Index: src/compiler/ia32/code-generator-ia32.cc |
| diff --git a/src/compiler/ia32/code-generator-ia32.cc b/src/compiler/ia32/code-generator-ia32.cc |
| index 555667afaef848cc1b5dceb3b892aea41938368c..332887537897c6bef7483b12c89acdb397af138a 100644 |
| --- a/src/compiler/ia32/code-generator-ia32.cc |
| +++ b/src/compiler/ia32/code-generator-ia32.cc |
| @@ -1455,16 +1455,26 @@ void CodeGenerator::AssembleDeoptimizerCall( |
| void CodeGenerator::AssemblePrologue() { |
| CallDescriptor* descriptor = linkage()->GetIncomingDescriptor(); |
| - if (descriptor->IsCFunctionCall()) { |
| - // Assemble a prologue similar the to cdecl calling convention. |
| - __ push(ebp); |
| - __ mov(ebp, esp); |
| - } else if (descriptor->IsJSFunctionCall()) { |
| + if (this->info()->GeneratePreagedPrologue()) { |
| // TODO(turbofan): this prologue is redundant with OSR, but still needed for |
| // code aging. |
| - __ Prologue(this->info()->GeneratePreagedPrologue()); |
| + DCHECK(frame()->needs_frame()); |
| + DCHECK((descriptor->flags() & CallDescriptor::kHasStandardFrameHeader) != |
| + 0); |
| + __ call(isolate()->builtins()->MarkCodeAsExecutedOnce(), |
| + RelocInfo::CODE_AGE_SEQUENCE); |
| + __ Nop(kNoCodeAgeSequenceLength - |
| + v8::internal::Assembler::kCallInstructionLength); |
| } else if (frame()->needs_frame()) { |
| - __ StubPrologue(); |
| + // Assemble a prologue similar the to cdecl calling convention. |
|
Michael Starzinger
2016/02/23 10:57:33
nit: Comment is outdated, it follows our internal
danno
2016/03/07 09:33:38
Done.
|
| + __ push(ebp); |
| + __ mov(ebp, esp); |
| + if ((descriptor->flags() & CallDescriptor::kHasStandardFrameHeader) != 0) { |
| + __ push(esi); |
| + __ push(edi); |
| + } else { |
| + __ push(Immediate(Smi::FromInt(StackFrame::STUB))); |
| + } |
| } else { |
| frame()->SetElidedFrameSizeInSlots(kPCOnStackSize / kPointerSize); |
| } |