Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(303)

Unified Diff: src/ast/ast.h

Issue 2219853002: Cleanup: Declaration doesn't need to know Zone. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ast/ast.h
diff --git a/src/ast/ast.h b/src/ast/ast.h
index c8171a5c482c7f618cce6a39b87324a1c26c719e..1b57b18934f20cea6f0de8793a354533e5a4047b 100644
--- a/src/ast/ast.h
+++ b/src/ast/ast.h
@@ -508,8 +508,8 @@ class Declaration : public AstNode {
InitializationFlag initialization() const;
protected:
- Declaration(Zone* zone, VariableProxy* proxy, VariableMode mode, Scope* scope,
- int pos, NodeType type)
+ Declaration(VariableProxy* proxy, VariableMode mode, Scope* scope, int pos,
+ NodeType type)
: AstNode(pos, type), mode_(mode), proxy_(proxy), scope_(scope) {
DCHECK(IsDeclaredVariableMode(mode));
}
@@ -532,9 +532,9 @@ class VariableDeclaration final : public Declaration {
}
protected:
- VariableDeclaration(Zone* zone, VariableProxy* proxy, VariableMode mode,
- Scope* scope, int pos)
- : Declaration(zone, proxy, mode, scope, pos, kVariableDeclaration) {}
+ VariableDeclaration(VariableProxy* proxy, VariableMode mode, Scope* scope,
+ int pos)
+ : Declaration(proxy, mode, scope, pos, kVariableDeclaration) {}
};
@@ -547,10 +547,9 @@ class FunctionDeclaration final : public Declaration {
InitializationFlag initialization() const { return kCreatedInitialized; }
protected:
- FunctionDeclaration(Zone* zone, VariableProxy* proxy, VariableMode mode,
+ FunctionDeclaration(VariableProxy* proxy, VariableMode mode,
FunctionLiteral* fun, Scope* scope, int pos)
- : Declaration(zone, proxy, mode, scope, pos, kFunctionDeclaration),
- fun_(fun) {
+ : Declaration(proxy, mode, scope, pos, kFunctionDeclaration), fun_(fun) {
DCHECK(mode == VAR || mode == LET || mode == CONST);
DCHECK(fun != NULL);
}
@@ -3060,7 +3059,7 @@ class AstNodeFactory final BASE_EMBEDDED {
VariableDeclaration* NewVariableDeclaration(VariableProxy* proxy,
VariableMode mode, Scope* scope,
int pos) {
- return new (zone_) VariableDeclaration(zone_, proxy, mode, scope, pos);
+ return new (zone_) VariableDeclaration(proxy, mode, scope, pos);
}
FunctionDeclaration* NewFunctionDeclaration(VariableProxy* proxy,
@@ -3068,7 +3067,7 @@ class AstNodeFactory final BASE_EMBEDDED {
FunctionLiteral* fun,
Scope* scope,
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,
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698