Commit 201706bc authored by mstarzinger's avatar mstarzinger Committed by Commit bot

Deprecate useless CompilationInfo::IsOptimizable predicate.

R=titzer@chromium.org

Review URL: https://codereview.chromium.org/1309813002

Cr-Commit-Position: refs/heads/master@{#30309}
parent ef2fd24e
...@@ -292,7 +292,6 @@ class CompilationInfo { ...@@ -292,7 +292,6 @@ class CompilationInfo {
// Accessors for the different compilation modes. // Accessors for the different compilation modes.
bool IsOptimizing() const { return mode_ == OPTIMIZE; } bool IsOptimizing() const { return mode_ == OPTIMIZE; }
bool IsOptimizable() const { return mode_ == BASE; }
bool IsStub() const { return mode_ == STUB; } bool IsStub() const { return mode_ == STUB; }
void SetOptimizing(BailoutId osr_ast_id, Handle<Code> unoptimized) { void SetOptimizing(BailoutId osr_ast_id, Handle<Code> unoptimized) {
DCHECK(!shared_info().is_null()); DCHECK(!shared_info().is_null());
...@@ -317,7 +316,7 @@ class CompilationInfo { ...@@ -317,7 +316,7 @@ class CompilationInfo {
return GetFlag(kDeoptimizationSupport); return GetFlag(kDeoptimizationSupport);
} }
void EnableDeoptimizationSupport() { void EnableDeoptimizationSupport() {
DCHECK(IsOptimizable()); DCHECK_EQ(BASE, mode_);
SetFlag(kDeoptimizationSupport); SetFlag(kDeoptimizationSupport);
} }
......
...@@ -790,7 +790,7 @@ void FullCodeGenerator::PrepareForBailoutBeforeSplit(Expression* expr, ...@@ -790,7 +790,7 @@ void FullCodeGenerator::PrepareForBailoutBeforeSplit(Expression* expr,
// Only prepare for bailouts before splits if we're in a test // Only prepare for bailouts before splits if we're in a test
// context. Otherwise, we let the Visit function deal with the // context. Otherwise, we let the Visit function deal with the
// preparation to avoid preparing with the same AST id twice. // preparation to avoid preparing with the same AST id twice.
if (!context()->IsTest() || !info_->IsOptimizable()) return; if (!context()->IsTest()) return;
Label skip; Label skip;
if (should_normalize) __ b(&skip); if (should_normalize) __ b(&skip);
......
...@@ -789,7 +789,7 @@ void FullCodeGenerator::PrepareForBailoutBeforeSplit(Expression* expr, ...@@ -789,7 +789,7 @@ void FullCodeGenerator::PrepareForBailoutBeforeSplit(Expression* expr,
// Only prepare for bailouts before splits if we're in a test // Only prepare for bailouts before splits if we're in a test
// context. Otherwise, we let the Visit function deal with the // context. Otherwise, we let the Visit function deal with the
// preparation to avoid preparing with the same AST id twice. // 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. // TODO(all): Investigate to see if there is something to work on here.
Label skip; Label skip;
......
...@@ -746,7 +746,7 @@ void FullCodeGenerator::PrepareForBailoutBeforeSplit(Expression* expr, ...@@ -746,7 +746,7 @@ void FullCodeGenerator::PrepareForBailoutBeforeSplit(Expression* expr,
// Only prepare for bailouts before splits if we're in a test // Only prepare for bailouts before splits if we're in a test
// context. Otherwise, we let the Visit function deal with the // context. Otherwise, we let the Visit function deal with the
// preparation to avoid preparing with the same AST id twice. // preparation to avoid preparing with the same AST id twice.
if (!context()->IsTest() || !info_->IsOptimizable()) return; if (!context()->IsTest()) return;
Label skip; Label skip;
if (should_normalize) __ jmp(&skip, Label::kNear); if (should_normalize) __ jmp(&skip, Label::kNear);
......
...@@ -793,7 +793,7 @@ void FullCodeGenerator::PrepareForBailoutBeforeSplit(Expression* expr, ...@@ -793,7 +793,7 @@ void FullCodeGenerator::PrepareForBailoutBeforeSplit(Expression* expr,
// Only prepare for bailouts before splits if we're in a test // Only prepare for bailouts before splits if we're in a test
// context. Otherwise, we let the Visit function deal with the // context. Otherwise, we let the Visit function deal with the
// preparation to avoid preparing with the same AST id twice. // preparation to avoid preparing with the same AST id twice.
if (!context()->IsTest() || !info_->IsOptimizable()) return; if (!context()->IsTest()) return;
Label skip; Label skip;
if (should_normalize) __ Branch(&skip); if (should_normalize) __ Branch(&skip);
......
...@@ -790,7 +790,7 @@ void FullCodeGenerator::PrepareForBailoutBeforeSplit(Expression* expr, ...@@ -790,7 +790,7 @@ void FullCodeGenerator::PrepareForBailoutBeforeSplit(Expression* expr,
// Only prepare for bailouts before splits if we're in a test // Only prepare for bailouts before splits if we're in a test
// context. Otherwise, we let the Visit function deal with the // context. Otherwise, we let the Visit function deal with the
// preparation to avoid preparing with the same AST id twice. // preparation to avoid preparing with the same AST id twice.
if (!context()->IsTest() || !info_->IsOptimizable()) return; if (!context()->IsTest()) return;
Label skip; Label skip;
if (should_normalize) __ Branch(&skip); if (should_normalize) __ Branch(&skip);
......
...@@ -757,7 +757,7 @@ void FullCodeGenerator::PrepareForBailoutBeforeSplit(Expression* expr, ...@@ -757,7 +757,7 @@ void FullCodeGenerator::PrepareForBailoutBeforeSplit(Expression* expr,
// Only prepare for bailouts before splits if we're in a test // Only prepare for bailouts before splits if we're in a test
// context. Otherwise, we let the Visit function deal with the // context. Otherwise, we let the Visit function deal with the
// preparation to avoid preparing with the same AST id twice. // preparation to avoid preparing with the same AST id twice.
if (!context()->IsTest() || !info_->IsOptimizable()) return; if (!context()->IsTest()) return;
Label skip; Label skip;
if (should_normalize) __ b(&skip); if (should_normalize) __ b(&skip);
......
...@@ -758,7 +758,7 @@ void FullCodeGenerator::PrepareForBailoutBeforeSplit(Expression* expr, ...@@ -758,7 +758,7 @@ void FullCodeGenerator::PrepareForBailoutBeforeSplit(Expression* expr,
// Only prepare for bailouts before splits if we're in a test // Only prepare for bailouts before splits if we're in a test
// context. Otherwise, we let the Visit function deal with the // context. Otherwise, we let the Visit function deal with the
// preparation to avoid preparing with the same AST id twice. // preparation to avoid preparing with the same AST id twice.
if (!context()->IsTest() || !info_->IsOptimizable()) return; if (!context()->IsTest()) return;
Label skip; Label skip;
if (should_normalize) __ jmp(&skip, Label::kNear); if (should_normalize) __ jmp(&skip, Label::kNear);
......
...@@ -743,7 +743,7 @@ void FullCodeGenerator::PrepareForBailoutBeforeSplit(Expression* expr, ...@@ -743,7 +743,7 @@ void FullCodeGenerator::PrepareForBailoutBeforeSplit(Expression* expr,
// Only prepare for bailouts before splits if we're in a test // Only prepare for bailouts before splits if we're in a test
// context. Otherwise, we let the Visit function deal with the // context. Otherwise, we let the Visit function deal with the
// preparation to avoid preparing with the same AST id twice. // preparation to avoid preparing with the same AST id twice.
if (!context()->IsTest() || !info_->IsOptimizable()) return; if (!context()->IsTest()) return;
Label skip; Label skip;
if (should_normalize) __ jmp(&skip, Label::kNear); if (should_normalize) __ jmp(&skip, Label::kNear);
......
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