Desugar async/await to create the resulting Promise upfront
As part of the work to implement catch prediction for async functions, the resulting Promise that is the output of the function needs to be available earlier for a couple reasons: - To be able to do %DebugPushPromise/%DebugPopPromise over the body of the async function - To be able to pass the resulting promise into AsyncFunctionAwait in order to set up the dependency chains This patch creates the Promise earlier and pushes it onto the debug stack; a later patch will set up the dependency chain. Although the debug stack is set up, it's not anticipated that this will change the catch prediction helpfully yet, as everything will still likely be predicted as 'caught' for now, as before. R=caitp@igalia.com,yangguo@chromium.org CC=neis@chromium.org,gsathya@chromium.org BUG=v8:5167 Review-Url: https://codereview.chromium.org/2233923003 Cr-Commit-Position: refs/heads/master@{#38957}
Showing
This diff is collapsed.
Please
register
or
sign in
to comment