Chromium Code Reviews| 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_; } |
|
rossberg
2015/02/25 13:55:49
Hm, is it necessary that the specifier is duplicat
arv (Not doing code reviews)
2015/02/25 16:07:25
At the moment the actual import statement is not r
adamk
2015/02/25 21:43:12
I'm open to other suggestions, but I don't think i
rossberg
2015/02/26 07:52:07
But is this an adequate desugaring? Wouldn't those
|
| + 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, |