1. 13 Feb, 2017 1 commit
  2. 09 Feb, 2017 2 commits
  3. 25 Jan, 2017 1 commit
    • kozyatinskiy's avatar
      [inspector] change target promise for kDebugWillHandle & kDebugDidHandle · cb545a8c
      kozyatinskiy authored
      - kDebugPromiseCreated(task, parent_task)
      This event occurs when promise is created (PromiseHookType::Init). V8Debugger uses this event to maintain task -> parent task map.
      
      - kDebugEnqueueAsyncFunction(task)
      This event occurs when first internal promise for async function is created. V8Debugger collects stack trace at this point.
      
      - kDebugEnqueuePromiseResolve(task),
      This event occurs when Promise fulfills with resolved status. V8Debugger collects stack trace at this point.
      
      - kDebugEnqueuePromiseReject(task),
      This event occurs when Promise fulfills with rejected status. V8Debugger collects stack trace at this point.
      
      - kDebugPromiseCollected,
      This event occurs when Promise is collected and no other chained callbacks can be added. V8Debugger removes information about async task for this promise.
      
      - kDebugWillHandle,
      This event occurs when chained promise function (either resolve or reject handler) is called. V8Debugger installs parent promise's stack (based on task -> parent_task map) as current if available or current promise's scheduled stack otherwise.
      
      - kDebugDidHandle,
      This event occurs after chained promise function has finished. V8Debugger restores asynchronous call chain to previous one.
      
      With this change all instrumentation calls are related to current promise (before WillHandle and DidHandle were related to next async task).
      
      Before V8Debugger supported only the following:
      - asyncTaskScheduled(task1)
      - asyncTaskStarted(task1)
      - asyncTaskFinished(task1)
      
      Now V8Debugger supports the following:
      - asyncTaskScheduled(parent_task)
      ..
      - asyncTaskCreated(task, parent_task),
      - asyncTaskStarted(task), uses parent_task scheduled stack
      - asyncTaskScheduled(task)
      - asyncTaskFinished(task)
      
      Additionally: WillHandle and DidHandle were migrated to PromiseHook API.
      
      More details: https://docs.google.com/document/d/1u19N45f1gSF7M39mGsycJEK3IPyJgIXCBnWyiPeuJFE
      
      BUG=v8:5738
      R=dgozman@chromium.org,gsathya@chromium.org,yangguo@chromium.org
      
      Review-Url: https://codereview.chromium.org/2650803003
      Cr-Commit-Position: refs/heads/master@{#42644}
      cb545a8c
  4. 20 Jan, 2017 1 commit
  5. 17 Jan, 2017 2 commits
  6. 13 Jan, 2017 1 commit
  7. 12 Jan, 2017 1 commit
  8. 10 Jan, 2017 1 commit
  9. 06 Jan, 2017 1 commit
  10. 05 Jan, 2017 1 commit
  11. 04 Jan, 2017 2 commits
  12. 03 Jan, 2017 1 commit
    • gsathya's avatar
      [promises] Refactor debug code · a2c15ba3
      gsathya authored
      -- Removes remaning debug from promise.js and moves it to c++
      -- Changes debug_id to be a smi in PromiseReactionJobInfo and
         PromiseResolveThenableJobInfo.
      -- Changes debug_name to be a smi in PromiseReactionJobInfo and
         PromiseResolveThenableJobInfo.
      -- Adds PromiseDebugActionName and PromiseDebugActionType enums
      -- Adds PromiseDebugActionNameToString and
         PromiseDebugActionTypeToString helper methods
      -- Changes variable `status` to be int in runtime functions.
      -- Changes debug_id to start from 1, not 0 for easier bookkeeping.
      
      BUG=v8:5343
      
      Review-Url: https://codereview.chromium.org/2606093002
      Cr-Commit-Position: refs/heads/master@{#42052}
      a2c15ba3
  13. 29 Dec, 2016 1 commit
    • gsathya's avatar
      [promises] Remove deferred object · 5668ce39
      gsathya authored
      This patch stores the promise, resolve, reject properties of the
      deferred object created by CreateInternalPromiseCapability and
      NewPromiseCapability directly on the promise (if the promise hasn't
      been fulfilled), otherwise they are stored on the
      PromiseReactionJobInfo.
      
      This patch removes the currently unused
      CreateInternalPromiseCapability and inlines the call to create the
      deferred promise object.
      
      NewPromiseCapability is the only function that works with a deferred.
      
      This patch results in a 8.5% improvement in benchmarks over 5 runs.
      
      BUG=v8:5343
      
      Review-Url: https://codereview.chromium.org/2590563003
      Cr-Commit-Position: refs/heads/master@{#41991}
      5668ce39
  14. 27 Dec, 2016 1 commit
  15. 23 Dec, 2016 1 commit
  16. 20 Dec, 2016 1 commit
    • yangguo's avatar
      [api] add API for Promise status and result. · 28432588
      yangguo authored
      Currently, to find out a Promise's status and result, one has to use the
      debug context. This is for example done in Node.js. This new API is a
      better replacement, also in the context of the debug context being
      deprecated eventually.
      
      R=franzih@chromium.org, gsathya@chromium.org, jochen@chromium.org
      BUG=v8:5764
      
      Review-Url: https://codereview.chromium.org/2589113002
      Cr-Commit-Position: refs/heads/master@{#41855}
      28432588
  17. 16 Dec, 2016 1 commit
  18. 15 Dec, 2016 1 commit
  19. 08 Dec, 2016 1 commit
    • gsathya's avatar
      [promises] Port ResolvePromise to TF · 11359e33
      gsathya authored
      -- Moves promiseHasHandlerSymbol to inobject property
      -- Ports PromiseResolveClosure to TF
      -- Fix a non spec async-await test which fails now because we do a map
      check for native promise check (instead of IsPromise). Changing the
      constructor (in the test) invalidates the map check.
      
      This patch results in a 7.1% performance improvement in the bluebird
      benchmark (over 5 runs).
      
      BUG=v8:5343
      
      Review-Url: https://codereview.chromium.org/2541283002
      Cr-Commit-Position: refs/heads/master@{#41569}
      11359e33
  20. 06 Dec, 2016 3 commits
  21. 05 Dec, 2016 1 commit
    • gsathya's avatar
      Object · 30b564c7
      gsathya authored
      -- New JSObject for promises: JSPromise
      
      Builtins
      -- PromiseThen TFJ
      -- PromiseCreateAndSet TFJ for internal use
      -- PerformPromiseThen TFJ for internal use
      -- PromiseInit for initial promise setup
      -- SpeciesConstructor for use in PromiseThen
      -- ThrowIfNotJSReceiver for use in SpeciesConstructor
      -- AppendPromiseCallback to update FixedArray with new callback
      -- InternalPerformPromiseThen
      
      Promises.js
      -- Cleanup unused symbols
      -- Remove PerformPromiseThen
      -- Remove PromiseThen
      -- Remove PromiseSet
      -- Remove PromiseAttachCallbacks
      
      Runtime
      -- PromiseSet to set promise inobject values
      -- Refactor functions to use FixedArrays for callbacks instead of
         JSArray
      -- Runtime_PromiseStatus to return promise status
      -- Runtime_PromiseResult to return promise result
      -- Runtime_PromiseDeferred to return deferred attached to promise
      -- Runtime_PromiseRejectReactions to return reject reactions attached
         to promise
      
      This CL results in a 13.07% improvement in the promises benchmark
      (over 5 runs).
      
      BUG=v8:5343
      
      Review-Url: https://codereview.chromium.org/2536463002
      Cr-Commit-Position: refs/heads/master@{#41503}
      30b564c7
  22. 01 Dec, 2016 1 commit
  23. 11 Nov, 2016 1 commit
    • gsathya's avatar
      [promises] Remove one runtime call to create_resolving_functions · ec61e6b4
      gsathya authored
      - Creates a new promise-utils.{h, cc} which refactors out the
      logic to create resolving functions. This is shared between the
      runtime functions and builtins.
      
      - Changes PromiseResolveThenableJobInfo to store the context
      since we no longer create the resolving functions in JS.
      
      - Changes EnqueuPromiseResolveThenableJob to take in the promise and
        not the callbacks.
      
      BUG=v8:5343
      
      Review-Url: https://codereview.chromium.org/2487053002
      Cr-Commit-Position: refs/heads/master@{#40941}
      ec61e6b4
  24. 27 Oct, 2016 2 commits