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

Unified Diff: src/crankshaft/ia32/lithium-codegen-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: Fix merge problems Created 4 years, 9 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/crankshaft/ia32/lithium-codegen-ia32.cc
diff --git a/src/crankshaft/ia32/lithium-codegen-ia32.cc b/src/crankshaft/ia32/lithium-codegen-ia32.cc
index 845d29731b3873bd0b871cc7ac24a5ec6cb91599..bd38ae2672609501150557674234b4860a7d8a35 100644
--- a/src/crankshaft/ia32/lithium-codegen-ia32.cc
+++ b/src/crankshaft/ia32/lithium-codegen-ia32.cc
@@ -130,7 +130,7 @@ bool LCodeGen::GeneratePrologue() {
DCHECK(!frame_is_built_);
frame_is_built_ = true;
if (info()->IsStub()) {
- __ StubPrologue();
+ __ StubPrologue(StackFrame::STUB);
} else {
__ Prologue(info()->GeneratePreagedPrologue());
}
@@ -280,29 +280,24 @@ bool LCodeGen::GenerateJumpTable() {
if (needs_frame.is_linked()) {
__ bind(&needs_frame);
/* stack layout
- 4: entry address
- 3: return address <-- esp
- 2: garbage
+ 3: entry address
+ 2: return address <-- esp
1: garbage
0: garbage
*/
- __ sub(esp, Immediate(kPointerSize)); // Reserve space for stub marker.
- __ push(MemOperand(esp, kPointerSize)); // Copy return address.
- __ push(MemOperand(esp, 3 * kPointerSize)); // Copy entry address.
+ __ push(MemOperand(esp, 0)); // Copy return address.
+ __ push(MemOperand(esp, 2 * kPointerSize)); // Copy entry address.
/* stack layout
4: entry address
3: return address
- 2: garbage
1: return address
0: entry address <-- esp
*/
- __ mov(MemOperand(esp, 4 * kPointerSize), ebp); // Save ebp.
- // Copy context.
- __ mov(ebp, MemOperand(ebp, StandardFrameConstants::kContextOffset));
- __ mov(MemOperand(esp, 3 * kPointerSize), ebp);
+ __ mov(MemOperand(esp, 3 * kPointerSize), ebp); // Save ebp.
// Fill ebp with the right stack frame address.
- __ lea(ebp, MemOperand(esp, 4 * kPointerSize));
+ __ lea(ebp, MemOperand(esp, 3 * kPointerSize));
+
// This variant of deopt can only be used with stubs. Since we don't
// have a function pointer to install in the stack frame that we're
// building, install a special marker there instead.
@@ -311,8 +306,7 @@ bool LCodeGen::GenerateJumpTable() {
Immediate(Smi::FromInt(StackFrame::STUB)));
/* stack layout
- 4: old ebp
- 3: context pointer
+ 3: old ebp
2: stub marker
1: return address
0: entry address <-- esp
@@ -347,9 +341,8 @@ bool LCodeGen::GenerateDeferredCode() {
frame_is_built_ = true;
// Build the frame in such a way that esi isn't trashed.
__ push(ebp); // Caller's frame pointer.
- __ push(Operand(ebp, StandardFrameConstants::kContextOffset));
__ push(Immediate(Smi::FromInt(StackFrame::STUB)));
- __ lea(ebp, Operand(esp, 2 * kPointerSize));
+ __ lea(ebp, Operand(esp, TypedFrameConstants::kFixedFrameSizeFromFp));
Comment(";;; Deferred code");
}
code->Generate();
@@ -2814,7 +2807,8 @@ void LCodeGen::DoArgumentsElements(LArgumentsElements* instr) {
// Check for arguments adapter frame.
Label done, adapted;
__ mov(result, Operand(ebp, StandardFrameConstants::kCallerFPOffset));
- __ mov(result, Operand(result, StandardFrameConstants::kContextOffset));
+ __ mov(result,
+ Operand(result, CommonFrameConstants::kContextOrFrameTypeOffset));
__ cmp(Operand(result),
Immediate(Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR)));
__ j(equal, &adapted, Label::kNear);

Powered by Google App Engine
This is Rietveld 408576698