ljharb at gmail.com
Sun Feb 25 03:27:55 UTC 2018
Simply theorizing about how it might be done - without an actual spec diff
(this email might be close but I can't personally reason about it) - isn't
going to achieve much, unfortunately.
However, if you'd like to make a PR to the proposal repo, I'd be happy to
review it. If it seems possible, and if it passes the test suites, I'd be
happy to make the corresponding PR to the actual spec and test262.
(as for "waiting a year", ES is a living standard; there's no need to wait
that long. If a change is presented that results in fewer observable calls
without violating any of the criteria that led to the current spec, I
suspect the committee and implementors would be more than happy to see the
change go in ASAP)
On Sat, Feb 24, 2018 at 1:22 AM, Raul-Sebastian Mihăilă <
raul.mihaila at gmail.com> wrote:
> Trying better formatting for esdiscuss.org.
> CreateResolvingFunctions(promise, finallySourcePromise)
> update step 3: Let resolve be CreateBuiltinFunction(stepsResolve, «
> [[Promise]], [[AlreadyResolved]], [[FinallySourcePromise]] »).
> insert new step 6: Set resolve.[[FinallySourcePromise]] to
> GetCapabilitiesExecutor Functions
> A GetCapabilitiesExecutor function is an anonymous built-in function
> that has a [[Capability]] and a [[FinallySourcePromise]] internal slots.
> NewPromiseCapability(C, finallySourcePromise = undefined)
> update step 5: Let executor be CreateBuiltinFunction(steps, «
> [[Capability]], [[FinallySourcePromise]] »).
> insert new step 7: Set executor.[[FinallySourcePromise]] to
> Promise ( executor )
> insert step 8: Let finallySourcePromise be undefined.
> insert setp 9: If executor has a internal slot [[FinallySourcePromise]]
> Let finallySourcePromise be executor.[[FinallySourcePromise]]
> update step 8 (which now becomes step 10): Let resolvingFunctions be
> CreateResolvingFunctions(promise, finallySourcePromise).
> PromiseResolveThenableJob(promiseToResolve, thenable, then,
> The job PromiseResolveThenableJob with parameters promiseToResolve,
> thenable, then and finallySourcePromise performs the following steps:
> update step 1: Let resolvingFunctions be CreateResolvingFunctions(promiseToResolve,
> Let promise be the this value.
> If IsPromise(promise) is false, throw a TypeError exception.
> Let C be ? SpeciesConstructor(promise, %Promise%).
> Let resultCapability be ? NewPromiseCapability(C, promise).
> Return PerformPromiseThen(promise, onFinally, onFinally,
> Promise Resolve Functions
> update step 7: If Type(resolution) is not Object, then
> Let finallySourcePromise be F.[[FinallySourcePromise]]
> If finallySourcePromise is undefined
> return FulfillPromise(promise, resolution).
> If finallySourcePromise.[[PromiseState]] is "rejected"
> return RejectPromise(promise, finallySourcePromise.[[Promise
> return FulfillPromise(promise, finallySourcePromise.[[Promise
> update step 12: Perform EnqueueJob("PromiseJobs",
> PromiseResolveThenableJob, « promise, resolution, thenAction,
> F.[[FinallySourcePromise]] »).
> es-discuss mailing list
> es-discuss at mozilla.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the es-discuss