[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}
This commit is contained in:
ishell 2016-03-02 23:00:23 -08:00 committed by Commit bot
parent 9d0cf920bd
commit e982f95023
11 changed files with 12 additions and 92 deletions

View File

@ -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()->
// This code tries to be close to ia32 code so that any changes can be

View File

@ -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(
FrameDescription* output_frame, CodeStubDescriptor* descriptor) {
ApiFunction function(descriptor->deoptimization_handler());

View File

@ -474,7 +474,6 @@ Deoptimizer::Deoptimizer(Isolate* isolate, JSFunction* function,
bailout_type_(type),
from_(from),
fp_to_sp_delta_(fp_to_sp_delta),
has_alignment_padding_(0),
deoptimizing_throw_(false),
catch_handler_data_(-1),
catch_handler_pc_offset_(-1),
@ -764,9 +763,7 @@ void Deoptimizer::DoComputeOutputFrames() {
output_count_ = static_cast<int>(count);
Register fp_reg = JavaScriptFrame::fp_register();
stack_fp_ = reinterpret_cast<Address>(
input_->GetRegister(fp_reg.code()) +
has_alignment_padding_ * kPointerSize);
stack_fp_ = reinterpret_cast<Address>(input_->GetRegister(fp_reg.code()));
// Translate each output frame.
for (size_t i = 0; i < count; ++i) {
@ -810,17 +807,13 @@ void Deoptimizer::DoComputeOutputFrames() {
PrintF(trace_scope_->file(), "[deoptimizing (%s): end ",
MessageFor(bailout_type_));
PrintFunctionName();
PrintF(trace_scope_->file(),
" @%d => node=%d, pc=0x%08" V8PRIxPTR ", state=%s, alignment=%s,"
" took %0.3f ms]\n",
bailout_id_,
node_id.ToInt(),
output_[index]->GetPc(),
FullCodeGenerator::State2String(
static_cast<FullCodeGenerator::State>(
output_[index]->GetState()->value())),
has_alignment_padding_ ? "with padding" : "no padding",
ms);
PrintF(
trace_scope_->file(),
" @%d => node=%d, pc=0x%08" V8PRIxPTR ", state=%s, took %0.3f ms]\n",
bailout_id_, node_id.ToInt(), output_[index]->GetPc(),
FullCodeGenerator::State2String(static_cast<FullCodeGenerator::State>(
output_[index]->GetState()->value())),
ms);
}
}
@ -882,17 +875,13 @@ void Deoptimizer::DoComputeJSFrame(int frame_index, bool goto_catch_handler) {
Register fp_reg = JavaScriptFrame::fp_register();
intptr_t top_address;
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.
// If the optimized frame had alignment padding, adjust the frame pointer
// to point to the new position of the old frame pointer after padding
// is removed. Subtract 2 * kPointerSize for the context and function slots.
top_address = input_->GetRegister(fp_reg.code()) -
StandardFrameConstants::kFixedFrameSizeFromFp -
height_in_bytes + has_alignment_padding_ * kPointerSize;
StandardFrameConstants::kFixedFrameSizeFromFp -
height_in_bytes;
} else {
top_address = output_[frame_index - 1]->GetTop() - output_frame_size;
}
@ -940,13 +929,10 @@ void Deoptimizer::DoComputeJSFrame(int frame_index, bool goto_catch_handler) {
}
output_frame->SetCallerFp(output_offset, value);
intptr_t fp_value = top_address + output_offset;
DCHECK(!is_bottommost || (input_->GetRegister(fp_reg.code()) +
has_alignment_padding_ * kPointerSize) == fp_value);
DCHECK(!is_bottommost || input_->GetRegister(fp_reg.code()) == fp_value);
output_frame->SetFp(fp_value);
if (is_topmost) output_frame->SetRegister(fp_reg.code(), fp_value);
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) {
// For the bottommost output frame the constant pool pointer can be gotten
@ -1185,14 +1171,10 @@ void Deoptimizer::DoComputeInterpretedFrame(int frame_index,
}
output_frame->SetCallerFp(output_offset, value);
intptr_t fp_value = top_address + output_offset;
DCHECK(!is_bottommost ||
(input_->GetRegister(fp_reg.code()) +
has_alignment_padding_ * kPointerSize) == fp_value);
DCHECK(!is_bottommost || input_->GetRegister(fp_reg.code()) == fp_value);
output_frame->SetFp(fp_value);
if (is_topmost) output_frame->SetRegister(fp_reg.code(), fp_value);
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) {
// For the bottommost output frame the constant pool pointer can be gotten

View File

@ -537,10 +537,6 @@ class Deoptimizer : public Malloced {
}
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 const int kNotDeoptimizationEntry = -1;
@ -651,10 +647,6 @@ class Deoptimizer : public Malloced {
// from the input frame's double registers.
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_;
JSFunction* function_;
Code* compiled_code_;
@ -662,7 +654,6 @@ class Deoptimizer : public Malloced {
BailoutType bailout_type_;
Address from_;
int fp_to_sp_delta_;
int has_alignment_padding_;
bool deoptimizing_throw_;
int catch_handler_data_;
int catch_handler_pc_offset_;

View File

@ -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()->
void Deoptimizer::TableEntryGenerator::Generate() {

View File

@ -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()->

View File

@ -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()->

View File

@ -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()->
// This code tries to be close to ia32 code so that any changes can be

View File

@ -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()->
// This code tries to be close to ia32 code so that any changes can be

View File

@ -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()->
void Deoptimizer::TableEntryGenerator::Generate() {

View File

@ -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()->
void Deoptimizer::TableEntryGenerator::Generate() {