Commit 21bbdec5 authored by Jakob Kummerow's avatar Jakob Kummerow Committed by Commit Bot

[turbofan] Handlify JSModuleNamespace AccessInfo computation

For consistency with surrounding handlified code. No change in
functionality intended.

Change-Id: I8501514ce9caf94fc7e6fb45162fcfd3d730efcd
Reviewed-on: https://chromium-review.googlesource.com/671671Reviewed-by: 's avatarBenedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#48095}
parent b361ed51
...@@ -420,19 +420,20 @@ bool AccessInfoFactory::ComputePropertyAccessInfo( ...@@ -420,19 +420,20 @@ bool AccessInfoFactory::ComputePropertyAccessInfo(
Handle<PrototypeInfo> proto_info = Handle<PrototypeInfo> proto_info =
Map::GetOrCreatePrototypeInfo(map, isolate()); Map::GetOrCreatePrototypeInfo(map, isolate());
DCHECK(proto_info->weak_cell()->IsWeakCell()); DCHECK(proto_info->weak_cell()->IsWeakCell());
Object* obj = WeakCell::cast(proto_info->weak_cell())->value(); Handle<JSModuleNamespace> module_namespace(
DCHECK(obj->IsJSModuleNamespace()); JSModuleNamespace::cast(
ObjectHashTable* exports = WeakCell::cast(proto_info->weak_cell())->value()),
JSModuleNamespace::cast(obj)->module()->exports(); isolate());
Object* value = Handle<Cell> cell(
exports->Lookup(isolate(), name, Smi::ToInt(name->GetHash())); Cell::cast(module_namespace->module()->exports()->Lookup(
DCHECK(value->IsCell()); isolate(), name, Smi::ToInt(name->GetHash()))),
if (Cell::cast(value)->value()->IsTheHole(isolate())) { isolate());
if (cell->value()->IsTheHole(isolate())) {
// This module has not been fully initialized yet. // This module has not been fully initialized yet.
return false; return false;
} }
*access_info = PropertyAccessInfo::ModuleExport( *access_info = PropertyAccessInfo::ModuleExport(
MapHandles{receiver_map}, handle(Cell::cast(value), isolate())); MapHandles{receiver_map}, cell);
return true; return true;
} }
Handle<Object> accessors(descriptors->GetValue(number), isolate()); Handle<Object> accessors(descriptors->GetValue(number), isolate());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment