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

Unified Diff: src/ast/scopes.cc

Issue 2357003002: [modules] Also (de-)serialize imports. (Closed)
Patch Set: 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/ast/scopeinfo.cc ('k') | src/objects.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ast/scopes.cc
diff --git a/src/ast/scopes.cc b/src/ast/scopes.cc
index af20ea65795b8305066354a64370a02d01e2c99e..e2c2ad4e9d16cdbc3bf46bd149b79386917f42a4 100644
--- a/src/ast/scopes.cc
+++ b/src/ast/scopes.cc
@@ -185,6 +185,26 @@ ModuleScope::ModuleScope(Isolate* isolate, Handle<ScopeInfo> scope_info,
module_descriptor_->AddRegularExport(ModuleDescriptor::Entry::Deserialize(
isolate, avfactory, serialized_entry));
}
+
+ // Deserialize special imports.
+ Handle<FixedArray> special_imports = handle(module_info->special_imports());
+ for (int i = 0, n = special_imports->length(); i < n; ++i) {
+ Handle<ModuleInfoEntry> serialized_entry(
+ ModuleInfoEntry::cast(special_imports->get(i)), isolate);
+ module_descriptor_->AddSpecialImport(
+ ModuleDescriptor::Entry::Deserialize(isolate, avfactory,
+ serialized_entry),
+ avfactory->zone());
+ }
+
+ // Deserialize regular imports.
+ Handle<FixedArray> regular_imports = handle(module_info->regular_imports());
+ for (int i = 0, n = regular_imports->length(); i < n; ++i) {
+ Handle<ModuleInfoEntry> serialized_entry(
+ ModuleInfoEntry::cast(regular_imports->get(i)), isolate);
+ module_descriptor_->AddRegularImport(ModuleDescriptor::Entry::Deserialize(
+ isolate, avfactory, serialized_entry));
+ }
}
Scope::Scope(Zone* zone, ScopeType scope_type, Handle<ScopeInfo> scope_info)
« no previous file with comments | « src/ast/scopeinfo.cc ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698