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

Unified Diff: src/ast.h

Issue 1087543004: [strong] Allow mutually recursive classes. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: . Created 5 years, 8 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 | src/parser.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ast.h
diff --git a/src/ast.h b/src/ast.h
index afb0684053114f370c8442997910924e397f2bca..7040ff78350bcfdc524114752ca33e559b0f1199 100644
--- a/src/ast.h
+++ b/src/ast.h
@@ -568,14 +568,15 @@ class VariableDeclaration FINAL : public Declaration {
return mode() == VAR ? kCreatedInitialized : kNeedsInitialization;
}
+ bool is_class_declaration() const { return is_class_declaration_; }
+
protected:
- VariableDeclaration(Zone* zone,
- VariableProxy* proxy,
- VariableMode mode,
- Scope* scope,
- int pos)
- : Declaration(zone, proxy, mode, scope, pos) {
- }
+ VariableDeclaration(Zone* zone, VariableProxy* proxy, VariableMode mode,
+ Scope* scope, int pos, bool is_class_declaration = false)
+ : Declaration(zone, proxy, mode, scope, pos),
+ is_class_declaration_(is_class_declaration) {}
+
+ bool is_class_declaration_;
};
@@ -3215,11 +3216,11 @@ class AstNodeFactory FINAL BASE_EMBEDDED {
: zone_(ast_value_factory->zone()),
ast_value_factory_(ast_value_factory) {}
- VariableDeclaration* NewVariableDeclaration(VariableProxy* proxy,
- VariableMode mode,
- Scope* scope,
- int pos) {
- return new (zone_) VariableDeclaration(zone_, proxy, mode, scope, pos);
+ VariableDeclaration* NewVariableDeclaration(
+ VariableProxy* proxy, VariableMode mode, Scope* scope, int pos,
+ bool is_class_declaration = false) {
+ return new (zone_) VariableDeclaration(zone_, proxy, mode, scope, pos,
+ is_class_declaration);
}
FunctionDeclaration* NewFunctionDeclaration(VariableProxy* proxy,
« no previous file with comments | « no previous file | src/parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698