From cf9a79e006e1b55a8219f39a39512faea38178ed Mon Sep 17 00:00:00 2001 From: Michael Dyck Date: Wed, 30 Aug 2023 22:42:54 -0400 Subject: [PATCH] fixup: respond to michaelficarra review --- spec.html | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/spec.html b/spec.html index ef3ee508b09..71f58f9d2f8 100644 --- a/spec.html +++ b/spec.html @@ -13724,7 +13724,7 @@

Built-in Function Objects

A built-in function object is an ordinary object; it must satisfy the requirements for ordinary objects set out in .

-

In addition to the internal slots required of every ordinary object, a built-in function object must also have the following internal slots:

+

In addition to the internal slots required of every ordinary object (see ), a built-in function object must also have the following internal slots:

  • [[Realm]], a Realm Record that represents the realm in which the function was created.
  • [[InitialName]], a String that is the initial name of the function. It is used by .
  • @@ -13732,7 +13732,6 @@

    Built-in Function Objects

    The initial value of a built-in function object's [[Prototype]] internal slot is %Function.prototype%, unless otherwise specified.

    A built-in function object must have a [[Call]] internal method that conforms to the definition in .

    A built-in function object has a [[Construct]] internal method if and only if it is described as a “constructor”, or some algorithm in this specification explicitly sets its [[Construct]] internal method. Such a [[Construct]] internal method must conform to the definition in .

    -

    For a built-in function object defined in this specification, the behaviour specified for it via algorithm steps or other means is “the specification of _F_” for the purposes of step of .

    An implementation may provide additional built-in function objects that are not defined in this specification.

    @@ -13789,6 +13788,7 @@

    1. Perform any necessary implementation-defined initialization of _calleeContext_. 1. Push _calleeContext_ onto the execution context stack; _calleeContext_ is now the running execution context. 1. [id="step-call-builtin-function-result"] Let _result_ be the Completion Record that is the result of evaluating _F_ in a manner that conforms to the specification of _F_. If _thisArgument_ is ~uninitialized~, the *this* value is uninitialized; otherwise, _thisArgument_ provides the *this* value. _argumentsList_ provides the named parameters. _newTarget_ provides the NewTarget value. + 1. NOTE: If _F_ is defined in this document, “the specification of _F_” is the behaviour specified for it via algorithm steps or other means. 1. Remove _calleeContext_ from the execution context stack and restore _callerContext_ as the running execution context. 1. Return ? _result_. @@ -28656,6 +28656,7 @@

    ECMAScript Standard Built-in Objects

    Unless otherwise specified every built-in function and every built-in constructor has the Function prototype object, which is the initial value of the expression `Function.prototype` (), as the value of its [[Prototype]] internal slot.

    Unless otherwise specified every built-in prototype object has the Object prototype object, which is the initial value of the expression `Object.prototype` (), as the value of its [[Prototype]] internal slot, except the Object prototype object itself.

    +

    If this specification defines a built-in constructor's behaviour via algorithm steps, then that is its behaviour for the purposes of both [[Call]] and [[Construct]]. If such an algorithm needs to distinguish the two cases, it checks whether NewTarget is *undefined*, which indicates a [[Call]] invocation.

    Built-in function objects that are not identified as constructors do not implement the [[Construct]] internal method unless otherwise specified in the description of a particular function.

    Built-in function objects that are not constructors do not have a *"prototype"* property unless otherwise specified in the description of a particular function.

    Each built-in function defined in this specification is created by calling the CreateBuiltinFunction abstract operation (). The values of the _length_ and _name_ parameters are the initial values of the *"length"* and *"name"* properties as discussed below. The values of the _prefix_ parameter are similarly discussed below.