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

Unified Diff: src/parser.cc

Issue 935723004: Rename Interface to ModuleDescriptor (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 10 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') | src/ppc/full-codegen-ppc.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 87561ad2d25f75a0eb924fffeac3e767f108fcf3..bb8cb52b75068f0aee6941880fd7d1ecfe58bd29 100644
--- a/src/parser.cc
+++ b/src/parser.cc
@@ -1278,9 +1278,9 @@ Statement* Parser::ParseModule(bool* ok) {
body->set_scope(scope);
// Check that all exports are bound.
- Interface* interface = scope->interface();
- for (Interface::Iterator it = interface->iterator();
- !it.done(); it.Advance()) {
+ ModuleDescriptor* descriptor = scope->module();
+ for (ModuleDescriptor::Iterator it = descriptor->iterator(); !it.done();
+ it.Advance()) {
if (scope->LookupLocal(it.name()) == NULL) {
ParserTraits::ReportMessage("module_export_undefined", it.name());
*ok = false;
@@ -1288,7 +1288,7 @@ Statement* Parser::ParseModule(bool* ok) {
}
}
- scope->interface()->Freeze();
+ scope->module()->Freeze();
return body;
}
@@ -1500,7 +1500,7 @@ Statement* Parser::ParseExportDefault(bool* ok) {
}
}
- // TODO(ES6): Add default export to scope_->interface()
+ // TODO(ES6): Add default export to scope_->module()
return result;
}
@@ -1605,16 +1605,12 @@ Statement* Parser::ParseExportDeclaration(bool* ok) {
// TODO(ES6): Handle 'export from' once imports are properly implemented.
// For now we just drop such exports on the floor.
if (!is_export_from) {
- // Extract declared names into export declarations and interface.
- Interface* interface = scope_->interface();
+ // Extract declared names into export declarations and module descriptor.
+ ModuleDescriptor* descriptor = scope_->module();
for (int i = 0; i < names.length(); ++i) {
-#ifdef DEBUG
- if (FLAG_print_interface_details)
- PrintF("# Export %.*s ", names[i]->length(), names[i]->raw_data());
-#endif
// TODO(adamk): Make early errors here provide the right error message
// (duplicate exported names).
- interface->Add(names[i], zone(), CHECK_OK);
+ descriptor->Add(names[i], zone(), CHECK_OK);
// TODO(rossberg): Rethink whether we actually need to store export
// declarations (for compilation?).
// ExportDeclaration* declaration =
« no previous file with comments | « src/modules.cc ('k') | src/ppc/full-codegen-ppc.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698