Skip to content

Commit b1ef33b

Browse files
committed
Editorial: add some <dfn>s
1 parent 1046a42 commit b1ef33b

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

spec.html

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -706,7 +706,7 @@ <h1>Static Semantic Rules</h1>
706706
1. Return *false*.
707707
</emu-alg>
708708
<p>The above definition is explicitly over-ridden for specific productions.</p>
709-
<p>A special kind of static semantic rule is an Early Error Rule. Early error rules define early error conditions (see clause <emu-xref href="#sec-error-handling-and-language-extensions"></emu-xref>) that are associated with specific grammar productions. Evaluation of most early error rules are not explicitly invoked within the algorithms of this specification. A conforming implementation must, prior to the first evaluation of a |Script| or |Module|, validate all of the early error rules of the productions used to parse that |Script| or |Module|. If any of the early error rules are violated the |Script| or |Module| is invalid and cannot be evaluated.</p>
709+
<p>A special kind of static semantic rule is an <dfn id="early-error-rule">Early Error Rule</dfn>. Early error rules define early error conditions (see clause <emu-xref href="#sec-error-handling-and-language-extensions"></emu-xref>) that are associated with specific grammar productions. Evaluation of most early error rules are not explicitly invoked within the algorithms of this specification. A conforming implementation must, prior to the first evaluation of a |Script| or |Module|, validate all of the early error rules of the productions used to parse that |Script| or |Module|. If any of the early error rules are violated the |Script| or |Module| is invalid and cannot be evaluated.</p>
710710
</emu-clause>
711711
</emu-clause>
712712

@@ -4649,9 +4649,9 @@ <h1>Lexical Environments</h1>
46494649
<p>A <dfn>Lexical Environment</dfn> is a specification type used to define the association of |Identifier|s to specific variables and functions based upon the lexical nesting structure of ECMAScript code. A Lexical Environment consists of an Environment Record and a possibly null reference to an <em>outer</em> Lexical Environment. Usually a Lexical Environment is associated with some specific syntactic structure of ECMAScript code such as a |FunctionDeclaration|, a |BlockStatement|, or a |Catch| clause of a |TryStatement| and a new Lexical Environment is created each time such code is evaluated.</p>
46504650
<p>An Environment Record records the identifier bindings that are created within the scope of its associated Lexical Environment. It is referred to as the Lexical Environment's <dfn>EnvironmentRecord</dfn></p>
46514651
<p>The outer environment reference is used to model the logical nesting of Lexical Environment values. The outer reference of a (inner) Lexical Environment is a reference to the Lexical Environment that logically surrounds the inner Lexical Environment. An outer Lexical Environment may, of course, have its own outer Lexical Environment. A Lexical Environment may serve as the outer environment for multiple inner Lexical Environments. For example, if a |FunctionDeclaration| contains two nested |FunctionDeclaration|s then the Lexical Environments of each of the nested functions will have as their outer Lexical Environment the Lexical Environment of the current evaluation of the surrounding function.</p>
4652-
<p>A <em>global environment</em> is a Lexical Environment which does not have an outer environment. The global environment's outer environment reference is *null*. A global environment's EnvironmentRecord may be prepopulated with identifier bindings and includes an associated <em>global object</em> whose properties provide some of the global environment's identifier bindings. This global object is the value of a global environment's `this` binding. As ECMAScript code is executed, additional properties may be added to the global object and the initial properties may be modified.</p>
4653-
<p>A <em>module environment</em> is a Lexical Environment that contains the bindings for the top level declarations of a |Module|. It also contains the bindings that are explicitly imported by the |Module|. The outer environment of a module environment is a global environment.</p>
4654-
<p>A <em>function environment</em> is a Lexical Environment that corresponds to the invocation of an ECMAScript function object. A function environment may establish a new `this` binding. A function environment also captures the state necessary to support `super` method invocations.</p>
4652+
<p>A <dfn id="global-environment">global environment</dfn> is a Lexical Environment which does not have an outer environment. The global environment's outer environment reference is *null*. A global environment's EnvironmentRecord may be prepopulated with identifier bindings and includes an associated <dfn id="global-object">global object</dfn> whose properties provide some of the global environment's identifier bindings. This global object is the value of a global environment's `this` binding. As ECMAScript code is executed, additional properties may be added to the global object and the initial properties may be modified.</p>
4653+
<p>A <dfn id="module-environment">module environment</dfn> is a Lexical Environment that contains the bindings for the top level declarations of a |Module|. It also contains the bindings that are explicitly imported by the |Module|. The outer environment of a module environment is a global environment.</p>
4654+
<p>A <dfn id="function-environment">function environment</dfn> is a Lexical Environment that corresponds to the invocation of an ECMAScript function object. A function environment may establish a new `this` binding. A function environment also captures the state necessary to support `super` method invocations.</p>
46554655
<p>Lexical Environments and Environment Record values are purely specification mechanisms and need not correspond to any specific artefact of an ECMAScript implementation. It is impossible for an ECMAScript program to directly access or manipulate such values.</p>
46564656

