Commit 476a8853 authored by Michael Starzinger's avatar Michael Starzinger Committed by Commit Bot

[turbofan] Remove remnants of deferred frame building.

R=clemensh@chromium.org

Change-Id: I756507bea262c16eb60e1c78dfb349d54633d37d
Reviewed-on: https://chromium-review.googlesource.com/1124689Reviewed-by: 's avatarClemens Hammacher <clemensh@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54190}
parent 1da6cd9f
...@@ -2933,49 +2933,41 @@ void CodeGenerator::AssembleConstructFrame() { ...@@ -2933,49 +2933,41 @@ void CodeGenerator::AssembleConstructFrame() {
const RegList saves_fp = call_descriptor->CalleeSavedFPRegisters(); const RegList saves_fp = call_descriptor->CalleeSavedFPRegisters();
if (shrink_slots > 0) { if (shrink_slots > 0) {
if (info()->IsWasm()) { DCHECK(frame_access_state()->has_frame());
if (shrink_slots > 128) { if (info()->IsWasm() && shrink_slots > 128) {
// For WebAssembly functions with big frames we have to do the stack // For WebAssembly functions with big frames we have to do the stack
// overflow check before we construct the frame. Otherwise we may not // overflow check before we construct the frame. Otherwise we may not
// have enough space on the stack to call the runtime for the stack // have enough space on the stack to call the runtime for the stack
// overflow. // overflow.
Label done; Label done;
// If the frame is bigger than the stack, we throw the stack overflow // If the frame is bigger than the stack, we throw the stack overflow
// exception unconditionally. Thereby we can avoid the integer overflow // exception unconditionally. Thereby we can avoid the integer overflow
// check in the condition code. // check in the condition code.
if ((shrink_slots * kPointerSize) < (FLAG_stack_size * 1024)) { if ((shrink_slots * kPointerSize) < (FLAG_stack_size * 1024)) {
UseScratchRegisterScope temps(tasm()); UseScratchRegisterScope temps(tasm());
Register scratch = temps.Acquire(); Register scratch = temps.Acquire();
__ Move(scratch, __ Move(scratch, Operand(ExternalReference::address_of_real_stack_limit(
Operand(ExternalReference::address_of_real_stack_limit( __ isolate())));
__ isolate()))); __ ldr(scratch, MemOperand(scratch));
__ ldr(scratch, MemOperand(scratch)); __ add(scratch, scratch, Operand(shrink_slots * kPointerSize));
__ add(scratch, scratch, Operand(shrink_slots * kPointerSize)); __ cmp(sp, scratch);
__ cmp(sp, scratch); __ b(cs, &done);
__ b(cs, &done); }
}
if (!frame_access_state()->has_frame()) {
__ set_has_frame(true);
// There is no need to leave the frame, we will not return from the
// runtime call.
__ EnterFrame(StackFrame::WASM_COMPILED);
}
__ ldr(r2, FieldMemOperand(kWasmInstanceRegister,
WasmInstanceObject::kCEntryStubOffset));
__ Move(cp, Smi::kZero);
__ CallRuntimeWithCEntry(Runtime::kThrowWasmStackOverflow, r2);
// We come from WebAssembly, there are no references for the GC.
ReferenceMap* reference_map = new (zone()) ReferenceMap(zone());
RecordSafepoint(reference_map, Safepoint::kSimple, 0,
Safepoint::kNoLazyDeopt);
if (FLAG_debug_code) {
__ stop(GetAbortReason(AbortReason::kUnexpectedReturnFromThrow));
}
__ bind(&done); __ ldr(r2, FieldMemOperand(kWasmInstanceRegister,
WasmInstanceObject::kCEntryStubOffset));
__ Move(cp, Smi::kZero);
__ CallRuntimeWithCEntry(Runtime::kThrowWasmStackOverflow, r2);
// We come from WebAssembly, there are no references for the GC.
ReferenceMap* reference_map = new (zone()) ReferenceMap(zone());
RecordSafepoint(reference_map, Safepoint::kSimple, 0,
Safepoint::kNoLazyDeopt);
if (FLAG_debug_code) {
__ stop(GetAbortReason(AbortReason::kUnexpectedReturnFromThrow));
} }
__ bind(&done);
} }
// Skip callee-saved and return slots, which are pushed below. // Skip callee-saved and return slots, which are pushed below.
......
...@@ -2430,15 +2430,8 @@ void CodeGenerator::AssembleConstructFrame() { ...@@ -2430,15 +2430,8 @@ void CodeGenerator::AssembleConstructFrame() {
__ B(hs, &done); __ B(hs, &done);
} }
if (!frame_access_state()->has_frame()) { {
__ set_has_frame(true);
// There is no need to leave the frame, we will not return from the
// runtime call.
__ EnterFrame(StackFrame::WASM_COMPILED);
} else {
// Finish the frame that hasn't been fully built yet. // Finish the frame that hasn't been fully built yet.
// TODO(mstarzinger): This is a work-around, deferred frame building is
// actually no longer supported, remove the associated code.
UseScratchRegisterScope temps(tasm()); UseScratchRegisterScope temps(tasm());
__ Claim(2); // Claim extra slots for marker + instance. __ Claim(2); // Claim extra slots for marker + instance.
Register scratch = temps.AcquireX(); Register scratch = temps.AcquireX();
......
...@@ -9,7 +9,6 @@ ...@@ -9,7 +9,6 @@
#include "src/compiler/node-matchers.h" #include "src/compiler/node-matchers.h"
#include "src/compiler/operator-properties.h" #include "src/compiler/operator-properties.h"
#include "src/compiler/simplified-operator.h" #include "src/compiler/simplified-operator.h"
#include "src/zone/zone-list-inl.h" // TODO(mstarzinger): Fix zone-handle-set.h instead!
#ifdef DEBUG #ifdef DEBUG
#define TRACE(...) \ #define TRACE(...) \
......
...@@ -4012,6 +4012,7 @@ void CodeGenerator::AssembleConstructFrame() { ...@@ -4012,6 +4012,7 @@ void CodeGenerator::AssembleConstructFrame() {
const RegList saves = call_descriptor->CalleeSavedRegisters(); const RegList saves = call_descriptor->CalleeSavedRegisters();
if (shrink_slots > 0) { if (shrink_slots > 0) {
DCHECK(frame_access_state()->has_frame());
if (info()->IsWasm() && shrink_slots > 128) { if (info()->IsWasm() && shrink_slots > 128) {
// For WebAssembly functions with big frames we have to do the stack // For WebAssembly functions with big frames we have to do the stack
// overflow check before we construct the frame. Otherwise we may not // overflow check before we construct the frame. Otherwise we may not
...@@ -4034,10 +4035,6 @@ void CodeGenerator::AssembleConstructFrame() { ...@@ -4034,10 +4035,6 @@ void CodeGenerator::AssembleConstructFrame() {
__ pop(scratch); __ pop(scratch);
__ j(above_equal, &done); __ j(above_equal, &done);
} }
if (!frame_access_state()->has_frame()) {
__ set_has_frame(true);
__ EnterFrame(StackFrame::WASM_COMPILED);
}
__ mov(ecx, FieldOperand(kWasmInstanceRegister, __ mov(ecx, FieldOperand(kWasmInstanceRegister,
WasmInstanceObject::kCEntryStubOffset)); WasmInstanceObject::kCEntryStubOffset));
__ Move(esi, Smi::kZero); __ Move(esi, Smi::kZero);
......
...@@ -733,7 +733,7 @@ std::ostream& operator<<(std::ostream& os, ...@@ -733,7 +733,7 @@ std::ostream& operator<<(std::ostream& os,
os << " " << std::setw(5) << j << ": " << printable_instr << std::endl; os << " " << std::setw(5) << j << ": " << printable_instr << std::endl;
} }
os << " succecessors:"; os << " successors:";
for (RpoNumber succ : block->successors()) { for (RpoNumber succ : block->successors()) {
os << " B" << succ.ToInt(); os << " B" << succ.ToInt();
} }
......
...@@ -3087,6 +3087,7 @@ void CodeGenerator::AssembleConstructFrame() { ...@@ -3087,6 +3087,7 @@ void CodeGenerator::AssembleConstructFrame() {
const RegList saves_fp = call_descriptor->CalleeSavedFPRegisters(); const RegList saves_fp = call_descriptor->CalleeSavedFPRegisters();
if (shrink_slots > 0) { if (shrink_slots > 0) {
DCHECK(frame_access_state()->has_frame());
if (info()->IsWasm() && shrink_slots > 128) { if (info()->IsWasm() && shrink_slots > 128) {
// For WebAssembly functions with big frames we have to do the stack // For WebAssembly functions with big frames we have to do the stack
// overflow check before we construct the frame. Otherwise we may not // overflow check before we construct the frame. Otherwise we may not
...@@ -3105,10 +3106,6 @@ void CodeGenerator::AssembleConstructFrame() { ...@@ -3105,10 +3106,6 @@ void CodeGenerator::AssembleConstructFrame() {
__ cmpq(rsp, kScratchRegister); __ cmpq(rsp, kScratchRegister);
__ j(above_equal, &done); __ j(above_equal, &done);
} }
if (!frame_access_state()->has_frame()) {
__ set_has_frame(true);
__ EnterFrame(StackFrame::WASM_COMPILED);
}
__ movp(rcx, FieldOperand(kWasmInstanceRegister, __ movp(rcx, FieldOperand(kWasmInstanceRegister,
WasmInstanceObject::kCEntryStubOffset)); WasmInstanceObject::kCEntryStubOffset));
__ Move(rsi, Smi::kZero); __ Move(rsi, Smi::kZero);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment