Commit 1f0c8d1e authored by mstarzinger's avatar mstarzinger Committed by Commit bot

[deoptimizer] Remove obsolete BailoutType switches.

R=jarin@chromium.org

Review-Url: https://codereview.chromium.org/2274273003
Cr-Commit-Position: refs/heads/master@{#38907}
parent 244d9ccd
......@@ -434,19 +434,9 @@ void Deoptimizer::ComputeOutputFrames(Deoptimizer* deoptimizer) {
deoptimizer->DoComputeOutputFrames();
}
bool Deoptimizer::TraceEnabledFor(BailoutType deopt_type,
StackFrame::Type frame_type) {
switch (deopt_type) {
case EAGER:
case SOFT:
case LAZY:
return (frame_type == StackFrame::STUB)
? FLAG_trace_stub_failures
: FLAG_trace_deopt;
}
FATAL("Unsupported deopt type");
return false;
bool Deoptimizer::TraceEnabledFor(StackFrame::Type frame_type) {
return (frame_type == StackFrame::STUB) ? FLAG_trace_stub_failures
: FLAG_trace_deopt;
}
......@@ -516,8 +506,9 @@ Deoptimizer::Deoptimizer(Isolate* isolate, JSFunction* function,
StackFrame::Type frame_type = function == NULL
? StackFrame::STUB
: StackFrame::JAVA_SCRIPT;
trace_scope_ = TraceEnabledFor(type, frame_type) ?
new CodeTracer::Scope(isolate->GetCodeTracer()) : NULL;
trace_scope_ = TraceEnabledFor(frame_type)
? new CodeTracer::Scope(isolate->GetCodeTracer())
: NULL;
#ifdef DEBUG
CHECK(AllowHeapAllocation::IsAllowed());
disallow_heap_allocation_ = new DisallowHeapAllocation();
......@@ -535,18 +526,10 @@ Deoptimizer::Deoptimizer(Isolate* isolate, JSFunction* function,
}
Code* Deoptimizer::FindOptimizedCode(JSFunction* function) {
switch (bailout_type_) {
case Deoptimizer::SOFT:
case Deoptimizer::EAGER:
case Deoptimizer::LAZY: {
Code* compiled_code = FindDeoptimizingCode(from_);
return (compiled_code == NULL)
? static_cast<Code*>(isolate_->FindCodeObject(from_))
: compiled_code;
}
}
FATAL("Could not find code for optimized function");
return NULL;
Code* compiled_code = FindDeoptimizingCode(from_);
return (compiled_code == NULL)
? static_cast<Code*>(isolate_->FindCodeObject(from_))
: compiled_code;
}
......
......@@ -383,8 +383,7 @@ class Deoptimizer : public Malloced {
bool needs_frame;
};
static bool TraceEnabledFor(BailoutType deopt_type,
StackFrame::Type frame_type);
static bool TraceEnabledFor(StackFrame::Type frame_type);
static const char* MessageFor(BailoutType type);
int output_count() const { return output_count_; }
......
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