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

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

Issue 2362083002: [modules] Do basic linking. (Closed)
Patch Set: Rename files because the presubmit tool is so fragile. Created 4 years, 3 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/api.cc ('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/zone-containers.h" 10 #include "src/zone/zone-containers.h"
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 129
130 void AddRegularExport(Entry* entry) { 130 void AddRegularExport(Entry* entry) {
131 DCHECK_NOT_NULL(entry->export_name); 131 DCHECK_NOT_NULL(entry->export_name);
132 DCHECK_NOT_NULL(entry->local_name); 132 DCHECK_NOT_NULL(entry->local_name);
133 DCHECK_NULL(entry->import_name); 133 DCHECK_NULL(entry->import_name);
134 DCHECK_LT(entry->module_request, 0); 134 DCHECK_LT(entry->module_request, 0);
135 regular_exports_.insert(std::make_pair(entry->local_name, entry)); 135 regular_exports_.insert(std::make_pair(entry->local_name, entry));
136 } 136 }
137 137
138 void AddSpecialExport(const Entry* entry, Zone* zone) { 138 void AddSpecialExport(const Entry* entry, Zone* zone) {
139 DCHECK_NULL(entry->local_name);
139 DCHECK_LE(0, entry->module_request); 140 DCHECK_LE(0, entry->module_request);
140 special_exports_.Add(entry, zone); 141 special_exports_.Add(entry, zone);
141 } 142 }
142 143
143 void AddRegularImport(const Entry* entry) { 144 void AddRegularImport(const Entry* entry) {
144 DCHECK_NOT_NULL(entry->import_name); 145 DCHECK_NOT_NULL(entry->import_name);
145 DCHECK_NOT_NULL(entry->local_name); 146 DCHECK_NOT_NULL(entry->local_name);
146 DCHECK_NULL(entry->export_name); 147 DCHECK_NULL(entry->export_name);
147 DCHECK_LE(0, entry->module_request); 148 DCHECK_LE(0, entry->module_request);
148 regular_imports_.insert(std::make_pair(entry->local_name, entry)); 149 regular_imports_.insert(std::make_pair(entry->local_name, entry));
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 .insert(std::make_pair(specifier, module_requests_.size())) 198 .insert(std::make_pair(specifier, module_requests_.size()))
198 .first; 199 .first;
199 return it->second; 200 return it->second;
200 } 201 }
201 }; 202 };
202 203
203 } // namespace internal 204 } // namespace internal
204 } // namespace v8 205 } // namespace v8
205 206
206 #endif // V8_AST_MODULES_H_ 207 #endif // V8_AST_MODULES_H_
OLDNEW
« no previous file with comments | « src/api.cc ('k') | src/ast/modules.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698