Skip to content

Commit

Permalink
Editorial: Fix internalSlotsList parameter of CreateBuiltinFunction
Browse files Browse the repository at this point in the history
  • Loading branch information
ExE-Boss committed Aug 6, 2020
1 parent cb3a24d commit 750835c
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions spec.html
Original file line number Diff line number Diff line change
Expand Up @@ -9049,17 +9049,22 @@ <h1>[[Construct]] ( _argumentsList_, _newTarget_ )</h1>
</emu-clause>

<emu-clause id="sec-createbuiltinfunction" aoid="CreateBuiltinFunction">
<h1>CreateBuiltinFunction ( _steps_, _internalSlotsList_ [ , _realm_ [ , _prototype_ ] ] )</h1>
<p>The abstract operation CreateBuiltinFunction takes arguments _steps_ and _internalSlotsList_ (a List of names of internal slots) and optional arguments _realm_ and _prototype_. _internalSlotsList_ contains the names of additional internal slots that must be defined as part of the object. This operation creates a built-in function object. It performs the following steps when called:</p>
<h1>CreateBuiltinFunction ( _steps_, _additionalInternalSlotsList_ [ , _realm_ [ , _prototype_ ] ] )</h1>
<p>The abstract operation CreateBuiltinFunction takes arguments _steps_ and optional arguments _additionalInternalSlotsList_ (a List of internal slot names), _realm_, and _prototype_. _additionalInternalSlotsList_ contains the names of additional internal slots that must be defined as part of the object. This operation creates a built-in function object. It performs the following steps when called:</p>
<emu-alg>
1. Assert: _steps_ is either a set of algorithm steps or other definition of a function's behaviour provided in this specification.
1. If _realm_ is not present, set _realm_ to the current Realm Record.
1. Assert: _realm_ is a Realm Record.
1. If _prototype_ is not present, set _prototype_ to _realm_.[[Intrinsics]].[[%Function.prototype%]].
1. Let _func_ be a new built-in function object that when called performs the action described by _steps_. The new function object has internal slots whose names are the elements of _internalSlotsList_, and an [[InitialName]] internal slot.
1. Set _func_.[[Realm]] to _realm_.
1. Set _func_.[[Prototype]] to _prototype_.
1. If the built-in function object is implemented using ECMAScript code,
1. Let _internalSlotsList_ be the internal slots listed in <emu-xref href="#table-27"></emu-xref>.
1. Otherwise, let _internalSlotsList_ be &laquo; [[Prototype]], [[Extensible]], [[Realm]], [[ScriptOrModule]] &raquo;.
1. Append [[InitialName]] to _internalSlotsList_.
1. Append each element of _additionalInternalSlotsList_ to _internalSlotsList_.
1. Let _func_ be a new built-in function object that when called performs the action described by _steps_. The new function object has internal slots whose names are the elements of _internalSlotsList_.
1. Set _func_.[[Extensible]] to *true*.
1. Set _func_.[[Prototype]] to _prototype_.
1. Set _func_.[[Realm]] to _realm_.
1. Set _func_.[[ScriptOrModule]] to *null*.
1. Set _func_.[[InitialName]] to *null*.
1. Return _func_.
Expand Down

0 comments on commit 750835c

Please sign in to comment.