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

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

Issue 2388153003: [modules] Implement namespace imports. (Closed)
Patch Set: Fix verifier. Created 4 years, 2 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
Index: src/runtime/runtime-object.cc
diff --git a/src/runtime/runtime-object.cc b/src/runtime/runtime-object.cc
index 70ed23ba6190ba6b58cd234982156ac0f47e1ad5..fbaf9f305011412d53da7c8960cebae65ae3c031 100644
--- a/src/runtime/runtime-object.cc
+++ b/src/runtime/runtime-object.cc
@@ -960,6 +960,14 @@ RUNTIME_FUNCTION(Runtime_CreateDataProperty) {
return *value;
}
+RUNTIME_FUNCTION(Runtime_GetModuleNamespace) {
adamk 2016/10/04 18:26:53 It occurs to me that maybe these runtime functions
neis 2016/10/05 08:18:41 Yeah I was planning to do that eventually.
+ HandleScope scope(isolate);
+ DCHECK(args.length() == 1);
+ CONVERT_ARG_HANDLE_CHECKED(Smi, module_request, 0);
adamk 2016/10/04 18:26:53 You can use CONVERT_SMI_ARG_CHECKED here to get an
neis 2016/10/05 08:18:42 Done.
+ Handle<Module> module(isolate->context()->module());
adamk 2016/10/04 18:26:53 Seems a little scary to depend on the current cont
neis 2016/10/05 08:18:42 I don't understand. All the module runtime functi
adamk 2016/10/05 17:21:54 Sorry, you're right. Like I said, I need to rename
+ return *Module::GetModuleNamespace(module, module_request->value());
+}
+
RUNTIME_FUNCTION(Runtime_LoadModuleExport) {
HandleScope scope(isolate);
DCHECK(args.length() == 1);

Powered by Google App Engine
This is Rietveld 408576698