Description[promise] Inline CreateResolvingFunctions
This CL inlines CreateResolvingFunctions removing the need for the 'alreadyResolved' variable and object literal which is used to return the two closures.
Instead this patch stores the state directly on the promise using a symbol. This patch also adds an additional parameter to the ResolvePromise and RejectPromise to make ensure that we do the resolution/rejection again when we resolve with a Promise. The symbol and this extra parameter only prevent external users from resolving/rejecting multiple times.
This patch results in a 7.3% improvement in the bluebird benchmark over 5 runs.
BUG=v8:5046
Patch Set 1 #Patch Set 2 : update cctest #
Total comments: 5
Messages
Total messages: 12 (8 generated)
|