Commit 204b6ff0 authored by bradnelson's avatar bradnelson Committed by Commit bot

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= titzer@chromium.org
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#30482}
parent 4d3a0a7c
...@@ -406,7 +406,7 @@ class Expression : public AstNode { ...@@ -406,7 +406,7 @@ class Expression : public AstNode {
Expression(Zone* zone, int pos) Expression(Zone* zone, int pos)
: AstNode(pos), : AstNode(pos),
base_id_(BailoutId::None().ToInt()), base_id_(BailoutId::None().ToInt()),
bounds_(Bounds::Unbounded(zone)), bounds_(Bounds::Unbounded()),
bit_field_(0) {} bit_field_(0) {}
static int parent_num_ids() { return 0; } static int parent_num_ids() { return 0; }
void set_to_boolean_types(uint16_t types) { void set_to_boolean_types(uint16_t types) {
......
...@@ -483,7 +483,7 @@ Bounds Typer::Visitor::TypeStart(Node* node) { ...@@ -483,7 +483,7 @@ Bounds Typer::Visitor::TypeStart(Node* node) {
Bounds Typer::Visitor::TypeIfException(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) { ...@@ -497,12 +497,12 @@ Bounds Typer::Visitor::TypeParameter(Node* node) {
return Bounds(Type::None(), function_type->Parameter(index)); return Bounds(Type::None(), function_type->Parameter(index));
} }
} }
return Bounds::Unbounded(zone()); return Bounds::Unbounded();
} }
Bounds Typer::Visitor::TypeOsrValue(Node* node) { Bounds Typer::Visitor::TypeOsrValue(Node* node) {
return Bounds::Unbounded(zone()); return Bounds::Unbounded();
} }
...@@ -605,18 +605,18 @@ Bounds Typer::Visitor::TypeTypedStateValues(Node* node) { ...@@ -605,18 +605,18 @@ Bounds Typer::Visitor::TypeTypedStateValues(Node* node) {
Bounds Typer::Visitor::TypeCall(Node* node) { Bounds Typer::Visitor::TypeCall(Node* node) {
return Bounds::Unbounded(zone()); return Bounds::Unbounded();
} }
Bounds Typer::Visitor::TypeProjection(Node* node) { Bounds Typer::Visitor::TypeProjection(Node* node) {
// TODO(titzer): use the output type of the input to determine the bounds. // 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) { Bounds Typer::Visitor::TypeDead(Node* node) {
return Bounds::Unbounded(zone()); return Bounds::Unbounded();
} }
...@@ -1204,12 +1204,12 @@ Bounds Typer::Visitor::TypeJSLoadProperty(Node* node) { ...@@ -1204,12 +1204,12 @@ Bounds Typer::Visitor::TypeJSLoadProperty(Node* node) {
Bounds Typer::Visitor::TypeJSLoadNamed(Node* node) { Bounds Typer::Visitor::TypeJSLoadNamed(Node* node) {
return Bounds::Unbounded(zone()); return Bounds::Unbounded();
} }
Bounds Typer::Visitor::TypeJSLoadGlobal(Node* node) { Bounds Typer::Visitor::TypeJSLoadGlobal(Node* node) {
return Bounds::Unbounded(zone()); return Bounds::Unbounded();
} }
...@@ -1377,12 +1377,12 @@ Bounds Typer::Visitor::TypeJSStoreContext(Node* node) { ...@@ -1377,12 +1377,12 @@ Bounds Typer::Visitor::TypeJSStoreContext(Node* node) {
Bounds Typer::Visitor::TypeJSLoadDynamicGlobal(Node* node) { Bounds Typer::Visitor::TypeJSLoadDynamicGlobal(Node* node) {
return Bounds::Unbounded(zone()); return Bounds::Unbounded();
} }
Bounds Typer::Visitor::TypeJSLoadDynamicContext(Node* node) { Bounds Typer::Visitor::TypeJSLoadDynamicContext(Node* node) {
return Bounds::Unbounded(zone()); return Bounds::Unbounded();
} }
...@@ -1432,7 +1432,7 @@ Bounds Typer::Visitor::TypeJSCreateScriptContext(Node* node) { ...@@ -1432,7 +1432,7 @@ Bounds Typer::Visitor::TypeJSCreateScriptContext(Node* node) {
Bounds Typer::Visitor::TypeJSYield(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) { ...@@ -1483,7 +1483,7 @@ Bounds Typer::Visitor::TypeJSCallRuntime(Node* node) {
default: default:
break; break;
} }
return Bounds::Unbounded(zone()); return Bounds::Unbounded();
} }
...@@ -1495,7 +1495,7 @@ Bounds Typer::Visitor::TypeJSForInNext(Node* node) { ...@@ -1495,7 +1495,7 @@ Bounds Typer::Visitor::TypeJSForInNext(Node* node) {
Bounds Typer::Visitor::TypeJSForInPrepare(Node* node) { Bounds Typer::Visitor::TypeJSForInPrepare(Node* node) {
// TODO(bmeurer): Return a tuple type here. // TODO(bmeurer): Return a tuple type here.
return Bounds::Unbounded(zone()); return Bounds::Unbounded();
} }
...@@ -1512,7 +1512,7 @@ Bounds Typer::Visitor::TypeJSForInStep(Node* node) { ...@@ -1512,7 +1512,7 @@ Bounds Typer::Visitor::TypeJSForInStep(Node* node) {
Bounds Typer::Visitor::TypeJSStackCheck(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) { ...@@ -1764,7 +1764,7 @@ Bounds Typer::Visitor::TypeObjectIsNonNegativeSmi(Node* node) {
// Machine operators. // Machine operators.
Bounds Typer::Visitor::TypeLoad(Node* node) { Bounds Typer::Visitor::TypeLoad(Node* node) {
return Bounds::Unbounded(zone()); return Bounds::Unbounded();
} }
...@@ -2213,7 +2213,7 @@ Bounds Typer::Visitor::TypeLoadFramePointer(Node* node) { ...@@ -2213,7 +2213,7 @@ Bounds Typer::Visitor::TypeLoadFramePointer(Node* node) {
Bounds Typer::Visitor::TypeCheckedLoad(Node* node) { Bounds Typer::Visitor::TypeCheckedLoad(Node* node) {
return Bounds::Unbounded(zone()); return Bounds::Unbounded();
} }
......
...@@ -35,11 +35,11 @@ struct Effect { ...@@ -35,11 +35,11 @@ struct Effect {
// The unknown effect. // The unknown effect.
static Effect Unknown(Zone* zone) { static Effect Unknown(Zone* zone) {
return Effect(Bounds::Unbounded(zone), POSSIBLE); return Effect(Bounds::Unbounded(), POSSIBLE);
} }
static Effect Forget(Zone* zone) { static Effect Forget(Zone* zone) {
return Effect(Bounds::Unbounded(zone), DEFINITE); return Effect(Bounds::Unbounded(), DEFINITE);
} }
// Sequential composition, as in 'e1; e2'. // Sequential composition, as in 'e1; e2'.
...@@ -87,7 +87,7 @@ class EffectsMixin: public Base { ...@@ -87,7 +87,7 @@ class EffectsMixin: public Base {
Bounds LookupBounds(Var var) { Bounds LookupBounds(Var var) {
Effect effect = Lookup(var); Effect effect = Lookup(var);
return effect.modality == Effect::DEFINITE return effect.modality == Effect::DEFINITE
? effect.bounds : Bounds::Unbounded(Base::zone()); ? effect.bounds : Bounds::Unbounded();
} }
// Sequential composition. // Sequential composition.
......
...@@ -1134,8 +1134,8 @@ struct BoundsImpl { ...@@ -1134,8 +1134,8 @@ struct BoundsImpl {
} }
// Unrestricted bounds. // Unrestricted bounds.
static BoundsImpl Unbounded(Region* region) { static BoundsImpl Unbounded() {
return BoundsImpl(Type::None(region), Type::Any(region)); return BoundsImpl(Type::None(), Type::Any());
} }
// Meet: both b1 and b2 are known to hold. // Meet: both b1 and b2 are known to hold.
......
...@@ -15,11 +15,11 @@ namespace internal { ...@@ -15,11 +15,11 @@ namespace internal {
TypingReseter::TypingReseter(CompilationInfo* info) TypingReseter::TypingReseter(CompilationInfo* info)
: AstExpressionVisitor(info), info_(info) {} : AstExpressionVisitor(info) {}
void TypingReseter::VisitExpression(Expression* expression) { void TypingReseter::VisitExpression(Expression* expression) {
expression->set_bounds(Bounds::Unbounded(info_->zone())); expression->set_bounds(Bounds::Unbounded());
} }
} }
} // namespace v8::internal } // namespace v8::internal
...@@ -19,9 +19,6 @@ class TypingReseter : public AstExpressionVisitor { ...@@ -19,9 +19,6 @@ class TypingReseter : public AstExpressionVisitor {
protected: protected:
void VisitExpression(Expression* expression) override; void VisitExpression(Expression* expression) override;
private:
CompilationInfo* info_;
}; };
} }
} // namespace v8::internal } // namespace v8::internal
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
CHECK_EQ(index, types.size()); \ CHECK_EQ(index, types.size()); \
} }
#define DEFAULT_TYPE Bounds::Unbounded(handles.main_zone()) #define DEFAULT_TYPE Bounds::Unbounded()
#define INT32_TYPE \ #define INT32_TYPE \
Bounds(Type::Signed32(handles.main_zone()), \ Bounds(Type::Signed32(handles.main_zone()), \
Type::Signed32(handles.main_zone())) Type::Signed32(handles.main_zone()))
......
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