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

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

Issue 2212383003: Revert of Separate Scope into DeclarationScope and Scope (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 | « src/ast/ast-traversal-visitor.h ('k') | 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.h" 10 #include "src/zone.h"
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 const AstRawString* export_name, const AstRawString* import_name, 56 const AstRawString* export_name, const AstRawString* import_name,
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 bool Validate(DeclarationScope* module_scope, 66 bool Validate(
67 PendingCompilationErrorHandler* error_handler, 67 Scope* module_scope, PendingCompilationErrorHandler* error_handler,
68 Zone* zone) const; 68 Zone* zone) const;
69
69 70
70 private: 71 private:
71 struct ModuleEntry : public ZoneObject { 72 struct ModuleEntry : public ZoneObject {
72 const Scanner::Location location; 73 const Scanner::Location location;
73 const AstRawString* export_name; 74 const AstRawString* export_name;
74 const AstRawString* local_name; 75 const AstRawString* local_name;
75 const AstRawString* import_name; 76 const AstRawString* import_name;
76 const AstRawString* module_request; 77 const AstRawString* module_request;
77 78
78 explicit ModuleEntry(Scanner::Location loc) 79 explicit ModuleEntry(Scanner::Location loc)
79 : location(loc), 80 : location(loc),
80 export_name(nullptr), 81 export_name(nullptr),
81 local_name(nullptr), 82 local_name(nullptr),
82 import_name(nullptr), 83 import_name(nullptr),
83 module_request(nullptr) {} 84 module_request(nullptr) {}
84 }; 85 };
85 86
86 ZoneList<const ModuleEntry*> exports_; 87 ZoneList<const ModuleEntry*> exports_;
87 ZoneList<const ModuleEntry*> imports_; 88 ZoneList<const ModuleEntry*> imports_;
88 }; 89 };
89 90
90 } // namespace internal 91 } // namespace internal
91 } // namespace v8 92 } // namespace v8
92 93
93 #endif // V8_AST_MODULES_H_ 94 #endif // V8_AST_MODULES_H_
OLDNEW
« no previous file with comments | « src/ast/ast-traversal-visitor.h ('k') | src/ast/modules.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698