Index: src/ast/scopeinfo.cc |
diff --git a/src/ast/scopeinfo.cc b/src/ast/scopeinfo.cc |
index e4d304116547bcc53e224923a721745ef08d5158..5d0212c750b5916c1d95de1da83f9692a9f47643 100644 |
--- a/src/ast/scopeinfo.cc |
+++ b/src/ast/scopeinfo.cc |
@@ -647,8 +647,12 @@ |
int entry = ModuleVariablesIndex(); |
for (int i = 0; i < module_vars_count; ++i) { |
if (*name == get(entry + kModuleVariableNameOffset)) { |
- int index; |
- ModuleVariable(i, nullptr, &index, mode, init_flag, maybe_assigned_flag); |
+ int index = Smi::cast(get(entry + kModuleVariableIndexOffset))->value(); |
+ int properties = |
+ Smi::cast(get(entry + kModuleVariablePropertiesOffset))->value(); |
+ *mode = VariableModeField::decode(properties); |
+ *init_flag = InitFlagField::decode(properties); |
+ *maybe_assigned_flag = MaybeAssignedFlagField::decode(properties); |
return index; |
} |
entry += kModuleVariableEntryLength; |
@@ -790,34 +794,6 @@ |
int ScopeInfo::ModuleVariablesIndex() { return ModuleVariableCountIndex() + 1; } |
-void ScopeInfo::ModuleVariable(int i, String** name, int* index, |
- VariableMode* mode, |
- InitializationFlag* init_flag, |
- MaybeAssignedFlag* maybe_assigned_flag) { |
- DCHECK_LE(0, i); |
- DCHECK_LT(i, Smi::cast(get(ModuleVariableCountIndex()))->value()); |
- |
- int entry = ModuleVariablesIndex() + i * kModuleVariableEntryLength; |
- int properties = |
- Smi::cast(get(entry + kModuleVariablePropertiesOffset))->value(); |
- |
- if (name != nullptr) { |
- *name = String::cast(get(entry + kModuleVariableNameOffset)); |
- } |
- if (index != nullptr) { |
- *index = Smi::cast(get(entry + kModuleVariableIndexOffset))->value(); |
- } |
- if (mode != nullptr) { |
- *mode = VariableModeField::decode(properties); |
- } |
- if (init_flag != nullptr) { |
- *init_flag = InitFlagField::decode(properties); |
- } |
- if (maybe_assigned_flag != nullptr) { |
- *maybe_assigned_flag = MaybeAssignedFlagField::decode(properties); |
- } |
-} |
- |
#ifdef DEBUG |
static void PrintList(const char* list_name, |
@@ -928,20 +904,5 @@ |
return result; |
} |
-Handle<ModuleInfoEntry> ModuleInfo::LookupRegularImport( |
- Handle<ModuleInfo> info, Handle<String> local_name) { |
- Isolate* isolate = info->GetIsolate(); |
- Handle<FixedArray> regular_imports(info->regular_imports(), isolate); |
- for (int i = 0, n = regular_imports->length(); i < n; ++i) { |
- Handle<ModuleInfoEntry> entry( |
- ModuleInfoEntry::cast(regular_imports->get(i)), isolate); |
- if (String::cast(entry->local_name())->Equals(*local_name)) { |
- return entry; |
- } |
- } |
- UNREACHABLE(); |
- return Handle<ModuleInfoEntry>(); |
-} |
- |
} // namespace internal |
} // namespace v8 |