Skip to content

Commit fc6f098

Browse files
committed
Common up two requirements shared by all three Annex B.3.3 use cases, and use more precise language to specify an antecedent within one of the requirements.
1 parent 0e10c9f commit fc6f098

File tree

1 file changed

+8
-19
lines changed

1 file changed

+8
-19
lines changed

spec.html

Lines changed: 8 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -36405,17 +36405,18 @@ <h1>Labelled Function Declarations</h1>
3640536405
<!-- es6num="B.3.3" -->
3640636406
<emu-annex id="sec-block-level-function-declarations-web-legacy-compatibility-semantics">
3640736407
<h1>Block-Level Function Declarations Web Legacy Compatibility Semantics</h1>
36408-
<p>Prior to ECMAScript 2015, the ECMAScript specification did not define the occurrence of a |FunctionDeclaration| as an element of a |Block| statement's |StatementList|. However, support for that form of |FunctionDeclaration| was an allowable extension and most browser-hosted ECMAScript implementations permitted them. Unfortunately, the semantics of such declarations differ among those implementations. Because of these semantic differences, existing web ECMAScript code that uses |Block| level function declarations is only portable among browser implementation if the usage only depends upon the semantic intersection of all of the browser implementations for such declarations. The following are the use cases that fall within that intersection semantics:</p>
36408+
<p>Prior to ECMAScript 2015, the ECMAScript specification did not define the occurrence of a |FunctionDeclaration| as an element of a |Block| statement's |StatementList|. However, support for that form of |FunctionDeclaration| was an allowable extension and most browser-hosted ECMAScript implementations permitted them. Unfortunately, the semantics of such declarations differ among those implementations. Because of these semantic differences, existing web ECMAScript code that uses |Block| level function declarations is only portable among browser implementation if the usage only depends upon the semantic intersection of all of the browser implementations for such declarations.</p>
36409+
<p>These are the threshold requirements for the semantic intersection to potentially occur:</p>
36410+
<ul>
36411+
<li>One or more |FunctionDeclaration|s whose |BindingIdentifier| is the name _f_ occur within the function code of an enclosing function _g_.</li>
36412+
<li>Those |FunctionDeclaration|s are nested within a single |Block|.</li>
36413+
<li>No other declaration of _f_ that is not a `var` declaration occurs within the function code of _g_.</li>
36414+
</ul>
36415+
<p>If those requirements are satisfied, the following use cases fall within the semantic intersection among browser implementations:</p>
3640936416
<ol>
3641036417
<li>
3641136418
<p>A function is declared and only referenced within a single block</p>
3641236419
<ul>
36413-
<li>
36414-
One or more |FunctionDeclaration|s whose |BindingIdentifier| is the name _f_ occur within the function code of an enclosing function _g_ and that declaration is nested within a |Block|.
36415-
</li>
36416-
<li>
36417-
No other declaration of _f_ that is not a `var` declaration occurs within the function code of _g_
36418-
</li>
3641936420
<li>
3642036421
All occurrences of _f_ as an |IdentifierReference| are within the |StatementList| of the |Block| containing the declaration of _f_.
3642136422
</li>
@@ -36424,12 +36425,6 @@ <h1>Block-Level Function Declarations Web Legacy Compatibility Semantics</h1>
3642436425
<li>
3642536426
<p>A function is declared and possibly used within a single |Block| but also referenced by an inner function definition that is not contained within that same |Block|.</p>
3642636427
<ul>
36427-
<li>
36428-
One or more |FunctionDeclaration|s whose |BindingIdentifier| is the name _f_ occur within the function code of an enclosing function _g_ and that declaration is nested within a |Block|.
36429-
</li>
36430-
<li>
36431-
No other declaration of _f_ that is not a `var` declaration occurs within the function code of _g_
36432-
</li>
3643336428
<li>
3643436429
There may be occurrences of _f_ as an |IdentifierReference| within the |StatementList| of the |Block| containing the declaration of _f_.
3643536430
</li>
@@ -36444,12 +36439,6 @@ <h1>Block-Level Function Declarations Web Legacy Compatibility Semantics</h1>
3644436439
<li>
3644536440
<p>A function is declared and possibly used within a single block but also referenced within subsequent blocks.</p>
3644636441
<ul>
36447-
<li>
36448-
One or more |FunctionDeclaration| whose |BindingIdentifier| is the name _f_ occur within the function code of an enclosing function _g_ and that declaration is nested within a |Block|.
36449-
</li>
36450-
<li>
36451-
No other declaration of _f_ that is not a `var` declaration occurs within the function code of _g_
36452-
</li>
3645336442
<li>
3645436443
There may be occurrences of _f_ as an |IdentifierReference| within the |StatementList| of the |Block| containing the declaration of _f_.
3645536444
</li>

0 commit comments

Comments
 (0)