diff --git a/src/compiler.h b/src/compiler.h index ea311cccfb..8ac0eea7ef 100644 --- a/src/compiler.h +++ b/src/compiler.h @@ -292,7 +292,6 @@ class CompilationInfo { // 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 unoptimized) { DCHECK(!shared_info().is_null()); @@ -317,7 +316,7 @@ class CompilationInfo { return GetFlag(kDeoptimizationSupport); } void EnableDeoptimizationSupport() { - DCHECK(IsOptimizable()); + DCHECK_EQ(BASE, mode_); SetFlag(kDeoptimizationSupport); } diff --git a/src/full-codegen/arm/full-codegen-arm.cc b/src/full-codegen/arm/full-codegen-arm.cc index 197a5ecc6f..17d30044cc 100644 --- a/src/full-codegen/arm/full-codegen-arm.cc +++ b/src/full-codegen/arm/full-codegen-arm.cc @@ -790,7 +790,7 @@ void FullCodeGenerator::PrepareForBailoutBeforeSplit(Expression* expr, // 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); diff --git a/src/full-codegen/arm64/full-codegen-arm64.cc b/src/full-codegen/arm64/full-codegen-arm64.cc index 73aaf46abd..be70f638ce 100644 --- a/src/full-codegen/arm64/full-codegen-arm64.cc +++ b/src/full-codegen/arm64/full-codegen-arm64.cc @@ -789,7 +789,7 @@ void FullCodeGenerator::PrepareForBailoutBeforeSplit(Expression* expr, // 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; diff --git a/src/full-codegen/ia32/full-codegen-ia32.cc b/src/full-codegen/ia32/full-codegen-ia32.cc index 5aa6409441..2ed198b184 100644 --- a/src/full-codegen/ia32/full-codegen-ia32.cc +++ b/src/full-codegen/ia32/full-codegen-ia32.cc @@ -746,7 +746,7 @@ void FullCodeGenerator::PrepareForBailoutBeforeSplit(Expression* expr, // 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); diff --git a/src/full-codegen/mips/full-codegen-mips.cc b/src/full-codegen/mips/full-codegen-mips.cc index c8da77fba2..3048372fbd 100644 --- a/src/full-codegen/mips/full-codegen-mips.cc +++ b/src/full-codegen/mips/full-codegen-mips.cc @@ -793,7 +793,7 @@ void FullCodeGenerator::PrepareForBailoutBeforeSplit(Expression* expr, // 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); diff --git a/src/full-codegen/mips64/full-codegen-mips64.cc b/src/full-codegen/mips64/full-codegen-mips64.cc index 231e8ba384..3edb1c3a3b 100644 --- a/src/full-codegen/mips64/full-codegen-mips64.cc +++ b/src/full-codegen/mips64/full-codegen-mips64.cc @@ -790,7 +790,7 @@ void FullCodeGenerator::PrepareForBailoutBeforeSplit(Expression* expr, // 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); diff --git a/src/full-codegen/ppc/full-codegen-ppc.cc b/src/full-codegen/ppc/full-codegen-ppc.cc index 4f927f04a8..2d6e7867b5 100644 --- a/src/full-codegen/ppc/full-codegen-ppc.cc +++ b/src/full-codegen/ppc/full-codegen-ppc.cc @@ -757,7 +757,7 @@ void FullCodeGenerator::PrepareForBailoutBeforeSplit(Expression* expr, // 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); diff --git a/src/full-codegen/x64/full-codegen-x64.cc b/src/full-codegen/x64/full-codegen-x64.cc index 7e0553103f..1647bd8da8 100644 --- a/src/full-codegen/x64/full-codegen-x64.cc +++ b/src/full-codegen/x64/full-codegen-x64.cc @@ -758,7 +758,7 @@ void FullCodeGenerator::PrepareForBailoutBeforeSplit(Expression* expr, // 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); diff --git a/src/full-codegen/x87/full-codegen-x87.cc b/src/full-codegen/x87/full-codegen-x87.cc index cfa752c191..2ce87412cc 100644 --- a/src/full-codegen/x87/full-codegen-x87.cc +++ b/src/full-codegen/x87/full-codegen-x87.cc @@ -743,7 +743,7 @@ void FullCodeGenerator::PrepareForBailoutBeforeSplit(Expression* expr, // 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);