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

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

Issue 2465283004: [modules] Maintain array of cells for imports and local exports. (Closed)
Patch Set: Rename parameter also in header file. Created 4 years, 1 month 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
« no previous file with comments | « src/runtime/runtime.h ('k') | test/cctest/interpreter/bytecode_expectations/Modules.golden » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/runtime/runtime-module.cc
diff --git a/src/runtime/runtime-module.cc b/src/runtime/runtime-module.cc
index 9f28f5d25acab2de6d0b61db8ae17221df812147..2b813430e07b0e6155ad5184c8e986f727a45a20 100644
--- a/src/runtime/runtime-module.cc
+++ b/src/runtime/runtime-module.cc
@@ -17,30 +17,21 @@ RUNTIME_FUNCTION(Runtime_GetModuleNamespace) {
return *Module::GetModuleNamespace(module, module_request);
}
-RUNTIME_FUNCTION(Runtime_LoadModuleExport) {
+RUNTIME_FUNCTION(Runtime_LoadModuleVariable) {
HandleScope scope(isolate);
DCHECK(args.length() == 1);
- CONVERT_ARG_HANDLE_CHECKED(String, name, 0);
+ CONVERT_SMI_ARG_CHECKED(index, 0);
Handle<Module> module(isolate->context()->module());
- return *Module::LoadExport(module, name);
+ return *Module::LoadVariable(module, index);
}
-RUNTIME_FUNCTION(Runtime_LoadModuleImport) {
+RUNTIME_FUNCTION(Runtime_StoreModuleVariable) {
HandleScope scope(isolate);
DCHECK(args.length() == 2);
- CONVERT_ARG_HANDLE_CHECKED(String, name, 0);
- CONVERT_SMI_ARG_CHECKED(module_request, 1);
- Handle<Module> module(isolate->context()->module());
- return *Module::LoadImport(module, name, module_request);
-}
-
-RUNTIME_FUNCTION(Runtime_StoreModuleExport) {
- HandleScope scope(isolate);
- DCHECK(args.length() == 2);
- CONVERT_ARG_HANDLE_CHECKED(String, name, 0);
+ CONVERT_SMI_ARG_CHECKED(index, 0);
CONVERT_ARG_HANDLE_CHECKED(Object, value, 1);
Handle<Module> module(isolate->context()->module());
- Module::StoreExport(module, name, value);
+ Module::StoreVariable(module, index, value);
return isolate->heap()->undefined_value();
}
« no previous file with comments | « src/runtime/runtime.h ('k') | test/cctest/interpreter/bytecode_expectations/Modules.golden » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698