Commit 74feddd5 authored by marja's avatar marja Committed by Commit bot

Cleanup: Declaration doesn't need to know Zone.

It wasn't using it for anything.

R=verwaest@chromium.org
BUG=

Review-Url: https://codereview.chromium.org/2219853002
Cr-Commit-Position: refs/heads/master@{#38416}
parent 288066e5
...@@ -508,8 +508,8 @@ class Declaration : public AstNode { ...@@ -508,8 +508,8 @@ class Declaration : public AstNode {
InitializationFlag initialization() const; InitializationFlag initialization() const;
protected: protected:
Declaration(Zone* zone, VariableProxy* proxy, VariableMode mode, Scope* scope, Declaration(VariableProxy* proxy, VariableMode mode, Scope* scope, int pos,
int pos, NodeType type) NodeType type)
: AstNode(pos, type), mode_(mode), proxy_(proxy), scope_(scope) { : AstNode(pos, type), mode_(mode), proxy_(proxy), scope_(scope) {
DCHECK(IsDeclaredVariableMode(mode)); DCHECK(IsDeclaredVariableMode(mode));
} }
...@@ -532,9 +532,9 @@ class VariableDeclaration final : public Declaration { ...@@ -532,9 +532,9 @@ class VariableDeclaration final : public Declaration {
} }
protected: protected:
VariableDeclaration(Zone* zone, VariableProxy* proxy, VariableMode mode, VariableDeclaration(VariableProxy* proxy, VariableMode mode, Scope* scope,
Scope* scope, int pos) int pos)
: Declaration(zone, proxy, mode, scope, pos, kVariableDeclaration) {} : Declaration(proxy, mode, scope, pos, kVariableDeclaration) {}
}; };
...@@ -547,10 +547,9 @@ class FunctionDeclaration final : public Declaration { ...@@ -547,10 +547,9 @@ class FunctionDeclaration final : public Declaration {
InitializationFlag initialization() const { return kCreatedInitialized; } InitializationFlag initialization() const { return kCreatedInitialized; }
protected: protected:
FunctionDeclaration(Zone* zone, VariableProxy* proxy, VariableMode mode, FunctionDeclaration(VariableProxy* proxy, VariableMode mode,
FunctionLiteral* fun, Scope* scope, int pos) FunctionLiteral* fun, Scope* scope, int pos)
: Declaration(zone, proxy, mode, scope, pos, kFunctionDeclaration), : Declaration(proxy, mode, scope, pos, kFunctionDeclaration), fun_(fun) {
fun_(fun) {
DCHECK(mode == VAR || mode == LET || mode == CONST); DCHECK(mode == VAR || mode == LET || mode == CONST);
DCHECK(fun != NULL); DCHECK(fun != NULL);
} }
...@@ -3075,7 +3074,7 @@ class AstNodeFactory final BASE_EMBEDDED { ...@@ -3075,7 +3074,7 @@ class AstNodeFactory final BASE_EMBEDDED {
VariableDeclaration* NewVariableDeclaration(VariableProxy* proxy, VariableDeclaration* NewVariableDeclaration(VariableProxy* proxy,
VariableMode mode, Scope* scope, VariableMode mode, Scope* scope,
int pos) { int pos) {
return new (zone_) VariableDeclaration(zone_, proxy, mode, scope, pos); return new (zone_) VariableDeclaration(proxy, mode, scope, pos);
} }
FunctionDeclaration* NewFunctionDeclaration(VariableProxy* proxy, FunctionDeclaration* NewFunctionDeclaration(VariableProxy* proxy,
...@@ -3083,7 +3082,7 @@ class AstNodeFactory final BASE_EMBEDDED { ...@@ -3083,7 +3082,7 @@ class AstNodeFactory final BASE_EMBEDDED {
FunctionLiteral* fun, FunctionLiteral* fun,
Scope* scope, Scope* scope,
int pos) { int pos) {
return new (zone_) FunctionDeclaration(zone_, proxy, mode, fun, scope, pos); return new (zone_) FunctionDeclaration(proxy, mode, fun, scope, pos);
} }
Block* NewBlock(ZoneList<const AstRawString*>* labels, int capacity, Block* NewBlock(ZoneList<const AstRawString*>* labels, int capacity,
......
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