Skip to content

Commit

Permalink
Address review comments
Browse files Browse the repository at this point in the history
Co-authored-by: Michael Dyck <[email protected]>
  • Loading branch information
ExE-Boss and jmdyck committed Jul 24, 2020
1 parent 181146e commit 2c4162c
Showing 1 changed file with 8 additions and 11 deletions.
19 changes: 8 additions & 11 deletions spec.html
Original file line number Diff line number Diff line change
Expand Up @@ -8871,20 +8871,20 @@ <h1>[[Construct]] ( _argumentsList_, _newTarget_ )</h1>
</emu-clause>

<emu-clause id="sec-createbuiltinfunction" aoid="CreateBuiltinFunction">
<h1>CreateBuiltinFunction ( _stepsOrClosure_, _internalSlotsList_ [ , _realm_ [ , _prototype_ ] ] )</h1>
<p>The abstract operation CreateBuiltinFunction takes arguments _stepsOrClosure_ 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 ( _algorithm_, _internalSlotsList_ [ , _realm_ [ , _prototype_ ] ] )</h1>
<p>The abstract operation CreateBuiltinFunction takes arguments _algorithm_ 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>
<emu-alg>
1. Assert: _stepsOrClosure_ is either an Abstract Closure, a set of algorithm steps, or some other definition of a function's behaviour provided in this specification.
1. Assert: _algorithm_ is either an Abstract Closure, a set of algorithm steps, or some 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 _stepsOrClosure_. The new function object has internal slots whose names are the elements of _internalSlotsList_.
1. Let _func_ be a new built-in function object that when called performs the action described by _algorithm_. The new function object has internal slots whose names are the elements of _internalSlotsList_.
1. Set _func_.[[Realm]] to _realm_.
1. Set _func_.[[Prototype]] to _prototype_.
1. Set _func_.[[Extensible]] to *true*.
1. Set _func_.[[ScriptOrModule]] to *null*.
1. If _stepsOrClosure_ is an Abstract Closure, then
1. Let _len_ be number of parameters taken by _stepsOrClosure_.
1. If _algorithm_ is an Abstract Closure, then
1. Let _len_ be the number of parameters taken by _algorithm_.
1. Perform ! SetFunctionLength(_func_, _len_).
1. Perform ! SetFunctionName(_func_, *""*).
1. Return _func_.
Expand Down Expand Up @@ -25981,12 +25981,9 @@ <h1>Object.fromEntries ( _iterable_ )</h1>
1. Perform ? RequireObjectCoercible(_iterable_).
1. Let _obj_ be OrdinaryObjectCreate(%Object.prototype%).
1. Assert: _obj_ is an extensible ordinary object with no own properties.
1. Let _closure_ be a new Abstract Closure with parameters (_key_, _value_) that performs the following steps when called:
1. Let _O_ be the *this* value.
1. Assert: Type(_O_) is Object.
1. Assert: _O_ is an extensible ordinary object.
1. Let _closure_ be a new Abstract Closure with parameters (_key_, _value_) that captures _obj_ and performs the following steps when called:
1. Let _propertyKey_ be ? ToPropertyKey(_key_).
1. Perform ! CreateDataPropertyOrThrow(_O_, _propertyKey_, _value_).
1. Perform ! CreateDataPropertyOrThrow(_obj_, _propertyKey_, _value_).
1. Return *undefined*.
1. Let _adder_ be ! CreateBuiltinFunction(_closure_, &laquo; &raquo;).
1. Return ? AddEntriesFromIterable(_obj_, _iterable_, _adder_).
Expand Down

0 comments on commit 2c4162c

Please sign in to comment.