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

Unified Diff: src/ast/ast.h

Issue 2108193003: [modules] AST and parser rework. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@anonymous-declarations
Patch Set: Rebase. Created 4 years, 5 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 | « src/asmjs/asm-wasm-builder.cc ('k') | src/ast/ast.cc » ('j') | 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 18f7aeb67562ff45ddae28289d36fde4eb016f57..a2f39292f0c4e1071eb7734fc69ed78db9d991cb 100644
--- a/src/ast/ast.h
+++ b/src/ast/ast.h
@@ -39,8 +39,7 @@ namespace internal {
#define DECLARATION_NODE_LIST(V) \
V(VariableDeclaration) \
- V(FunctionDeclaration) \
- V(ImportDeclaration)
+ V(FunctionDeclaration)
#define ITERATION_NODE_LIST(V) \
V(DoWhileStatement) \
@@ -553,50 +552,6 @@ class FunctionDeclaration final : public Declaration {
};
-class ImportDeclaration final : public Declaration {
- public:
- DECLARE_NODE_TYPE(ImportDeclaration)
-
- const AstRawString* import_name() const { return import_name_; }
- const AstRawString* module_specifier() const { return module_specifier_; }
- void set_module_specifier(const AstRawString* module_specifier) {
- DCHECK(module_specifier_ == NULL);
- module_specifier_ = module_specifier;
- }
- InitializationFlag initialization() const { return kNeedsInitialization; }
-
- protected:
- ImportDeclaration(Zone* zone, VariableProxy* proxy,
- const AstRawString* import_name,
- const AstRawString* module_specifier, Scope* scope, int pos)
- : Declaration(zone, proxy, CONST, scope, pos, kImportDeclaration),
- import_name_(import_name),
- module_specifier_(module_specifier) {}
-
- private:
- const AstRawString* import_name_;
- const AstRawString* module_specifier_;
-};
-
-class Module final : public AstNode {
- public:
- ModuleDescriptor* descriptor() const { return descriptor_; }
- Block* body() const { return body_; }
-
- protected:
- Module(Zone* zone, int pos)
- : AstNode(pos, kModule),
- descriptor_(ModuleDescriptor::New(zone)),
- body_(NULL) {}
- Module(Zone* zone, ModuleDescriptor* descriptor, int pos, Block* body = NULL)
- : AstNode(pos, kModule), descriptor_(descriptor), body_(body) {}
-
- private:
- ModuleDescriptor* descriptor_;
- Block* body_;
-};
-
-
class IterationStatement : public BreakableStatement {
public:
Statement* body() const { return body_; }
@@ -3131,14 +3086,6 @@ class AstNodeFactory final BASE_EMBEDDED {
FunctionDeclaration(parser_zone_, proxy, mode, fun, scope, pos);
}
- ImportDeclaration* NewImportDeclaration(VariableProxy* proxy,
- const AstRawString* import_name,
- const AstRawString* module_specifier,
- Scope* scope, int pos) {
- return new (parser_zone_) ImportDeclaration(
- parser_zone_, proxy, import_name, module_specifier, scope, pos);
- }
-
Block* NewBlock(ZoneList<const AstRawString*>* labels, int capacity,
bool ignore_completion_value, int pos) {
return new (local_zone_)
« no previous file with comments | « src/asmjs/asm-wasm-builder.cc ('k') | src/ast/ast.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698