1. 19 Jan, 2018 1 commit
  2. 18 Jan, 2018 2 commits
  3. 11 Jan, 2018 1 commit
    • Caitlin Potter's avatar
      Reland "[esnext] load `iterator.next` only once at beginning of iteration" · 2d889aa9
      Caitlin Potter authored
      https://github.com/tc39/ecma262/pull/988 gained concensus during the
      september 2017 TC39 meetings. This moves the load of the "next" method
      to the very beginning of the iteration protocol, rather than during
      each iteration step.
      
      This impacts:
      
      - yield*
      - for-of loops
      - spread arguments
      - array spreads
      
      In the v8 implementation, this also affects async iteration versions of
      these things (the sole exception being the Async-From-Sync iterator,
      which requires a few more changes to work with this, likely done in a
      followup patch).
      
      This change introduces a new AST node, ResolvedProperty, which can be used
      as a callee by Call nodes to produce the same bytecode as Property calls,
      without observably re-loading the property. This is used in several
      AST-desugarings involving the iteration protocol.
      
      BUG=v8:6861, v8:5699
      R=rmcilroy@chromium.org
      TBR=neis@chromium.org, adamk@chromium.org
      
      Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
      Change-Id: I9685db6e85315ba8a2df87a4537c2bf491e1e35b
      Reviewed-on: https://chromium-review.googlesource.com/857593
      Commit-Queue: Caitlin Potter <caitp@igalia.com>
      Reviewed-by: 's avatarRoss McIlroy <rmcilroy@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#50518}
      2d889aa9
  4. 09 Jan, 2018 3 commits
    • Benedikt Meurer's avatar
      [builtins] Turn EnqueueMicrotask into a dedicated builtin. · 6ef05c78
      Benedikt Meurer authored
      Inlining the EnqueueMicrotask logic into the various uses blows up the
      snapshot size significantly. So instead of doing that we just turn the
      operation into a dedicated builtin that we call from the various uses.
      This still avoids the runtime function call overhead and maintains the
      fast path without write barriers for the common case of the microtask
      queue fitting into new space.
      
      This also moves back the microtask helper CSA functions to the
      specialized assembler.
      
      Bug: v8:7253, chromium:799563
      Change-Id: I2d24d0e5c01e442c5ad7f5d4373fbc6e94351ac5
      Reviewed-on: https://chromium-review.googlesource.com/856618Reviewed-by: 's avatarSathya Gunasekaran <gsathya@chromium.org>
      Reviewed-by: 's avatarBenedikt Meurer <bmeurer@chromium.org>
      Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#50461}
      6ef05c78
    • Michael Achenbach's avatar
      Revert "[esnext] load `iterator.next` only once at beginning of iteration" · 163b5d70
      Michael Achenbach authored
      This reverts commit bf4cc9ee.
      
      Reason for revert: Breaks windows with msvc and linux with gcc
      https://build.chromium.org/p/client.v8/builders/V8%20Win64%20-%20msvc/builds/841
      https://build.chromium.org/p/client.v8/builders/V8%20Linux%20gcc%204.8/builds/17265
      
      Original change's description:
      > [esnext] load `iterator.next` only once at beginning of iteration
      > 
      > https://github.com/tc39/ecma262/pull/988 gained concensus during the
      > september 2017 TC39 meetings. This moves the load of the "next" method
      > to the very beginning of the iteration protocol, rather than during
      > each iteration step.
      > 
      > This impacts:
      > 
      > - yield*
      > - for-of loops
      > - spread arguments
      > - array spreads
      > 
      > In the v8 implementation, this also affects async iteration versions of
      > these things (the sole exception being the Async-From-Sync iterator,
      > which requires a few more changes to work with this, likely done in a
      > followup patch).
      > 
      > This change introduces a new AST node, ResolvedProperty, which can be used
      > as a callee by Call nodes to produce the same bytecode as Property calls,
      > without observably re-loading the property. This is used in several
      > AST-desugarings involving the iteration protocol.
      > 
      > BUG=v8:6861, v8:5699
      > R=​rmcilroy@chromium.org, neis@chromium.org, adamk@chromium.org
      > 
      > Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
      > Change-Id: Ib81106a0182687fc5efea0bc32302ad06376773b
      > Reviewed-on: https://chromium-review.googlesource.com/687997
      > Commit-Queue: Caitlin Potter <caitp@igalia.com>
      > Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
      > Reviewed-by: Adam Klein <adamk@chromium.org>
      > Reviewed-by: Georg Neis <neis@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#50452}
      
      TBR=rmcilroy@chromium.org,adamk@chromium.org,neis@chromium.org,caitp@igalia.com,caitp@chromium.org
      
      Change-Id: I1797c0d596dfd6850d6f0f505f591a7a990dd1f1
      No-Presubmit: true
      No-Tree-Checks: true
      No-Try: true
      Bug: v8:6861, v8:5699
      Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
      Reviewed-on: https://chromium-review.googlesource.com/857616Reviewed-by: 's avatarMichael Achenbach <machenbach@chromium.org>
      Commit-Queue: Michael Achenbach <machenbach@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#50454}
      163b5d70
    • Caitlin Potter's avatar
      [esnext] load `iterator.next` only once at beginning of iteration · bf4cc9ee
      Caitlin Potter authored
      https://github.com/tc39/ecma262/pull/988 gained concensus during the
      september 2017 TC39 meetings. This moves the load of the "next" method
      to the very beginning of the iteration protocol, rather than during
      each iteration step.
      
      This impacts:
      
      - yield*
      - for-of loops
      - spread arguments
      - array spreads
      
      In the v8 implementation, this also affects async iteration versions of
      these things (the sole exception being the Async-From-Sync iterator,
      which requires a few more changes to work with this, likely done in a
      followup patch).
      
      This change introduces a new AST node, ResolvedProperty, which can be used
      as a callee by Call nodes to produce the same bytecode as Property calls,
      without observably re-loading the property. This is used in several
      AST-desugarings involving the iteration protocol.
      
      BUG=v8:6861, v8:5699
      R=rmcilroy@chromium.org, neis@chromium.org, adamk@chromium.org
      
      Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
      Change-Id: Ib81106a0182687fc5efea0bc32302ad06376773b
      Reviewed-on: https://chromium-review.googlesource.com/687997
      Commit-Queue: Caitlin Potter <caitp@igalia.com>
      Reviewed-by: 's avatarRoss McIlroy <rmcilroy@chromium.org>
      Reviewed-by: 's avatarAdam Klein <adamk@chromium.org>
      Reviewed-by: 's avatarGeorg Neis <neis@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#50452}
      bf4cc9ee
  5. 07 Jan, 2018 1 commit
  6. 05 Jan, 2018 1 commit
    • Benedikt Meurer's avatar
      [builtins] Port EnqueueMicrotask to CSA. · 2b4cc835
      Benedikt Meurer authored
      Previously the Promise builtins would always use a runtime function to
      schedule a new microtask, which is unnecessarily expensive. Since the
      runtime function only adds the microtask to a FixedArray (potentially
      growing that array) and increments the number of pending microtasks, it
      is fairly straight-forward to do this in CSA land instead.
      
      This change improves the Bluebird benchmarks by 2-4% on average.
      
      Bug: v8:7253
      Change-Id: I77e96b9e5afbb4bdbe129b6bb289d9905ed581bf
      Reviewed-on: https://chromium-review.googlesource.com/851972
      Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
      Reviewed-by: 's avatarYang Guo <yangguo@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#50372}
      2b4cc835
  7. 07 Nov, 2017 1 commit
  8. 16 Oct, 2017 1 commit
    • Benedikt Meurer's avatar
      [es2015] Optimize Reflect.has builtin. · 4213af64
      Benedikt Meurer authored
      Port the baseline version of Reflect.has to the CodeStubAssembler and
      reuse the existing logic for HasProperty (i.e. the HasProperty builtin).
      Also inline the Reflect.has builtin into TurboFan, by adding a check
      on the target in front of a use of the JSHasProperty operator.
      Technically this additional check is not necessary, because the
      JSHasProperty operator already throws if the target is not a JSReceiver,
      but the exception message is confusing then.
      
      This improves the performance of the micro-benchmark from
      
        reflectHasPresent: 337 ms.
        reflectHasAbsent: 472 ms.
      
      to
      
        reflectHasPresent: 121 ms.
        reflectHasAbsent: 216 ms.
      
      which is a nice 2.8x improvement in the best case. It also improves the
      chai test on the web-tooling-benchmark by around 1-2%, which is roughly
      the expected win (since Reflect.has overall accounts for around 3-4%).
      
      Bug: v8:5996, v8:6936, v8:6937
      Change-Id: I856183229677a71c19936f06f2a4fc7a794a9a4a
      Reviewed-on: https://chromium-review.googlesource.com/720959
      Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
      Reviewed-by: 's avatarJaroslav Sevcik <jarin@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#48608}
      4213af64
  9. 07 Sep, 2017 1 commit
  10. 28 Aug, 2017 1 commit
  11. 22 Aug, 2017 1 commit
  12. 08 Jul, 2017 1 commit
    • Caitlin Potter's avatar
      [builtins] port Promise.race to CSA · bba473db
      Caitlin Potter authored
      - Implements the Promise.race algorithm using CodeStubAssembler.
      - Delete src/js/promise.js, which is no longer needed.
      - Migrate Promise constructor from slow to fast object in bootstrapper
        (per v8:5902)
      
      Increases size of snapshot_blob.bin on an x64.release build by 1.27kb.
      
      BUG=v8:5343
      R=gsathya@chromium.org, cbruni@chromium.org
      
      Change-Id: I751e7389bd6ba410109640fcd7960b6021540f2f
      Reviewed-on: https://chromium-review.googlesource.com/535041
      Commit-Queue: Caitlin Potter <caitp@igalia.com>
      Reviewed-by: 's avatarCamillo Bruni <cbruni@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#46489}
      bba473db
  13. 30 Jun, 2017 1 commit
  14. 14 Jun, 2017 1 commit
    • Caitlin Potter's avatar
      Reland "[builtins] port Promise.all to CSA" · 8ada7538
      Caitlin Potter authored
      Simplifies the implementation of IteratorClose in IteratorBuiltinsAssembler, and makes clear that it is only invoked when an exception occurs. Adds exception handling support to GetIterator, IteratorStep, and IteratorCloseOnException.
      
      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.release build
      by 8.51kb
      
      BUG=v8:5343
      R=cbruni@chromium.org, gsathysa@chromium.org, jgruber@chromium.org, hpayer@chromium.org, tebbi@chromium.org
      
      Change-Id: I29c4a529154ef49ad65555ce6ddc2c5b7c9de6b3
      Reviewed-on: https://chromium-review.googlesource.com/508473
      Commit-Queue: Caitlin Potter <caitp@igalia.com>
      Reviewed-by: 's avatarHannes Payer <hpayer@chromium.org>
      Reviewed-by: 's avatarTobias Tebbi <tebbi@chromium.org>
      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@{#45946}
      8ada7538
  15. 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
  16. 21 Mar, 2017 1 commit
  17. 16 Mar, 2017 1 commit
  18. 17 Feb, 2017 1 commit
  19. 20 Jan, 2017 1 commit
  20. 18 Jan, 2017 1 commit
  21. 17 Jan, 2017 2 commits
  22. 12 Jan, 2017 1 commit
  23. 06 Jan, 2017 1 commit
  24. 04 Jan, 2017 3 commits
  25. 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
  26. 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
  27. 21 Dec, 2016 1 commit
  28. 19 Dec, 2016 2 commits