1. 15 May, 2017 2 commits
    • Clemens Hammacher's avatar
      Revert "[builtins] port Promise.all to CSA" · ae421616
      Clemens Hammacher authored
      This reverts commit 7ef1df85.
      
      Reason for revert: Breaks inspector/debugger/get-possible-breakpoints-restrict-to-function: https://build.chromium.org/p/client.v8/builders/V8%20Linux%20-%20nosnap%20-%20debug/builds/13191/steps/Check/logs/get-possible-breakpoi..
      
      Original change's description:
      > [builtins] port Promise.all to CSA
      > 
      > Introduces CodeStubAssembler helpers for common Iterator operations
      > (GetIterator, IteratorStep, IteratorClose).
      > 
      > Moves the Promise.all resolveElement closure and it's caller to
      > builtins-promise-gen.cc.
      > 
      > Instead of creating an internal array (and copying its elements into a result
      > array), a single JSArray is allocated, and appended with BuildAppendJSArray(),
      > falling back to %CreateDataProperty(), and elements are updated in the resolve
      > closure the same way. This should always be unobservable.
      > 
      > This CL increases the size of snapshot_blob.bin on an x64.debug build by 11.44kb
      > 
      > BUG=v8:5343
      > R=​cbruni@chromium.org, gsathysa@chromium.org, jgruber@chromium.org
      > 
      > Change-Id: Id69b7f76866b29caccd97f35870154c4be85f418
      > Reviewed-on: https://chromium-review.googlesource.com/497974
      > Commit-Queue: Caitlin Potter <caitp@igalia.com>
      > Reviewed-by: Camillo Bruni <cbruni@chromium.org>
      > Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
      > Reviewed-by: Jakob Gruber <jgruber@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#45306}
      
      TBR=adamk@chromium.org,cbruni@chromium.org,gsathya@chromium.org,caitp@igalia.com,jgruber@chromium.org,ishell@chromium.org
      NOPRESUBMIT=true
      NOTREECHECKS=true
      NOTRY=true
      BUG=v8:5343
      
      Change-Id: I831738003643561fa628266af2bcebbb18000e55
      Reviewed-on: https://chromium-review.googlesource.com/506014Reviewed-by: 's avatarClemens Hammacher <clemensh@chromium.org>
      Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#45313}
      ae421616
    • Caitlin Potter's avatar
      [builtins] port Promise.all to CSA · 7ef1df85
      Caitlin Potter authored
      Introduces CodeStubAssembler helpers for common Iterator operations
      (GetIterator, IteratorStep, IteratorClose).
      
      Moves the Promise.all resolveElement closure and it's caller to
      builtins-promise-gen.cc.
      
      Instead of creating an internal array (and copying its elements into a result
      array), a single JSArray is allocated, and appended with BuildAppendJSArray(),
      falling back to %CreateDataProperty(), and elements are updated in the resolve
      closure the same way. This should always be unobservable.
      
      This CL increases the size of snapshot_blob.bin on an x64.debug build by 11.44kb
      
      BUG=v8:5343
      R=cbruni@chromium.org, gsathysa@chromium.org, jgruber@chromium.org
      
      Change-Id: Id69b7f76866b29caccd97f35870154c4be85f418
      Reviewed-on: https://chromium-review.googlesource.com/497974
      Commit-Queue: Caitlin Potter <caitp@igalia.com>
      Reviewed-by: 's avatarCamillo Bruni <cbruni@chromium.org>
      Reviewed-by: 's avatarSathya Gunasekaran <gsathya@chromium.org>
      Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#45306}
      7ef1df85
  2. 13 Feb, 2017 1 commit
    • gsathya's avatar
      [promises] cleanup default promise handlers · 31bc17f0
      gsathya authored
      Use private symbols to mark default promise handler, instead of calling out to default
      handlers defined in JS. We check for this symbol in PromiseHandle and perform the
      appropriate behavior as the default handlers.
      
      Catch prediction logic is updated to account for a symbol.
      
      BUG=v8:5343
      
      Review-Url: https://codereview.chromium.org/2695593002
      Cr-Commit-Position: refs/heads/master@{#43135}
      31bc17f0
  3. 17 Jan, 2017 1 commit
  4. 12 Jan, 2017 1 commit
    • adamk's avatar
      [promises] Remove unneeded PromiseCreate function from promise.js · a0e3a8ee
      adamk authored
      This function was only needed for extrasUtils. Since it was simply
      calling a builtin function, just expose that builtin instead. This
      requires an arguments adapter frame for the builtin. As a drive-by
      fix, also added an arguments adapter for the extrasUtils.resolvePromise
      (and a regression test).
      
      Other cleanup: removed unused native context slot for PROMISE_SET_AND_CREATE.
      
      R=gsathya@chromium.org
      BUG=v8:5343
      
      Review-Url: https://codereview.chromium.org/2626793003
      Cr-Commit-Position: refs/heads/master@{#42284}
      a0e3a8ee
  5. 10 Jan, 2017 1 commit
  6. 06 Jan, 2017 1 commit
  7. 04 Jan, 2017 1 commit
  8. 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
  9. 02 Jan, 2017 1 commit
    • caitp's avatar
      [promises] port NewPromiseCapability to TF · 4f95a1eb
      caitp authored
      - Adds CodeAssembler::ConstructJS() to simplify calling JS functions as
      constructors, used by NewPromiseCapability()
      - Defines PromiseCapability as a special JSObject subclass, with a
      non-exensible Map, and read-only non-configurable DataDescriptors which
      point to its in-object fields. This allows its fields to be used by JS
      builtins until there is no longer any need.
      
      Currently, the performance benefit comes from
      https://codereview.chromium.org/2567033003/, but does not appear to
      regress performance in any significant way.
      
      BUG=v8:5343
      TBR=ulan@chromium.org
      
      Review-Url: https://codereview.chromium.org/2567333002
      Cr-Commit-Position: refs/heads/master@{#42014}
      4f95a1eb
  10. 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
  11. 23 Dec, 2016 1 commit
  12. 21 Dec, 2016 4 commits
  13. 16 Dec, 2016 1 commit
  14. 15 Dec, 2016 1 commit
  15. 14 Dec, 2016 1 commit
  16. 13 Dec, 2016 1 commit
    • gsathya's avatar
      PromiseHandle port to TF · 9fc3c017
      gsathya authored
      Splits PromiseHandle into two TF builtins to account for catch
      prediction. An exception in PromiseHandleReject builtin results in a
      "caught" prediction whereas an expception in PromiseHandle results in a
      "promise rejection" prediction.
      
      An extra is_exception_caught bit is added to Code to mark this catch
      prediction behavior.
      
      BUG=v8:5343
      
      Review-Url: https://codereview.chromium.org/2572623002
      Cr-Commit-Position: refs/heads/master@{#41683}
      9fc3c017
  17. 08 Dec, 2016 2 commits
  18. 06 Dec, 2016 2 commits
  19. 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
  20. 04 Dec, 2016 1 commit
  21. 01 Dec, 2016 2 commits
  22. 21 Nov, 2016 1 commit
  23. 18 Nov, 2016 1 commit
    • gsathya's avatar
      [async-await] Don't create resolving callbacks for throwaway promises · 764548e2
      gsathya authored
      This patch also cleans up NewPromiseCapability.
      
      This patch results in a 20% improvement over 4 runs with the following micro
      benchmark -
      
      var x = Promise.resolve();
      
      async function bar() {
          return x;
      }
      
      async function foo() {
          await bar();
      }
      
      var start = performance.now();
      var count = 0;
      var max = 10000;
      for(var i = 0; i <= max; i++) {
          foo().then(() => {
              count++;
              if(count === max) print( performance.now() - start );
          })
      }
      
      BUG=v8:5639
      
      Review-Url: https://codereview.chromium.org/2512103002
      Cr-Commit-Position: refs/heads/master@{#41116}
      764548e2
  24. 15 Nov, 2016 1 commit
  25. 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
  26. 10 Nov, 2016 1 commit
    • gsathya's avatar
      [promises] Move CreateResolvingFunctions to c++ · cb6c8e48
      gsathya authored
      - A new runtime function (%create_resolving_functions) is installed to
        call the CreateResolvingFunctions builtin from JS.
      
      - Three new builtins are created - resolve and reject functions and a
        third function that creates a new JSFunctions from these
        resolve/reject builtins.
      
      - The promise reject function is installed on the context temporarily
        as internal_promise_reject. This should go away once we remove
        PromiseSet.
      
      BUG=v8:5343
      
      Review-Url: https://codereview.chromium.org/2459283004
      Cr-Commit-Position: refs/heads/master@{#40903}
      cb6c8e48
  27. 27 Oct, 2016 1 commit
  28. 26 Oct, 2016 2 commits
  29. 25 Oct, 2016 3 commits
  30. 19 Oct, 2016 1 commit