Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(225)

Unified Diff: src/deoptimizer.cc

Issue 2274273003: [deoptimizer] Remove obsolete BailoutType switches. (Closed)
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/deoptimizer.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/deoptimizer.cc
diff --git a/src/deoptimizer.cc b/src/deoptimizer.cc
index 8e800448cebf2be24cf4c2d025e282a0464aa049..69abc7434b3c0c770ecf345a3736c796858f911c 100644
--- a/src/deoptimizer.cc
+++ b/src/deoptimizer.cc
@@ -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;
}
« no previous file with comments | « src/deoptimizer.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698