archives

« Bugzilla Issues Index

#2536 — chapter 15: misc editorial


----------------------------------------
In 15.2 "Modules":

15.2 / Syntax / prod 3:
ModuleItemList :
ModuleItem
ModuleItemList ModuleItem

This production disagrees with 15.2.0.{3,4,5,6,9,10,11,14} / group 1,
which all have:
ModuleItemList : [empty]

It's probably easier to change the defining syntax than all the uses.
But if you do, you'll also need to drop the 'opt' from
Module : ModuleBody_opt
to prevent ambiguity.
And you'll need to remove 15.2.0.9 / group 2, which has:
ModuleItemList : ModuleItem

----------------------------------------
In 15.2.0.2 "Static Semantics: DeclaredNames":

15.2.0.2 / group 2 / step 2:
Append to /names/ the elements of the VarDeclaratedNames of /ModuleBody/.
s|Declarated|Declared|

----------------------------------------
In 15.2.0.11 "Static Semantics: LexicalDeclarations":

15.2.0.11 / group 3 / step 1:
If the BoundNames of /ImportDeclarations/ is empty, then return an empty List.
Drop "s" from "ImportDeclarations".

15.2.0.11 / group 4 / step 1:
If /ExportDeclaration/ is export /Declaration/; then ...
Delete the semicolon.

----------------------------------------
In 15.2.0.13 "Static Semantics: VarDeclaredNames":

15.2.0.13 / group 3 / step 1:
If /ExportDeclaration/ is export /VariableStatement/; then ...
Delete the semicolon.

----------------------------------------
In 15.2.0.14 "Static Semantics: VarScopedDeclarations":

15.2.0.14 / group 4 / step 1:
If /ExportDeclaration/ is export /VariableStatement/; then ...
Delete the semicolon.

----------------------------------------
In 15.2.1.6 "Runtime Semantics: Module Objects":

15.2.1.6 / para 2:
Each property name is the StringValue of of the corresponding exported binding.
Delete extra "of".

----------------------------------------
In 15.2.2.1 "Static Semantics: BoundNames":

15.2.2.1 / group 2:
ExportDeclaration : export VariableStatement ;
Delete the semicolon.

15.2.2.1 / group 3:
ExportDeclaration : export Declaration ;
Delete the semicolon.

----------------------------------------
In 15.2.2.2 "Static Semantics: ExportedBindings":

15.2.2.2 / group 3 / production / rhs 2:
Delete syntactic parameter "[Default]".

15.2.2.2 / group 7 / production:
ExportDeclaration : export ExportClause FromClause_opt ;
Delete "opt" subscript.

----------------------------------------
In 15.2.2.3 "Static Semantics: ExportEntries":

15.2.2.3 / group 4 / production:
ExportDeclaration : export VariableStatement ;
Delete the semicolon.

15.2.2.3 / group 5 / production:
ExportDeclaration : export Declaration ;
Delete the semicolon.

----------------------------------------
In 15.2.3.1 "Loader Records and Loader Objects":

15.2.3.1 / Table 33 / last row:
After "[[LoaderObj]", add "]".

----------------------------------------
In 15.2.3.1.1 "CreateLoaderRecord(realm, object) Abstract Operation":

15.2.3.1.1 / step 3:
Set /loader/.[[ Modules]] to a new empty List.
Delete space before "Modules".

----------------------------------------
In 15.2.3.2 "Load Records and LoadRequest Objects":

15.2.3.2 / Table 34:
Add rows for [[Factory]] and [[GroupIndex]].

----------------------------------------
In 15.2.3.2.1 "CreateLoad(name) Abstract Operation":

Steps start at 7.

15.2.3.2.1 / step 11:
Set /load/.[[Metadata]] to /metadata/ ObjectCreate(%ObjectPrototype%).
Delete "metadata".

----------------------------------------
In 15.2.4.1 "LoadModule(loader, name, options) Abstract Operation":

15.2.4.1 / preamble:
The preamble doesn't say anything about the operation.

15.2.4.1 / step 1:
Assert: /loader/ is a Loader record.
Capitalize "record".

15.2.4.1 / step 9:
Return PromiseOfStartLoadPartwayThrough( ..., /source/, ...).
'source' is not defined

