Commit e982f950 authored by ishell's avatar ishell Committed by Commit bot

[deoptimizer] Removed dynamic frame alignment support.

The support was already removed from the Crankshaft and this CL removes the last piece.

Review URL: https://codereview.chromium.org/1764593002

Cr-Commit-Position: refs/heads/master@{#34456}
parent 9d0cf920
...@@ -103,12 +103,6 @@ void Deoptimizer::CopyDoubleRegisters(FrameDescription* output_frame) { ...@@ -103,12 +103,6 @@ void Deoptimizer::CopyDoubleRegisters(FrameDescription* output_frame) {
} }
} }
bool Deoptimizer::HasAlignmentPadding(SharedFunctionInfo* shared) {
// There is no dynamic alignment padding on ARM in the input frame.
return false;
}
#define __ masm()-> #define __ masm()->
// This code tries to be close to ia32 code so that any changes can be // This code tries to be close to ia32 code so that any changes can be
......
...@@ -65,12 +65,6 @@ void Deoptimizer::PatchCodeForDeoptimization(Isolate* isolate, Code* code) { ...@@ -65,12 +65,6 @@ void Deoptimizer::PatchCodeForDeoptimization(Isolate* isolate, Code* code) {
} }
bool Deoptimizer::HasAlignmentPadding(SharedFunctionInfo* shared) {
// There is no dynamic alignment padding on ARM64 in the input frame.
return false;
}
void Deoptimizer::SetPlatformCompiledStubRegisters( void Deoptimizer::SetPlatformCompiledStubRegisters(
FrameDescription* output_frame, CodeStubDescriptor* descriptor) { FrameDescription* output_frame, CodeStubDescriptor* descriptor) {
ApiFunction function(descriptor->deoptimization_handler()); ApiFunction function(descriptor->deoptimization_handler());
......
...@@ -474,7 +474,6 @@ Deoptimizer::Deoptimizer(Isolate* isolate, JSFunction* function, ...@@ -474,7 +474,6 @@ Deoptimizer::Deoptimizer(Isolate* isolate, JSFunction* function,
bailout_type_(type), bailout_type_(type),
from_(from), from_(from),
fp_to_sp_delta_(fp_to_sp_delta), fp_to_sp_delta_(fp_to_sp_delta),
has_alignment_padding_(0),
deoptimizing_throw_(false), deoptimizing_throw_(false),
catch_handler_data_(-1), catch_handler_data_(-1),
catch_handler_pc_offset_(-1), catch_handler_pc_offset_(-1),
...@@ -764,9 +763,7 @@ void Deoptimizer::DoComputeOutputFrames() { ...@@ -764,9 +763,7 @@ void Deoptimizer::DoComputeOutputFrames() {
output_count_ = static_cast<int>(count); output_count_ = static_cast<int>(count);
Register fp_reg = JavaScriptFrame::fp_register(); Register fp_reg = JavaScriptFrame::fp_register();
stack_fp_ = reinterpret_cast<Address>( stack_fp_ = reinterpret_cast<Address>(input_->GetRegister(fp_reg.code()));
input_->GetRegister(fp_reg.code()) +
has_alignment_padding_ * kPointerSize);
// Translate each output frame. // Translate each output frame.
for (size_t i = 0; i < count; ++i) { for (size_t i = 0; i < count; ++i) {
...@@ -810,17 +807,13 @@ void Deoptimizer::DoComputeOutputFrames() { ...@@ -810,17 +807,13 @@ void Deoptimizer::DoComputeOutputFrames() {
PrintF(trace_scope_->file(), "[deoptimizing (%s): end ", PrintF(trace_scope_->file(), "[deoptimizing (%s): end ",
MessageFor(bailout_type_)); MessageFor(bailout_type_));
PrintFunctionName(); PrintFunctionName();
PrintF(trace_scope_->file(), PrintF(
" @%d => node=%d, pc=0x%08" V8PRIxPTR ", state=%s, alignment=%s," trace_scope_->file(),
" took %0.3f ms]\n", " @%d => node=%d, pc=0x%08" V8PRIxPTR ", state=%s, took %0.3f ms]\n",
bailout_id_, bailout_id_, node_id.ToInt(), output_[index]->GetPc(),
node_id.ToInt(), FullCodeGenerator::State2String(static_cast<FullCodeGenerator::State>(
output_[index]->GetPc(), output_[index]->GetState()->value())),
FullCodeGenerator::State2String( ms);
static_cast<FullCodeGenerator::State>(
output_[index]->GetState()->value())),
has_alignment_padding_ ? "with padding" : "no padding",
ms);
} }
} }
...@@ -882,17 +875,13 @@ void Deoptimizer::DoComputeJSFrame(int frame_index, bool goto_catch_handler) { ...@@ -882,17 +875,13 @@ void Deoptimizer::DoComputeJSFrame(int frame_index, bool goto_catch_handler) {
Register fp_reg = JavaScriptFrame::fp_register(); Register fp_reg = JavaScriptFrame::fp_register();
intptr_t top_address; intptr_t top_address;
if (is_bottommost) { if (is_bottommost) {
// Determine whether the input frame contains alignment padding.
has_alignment_padding_ =
(!compiled_code_->is_turbofanned() && HasAlignmentPadding(shared)) ? 1
: 0;
// 2 = context and function in the frame. // 2 = context and function in the frame.
// If the optimized frame had alignment padding, adjust the frame pointer // If the optimized frame had alignment padding, adjust the frame pointer
// to point to the new position of the old frame pointer after padding // to point to the new position of the old frame pointer after padding
// is removed. Subtract 2 * kPointerSize for the context and function slots. // is removed. Subtract 2 * kPointerSize for the context and function slots.
top_address = input_->GetRegister(fp_reg.code()) - top_address = input_->GetRegister(fp_reg.code()) -
StandardFrameConstants::kFixedFrameSizeFromFp - StandardFrameConstants::kFixedFrameSizeFromFp -
height_in_bytes + has_alignment_padding_ * kPointerSize; height_in_bytes;
} else { } else {
top_address = output_[frame_index - 1]->GetTop() - output_frame_size; top_address = output_[frame_index - 1]->GetTop() - output_frame_size;
} }
...@@ -940,13 +929,10 @@ void Deoptimizer::DoComputeJSFrame(int frame_index, bool goto_catch_handler) { ...@@ -940,13 +929,10 @@ void Deoptimizer::DoComputeJSFrame(int frame_index, bool goto_catch_handler) {
} }
output_frame->SetCallerFp(output_offset, value); output_frame->SetCallerFp(output_offset, value);
intptr_t fp_value = top_address + output_offset; intptr_t fp_value = top_address + output_offset;
DCHECK(!is_bottommost || (input_->GetRegister(fp_reg.code()) + DCHECK(!is_bottommost || input_->GetRegister(fp_reg.code()) == fp_value);
has_alignment_padding_ * kPointerSize) == fp_value);
output_frame->SetFp(fp_value); output_frame->SetFp(fp_value);
if (is_topmost) output_frame->SetRegister(fp_reg.code(), fp_value); if (is_topmost) output_frame->SetRegister(fp_reg.code(), fp_value);
DebugPrintOutputSlot(value, frame_index, output_offset, "caller's fp\n"); DebugPrintOutputSlot(value, frame_index, output_offset, "caller's fp\n");
DCHECK(!is_bottommost || !has_alignment_padding_ ||
(fp_value & kPointerSize) != 0);
if (FLAG_enable_embedded_constant_pool) { if (FLAG_enable_embedded_constant_pool) {
// For the bottommost output frame the constant pool pointer can be gotten // For the bottommost output frame the constant pool pointer can be gotten
...@@ -1185,14 +1171,10 @@ void Deoptimizer::DoComputeInterpretedFrame(int frame_index, ...@@ -1185,14 +1171,10 @@ void Deoptimizer::DoComputeInterpretedFrame(int frame_index,
} }
output_frame->SetCallerFp(output_offset, value); output_frame->SetCallerFp(output_offset, value);
intptr_t fp_value = top_address + output_offset; intptr_t fp_value = top_address + output_offset;
DCHECK(!is_bottommost || DCHECK(!is_bottommost || input_->GetRegister(fp_reg.code()) == fp_value);
(input_->GetRegister(fp_reg.code()) +
has_alignment_padding_ * kPointerSize) == fp_value);
output_frame->SetFp(fp_value); output_frame->SetFp(fp_value);
if (is_topmost) output_frame->SetRegister(fp_reg.code(), fp_value); if (is_topmost) output_frame->SetRegister(fp_reg.code(), fp_value);
DebugPrintOutputSlot(value, frame_index, output_offset, "caller's fp\n"); DebugPrintOutputSlot(value, frame_index, output_offset, "caller's fp\n");
DCHECK(!is_bottommost || !has_alignment_padding_ ||
(fp_value & kPointerSize) != 0);
if (FLAG_enable_embedded_constant_pool) { if (FLAG_enable_embedded_constant_pool) {
// For the bottommost output frame the constant pool pointer can be gotten // For the bottommost output frame the constant pool pointer can be gotten
......
...@@ -537,10 +537,6 @@ class Deoptimizer : public Malloced { ...@@ -537,10 +537,6 @@ class Deoptimizer : public Malloced {
} }
static int output_offset() { return OFFSET_OF(Deoptimizer, output_); } static int output_offset() { return OFFSET_OF(Deoptimizer, output_); }
static int has_alignment_padding_offset() {
return OFFSET_OF(Deoptimizer, has_alignment_padding_);
}
static int GetDeoptimizedCodeCount(Isolate* isolate); static int GetDeoptimizedCodeCount(Isolate* isolate);
static const int kNotDeoptimizationEntry = -1; static const int kNotDeoptimizationEntry = -1;
...@@ -651,10 +647,6 @@ class Deoptimizer : public Malloced { ...@@ -651,10 +647,6 @@ class Deoptimizer : public Malloced {
// from the input frame's double registers. // from the input frame's double registers.
void CopyDoubleRegisters(FrameDescription* output_frame); void CopyDoubleRegisters(FrameDescription* output_frame);
// Determines whether the input frame contains alignment padding by looking
// at the dynamic alignment state slot inside the frame.
bool HasAlignmentPadding(SharedFunctionInfo* shared);
Isolate* isolate_; Isolate* isolate_;
JSFunction* function_; JSFunction* function_;
Code* compiled_code_; Code* compiled_code_;
...@@ -662,7 +654,6 @@ class Deoptimizer : public Malloced { ...@@ -662,7 +654,6 @@ class Deoptimizer : public Malloced {
BailoutType bailout_type_; BailoutType bailout_type_;
Address from_; Address from_;
int fp_to_sp_delta_; int fp_to_sp_delta_;
int has_alignment_padding_;
bool deoptimizing_throw_; bool deoptimizing_throw_;
int catch_handler_data_; int catch_handler_data_;
int catch_handler_pc_offset_; int catch_handler_pc_offset_;
......
...@@ -186,12 +186,6 @@ void Deoptimizer::CopyDoubleRegisters(FrameDescription* output_frame) { ...@@ -186,12 +186,6 @@ void Deoptimizer::CopyDoubleRegisters(FrameDescription* output_frame) {
} }
} }
bool Deoptimizer::HasAlignmentPadding(SharedFunctionInfo* shared) {
// There is no dynamic alignment padding on ia32 in the input frame.
return false;
}
#define __ masm()-> #define __ masm()->
void Deoptimizer::TableEntryGenerator::Generate() { void Deoptimizer::TableEntryGenerator::Generate() {
......
...@@ -98,12 +98,6 @@ void Deoptimizer::CopyDoubleRegisters(FrameDescription* output_frame) { ...@@ -98,12 +98,6 @@ void Deoptimizer::CopyDoubleRegisters(FrameDescription* output_frame) {
} }
} }
bool Deoptimizer::HasAlignmentPadding(SharedFunctionInfo* shared) {
// There is no dynamic alignment padding on MIPS in the input frame.
return false;
}
#define __ masm()-> #define __ masm()->
......
...@@ -98,12 +98,6 @@ void Deoptimizer::CopyDoubleRegisters(FrameDescription* output_frame) { ...@@ -98,12 +98,6 @@ void Deoptimizer::CopyDoubleRegisters(FrameDescription* output_frame) {
} }
} }
bool Deoptimizer::HasAlignmentPadding(SharedFunctionInfo* shared) {
// There is no dynamic alignment padding on MIPS in the input frame.
return false;
}
#define __ masm()-> #define __ masm()->
......
...@@ -106,12 +106,6 @@ void Deoptimizer::CopyDoubleRegisters(FrameDescription* output_frame) { ...@@ -106,12 +106,6 @@ void Deoptimizer::CopyDoubleRegisters(FrameDescription* output_frame) {
} }
} }
bool Deoptimizer::HasAlignmentPadding(SharedFunctionInfo* shared) {
// There is no dynamic alignment padding on PPC in the input frame.
return false;
}
#define __ masm()-> #define __ masm()->
// This code tries to be close to ia32 code so that any changes can be // This code tries to be close to ia32 code so that any changes can be
......
...@@ -100,11 +100,6 @@ void Deoptimizer::CopyDoubleRegisters(FrameDescription* output_frame) { ...@@ -100,11 +100,6 @@ void Deoptimizer::CopyDoubleRegisters(FrameDescription* output_frame) {
} }
} }
bool Deoptimizer::HasAlignmentPadding(SharedFunctionInfo* shared) {
// There is no dynamic alignment padding on S390 in the input frame.
return false;
}
#define __ masm()-> #define __ masm()->
// This code tries to be close to ia32 code so that any changes can be // This code tries to be close to ia32 code so that any changes can be
......
...@@ -105,12 +105,6 @@ void Deoptimizer::CopyDoubleRegisters(FrameDescription* output_frame) { ...@@ -105,12 +105,6 @@ void Deoptimizer::CopyDoubleRegisters(FrameDescription* output_frame) {
} }
} }
bool Deoptimizer::HasAlignmentPadding(SharedFunctionInfo* shared) {
// There is no dynamic alignment padding on x64 in the input frame.
return false;
}
#define __ masm()-> #define __ masm()->
void Deoptimizer::TableEntryGenerator::Generate() { void Deoptimizer::TableEntryGenerator::Generate() {
......
...@@ -186,12 +186,6 @@ void Deoptimizer::CopyDoubleRegisters(FrameDescription* output_frame) { ...@@ -186,12 +186,6 @@ void Deoptimizer::CopyDoubleRegisters(FrameDescription* output_frame) {
} }
} }
bool Deoptimizer::HasAlignmentPadding(SharedFunctionInfo* shared) {
// There is no dynamic alignment padding on x87 in the input frame.
return false;
}
#define __ masm()-> #define __ masm()->
void Deoptimizer::TableEntryGenerator::Generate() { void Deoptimizer::TableEntryGenerator::Generate() {
......
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