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

Unified Diff: src/parser.cc

Issue 1078903002: Collect list of requested modules in ModuleDescriptor while parsing (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 8 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 | « src/modules.cc ('k') | test/cctest/test-parsing.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/parser.cc
diff --git a/src/parser.cc b/src/parser.cc
index 0dc013202f857d8398a72fb599c2b6daadc94ce1..fc4138d18621260079dc4a5b7263e68155b1982a 100644
--- a/src/parser.cc
+++ b/src/parser.cc
@@ -1560,6 +1560,8 @@ Statement* Parser::ParseImportDeclaration(bool* ok) {
const AstRawString* module_specifier = ParseModuleSpecifier(CHECK_OK);
ExpectSemicolon(CHECK_OK);
+ scope_->module()->AddModuleRequest(module_specifier, zone());
+
if (module_instance_binding != NULL) {
// TODO(ES6): Set the module specifier for the module namespace binding.
}
@@ -1697,6 +1699,8 @@ Statement* Parser::ParseExportDeclaration(bool* ok) {
}
}
} else {
+ scope_->module()->AddModuleRequest(indirect_export_module_specifier,
+ zone());
for (int i = 0; i < length; ++i) {
// TODO(ES6): scope_->module()->AddIndirectExport(...);(
}
« no previous file with comments | « src/modules.cc ('k') | test/cctest/test-parsing.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698