1. 26 Aug, 2016 1 commit
    • littledan's avatar
      Desugar async/await to create the resulting Promise upfront · 5386c006
      littledan authored
      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}
      5386c006
  2. 24 Aug, 2016 2 commits
    • littledan's avatar
      Do not trigger ExceptionEvents for another forwarding case · aae17eb3
      littledan authored
      This patch fixes up one last case of redundant ExceptionEvents being
      triggered in the debugger for Promises--it makes the default reject
      handler for Promises (e.g., if the second argument for
      Promise.prototype.then is missing) appear to the debugger as a
      rethrow.
      
      R=adamk@chromium.org,jgruber@chromium.org
      BUG=v8:5167
      
      Review-Url: https://codereview.chromium.org/2278643002
      Cr-Commit-Position: refs/heads/master@{#38876}
      aae17eb3
    • littledan's avatar
      Change which ExceptionEvents are triggered by Promises · 013e49f7
      littledan authored
      To make async/await catch prediction work well, this patch regularizes
      the exception events sent to DevTools from various places in the Promise
      lifecycle. The core is that there should be an exception event when the
      rejection first starts, rather than when it is propagated.
      
      - Several cases within Promise code which propagate errors are
        modified to not trigger a new ExceptionEvent in that case, such
        as .then on a rejected Promise and returning a rejected Promise
        from .then, as well as Promise.race and Promise.all.
      - Make Promise.reject() create an ExceptionEvent, subject to catch
        prediction based on the Promise stack. This is important
        so that, e.g., if "await Promise.reject()" will trigger a new
        throw (rather than a silent rethrow of something that never
        triggered an event in the first place).
      
      BUG=v8:5167
      
      Review-Url: https://codereview.chromium.org/2244003003
      Cr-Commit-Position: refs/heads/master@{#38847}
      013e49f7
  3. 22 Aug, 2016 2 commits
  4. 18 Aug, 2016 1 commit
  5. 17 Aug, 2016 3 commits
  6. 15 Aug, 2016 1 commit
  7. 12 Aug, 2016 1 commit
    • jkummerow's avatar
      [regexp][liveedit] Fix inconsistent JSArrays · bb9707c8
      jkummerow authored
      The hand-written KeyedLoadIC_Megamorphic stub didn't care about JSArray
      lengths, which made it lenient towards said lengths being wrong, but it
      will soon fix that bug and thereby become more strict.
      
      LiveEdit: factory->NewJSArray(capacity) doesn't set a length, so set it
      manually.
      RegExp: to avoid having to take care of array length updating in the
      RegExpExecStub, just use a JSObject instead.
      
      Review-Url: https://codereview.chromium.org/2244673002
      Cr-Commit-Position: refs/heads/master@{#38624}
      bb9707c8
  8. 10 Aug, 2016 1 commit
  9. 09 Aug, 2016 1 commit
  10. 06 Aug, 2016 1 commit
    • littledan's avatar
      [promise] Async/await edge case spec compliance fix · 7826bfa7
      littledan authored
      - Don't read .constructor when returning a Promise from an async function.
        Instead, call out to the internals of Promise.resolve directly.
        This is done by adding back in an "optimization" from an earlier form of
        the async/await code written by Caitlin Potter.
      - Async functions always return a new Promise with a distinct identity,
        even if they simply return another Promise.
      
      R=caitp@igalia.com
      BUG=v8:4483
      
      Review-Url: https://codereview.chromium.org/2219623002
      Cr-Commit-Position: refs/heads/master@{#38404}
      7826bfa7
  11. 04 Aug, 2016 1 commit
    • caitp's avatar
      [promise] separate PerformPromiseThen from PromiseThen · 0272aa50
      caitp authored
      The `PerformPromiseThen` spec-internal operation is used by the async functions
      proposal, in order to ensure that AwaitExpressions are not observable via
      usual mechanisms/hooks, such as Symbol.species.
      
      BUG=v8:5253
      R=littledan@chromium.org, adamk@chromium.org, gsathya@chromium.org, yangguo@chromium.org
      
      Review-Url: https://codereview.chromium.org/2209433003
      Cr-Commit-Position: refs/heads/master@{#38353}
      0272aa50
  12. 03 Aug, 2016 5 commits
  13. 02 Aug, 2016 1 commit
  14. 01 Aug, 2016 3 commits
  15. 28 Jul, 2016 2 commits
  16. 22 Jul, 2016 2 commits
    • jgruber's avatar
      Begin porting CallSite to C++ · c8a0dce9
      jgruber authored
      Review-Url: https://codereview.chromium.org/2158303002
      Cr-Commit-Position: refs/heads/master@{#37975}
      c8a0dce9
    • 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
  17. 21 Jul, 2016 3 commits
  18. 20 Jul, 2016 3 commits
  19. 19 Jul, 2016 1 commit
  20. 18 Jul, 2016 1 commit
  21. 15 Jul, 2016 1 commit
  22. 14 Jul, 2016 1 commit
  23. 13 Jul, 2016 1 commit
  24. 12 Jul, 2016 1 commit