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

Side by Side Diff: src/ast/modules.h

Issue 2252223002: Introduce ModuleScope subclass of DeclarationScope (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 unified diff | Download patch
« no previous file with comments | « no previous file | src/ast/modules.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_AST_MODULES_H_ 5 #ifndef V8_AST_MODULES_H_
6 #define V8_AST_MODULES_H_ 6 #define V8_AST_MODULES_H_
7 7
8 #include "src/parsing/scanner.h" // Only for Scanner::Location. 8 #include "src/parsing/scanner.h" // Only for Scanner::Location.
9 #include "src/pending-compilation-error-handler.h" 9 #include "src/pending-compilation-error-handler.h"
10 #include "src/zone-containers.h" 10 #include "src/zone-containers.h"
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 const AstRawString* module_request, const Scanner::Location loc, 57 const AstRawString* module_request, const Scanner::Location loc,
58 Zone* zone); 58 Zone* zone);
59 59
60 // export * from "foo.js"; 60 // export * from "foo.js";
61 void AddStarExport( 61 void AddStarExport(
62 const AstRawString* module_request, const Scanner::Location loc, 62 const AstRawString* module_request, const Scanner::Location loc,
63 Zone* zone); 63 Zone* zone);
64 64
65 // Check if module is well-formed and report error if not. 65 // Check if module is well-formed and report error if not.
66 // Also canonicalize indirect exports. 66 // Also canonicalize indirect exports.
67 bool Validate(DeclarationScope* module_scope, 67 bool Validate(ModuleScope* module_scope,
68 PendingCompilationErrorHandler* error_handler, Zone* zone); 68 PendingCompilationErrorHandler* error_handler, Zone* zone);
69 69
70 struct ModuleEntry : public ZoneObject { 70 struct ModuleEntry : public ZoneObject {
71 const Scanner::Location location; 71 const Scanner::Location location;
72 const AstRawString* export_name; 72 const AstRawString* export_name;
73 const AstRawString* local_name; 73 const AstRawString* local_name;
74 const AstRawString* import_name; 74 const AstRawString* import_name;
75 const AstRawString* module_request; 75 const AstRawString* module_request;
76 76
77 explicit ModuleEntry(Scanner::Location loc) 77 explicit ModuleEntry(Scanner::Location loc)
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 // into: 116 // into:
117 // import {a as b} from "X"; export {a as c} from "X"; 117 // import {a as b} from "X"; export {a as c} from "X";
118 // (The import entry is never deleted.) 118 // (The import entry is never deleted.)
119 void MakeIndirectExportsExplicit(); 119 void MakeIndirectExportsExplicit();
120 }; 120 };
121 121
122 } // namespace internal 122 } // namespace internal
123 } // namespace v8 123 } // namespace v8
124 124
125 #endif // V8_AST_MODULES_H_ 125 #endif // V8_AST_MODULES_H_
OLDNEW
« no previous file with comments | « no previous file | src/ast/modules.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698