Reviewers: titzer,

Description:
Drop region parameter to Unbounded, as it can be done without.

Unbounded is defined in terms of None any Any,
which don't require an explicit zone.
Switching Unbounded to be the same.

BUG= None
TEST= trybots
R= tit...@chromium.org
LOG=N

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

Base URL: https://chromium.googlesource.com/v8/v8.git@master

Affected files (+25, -28 lines):
  M src/ast.h
  M src/compiler/typer.cc
  M src/effects.h
  M src/types.h
  M src/typing-reset.h
  M src/typing-reset.cc
  M test/cctest/expression-type-collector-macros.h


Index: src/ast.h
diff --git a/src/ast.h b/src/ast.h
index 7eb73d9023547f9587a95aec5d64d6153c8b2fdb..1a56b32c00e9d1ea96a6c31a58d82b135a133463 100644
--- a/src/ast.h
+++ b/src/ast.h
@@ -406,7 +406,7 @@ class Expression : public AstNode {
   Expression(Zone* zone, int pos)
       : AstNode(pos),
         base_id_(BailoutId::None().ToInt()),
-        bounds_(Bounds::Unbounded(zone)),
+        bounds_(Bounds::Unbounded()),
         bit_field_(0) {}
   static int parent_num_ids() { return 0; }
   void set_to_boolean_types(uint16_t types) {
Index: src/compiler/typer.cc
diff --git a/src/compiler/typer.cc b/src/compiler/typer.cc
index a6c69bbd2e9810b2755d8ea6eb03aa05f57ab3a0..778d96fb0732867a766c2988482f311e1afb8ded 100644
--- a/src/compiler/typer.cc
+++ b/src/compiler/typer.cc
@@ -483,7 +483,7 @@ Bounds Typer::Visitor::TypeStart(Node* node) {


 Bounds Typer::Visitor::TypeIfException(Node* node) {
-  return Bounds::Unbounded(zone());
+  return Bounds::Unbounded();
 }


@@ -497,12 +497,12 @@ Bounds Typer::Visitor::TypeParameter(Node* node) {
       return Bounds(Type::None(), function_type->Parameter(index));
     }
   }
-  return Bounds::Unbounded(zone());
+  return Bounds::Unbounded();
 }


 Bounds Typer::Visitor::TypeOsrValue(Node* node) {
-  return Bounds::Unbounded(zone());
+  return Bounds::Unbounded();
 }


@@ -605,18 +605,18 @@ Bounds Typer::Visitor::TypeTypedStateValues(Node* node) {


 Bounds Typer::Visitor::TypeCall(Node* node) {
-  return Bounds::Unbounded(zone());
+  return Bounds::Unbounded();
 }


 Bounds Typer::Visitor::TypeProjection(Node* node) {
// TODO(titzer): use the output type of the input to determine the bounds.
-  return Bounds::Unbounded(zone());
+  return Bounds::Unbounded();
 }


 Bounds Typer::Visitor::TypeDead(Node* node) {
-  return Bounds::Unbounded(zone());
+  return Bounds::Unbounded();
 }


@@ -1204,12 +1204,12 @@ Bounds Typer::Visitor::TypeJSLoadProperty(Node* node) {


 Bounds Typer::Visitor::TypeJSLoadNamed(Node* node) {
-  return Bounds::Unbounded(zone());
+  return Bounds::Unbounded();
 }


 Bounds Typer::Visitor::TypeJSLoadGlobal(Node* node) {
-  return Bounds::Unbounded(zone());
+  return Bounds::Unbounded();
 }


@@ -1377,12 +1377,12 @@ Bounds Typer::Visitor::TypeJSStoreContext(Node* node) {


 Bounds Typer::Visitor::TypeJSLoadDynamicGlobal(Node* node) {
-  return Bounds::Unbounded(zone());
+  return Bounds::Unbounded();
 }


 Bounds Typer::Visitor::TypeJSLoadDynamicContext(Node* node) {
-  return Bounds::Unbounded(zone());
+  return Bounds::Unbounded();
 }


@@ -1432,7 +1432,7 @@ Bounds Typer::Visitor::TypeJSCreateScriptContext(Node* node) {


 Bounds Typer::Visitor::TypeJSYield(Node* node) {
-  return Bounds::Unbounded(zone());
+  return Bounds::Unbounded();
 }


@@ -1483,7 +1483,7 @@ Bounds Typer::Visitor::TypeJSCallRuntime(Node* node) {
     default:
       break;
   }
-  return Bounds::Unbounded(zone());
+  return Bounds::Unbounded();
 }


@@ -1495,7 +1495,7 @@ Bounds Typer::Visitor::TypeJSForInNext(Node* node) {

 Bounds Typer::Visitor::TypeJSForInPrepare(Node* node) {
   // TODO(bmeurer): Return a tuple type here.
-  return Bounds::Unbounded(zone());
+  return Bounds::Unbounded();
 }


@@ -1512,7 +1512,7 @@ Bounds Typer::Visitor::TypeJSForInStep(Node* node) {


 Bounds Typer::Visitor::TypeJSStackCheck(Node* node) {
-  return Bounds::Unbounded(zone());
+  return Bounds::Unbounded();
 }


@@ -1764,7 +1764,7 @@ Bounds Typer::Visitor::TypeObjectIsNonNegativeSmi(Node* node) {
 // Machine operators.

 Bounds Typer::Visitor::TypeLoad(Node* node) {
-  return Bounds::Unbounded(zone());
+  return Bounds::Unbounded();
 }


@@ -2213,7 +2213,7 @@ Bounds Typer::Visitor::TypeLoadFramePointer(Node* node) {


 Bounds Typer::Visitor::TypeCheckedLoad(Node* node) {
-  return Bounds::Unbounded(zone());
+  return Bounds::Unbounded();
 }


Index: src/effects.h
diff --git a/src/effects.h b/src/effects.h
index e18baeafd6f47ee2b4bcb2e1b9895602661ee653..8d539f64bd8f64d11032353c6d8365a320c70446 100644
--- a/src/effects.h
+++ b/src/effects.h
@@ -35,11 +35,11 @@ struct Effect {

   // The unknown effect.
   static Effect Unknown(Zone* zone) {
-    return Effect(Bounds::Unbounded(zone), POSSIBLE);
+    return Effect(Bounds::Unbounded(), POSSIBLE);
   }

   static Effect Forget(Zone* zone) {
-    return Effect(Bounds::Unbounded(zone), DEFINITE);
+    return Effect(Bounds::Unbounded(), DEFINITE);
   }

   // Sequential composition, as in 'e1; e2'.
@@ -87,7 +87,7 @@ class EffectsMixin: public Base {
   Bounds LookupBounds(Var var) {
     Effect effect = Lookup(var);
     return effect.modality == Effect::DEFINITE
-        ? effect.bounds : Bounds::Unbounded(Base::zone());
+        ? effect.bounds : Bounds::Unbounded();
   }

   // Sequential composition.
Index: src/types.h
diff --git a/src/types.h b/src/types.h
index 66f209c12b7c09ec0af209dfabe3e9b827bfe21f..2699845c4450768cd5978523bf9b068764cb09a1 100644
--- a/src/types.h
+++ b/src/types.h
@@ -1134,8 +1134,8 @@ struct BoundsImpl {
   }

   // Unrestricted bounds.
-  static BoundsImpl Unbounded(Region* region) {
-    return BoundsImpl(Type::None(region), Type::Any(region));
+  static BoundsImpl Unbounded() {
+    return BoundsImpl(Type::None(), Type::Any());
   }

   // Meet: both b1 and b2 are known to hold.
Index: src/typing-reset.cc
diff --git a/src/typing-reset.cc b/src/typing-reset.cc
index 0650656b2e54ecfc4606e70eb666365dc577f106..97a641a8d07d75d130a91f910e455df08bd8c6c8 100644
--- a/src/typing-reset.cc
+++ b/src/typing-reset.cc
@@ -15,11 +15,11 @@ namespace internal {


 TypingReseter::TypingReseter(CompilationInfo* info)
-    : AstExpressionVisitor(info), info_(info) {}
+    : AstExpressionVisitor(info) {}


 void TypingReseter::VisitExpression(Expression* expression) {
-  expression->set_bounds(Bounds::Unbounded(info_->zone()));
+  expression->set_bounds(Bounds::Unbounded());
 }
 }
 }  // namespace v8::internal
Index: src/typing-reset.h
diff --git a/src/typing-reset.h b/src/typing-reset.h
index 5e7d6282007fb7cfd3b885e6a9f2b7f87a3b0c95..7d87dc0f50c873393b039a062b014935010e579d 100644
--- a/src/typing-reset.h
+++ b/src/typing-reset.h
@@ -19,9 +19,6 @@ class TypingReseter : public AstExpressionVisitor {

  protected:
   void VisitExpression(Expression* expression) override;
-
- private:
-  CompilationInfo* info_;
 };
 }
 }  // namespace v8::internal
Index: test/cctest/expression-type-collector-macros.h
diff --git a/test/cctest/expression-type-collector-macros.h b/test/cctest/expression-type-collector-macros.h index 2dcc1dcae73ca67332ecf789ea9487aff7b4d371..edc1f0911e197984624da1bf436e6736780cb3a7 100644
--- a/test/cctest/expression-type-collector-macros.h
+++ b/test/cctest/expression-type-collector-macros.h
@@ -14,7 +14,7 @@
   CHECK_EQ(index, types.size()); \
   }

-#define DEFAULT_TYPE Bounds::Unbounded(handles.main_zone())
+#define DEFAULT_TYPE Bounds::Unbounded()
 #define INT32_TYPE                            \
   Bounds(Type::Signed32(handles.main_zone()), \
          Type::Signed32(handles.main_zone()))


--
--
v8-dev mailing list
v8-dev@googlegroups.com
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 v8-dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to