Skip to content

Commit

Permalink
Editorial: Improve callback variable names used by Promise statics
Browse files Browse the repository at this point in the history
  • Loading branch information
ExE-Boss committed Jan 9, 2021
1 parent 25382cd commit 677e20d
Showing 1 changed file with 33 additions and 33 deletions.
66 changes: 33 additions & 33 deletions spec.html
Original file line number Diff line number Diff line change
Expand Up @@ -38965,14 +38965,14 @@ <h1>PerformPromiseAll ( _iteratorRecord_, _constructor_, _resultCapability_, _pr
1. Let _nextPromise_ be ? Call(_promiseResolve_, _constructor_, &laquo; _nextValue_ &raquo;).
1. Let _steps_ be the algorithm steps defined in <emu-xref href="#sec-promise.all-resolve-element-functions" title></emu-xref>.
1. Let _length_ be the number of non-optional parameters of the function definition in <emu-xref href="#sec-promise.all-resolve-element-functions" title></emu-xref>.
1. Let _resolveElement_ be ! CreateBuiltinFunction(_steps_, _length_, *""*, &laquo; [[AlreadyCalled]], [[Index]], [[Values]], [[Capability]], [[RemainingElements]] &raquo;).
1. Set _resolveElement_.[[AlreadyCalled]] to *false*.
1. Set _resolveElement_.[[Index]] to _index_.
1. Set _resolveElement_.[[Values]] to _values_.
1. Set _resolveElement_.[[Capability]] to _resultCapability_.
1. Set _resolveElement_.[[RemainingElements]] to _remainingElementsCount_.
1. Let _onFulfilled_ be ! CreateBuiltinFunction(_steps_, _length_, *""*, &laquo; [[AlreadyCalled]], [[Index]], [[Values]], [[Capability]], [[RemainingElements]] &raquo;).
1. Set _onFulfilled_.[[AlreadyCalled]] to *false*.
1. Set _onFulfilled_.[[Index]] to _index_.
1. Set _onFulfilled_.[[Values]] to _values_.
1. Set _onFulfilled_.[[Capability]] to _resultCapability_.
1. Set _onFulfilled_.[[RemainingElements]] to _remainingElementsCount_.
1. Set _remainingElementsCount_.[[Value]] to _remainingElementsCount_.[[Value]] + 1.
1. Perform ? Invoke(_nextPromise_, *"then"*, &laquo; _resolveElement_, _resultCapability_.[[Reject]] &raquo;).
1. Perform ? Invoke(_nextPromise_, *"then"*, &laquo; _onFulfilled_, _resultCapability_.[[Reject]] &raquo;).
1. Set _index_ to _index_ + 1.
</emu-alg>
</emu-clause>
Expand Down Expand Up @@ -39045,25 +39045,25 @@ <h1>PerformPromiseAllSettled ( _iteratorRecord_, _constructor_, _resultCapabilit
1. ReturnIfAbrupt(_nextValue_).
1. Append *undefined* to _values_.
1. Let _nextPromise_ be ? Call(_promiseResolve_, _constructor_, &laquo; _nextValue_ &raquo;).
1. Let _resolveSteps_ be the algorithm steps defined in <emu-xref href="#sec-promise.allsettled-resolve-element-functions" title></emu-xref>.
1. Let _resolveLength_ be the number of non-optional parameters of the function definition in <emu-xref href="#sec-promise.allsettled-resolve-element-functions" title></emu-xref>.
1. Let _resolveElement_ be ! CreateBuiltinFunction(_resolveSteps_, _resolveLength_, *""*, &laquo; [[AlreadyCalled]], [[Index]], [[Values]], [[Capability]], [[RemainingElements]] &raquo;).
1. Let _stepsFulfilled_ be the algorithm steps defined in <emu-xref href="#sec-promise.allsettled-resolve-element-functions" title></emu-xref>.
1. Let _lengthFulfilled_ be the number of non-optional parameters of the function definition in <emu-xref href="#sec-promise.allsettled-resolve-element-functions" title></emu-xref>.
1. Let _onFulfilled_ be ! CreateBuiltinFunction(_stepsFulfilled_, _lengthFulfilled_, *""*, &laquo; [[AlreadyCalled]], [[Index]], [[Values]], [[Capability]], [[RemainingElements]] &raquo;).
1. Let _alreadyCalled_ be the Record { [[Value]]: *false* }.
1. Set _resolveElement_.[[AlreadyCalled]] to _alreadyCalled_.
1. Set _resolveElement_.[[Index]] to _index_.
1. Set _resolveElement_.[[Values]] to _values_.
1. Set _resolveElement_.[[Capability]] to _resultCapability_.
1. Set _resolveElement_.[[RemainingElements]] to _remainingElementsCount_.
1. Let _rejectSteps_ be the algorithm steps defined in <emu-xref href="#sec-promise.allsettled-reject-element-functions" title></emu-xref>.
1. Let _rejectLength_ be the number of non-optional parameters of the function definition in <emu-xref href="#sec-promise.allsettled-reject-element-functions" title></emu-xref>.
1. Let _rejectElement_ be ! CreateBuiltinFunction(_rejectSteps_, _rejectLength_, *""*, &laquo; [[AlreadyCalled]], [[Index]], [[Values]], [[Capability]], [[RemainingElements]] &raquo;).
1. Set _rejectElement_.[[AlreadyCalled]] to _alreadyCalled_.
1. Set _rejectElement_.[[Index]] to _index_.
1. Set _rejectElement_.[[Values]] to _values_.
1. Set _rejectElement_.[[Capability]] to _resultCapability_.
1. Set _rejectElement_.[[RemainingElements]] to _remainingElementsCount_.
1. Set _onFulfilled_.[[AlreadyCalled]] to _alreadyCalled_.
1. Set _onFulfilled_.[[Index]] to _index_.
1. Set _onFulfilled_.[[Values]] to _values_.
1. Set _onFulfilled_.[[Capability]] to _resultCapability_.
1. Set _onFulfilled_.[[RemainingElements]] to _remainingElementsCount_.
1. Let _stepsRejected_ be the algorithm steps defined in <emu-xref href="#sec-promise.allsettled-reject-element-functions" title></emu-xref>.
1. Let _lengthRejected_ be the number of non-optional parameters of the function definition in <emu-xref href="#sec-promise.allsettled-reject-element-functions" title></emu-xref>.
1. Let _onRejected_ be ! CreateBuiltinFunction(_stepsRejected_, _lengthRejected_, *""*, &laquo; [[AlreadyCalled]], [[Index]], [[Values]], [[Capability]], [[RemainingElements]] &raquo;).
1. Set _onRejected_.[[AlreadyCalled]] to _alreadyCalled_.
1. Set _onRejected_.[[Index]] to _index_.
1. Set _onRejected_.[[Values]] to _values_.
1. Set _onRejected_.[[Capability]] to _resultCapability_.
1. Set _onRejected_.[[RemainingElements]] to _remainingElementsCount_.
1. Set _remainingElementsCount_.[[Value]] to _remainingElementsCount_.[[Value]] + 1.
1. Perform ? Invoke(_nextPromise_, *"then"*, &laquo; _resolveElement_, _rejectElement_ &raquo;).
1. Perform ? Invoke(_nextPromise_, *"then"*, &laquo; _onFulfilled_, _onRejected_ &raquo;).
1. Set _index_ to _index_ + 1.
</emu-alg>
</emu-clause>
Expand Down Expand Up @@ -39167,16 +39167,16 @@ <h1>PerformPromiseAny ( _iteratorRecord_, _constructor_, _resultCapability_, _pr
1. ReturnIfAbrupt(_nextValue_).
1. Append *undefined* to _errors_.
1. Let _nextPromise_ be ? Call(_promiseResolve_, _constructor_, &laquo; _nextValue_ &raquo;).
1. Let _rejectSteps_ be the algorithm steps defined in <emu-xref href="#sec-promise.any-reject-element-functions" title></emu-xref>.
1. Let _rejectLength_ be the number of non-optional parameters of the function definition in <emu-xref href="#sec-promise.any-reject-element-functions" title></emu-xref>.
1. Let _rejectElement_ be ! CreateBuiltinFunction(_rejectSteps_, _rejectLength_, *""*, &laquo; [[AlreadyCalled]], [[Index]], [[Errors]], [[Capability]], [[RemainingElements]] &raquo;).
1. Set _rejectElement_.[[AlreadyCalled]] to *false*.
1. Set _rejectElement_.[[Index]] to _index_.
1. Set _rejectElement_.[[Errors]] to _errors_.
1. Set _rejectElement_.[[Capability]] to _resultCapability_.
1. Set _rejectElement_.[[RemainingElements]] to _remainingElementsCount_.
1. Let _stepsRejected_ be the algorithm steps defined in <emu-xref href="#sec-promise.any-reject-element-functions" title></emu-xref>.
1. Let _lengthRejected_ be the number of non-optional parameters of the function definition in <emu-xref href="#sec-promise.any-reject-element-functions" title></emu-xref>.
1. Let _onRejected_ be ! CreateBuiltinFunction(_stepsRejected_, _lengthRejected_, *""*, &laquo; [[AlreadyCalled]], [[Index]], [[Errors]], [[Capability]], [[RemainingElements]] &raquo;).
1. Set _onRejected_.[[AlreadyCalled]] to *false*.
1. Set _onRejected_.[[Index]] to _index_.
1. Set _onRejected_.[[Errors]] to _errors_.
1. Set _onRejected_.[[Capability]] to _resultCapability_.
1. Set _onRejected_.[[RemainingElements]] to _remainingElementsCount_.
1. Set _remainingElementsCount_.[[Value]] to _remainingElementsCount_.[[Value]] + 1.
1. Perform ? Invoke(_nextPromise_, *"then"*, &laquo; _resultCapability_.[[Resolve]], _rejectElement_ &raquo;).
1. Perform ? Invoke(_nextPromise_, *"then"*, &laquo; _resultCapability_.[[Resolve]], _onRejected_ &raquo;).
1. Set _index_ to _index_ + 1.
</emu-alg>
</emu-clause>
Expand Down

0 comments on commit 677e20d

Please sign in to comment.