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

Unified Diff: src/debug/debug-scopes.cc

Issue 2465283004: [modules] Maintain array of cells for imports and local exports. (Closed)
Patch Set: Rename parameter also in header file. Created 4 years, 1 month 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/modules.cc ('k') | src/factory.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/debug/debug-scopes.cc
diff --git a/src/debug/debug-scopes.cc b/src/debug/debug-scopes.cc
index b0b6194d6acb69f2d5a668b59d6736b1491f7084..c84d32ae7da7e2ecd89c072a72f38d81a5bd0dd5 100644
--- a/src/debug/debug-scopes.cc
+++ b/src/debug/debug-scopes.cc
@@ -794,29 +794,14 @@ void ScopeIterator::CopyModuleVarsToScopeObject(Handle<ScopeInfo> scope_info,
->value();
for (int i = 0; i < module_variable_count; ++i) {
Handle<String> local_name;
- bool is_export;
+ Handle<Object> value;
{
String* name;
int index;
scope_info->ModuleVariable(i, &name, &index);
CHECK(!ScopeInfo::VariableIsSynthetic(name));
local_name = handle(name, isolate);
- DCHECK_NE(index, 0);
- is_export = index > 0;
- }
-
- Handle<Object> value;
- if (is_export) {
- value =
- Module::LoadExport(handle(context->module(), isolate), local_name);
- } else {
- Handle<ModuleInfo> module_info(scope_info->ModuleDescriptorInfo(),
- isolate);
- Handle<ModuleInfoEntry> entry =
- ModuleInfo::LookupRegularImport(module_info, local_name);
- Handle<String> import_name(String::cast(entry->import_name()), isolate);
- value = Module::LoadImport(handle(context->module(), isolate),
- import_name, entry->module_request());
+ value = Module::LoadVariable(handle(context->module(), isolate), index);
}
// Reflect variables under TDZ as undefined in scope object.
« no previous file with comments | « src/ast/modules.cc ('k') | src/factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698