----------------------------------------
In 15.2.4.2 "RequestLoad(...) Abstract Operation":

15.2.4.2 / para 2:
The /loader/ argument is a Loader record.
Capitalize "record".

----------------------------------------
In 15.2.4.2.2 "GetOrCreateLoad(name) Functions":

15.2.4.2.2 / step 4:
Let /modules/ be the value of of /loaderRecord/.[[ Modules]],
Delete extra "of".
'loaderRecord' is not defined. Change to 'loader'?
Delete space before "Modules".

15.2.4.2.2 / step 5:
Repeat for each Record {...} /p/ that is an element of /loader/.[[ Modules], do
Delete space before "Modules", and add a "]".

15.2.4.2.2 / step 5.a.i:
Let /existingModule/ be the [[value]] field of that Record.
Change "the [[value]] field of that Record" to "/p/.[[value]]"

15.2.4.2.2 / step 6.a.i:
Assert: /load/.status is either "loading" or "loaded".
Change "status" to "[[Status]]"

15.2.4.2.2 / step 8:
Append /load/ to the the end of the List /loader/.[[Loads]].
Delete extra "the"

----------------------------------------
In 15.2.4.4 "ProceedToFetch(loader, load, p) Abstract Operation":

15.2.4.4 / step 4:
Set /F/'s [[AddressPromise]] internal slot to /p/.
This is the only mention of [[AddressPromise]].

----------------------------------------
In 15.2.4.4.1 "CallFetch(address) Functions":

15.2.4.4.1 / step 8:
If IsCallable(/hook/) is false, throw a *TypeError* exception.
Put "false" in bold.

----------------------------------------
In 15.2.4.5 "ProceedToTranslate(loader, load, p) Abstract Operation":

15.2.4.5 / step 7:
Set /F/'s [[Load]] to internal slot /load/.
s|to internal slot|internal slot to|

15.2.4.5 / step 10:
Set /F/'s [[Loader]] to internal slot /loader/.
s|to internal slot|internal slot to|

15.2.4.5 / step 11:
Set /F/'s [[Load]] to internal slot /load/.
s|to internal slot|internal slot to|

----------------------------------------
In 15.2.4.5.1 "CallTranslate Functions":

15.2.4.5.1 / step 6:
If IsCallable(/hook/) is false, throw a *TypeError* exception.
Put "false" in bold.

15.2.4.5.1 / step 7:
Let /obj/ be CreateLoadRequestObject(/load/.[[Name, ..., ", ...).
After "[[Name", add "]]"
Delete the quote+comma.

----------------------------------------
In 15.2.4.5.3 "InstantiateSucceeded(instantiateResult) Functions":

15.2.4.5.3 / step 5.c:
If /deps/ is undefined, then let /depsList/ be a new empty List.
Put "undefined" in bold.

15.2.4.5.3 / step 5.d.i:
... the result of calling the IterableToArray abstract operation ...
IterableToArray is not defined

----------------------------------------
In 15.2.4.5.4 "LoadFailed Functions":

15.2.4.5.4 / step 3:
Set /load/.[[Status]] to `"failed".
Delete backtick

----------------------------------------
In 15.2.4.6 "ProcessLoadDependencies(...) Abstract Operation":

15.2.4.6 / step 2:
Set /load/. [[Dependencies]] to a new empty List.
Delete space between dot and "[["

----------------------------------------
In 15.2.4.7 "PromiseOfStartLoadPartwayThrough (...)":

This algorithm has no preamble.

15.2.4.7 / step 3:
Set /F/'s [[StepState]] ]] internal slot to /state/.
Delete extra "]]"

----------------------------------------
In 15.2.4.7.1 "AsyncStartLoadPartwayThrough Functions":

15.2.4.7.1 / step 6:
Repeat for each Record {...} /p/ that is an element of /loader/.[[ Modules], do
Delete space before "Modules", and add a "]".

15.2.4.7.1 / step 7:
Repeat for element of /load/ or /loader/.[[ Modules], do
Change "for element of /load/ or" to "for each element /loads/ of"

Delete space before "Modules", and add a "]".

Rename 'loads' to 'module' in 7 and 7.a?

15.2.4.7.1 / step 8:
Let /load/ be the result of calling the CreateLoad(/name/).
Delete "the"

----------------------------------------
In 15.2.5.1 "ModuleLinkage Record":

15.2.5.1 / Table 35:

Change second occurrence of "KnownExportEntries" to "UnknownExportEntries".

s|Dependenies|Dependencies|

s|ImportedEntries|ImportEntries|

s|ImportedDefinitions|ImportDefinitions|

Add entry for [[Evaluated]].

----------------------------------------
In 15.2.5.1.1 "CreateModuleLinkageRecord (loader, body) Abstract Operation":

15.2.5.1.1 / step 1:
Assert: /body/ is a /Modulebody/ parse.
s|Modulebody|ModuleBody|
Delete "parse".
I.e., change "is a Modulebody parse" to "is a ModuleBody".

15.2.5.1.1 / step 15:
Let /globalEnv/ be /realm/.[[/globalEnv/]].
De-italicize the second "globalEnv".

15.2.5.1.1 / step 16:
Let /env/ be NewModuleEnvironment(/globalEnv/).
NewModuleEnvironment is not defined

----------------------------------------
In 15.2.5.1.2 "LookupExport ( M, exportName )":

LookupExport is defined but never used.

----------------------------------------
In 15.2.5.2.1 "CreateLinkSet(loader, startingLoad) Abstract Operation":

15.2.5.2.1 / step 2:
If /loader/ does not have all of the internal properties of a Loader Instance,
throw a TypeError exception.
s|properties|slots|

Put "TypeError" in serif-bold

----------------------------------------
In 15.2.5.2.2 "AddLoadToLinkSet(linkSet, load) Abstract Operation":

15.2.5.2.2 / step 3.c.i:
Repeat for each /r/ that is a Record {[[Name]], [[NormalisedName]]} in
/load/.[[Dependencies]],
Delete "that is a Record {[[Name]], [[NormalisedName]]}".
Its presence suggests that there might be things in load.[[Dependencies]]
that *aren't* records with [[Name]] and [[NormalisedName]] fields,
that the for-each should skip over.

15.2.5.2.2 / step 3.c.i.1:
If there is no element of /loader/.[[ Modules]] whose [[key]] field
is equal to /name/,
Delete space before "Modules".

'name' is undefined.
Insert step "Let /name/ be /r/.[[Name]]" ?

----------------------------------------
In 15.2.5.2.4 "LinkSetFailed(linkSet, exc) Abstract Operation":

15.2.5.2.4 / step 4:
Return the result of calling [[Call]] internal method of /linkSet/.[[Reject]] ...
After "calling", insert "the"

----------------------------------------
In 15.2.5.2.5 "FinishLoad(loader, load) Abstract Operation":

15.2.5.2.5 / step 2.a:
... that is an element of /loader/.[[ Modules]], ...
Delete space before "Modules".

15.2.5.2.5 / step 2.b:
... as the last element of /loader/.[[ Modules]].
Delete space before "Modules".

----------------------------------------
In 15.2.5.3.1 "LinkageGroups ( start )":

15.2.5.3.1 / step 3:
If there are any mixed dependency cycles in /G/, throw a new Syntax Error.
s|a new Syntax Error|a SyntaxError exception|
where 'SyntaxError' is serif-bold

----------------------------------------
In 15.2.5.3.2 "BuildLinkageGroups (...)":

15.2.5.3.2 / preamble:
Doesn't mention the 'visited' parameter.

15.2.5.3.2 / step 1:
If /visited/ contains an element whose [[Name]] is equal to /load/.[[Name]], ...
After "[[Name]]", insert "field"

----------------------------------------
In 15.2.5.4 "Link ( start, loader )":

15.2.5.4 / preamble:
The preamble omits the 'loader' parameter.

15.2.5.4 / step 2.a:
If the [[Kind]] of each element of /group/ is declarative, then perfrom ...
s|perfrom|perform|

15.2.5.4 / step 2.b:
Else, perfrom LinkDynamicModules(/group/, /loader/).
s|perfrom|perform|

----------------------------------------
In 15.2.5.5 "LinkDeclarativeModules ( loads, loader )":

15.2.5.5 / step 2.a:
If /load/.[[Status]] is not *linked*, then
Change 'linked' from serif-bold to quoted and monospace.

15.2.5.5 / step 3.c.iii.1:
If /load/.[[Status]] is *linked*, then
Change 'linked' from serif-bold to quoted and monospace.

15.2.5.5 / step 3.c.iv.1:
Let /module/ be LoaderRegistryLookup(/loader/, /normalizedName/).
LoaderRegistryLookup is not defined.

15.2.5.5 / step 3.c.iv.2.a:
Let /error/ be a new *ReferenceError* exception.
s|exception|object|
(You shouldn't call it an exception until/unless it's thrown.)

15.2.5.5 / step 4.a:
Perform ResolveExportEntries(/pair/.[[Module]], a new empty List.
Insert right-paren before final period.

15.2.5.5 / step 7.b:
Set /pair/.[[Load]].[[Status]] to *linked*.
Change 'linked' from serif-bold to quoted and monospace.

15.2.5.5 / step 7.c:
Let /r/ beFinishLoad(/loader/, /pair/.[[Load]]).
Insert space between "be" and "FinishLoad"

----------------------------------------
In 15.2.5.5.1 "LinkImports ( M )":

15.2.5.5.1 / step 3.a:
If /def/.[[ImportName]] is *module*, then the following steps are taken:
Where would [[ImportName]] be set to *module*?

15.2.5.5.1 / step 3.a.ii:
Call the InitializeImmutableBinding concrete method of /envRec/ passing ...
InitializeImmutableBinding is not defined

15.2.5.5.1 / step 3.b.ii.1:
Let /error/ be a new Reference Error.
Change "a new Reference Error" to "a new ReferenceError object"
(where "ReferenceError" is bold)

15.2.5.5.1 / step 3.b.iii:
Otherwise, call the CreateImportBinding concrete method of /envRec/ ...
CreateImportBinding is not defined.

----------------------------------------
In 15.2.5.6 "LinkDynamicModules ( loads, loader )":

15.2.5.6 / step 1.f:
Set /load/.[[Status]] to *linked*.
Change 'linked' from serif-bold to quoted and monospace.

----------------------------------------
In 15.2.5.7 "ResolveExportEntries ( M, visited )":

15.2.5.7 / step 4.c.i:
Let /error/ be a new Reference Error.
Change "a new Reference Error" to "a new ReferenceError object"
(where "ReferenceError" is bold)

15.2.5.7 / step 5.b.i:
Let /error/ be a new Syntax Error.
Change "a new Syntax Error" to "a new SyntaxError object"
(where "SyntaxError" is bold)

----------------------------------------
In 15.2.5.9 "ResolveExport ( M, exportName, visited )":

15.2.5.9 / preamble:
... with arguments M, exportName, and importName performs the following steps:
s|importName|visited|

15.2.5.9 / step 3:
Let /ref/ be {[[Module]]: /M/, [[ExportName]]: /exportName/}.
Insert "the Record" before "{".

15.2.5.9 / step 4.a:
Let /error/ be a new Syntax Error.
Change "a new Syntax Error" to "a new SyntaxError object"
(where "SyntaxError" is bold)

15.2.5.9 / step 7.a:
Let /error/ be a new Reference Error.
Change "a new Reference Error" to "a new ReferenceError object"
(where "ReferenceError" is bold)

15.2.5.9 / step 8:
If /overlappingDefs/ has more than one record /def/ such that /def/.[[Explicit]]
is *true*, or if it has length greater than 1 but contains no records /def/ such
that /def/.[[Explicit]] is *true*, then the following steps are taken:

An equivalent but simpler condition would be:
... /overlappingDefs/ has length greater than 1 and it does not
have exactly one record def such that def.[[Explicit]] is *true* ...

15.2.5.9 / step 8.a:
Let /error/ be a new Syntax Error.
Change "a new Syntax Error" to "a new SyntaxError object"
(where "SyntaxError" is bold)

----------------------------------------
In 15.2.6.2 "EnsureEvaluated(mod, seen, loader) Abstract Operation":

15.2.6.2 / step 7:
Let status be the result of perform ModuleDeclarationInstantiation ...
s|perform|performing|

XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX


*** Bug 2584 has been marked as a duplicate of this bug. ***


*** Bug 2591 has been marked as a duplicate of this bug. ***


Fixed in rev31 editor's draft

or at least tried to verify that typos in sections that are no longer present haven't leaked forward.


In Rev31