Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2095)

Unified Diff: src/compiler/ia32/code-generator-ia32.cc

Issue 1696043002: [runtime] Unify and simplify how frames are marked (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Tweaks Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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);
}
« no previous file with comments | « src/compiler/frame.h ('k') | src/compiler/linkage.h » ('j') | src/compiler/linkage.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698