• yangguo's avatar
    [debug] use catch prediction flag for promise rejections. · 6d0a4202
    yangguo authored
    This is in preparation to implementing exception prediction for async
    functions.  Each handler table entry can now predict "caught", "uncaught", or
    "promise". The latter indicates that the exception will lead to a promise
    rejection.
    
    To mark the relevant try-catch blocks, we add a new native syntax.
    try { } %catch (e) { } indicates a TryCatchStatement with the "promise"
    prediction.
    
    The previous implementation of using the function to tell the relevant
    try-catch apart from inner try-catch blocks will not work for async functions
    since these can have inner try-catch blocks inside the same function.
    
    BUG=v8:5167
    
    Review-Url: https://codereview.chromium.org/2161263003
    Cr-Commit-Position: refs/heads/master@{#37966}
    6d0a4202
handler-table-builder.cc 2.37 KB