Skip to content

Commit

Permalink
Respecify 'anonymous function' to mean the 'name' property is the emp…
Browse files Browse the repository at this point in the history
…ty string instead of being absent
  • Loading branch information
anba committed Aug 15, 2019
1 parent 36a81a0 commit b3bfef0
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions spec.html
Original file line number Diff line number Diff line change
Expand Up @@ -7577,6 +7577,7 @@ <h1>%ThrowTypeError% ( )</h1>
</emu-alg>
<p>The value of the [[Extensible]] internal slot of a %ThrowTypeError% function is *false*.</p>
<p>The `"length"` property of a %ThrowTypeError% function has the attributes { [[Writable]]: *false*, [[Enumerable]]: *false*, [[Configurable]]: *false* }.</p>
<p>The `"name"` property of a %ThrowTypeError% function has the attributes { [[Writable]]: *false*, [[Enumerable]]: *false*, [[Configurable]]: *false* }.</p>
</emu-clause>
</emu-clause>

Expand Down Expand Up @@ -23515,8 +23516,8 @@ <h1>ECMAScript Standard Built-in Objects</h1>
<p>For example, the function object that is the initial value of the `map` property of the Array prototype object is described under the subclause heading &laquo;Array.prototype.map (callbackFn [ , thisArg])&raquo; which shows the two named arguments callbackFn and thisArg, the latter being optional; therefore the value of the `"length"` property of that function object is 1.</p>
</emu-note>
<p>Unless otherwise specified, the `"length"` property of a built-in function object has the attributes { [[Writable]]: *false*, [[Enumerable]]: *false*, [[Configurable]]: *true* }.</p>
<p>Every built-in function object, including constructors, that is not identified as an anonymous function has a `name` property whose value is a String. Unless otherwise specified, this value is the name that is given to the function in this specification. For functions that are specified as properties of objects, the name value is the property name string used to access the function. Functions that are specified as get or set accessor functions of built-in properties have `"get "` or `"set "` prepended to the property name string. The value of the `name` property is explicitly specified for each built-in functions whose property key is a Symbol value.</p>
<p>Unless otherwise specified, the `name` property of a built-in function object, if it exists, has the attributes { [[Writable]]: *false*, [[Enumerable]]: *false*, [[Configurable]]: *true* }.</p>
<p>Every built-in function object, including constructors, has a `"name"` property whose value is a String. Unless otherwise specified, this value is the name that is given to the function in this specification. Functions that are identified as anonymous functions use the empty string as the value of the `"name"` property. For functions that are specified as properties of objects, the name value is the property name string used to access the function. Functions that are specified as get or set accessor functions of built-in properties have `"get "` or `"set "` prepended to the property name string. The value of the `"name"` property is explicitly specified for each built-in functions whose property key is a Symbol value.</p>
<p>Unless otherwise specified, the `"name"` property of a built-in function object has the attributes { [[Writable]]: *false*, [[Enumerable]]: *false*, [[Configurable]]: *true* }.</p>
<p>Every other data property described in clauses 18 through 26 and in Annex <emu-xref href="#sec-additional-built-in-properties"></emu-xref> has the attributes { [[Writable]]: *true*, [[Enumerable]]: *false*, [[Configurable]]: *true* } unless otherwise specified.</p>
<p>Every accessor property described in clauses 18 through 26 and in Annex <emu-xref href="#sec-additional-built-in-properties"></emu-xref> has the attributes { [[Enumerable]]: *false*, [[Configurable]]: *true* } unless otherwise specified. If only a get accessor function is described, the set accessor function is the default value, *undefined*. If only a set accessor is described the get accessor is the default value, *undefined*.</p>
</emu-clause>
Expand Down Expand Up @@ -25097,7 +25098,7 @@ <h1>length</h1>
<emu-clause id="sec-function-instances-name">
<h1>name</h1>
<p>The value of the `name` property is a String that is descriptive of the function. The name has no semantic significance but is typically a variable or property name that is used to refer to the function at its point of definition in ECMAScript code. This property has the attributes { [[Writable]]: *false*, [[Enumerable]]: *false*, [[Configurable]]: *true* }.</p>
<p>Anonymous functions objects that do not have a contextual name associated with them by this specification do not have a `name` own property but inherit the `name` property of %Function.prototype%.</p>
<p>Anonymous functions objects that do not have a contextual name associated with them by this specification use the empty string as the value of the `"name"` property.</p>
</emu-clause>

<emu-clause id="sec-function-instances-prototype">
Expand Down

0 comments on commit b3bfef0

Please sign in to comment.