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

Unified Diff: src/ast/scopes.cc

Issue 2353403003: [modules] Support exporting a local variable under multiple export names. (Closed)
Patch Set: Comments 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 e2c2ad4e9d16cdbc3bf46bd149b79386917f42a4..f4dcea38dc6141e8851701fba17ce7f134c9c300 100644
--- a/src/ast/scopes.cc
+++ b/src/ast/scopes.cc
@@ -167,7 +167,7 @@ ModuleScope::ModuleScope(Isolate* isolate, Handle<ScopeInfo> scope_info,
module_descriptor_ = new (zone) ModuleDescriptor(zone);
// Deserialize special exports.
- Handle<FixedArray> special_exports = handle(module_info->special_exports());
+ Handle<FixedArray> special_exports(module_info->special_exports(), isolate);
for (int i = 0, n = special_exports->length(); i < n; ++i) {
Handle<ModuleInfoEntry> serialized_entry(
ModuleInfoEntry::cast(special_exports->get(i)), isolate);
@@ -178,16 +178,12 @@ ModuleScope::ModuleScope(Isolate* isolate, Handle<ScopeInfo> scope_info,
}
// Deserialize regular exports.
- Handle<FixedArray> regular_exports = handle(module_info->regular_exports());
- for (int i = 0, n = regular_exports->length(); i < n; ++i) {
- Handle<ModuleInfoEntry> serialized_entry(
- ModuleInfoEntry::cast(regular_exports->get(i)), isolate);
- module_descriptor_->AddRegularExport(ModuleDescriptor::Entry::Deserialize(
- isolate, avfactory, serialized_entry));
- }
+ Handle<FixedArray> regular_exports(module_info->regular_exports(), isolate);
+ module_descriptor_->DeserializeRegularExports(isolate, avfactory,
+ regular_exports);
// Deserialize special imports.
- Handle<FixedArray> special_imports = handle(module_info->special_imports());
+ Handle<FixedArray> special_imports(module_info->special_imports(), isolate);
for (int i = 0, n = special_imports->length(); i < n; ++i) {
Handle<ModuleInfoEntry> serialized_entry(
ModuleInfoEntry::cast(special_imports->get(i)), isolate);
@@ -198,7 +194,7 @@ ModuleScope::ModuleScope(Isolate* isolate, Handle<ScopeInfo> scope_info,
}
// Deserialize regular imports.
- Handle<FixedArray> regular_imports = handle(module_info->regular_imports());
+ Handle<FixedArray> regular_imports(module_info->regular_imports(), isolate);
for (int i = 0, n = regular_imports->length(); i < n; ++i) {
Handle<ModuleInfoEntry> serialized_entry(
ModuleInfoEntry::cast(regular_imports->get(i)), isolate);
« 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