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

Unified Diff: src/runtime/runtime-object.cc

Issue 2360063002: [modules] Basic support of import statements. (Closed)
Patch Set: . 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
« src/interpreter/bytecode-generator.cc ('K') | « src/runtime/runtime.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/runtime/runtime-object.cc
diff --git a/src/runtime/runtime-object.cc b/src/runtime/runtime-object.cc
index b503d101075897780ee49c08294f70398d3d5f70..70ed23ba6190ba6b58cd234982156ac0f47e1ad5 100644
--- a/src/runtime/runtime-object.cc
+++ b/src/runtime/runtime-object.cc
@@ -968,6 +968,15 @@ RUNTIME_FUNCTION(Runtime_LoadModuleExport) {
return *Module::LoadExport(module, name);
}
+RUNTIME_FUNCTION(Runtime_LoadModuleImport) {
+ HandleScope scope(isolate);
+ DCHECK(args.length() == 2);
+ CONVERT_ARG_HANDLE_CHECKED(String, name, 0);
+ CONVERT_ARG_HANDLE_CHECKED(Smi, module_request, 1);
+ Handle<Module> module(isolate->context()->module());
+ return *Module::LoadImport(module, name, module_request->value());
+}
+
RUNTIME_FUNCTION(Runtime_StoreModuleExport) {
HandleScope scope(isolate);
DCHECK(args.length() == 2);
« src/interpreter/bytecode-generator.cc ('K') | « src/runtime/runtime.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698