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

Unified Diff: src/ast.h

Issue 948303004: Re-introduce ImportDeclaration to the parser (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Merged to trunk so I can run tryjobs Created 5 years, 10 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/ast-numbering.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 9b86d0b51292f6291b734962af0f8912e8218f4d..b18d81ca1558cef49ddbb8e986a5125d8e4b91b0 100644
--- a/src/ast.h
+++ b/src/ast.h
@@ -609,23 +609,27 @@ class ImportDeclaration FINAL : public Declaration {
public:
DECLARE_NODE_TYPE(ImportDeclaration)
- Module* module() const { return module_; }
+ 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 OVERRIDE {
- return kCreatedInitialized;
+ return kNeedsInitialization;
}
protected:
- ImportDeclaration(Zone* zone,
- VariableProxy* proxy,
- Module* module,
- Scope* scope,
- int pos)
- : Declaration(zone, proxy, LET, scope, pos),
- module_(module) {
- }
+ ImportDeclaration(Zone* zone, VariableProxy* proxy,
+ const AstRawString* import_name,
+ const AstRawString* module_specifier, Scope* scope, int pos)
+ : Declaration(zone, proxy, IMPORT, scope, pos),
+ import_name_(import_name),
+ module_specifier_(module_specifier) {}
private:
- Module* module_;
+ const AstRawString* import_name_;
+ const AstRawString* module_specifier_;
};
@@ -3155,10 +3159,11 @@ class AstNodeFactory FINAL BASE_EMBEDDED {
}
ImportDeclaration* NewImportDeclaration(VariableProxy* proxy,
- Module* module,
- Scope* scope,
- int pos) {
- return new (zone_) ImportDeclaration(zone_, proxy, module, scope, pos);
+ const AstRawString* import_name,
+ const AstRawString* module_specifier,
+ Scope* scope, int pos) {
+ return new (zone_) ImportDeclaration(zone_, proxy, import_name,
+ module_specifier, scope, pos);
}
ExportDeclaration* NewExportDeclaration(VariableProxy* proxy,
« no previous file with comments | « no previous file | src/ast-numbering.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698