Index: src/objects.cc |
diff --git a/src/objects.cc b/src/objects.cc |
index 9e633721fdeade0852f815df56fc9f7a11c35769..4a096aac44b12c1e453b1e01a8b869aaced80114 100644 |
--- a/src/objects.cc |
+++ b/src/objects.cc |
@@ -19608,5 +19608,16 @@ Handle<Object> Module::LoadExport(Handle<Module> module, Handle<String> name) { |
return handle(cell->value(), isolate); |
} |
+Handle<Object> Module::LoadImport(Handle<Module> module, Handle<String> name, |
+ int module_request) { |
+ Isolate* isolate = module->GetIsolate(); |
+ Handle<Module> requested_module( |
+ Module::cast(module->requested_modules()->get(module_request)), isolate); |
+ Handle<ObjectHashTable> exports(requested_module->exports(), isolate); |
+ Object* object = exports->Lookup(name); |
+ if (!object->IsCell()) UNIMPLEMENTED(); |
+ return handle(Cell::cast(object)->value(), isolate); |
+} |
+ |
} // namespace internal |
} // namespace v8 |