diff options
Diffstat (limited to 'js/src/vm')
-rw-r--r-- | js/src/vm/CommonPropertyNames.h | 4 | ||||
-rw-r--r-- | js/src/vm/SelfHosting.cpp | 19 |
2 files changed, 5 insertions, 18 deletions
diff --git a/js/src/vm/CommonPropertyNames.h b/js/src/vm/CommonPropertyNames.h index b4a2de6f3..aa555886e 100644 --- a/js/src/vm/CommonPropertyNames.h +++ b/js/src/vm/CommonPropertyNames.h @@ -227,8 +227,8 @@ macro(missingArguments, missingArguments, "missingArguments") \ macro(module, module, "module") \ macro(Module, Module, "Module") \ - macro(ModuleDeclarationInstantiation, ModuleDeclarationInstantiation, "ModuleDeclarationInstantiation") \ - macro(ModuleEvaluation, ModuleEvaluation, "ModuleEvaluation") \ + macro(ModuleInstantiate, ModuleInstantiate, "ModuleInstantiate") \ + macro(ModuleEvaluate, ModuleEvaluate, "ModuleEvaluate") \ macro(month, month, "month") \ macro(multiline, multiline, "multiline") \ macro(name, name, "name") \ diff --git a/js/src/vm/SelfHosting.cpp b/js/src/vm/SelfHosting.cpp index 2216bf91e..89750d61a 100644 --- a/js/src/vm/SelfHosting.cpp +++ b/js/src/vm/SelfHosting.cpp @@ -2060,24 +2060,12 @@ intrinsic_InstantiateModuleFunctionDeclarations(JSContext* cx, unsigned argc, Va } static bool -intrinsic_SetModuleState(JSContext* cx, unsigned argc, Value* vp) -{ - CallArgs args = CallArgsFromVp(argc, vp); - MOZ_ASSERT(args.length() == 2); - RootedModuleObject module(cx, &args[0].toObject().as<ModuleObject>()); - ModuleState newState = args[1].toInt32(); - module->setState(newState); - args.rval().setUndefined(); - return true; -} - -static bool -intrinsic_EvaluateModule(JSContext* cx, unsigned argc, Value* vp) +intrinsic_ExecuteModule(JSContext* cx, unsigned argc, Value* vp) { CallArgs args = CallArgsFromVp(argc, vp); MOZ_ASSERT(args.length() == 1); RootedModuleObject module(cx, &args[0].toObject().as<ModuleObject>()); - return ModuleObject::evaluate(cx, module, args.rval()); + return ModuleObject::execute(cx, module, args.rval()); } static bool @@ -2630,8 +2618,7 @@ static const JSFunctionSpec intrinsic_functions[] = { JS_FN("CreateNamespaceBinding", intrinsic_CreateNamespaceBinding, 3, 0), JS_FN("InstantiateModuleFunctionDeclarations", intrinsic_InstantiateModuleFunctionDeclarations, 1, 0), - JS_FN("SetModuleState", intrinsic_SetModuleState, 1, 0), - JS_FN("EvaluateModule", intrinsic_EvaluateModule, 1, 0), + JS_FN("ExecuteModule", intrinsic_ExecuteModule, 1, 0), JS_FN("NewModuleNamespace", intrinsic_NewModuleNamespace, 2, 0), JS_FN("AddModuleNamespaceBinding", intrinsic_AddModuleNamespaceBinding, 4, 0), JS_FN("ModuleNamespaceExports", intrinsic_ModuleNamespaceExports, 1, 0), |