Reviewers: titzer,

Description:
Deprecate useless CompilationInfo::IsOptimizable predicate.

[email protected]

Please review this at https://codereview.chromium.org/1309813002/

Base URL: https://chromium.googlesource.com/v8/v8.git@local_cleanup-compilation-info-flags

Affected files (+9, -10 lines):
  M src/compiler.h
  M src/full-codegen/arm/full-codegen-arm.cc
  M src/full-codegen/arm64/full-codegen-arm64.cc
  M src/full-codegen/ia32/full-codegen-ia32.cc
  M src/full-codegen/mips/full-codegen-mips.cc
  M src/full-codegen/mips64/full-codegen-mips64.cc
  M src/full-codegen/ppc/full-codegen-ppc.cc
  M src/full-codegen/x64/full-codegen-x64.cc
  M src/full-codegen/x87/full-codegen-x87.cc


Index: src/compiler.h
diff --git a/src/compiler.h b/src/compiler.h
index ea311cccfb0d4d96d0550a4216f38cd14401d4bd..8ac0eea7efb306468ea76dc8b85b0f8fffeaf454 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<Code> 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);
   }

Index: src/full-codegen/arm/full-codegen-arm.cc
diff --git a/src/full-codegen/arm/full-codegen-arm.cc b/src/full-codegen/arm/full-codegen-arm.cc index 197a5ecc6fc1f96420a339d0dde3ab58ab438c44..17d30044cceaf6ad610b17ac0e81c17f76c1a400 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);
Index: src/full-codegen/arm64/full-codegen-arm64.cc
diff --git a/src/full-codegen/arm64/full-codegen-arm64.cc b/src/full-codegen/arm64/full-codegen-arm64.cc index 73aaf46abde31a4bb33c734e2c76afc3d2942e54..be70f638cef1da7ef25980a460cb636eda1abeae 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;
Index: src/full-codegen/ia32/full-codegen-ia32.cc
diff --git a/src/full-codegen/ia32/full-codegen-ia32.cc b/src/full-codegen/ia32/full-codegen-ia32.cc index 5aa64094413334f8c34215394442f3097c711dd9..2ed198b18403844254ac96453605952a113a650d 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);
Index: src/full-codegen/mips/full-codegen-mips.cc
diff --git a/src/full-codegen/mips/full-codegen-mips.cc b/src/full-codegen/mips/full-codegen-mips.cc index c8da77fba2128ca8c285b3ab2cd5d65556d85778..3048372fbdf68b03cc9090c92803deed14ada619 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);
Index: src/full-codegen/mips64/full-codegen-mips64.cc
diff --git a/src/full-codegen/mips64/full-codegen-mips64.cc b/src/full-codegen/mips64/full-codegen-mips64.cc index 231e8ba3840a77814da2e4d0b62b0f31565935af..3edb1c3a3bf590545adb3ac8596e56b1dda6e647 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);
Index: src/full-codegen/ppc/full-codegen-ppc.cc
diff --git a/src/full-codegen/ppc/full-codegen-ppc.cc b/src/full-codegen/ppc/full-codegen-ppc.cc index 4f927f04a8f28cb0709d4e2162588451c68b7870..2d6e7867b560e03d2985b5523a630a90d08a4e33 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);
Index: src/full-codegen/x64/full-codegen-x64.cc
diff --git a/src/full-codegen/x64/full-codegen-x64.cc b/src/full-codegen/x64/full-codegen-x64.cc index 7e0553103f3fff12a0106dc2bdb63f20845091e3..1647bd8da8d161a98e1b7493a2fd1a83ff5d45c8 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);
Index: src/full-codegen/x87/full-codegen-x87.cc
diff --git a/src/full-codegen/x87/full-codegen-x87.cc b/src/full-codegen/x87/full-codegen-x87.cc index cfa752c19145dbc388117afad86cbb167868563e..2ce87412ccb176891dcd6c78801987d191e302f6 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);


--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to