From 57523a0debf898dc9583bfbc6c12f3e024f40b23 Mon Sep 17 00:00:00 2001 From: Moonchild Date: Fri, 3 Jul 2020 14:05:40 +0000 Subject: Issue #618 - Update code comments for ModuleInstantiate --- js/src/frontend/BytecodeEmitter.cpp | 2 +- js/src/frontend/Parser.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'js/src/frontend') diff --git a/js/src/frontend/BytecodeEmitter.cpp b/js/src/frontend/BytecodeEmitter.cpp index 18cc7d954..654336a64 100644 --- a/js/src/frontend/BytecodeEmitter.cpp +++ b/js/src/frontend/BytecodeEmitter.cpp @@ -8261,7 +8261,7 @@ BytecodeEmitter::emitFunction(ParseNode* pn, bool needsProto) if (topLevelFunction) { if (sc->isModuleContext()) { // For modules, we record the function and instantiate the binding - // during ModuleDeclarationInstantiation(), before the script is run. + // during ModuleInstantiate(), before the script is run. RootedModuleObject module(cx, sc->asModuleContext()->module()); if (!module->noteFunctionDeclaration(cx, name, fun)) diff --git a/js/src/frontend/Parser.cpp b/js/src/frontend/Parser.cpp index 810d589be..59783a759 100644 --- a/js/src/frontend/Parser.cpp +++ b/js/src/frontend/Parser.cpp @@ -5038,7 +5038,7 @@ Parser::namedImportsOrNamespaceImport(TokenKind tt, Node impor // Namespace imports are are not indirect bindings but lexical // definitions that hold a module namespace object. They are treated // as const variables which are initialized during the - // ModuleDeclarationInstantiation step. + // ModuleInstantiate step. RootedPropertyName bindingName(context, importedBinding()); if (!bindingName) return false; -- cgit v1.2.3 From 83abc5af599d4531c68c2e7a84caab9545854594 Mon Sep 17 00:00:00 2001 From: Moonchild Date: Sat, 4 Jul 2020 23:12:13 +0000 Subject: Issue #618 - Report source position information (line/column) Report source position information for module export resolution failures. Ref: BZ 1362098 --- js/src/frontend/BytecodeCompiler.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'js/src/frontend') diff --git a/js/src/frontend/BytecodeCompiler.cpp b/js/src/frontend/BytecodeCompiler.cpp index ccfe3cd2e..3c2bcc1ed 100644 --- a/js/src/frontend/BytecodeCompiler.cpp +++ b/js/src/frontend/BytecodeCompiler.cpp @@ -405,7 +405,7 @@ BytecodeCompiler::compileModule() module->init(script); - ModuleBuilder builder(cx, module); + ModuleBuilder builder(cx, module, parser->tokenStream); ModuleSharedContext modulesc(cx, module, enclosingScope, builder); ParseNode* pn = parser->moduleBody(&modulesc); if (!pn) -- cgit v1.2.3