// Accessors for the different compilation modes.
bool IsOptimizing() const { return mode_ == OPTIMIZE; }
- bool IsOptimizable() const { return mode_ == BASE; }
bool IsStub() const { return mode_ == STUB; }
void SetOptimizing(BailoutId osr_ast_id, Handle<Code> unoptimized) {
DCHECK(!shared_info().is_null());
return GetFlag(kDeoptimizationSupport);
}
void EnableDeoptimizationSupport() {
- DCHECK(IsOptimizable());
+ DCHECK_EQ(BASE, mode_);
SetFlag(kDeoptimizationSupport);
}
// Only prepare for bailouts before splits if we're in a test
// context. Otherwise, we let the Visit function deal with the
// preparation to avoid preparing with the same AST id twice.
- if (!context()->IsTest() || !info_->IsOptimizable()) return;
+ if (!context()->IsTest()) return;
Label skip;
if (should_normalize) __ b(&skip);
// Only prepare for bailouts before splits if we're in a test
// context. Otherwise, we let the Visit function deal with the
// preparation to avoid preparing with the same AST id twice.
- if (!context()->IsTest() || !info_->IsOptimizable()) return;
+ if (!context()->IsTest()) return;
// TODO(all): Investigate to see if there is something to work on here.
Label skip;
// Only prepare for bailouts before splits if we're in a test
// context. Otherwise, we let the Visit function deal with the
// preparation to avoid preparing with the same AST id twice.
- if (!context()->IsTest() || !info_->IsOptimizable()) return;
+ if (!context()->IsTest()) return;
Label skip;
if (should_normalize) __ jmp(&skip, Label::kNear);
// Only prepare for bailouts before splits if we're in a test
// context. Otherwise, we let the Visit function deal with the
// preparation to avoid preparing with the same AST id twice.
- if (!context()->IsTest() || !info_->IsOptimizable()) return;
+ if (!context()->IsTest()) return;
Label skip;
if (should_normalize) __ Branch(&skip);
// Only prepare for bailouts before splits if we're in a test
// context. Otherwise, we let the Visit function deal with the
// preparation to avoid preparing with the same AST id twice.
- if (!context()->IsTest() || !info_->IsOptimizable()) return;
+ if (!context()->IsTest()) return;
Label skip;
if (should_normalize) __ Branch(&skip);
// Only prepare for bailouts before splits if we're in a test
// context. Otherwise, we let the Visit function deal with the
// preparation to avoid preparing with the same AST id twice.
- if (!context()->IsTest() || !info_->IsOptimizable()) return;
+ if (!context()->IsTest()) return;
Label skip;
if (should_normalize) __ b(&skip);
// Only prepare for bailouts before splits if we're in a test
// context. Otherwise, we let the Visit function deal with the
// preparation to avoid preparing with the same AST id twice.
- if (!context()->IsTest() || !info_->IsOptimizable()) return;
+ if (!context()->IsTest()) return;
Label skip;
if (should_normalize) __ jmp(&skip, Label::kNear);
// Only prepare for bailouts before splits if we're in a test
// context. Otherwise, we let the Visit function deal with the
// preparation to avoid preparing with the same AST id twice.
- if (!context()->IsTest() || !info_->IsOptimizable()) return;
+ if (!context()->IsTest()) return;
Label skip;
if (should_normalize) __ jmp(&skip, Label::kNear);