• caitp's avatar
    [async-await] (simpler) fix for Return in try/finally in async functions · 39642fa2
    caitp authored
    Alternative approach to https://codereview.chromium.org/2667983004/, which
    does not depend on implicit control flow changes from
    https://codereview.chromium.org/2664083002
    
    - Remove handling for `async function` from Parser::RewriteReturn(). This functionality
    is moved to BytecodeGenerator::BuildAsyncReturn(). This ensures that promise resolution
    is deferred until all finally blocks are evaluated fully.
    
    - Add a new deferred command (CMD_ASYNC_RETURN), which instructs ControlScope to
    generate return code using BuildAsyncReturn rather than BuildReturn.
    
    - Parser has a new `NewReturnStatement()` helper which determines what type of return
    statement to generate based on the type of function.
    
    BUG=v8:5896, v8:4483
    R=littledan@chromium.org, neis@chromium.org, rmcilroy@chromium.org, adamk@chromium.org, gsathya@chromium.org
    
    Review-Url: https://codereview.chromium.org/2685683002
    Cr-Commit-Position: refs/heads/master@{#43104}
    39642fa2
Name
Last commit
Last update
..
regress Loading commit data...
async-arrow-lexical-arguments.js Loading commit data...
async-arrow-lexical-new.target.js Loading commit data...
async-arrow-lexical-super.js Loading commit data...
async-arrow-lexical-this.js Loading commit data...
async-await-basic.js Loading commit data...
async-await-no-constructor.js Loading commit data...
async-await-resolve-new.js Loading commit data...
async-await-species.js Loading commit data...
async-destructuring.js Loading commit data...
async-function-stacktrace.js Loading commit data...
async-function-try-finally.js Loading commit data...
object-entries.js Loading commit data...
object-get-own-property-descriptors.js Loading commit data...
object-values.js Loading commit data...
sloppy-no-duplicate-async.js Loading commit data...