You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
_behaviour_: an Abstract Closure, a set of algorithm steps, or some other definition of a function's behaviour provided in this specification,
168
+
optional _length_: a non-negative integer or +∞,
169
+
optional _name_: a property key or a Private Name,
170
+
optional _additionalInternalSlotsList_: a List of names of internal slots,
171
+
optional _realm_: a Realm Record,
172
+
optional _prototype_: an Object or *null*,
173
+
optional _prefix_: a String,
174
+
): a function object
175
+
</h1>
176
+
<dlclass="header">
177
+
<dt>description</dt>
178
+
<dd>_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.</dd>
179
+
</dl>
180
+
<emu-alg>
181
+
1. <ins>If _additionalInternalSlotsList_ is not present, set _additionalInternalSlotsList_ to a new empty List.</ins>
182
+
1. If _realm_ is not present, set _realm_ to the current Realm Record.
183
+
1. If _prototype_ is not present, set _prototype_ to _realm_.[[Intrinsics]].[[%Function.prototype%]].
184
+
1. Let _internalSlotsList_ be a List containing the names of all the internal slots that <emu-xrefhref="#sec-built-in-function-objects"></emu-xref> requires for the built-in function object that is about to be created.
185
+
1. Append to _internalSlotsList_ the elements of _additionalInternalSlotsList_.
186
+
1. Let _func_ be a new built-in function object that, when called, performs the action described by _behaviour_ using the provided arguments as the values of the corresponding parameters specified by _behaviour_. The new function object has internal slots whose names are the elements of _internalSlotsList_, and an [[InitialName]] internal slot.
0 commit comments