46574657
<!-- es6num="8.1.1" -->
@@ -5790,7 +5790,7 @@ <h1>NewModuleEnvironment (_E_)</h1>
57905790
<!-- es6num="8.2" -->
57915791
<emu-clause id="sec-code-realms">
57925792
<h1>Code Realms</h1>
5793-
<p>Before it is evaluated, all ECMAScript code must be associated with a <dfn>Realm</dfn>. Conceptually, a realm consists of a set of intrinsic objects, an ECMAScript global environment, all of the ECMAScript code that is loaded within the scope of that global environment, and other associated state and resources.</p>
5793+
<p>Before it is evaluated, all ECMAScript code must be associated with a <dfn id="realm">Realm</dfn>. Conceptually, a realm consists of a set of intrinsic objects, an ECMAScript global environment, all of the ECMAScript code that is loaded within the scope of that global environment, and other associated state and resources.</p>
57945794
<p>A Realm is specified as a Record with the fields specified in <emu-xref href="#table-21"></emu-xref>:</p>
57955795
<emu-table id="table-21" caption="Realm Record Fields">
57965796
<table>
@@ -17361,8 +17361,8 @@ <h2>Syntax</h2>
1736117361
<!-- es6num="14.1.1" -->
1736217362
<emu-clause id="sec-directive-prologues-and-the-use-strict-directive">
1736317363
<h1>Directive Prologues and the Use Strict Directive</h1>
17364-
<p>A <dfn>Directive Prologue</dfn> is the longest sequence of |ExpressionStatement| productions occurring as the initial |StatementListItem| or |ModuleItem| productions of a |FunctionBody|, a |ScriptBody|, or a |ModuleBody| and where each |ExpressionStatement| in the sequence consists entirely of a |StringLiteral| token followed by a semicolon. The semicolon may appear explicitly or may be inserted by automatic semicolon insertion. A Directive Prologue may be an empty sequence.</p>
17365-
<p>A <dfn>Use Strict Directive</dfn> is an |ExpressionStatement| in a Directive Prologue whose |StringLiteral| is either the exact code unit sequences `"use strict"` or `'use strict'`. A Use Strict Directive may not contain an |EscapeSequence| or |LineContinuation|.</p>
17364+
<p>A <dfn id="directive-prologue">Directive Prologue</dfn> is the longest sequence of |ExpressionStatement| productions occurring as the initial |StatementListItem| or |ModuleItem| productions of a |FunctionBody|, a |ScriptBody|, or a |ModuleBody| and where each |ExpressionStatement| in the sequence consists entirely of a |StringLiteral| token followed by a semicolon. The semicolon may appear explicitly or may be inserted by automatic semicolon insertion. A Directive Prologue may be an empty sequence.</p>
17365+
<p>A <dfn id="use-strict-directive">Use Strict Directive</dfn> is an |ExpressionStatement| in a Directive Prologue whose |StringLiteral| is either the exact code unit sequences `"use strict"` or `'use strict'`. A Use Strict Directive may not contain an |EscapeSequence| or |LineContinuation|.</p>
1736617366
<p>A Directive Prologue may contain more than one Use Strict Directive. However, an implementation may issue a warning if this occurs.</p>
1736717367
<emu-note>
1736817368
<p>The |ExpressionStatement| productions of a Directive Prologue are evaluated normally during evaluation of the containing production. Implementations may define implementation specific meanings for |ExpressionStatement| productions which are not a Use Strict Directive and which occur in a Directive Prologue. If an appropriate notification mechanism exists, an implementation should issue a warning if it encounters in a Directive Prologue an |ExpressionStatement| that is not a Use Strict Directive and which does not have a meaning defined by the implementation.</p>

0 commit comments

Comments
 (0)