Skip to content

Commit

Permalink
Remove assert
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolo-ribaudo committed Jul 30, 2024
1 parent ad9d57b commit b175092
Showing 1 changed file with 5 additions and 43 deletions.
48 changes: 5 additions & 43 deletions spec.html
Original file line number Diff line number Diff line change
Expand Up @@ -144,13 +144,6 @@ <h1>Example Legacy Clause Heading</h1>
<h1>Example Legacy Normative Optional Clause Heading</h1>
<p>Example clause contents.</p>
</emu-clause>

<p>A conforming implementation of ECMAScript should not implement <dfn>Deprecated</dfn> subclauses or algorithm steps, unless necessary for compatibility with existing applications that already run in such an implementation before the deprecation of the given language feature. All of the language features and behaviours specified within Deprecated subclauses or algorithm steps have one or more undesirable characteristics. However, their use in existing applications currently prevents their removal from this specification. These features are not considered part of the core ECMAScript language. Programmers should not use or assume the existence of these features and behaviours when writing new ECMAScript code.</p>

<emu-clause id="sec-conformance-deprecated" example deprecated>
<h1>Example Deprecated Clause Heading</h1>
<p>Example clause contents.</p>
</emu-clause>
</emu-clause>

<emu-clause id="sec-normative-references">
Expand Down Expand Up @@ -19595,9 +19588,6 @@ <h1>
1. Return _promiseCapability_.[[Promise]].
1. Let _attributesObj_ be Completion(Get(_options_, *"with"*)).
1. IfAbruptRejectPromise(_attributesObj_, _promiseCapability_).
1. [id="step-evaluate-import-call-assert-fallback", deprecated, normative-optional] If the host supports the <emu-xref href="#sec-deprecated-assert-keyword-for-import-attributes">deprecated `assert` keyword for import attributes</emu-xref> and _attributesObj_ is *undefined*, then
1. Set _attributesObj_ to Completion(Get(_options_, *"assert"*)).
1. IfAbruptRejectPromise(_attributesObj_, _promiseCapability_).
1. If _attributesObj_ is not *undefined*, then
1. If _attributesObj_ is not an Object, then
1. Perform ! Call(_promiseCapability_.[[Reject]], *undefined*, « a newly created *TypeError* object »).
Expand All @@ -19620,10 +19610,6 @@ <h1>
1. Perform HostLoadImportedModule(_referrer_, _moduleRequest_, ~empty~, _promiseCapability_).
1. Return _promiseCapability_.[[Promise]].
</emu-alg>

<emu-note>
Removal of the `assert` fallback when _options_'s `with` property is *undefined* is being investigated.
</emu-note>
</emu-clause>

<emu-clause id="sec-ContinueDynamicImport" type="abstract operation">
Expand Down Expand Up @@ -28584,11 +28570,8 @@ <h2>Syntax</h2>
BindingIdentifier[~Yield, +Await]

WithClause :
AttributesKeyword `{` `}`
AttributesKeyword `{` WithEntries `,`? `}`

AttributesKeyword :
`with`
`with` `{` `}`
`with` `{` WithEntries `,`? `}`

WithEntries :
AttributeKey `:` StringLiteral
Expand All @@ -28599,10 +28582,6 @@ <h2>Syntax</h2>
StringLiteral
</emu-grammar>

<emu-note>
<p>The |AttributesKeyword| production is extended by <emu-xref href="#sec-deprecated-assert-keyword-for-import-attributes"></emu-xref>.</p>
</emu-note>

<emu-clause id="sec-imports-static-semantics-early-errors">
<h1>Static Semantics: Early Errors</h1>
<emu-grammar>ModuleItem : ImportDeclaration</emu-grammar>
Expand All @@ -28612,7 +28591,7 @@ <h1>Static Semantics: Early Errors</h1>
</li>
</ul>

<emu-grammar>WithClause : AttributesKeyword `{` WithEntries `,`? `}`</emu-grammar>
<emu-grammar>WithClause : `with` `{` WithEntries `,`? `}`</emu-grammar>
<ul>
<li>
It is a Syntax Error if WithClauseToAttributes of |WithClause| has two different entries _a_ and _b_ such that _a_.[[Key]] is _b_.[[Key]].
Expand Down Expand Up @@ -28716,14 +28695,14 @@ <h1>Static Semantics: WithClauseToAttributes ( ): a List of ImportAttribute Reco
</dl>

<emu-grammar>
WithClause : AttributesKeyword `{` `}`
WithClause : `with` `{` `}`
</emu-grammar>
<emu-alg>
1. Return a new empty List.
</emu-alg>

<emu-grammar>
WithClause : AttributesKeyword `{` WithEntries `,`? `}`
WithClause : `with` `{` WithEntries `,`? `}`
</emu-grammar>
<emu-alg>
1. Let _attributes_ be WithClauseToAttributes of |WithEntries|.
Expand All @@ -28746,22 +28725,6 @@ <h1>Static Semantics: WithClauseToAttributes ( ): a List of ImportAttribute Reco
1. Return the list-concatenation of « _entry_ » and _rest_.
</emu-alg>
</emu-clause>

<emu-clause id="sec-deprecated-assert-keyword-for-import-attributes" deprecated normative-optional>
<h1>Deprecated `assert` keyword for Import Attributes</h1>

<p>Import Attributes are denoted using the `with` keyword. However, there are existing implementations based on a previous version of the proposal using the `assert` keyword. Due to potential web compatibility risks, the `assert` keyword is still included in this specification, but its removal is being investigated.</p>

<p>This deprecated feature includes the `assert` fallback for import attributes in import calls (step <emu-xref href="#step-evaluate-import-call-assert-fallback"></emu-xref> of <emu-xref href="#sec-evaluate-import-call"></emu-xref>).</p>

<p>The following extends the |AttributesKeyword| production in <emu-xref href="#sec-imports"></emu-xref>:</p>
<!-- emu-grammar[type=definition] have different margin than other emu-grammar, but we want this to be aligned with the one below. -->
<emu-grammar style="display:block; margin-left: 5ex">
AttributesKeyword :
`with`
[no LineTerminator here] `assert`
</emu-grammar>
</emu-clause>
</emu-clause>

<emu-clause id="sec-exports">
Expand Down Expand Up @@ -50444,7 +50407,6 @@ <h1>Scripts and Modules</h1>
<emu-prodref name="ModuleSpecifier"></emu-prodref>
<emu-prodref name="ImportedBinding"></emu-prodref>
<emu-prodref name="WithClause"></emu-prodref>
<emu-prodref name="AttributesKeyword"></emu-prodref>
<emu-prodref name="WithEntries"></emu-prodref>
<emu-prodref name="ExportDeclaration"></emu-prodref>
<emu-prodref name="ExportFromClause"></emu-prodref>
Expand Down

0 comments on commit b175092

Please sign in to comment.