Commit d0f79eeb authored by Michael Starzinger's avatar Michael Starzinger Committed by Commit Bot

[deoptimizer] Remove remnants of stub failure support.

R=jarin@chromium.org

Change-Id: I336595bdcbdb41d7c33aa138fdc7893aa02e655b
Reviewed-on: https://chromium-review.googlesource.com/605647Reviewed-by: 's avatarJaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47220}
parent 95f86859
......@@ -431,11 +431,6 @@ void Deoptimizer::ComputeOutputFrames(Deoptimizer* deoptimizer) {
deoptimizer->DoComputeOutputFrames();
}
bool Deoptimizer::TraceEnabledFor(StackFrame::Type frame_type) {
return (frame_type == StackFrame::STUB) ? FLAG_trace_stub_failures
: FLAG_trace_deopt;
}
const char* Deoptimizer::MessageFor(BailoutType type) {
switch (type) {
......@@ -492,13 +487,8 @@ Deoptimizer::Deoptimizer(Isolate* isolate, JSFunction* function,
deoptimizing_throw_ = true;
}
// For COMPILED_STUBs called from builtins, the function pointer is a SMI
// indicating an internal frame.
if (function->IsSmi()) {
function = nullptr;
}
DCHECK(from != nullptr);
compiled_code_ = FindOptimizedCode(function);
compiled_code_ = FindOptimizedCode();
#if DEBUG
DCHECK(compiled_code_ != NULL);
if (type == EAGER || type == SOFT || type == LAZY) {
......@@ -506,12 +496,9 @@ Deoptimizer::Deoptimizer(Isolate* isolate, JSFunction* function,
}
#endif
StackFrame::Type frame_type = function == NULL
? StackFrame::STUB
: StackFrame::JAVA_SCRIPT;
trace_scope_ = TraceEnabledFor(frame_type)
? new CodeTracer::Scope(isolate->GetCodeTracer())
: NULL;
DCHECK(function->IsJSFunction());
trace_scope_ =
FLAG_trace_deopt ? new CodeTracer::Scope(isolate->GetCodeTracer()) : NULL;
#ifdef DEBUG
CHECK(AllowHeapAllocation::IsAllowed());
disallow_heap_allocation_ = new DisallowHeapAllocation();
......@@ -538,14 +525,11 @@ Deoptimizer::Deoptimizer(Isolate* isolate, JSFunction* function,
}
unsigned size = ComputeInputFrameSize();
int parameter_count =
function == nullptr
? 0
: (function->shared()->internal_formal_parameter_count() + 1);
function->shared()->internal_formal_parameter_count() + 1;
input_ = new (size) FrameDescription(size, parameter_count);
input_->SetFrameType(frame_type);
}
Code* Deoptimizer::FindOptimizedCode(JSFunction* function) {
Code* Deoptimizer::FindOptimizedCode() {
Code* compiled_code = FindDeoptimizingCode(from_);
return (compiled_code == NULL)
? static_cast<Code*>(isolate_->FindCodeObject(from_))
......@@ -841,7 +825,6 @@ void Deoptimizer::DoComputeInterpretedFrame(TranslatedFrame* translated_frame,
int parameter_count = shared->internal_formal_parameter_count() + 1;
FrameDescription* output_frame = new (output_frame_size)
FrameDescription(output_frame_size, parameter_count);
output_frame->SetFrameType(StackFrame::INTERPRETED);
CHECK(frame_index >= 0 && frame_index < output_count_);
CHECK_NULL(output_[frame_index]);
......@@ -1095,7 +1078,6 @@ void Deoptimizer::DoComputeArgumentsAdaptorFrame(
int parameter_count = height;
FrameDescription* output_frame = new (output_frame_size)
FrameDescription(output_frame_size, parameter_count);
output_frame->SetFrameType(StackFrame::ARGUMENTS_ADAPTOR);
// Arguments adaptor can not be topmost.
CHECK(frame_index < output_count_ - 1);
......@@ -1238,7 +1220,6 @@ void Deoptimizer::DoComputeConstructStubFrame(TranslatedFrame* translated_frame,
// Allocate and store the output frame description.
FrameDescription* output_frame =
new (output_frame_size) FrameDescription(output_frame_size);
output_frame->SetFrameType(StackFrame::CONSTRUCT);
// Construct stub can not be topmost.
DCHECK(frame_index > 0 && frame_index < output_count_);
......@@ -1440,7 +1421,6 @@ void Deoptimizer::DoComputeAccessorStubFrame(TranslatedFrame* translated_frame,
// Allocate and store the output frame description.
FrameDescription* output_frame =
new (output_frame_size) FrameDescription(output_frame_size);
output_frame->SetFrameType(StackFrame::INTERNAL);
// A frame for an accessor stub can not be bottommost.
CHECK(frame_index > 0 && frame_index < output_count_);
......
......@@ -374,7 +374,6 @@ class Deoptimizer : public Malloced {
bool needs_frame;
};
static bool TraceEnabledFor(StackFrame::Type frame_type);
static const char* MessageFor(BailoutType type);
int output_count() const { return output_count_; }
......@@ -505,7 +504,7 @@ class Deoptimizer : public Malloced {
Deoptimizer(Isolate* isolate, JSFunction* function, BailoutType type,
unsigned bailout_id, Address from, int fp_to_sp_delta);
Code* FindOptimizedCode(JSFunction* function);
Code* FindOptimizedCode();
void PrintFunctionName();
void DeleteFrameDescriptions();
......@@ -745,9 +744,6 @@ class FrameDescription {
void SetContinuation(intptr_t pc) { continuation_ = pc; }
StackFrame::Type GetFrameType() const { return type_; }
void SetFrameType(StackFrame::Type type) { type_ = type; }
// Argument count, including receiver.
int parameter_count() { return parameter_count_; }
......@@ -793,7 +789,6 @@ class FrameDescription {
intptr_t fp_;
intptr_t context_;
intptr_t constant_pool_;
StackFrame::Type type_;
Smi* state_;
// Continuation is the PC where the execution continues after
......
......@@ -777,8 +777,6 @@ DEFINE_BOOL(always_opt, false, "always try to optimize functions")
DEFINE_BOOL(always_osr, false, "always try to OSR functions")
DEFINE_BOOL(prepare_always_opt, false, "prepare for turning on always opt")
DEFINE_BOOL(trace_deopt, false, "trace optimize function deoptimization")
DEFINE_BOOL(trace_stub_failures, false,
"trace deoptimization of generated code stubs")
DEFINE_BOOL(serialize_toplevel, true, "enable caching of toplevel scripts")
DEFINE_BOOL(serialize_eager, false, "compile eagerly when caching scripts")
......
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