1. 12 Sep, 2017 2 commits
  2. 11 Sep, 2017 1 commit
  3. 08 Sep, 2017 1 commit
  4. 07 Sep, 2017 1 commit
  5. 05 Sep, 2017 2 commits
  6. 04 Sep, 2017 1 commit
  7. 01 Sep, 2017 1 commit
    • Benedikt Meurer's avatar
      [turbofan] Optimize fast enum cache driven for..in. · f1ec44e2
      Benedikt Meurer authored
      This CL adds support to optimize for..in in fast enum-cache mode to the
      same degree that it was optimized in Crankshaft, without adding the same
      deoptimization loop that Crankshaft had with missing enum cache indices.
      That means code like
      
        for (var k in o) {
          var v = o[k];
          // ...
        }
      
      and code like
      
        for (var k in o) {
          if (Object.prototype.hasOwnProperty.call(o, k)) {
            var v = o[k];
            // ...
          }
        }
      
      which follows the https://eslint.org/docs/rules/guard-for-in linter
      rule, can now utilize the enum cache indices if o has only fast
      properties on the receiver, which speeds up the access o[k]
      significantly and reduces the pollution of the global megamorphic
      stub cache.
      
      For example the micro-benchmark in the tracking bug v8:6702 now runs
      faster than ever before:
      
       forIn: 1516 ms.
       forInHasOwnProperty: 1674 ms.
       forInHasOwnPropertySafe: 1595 ms.
       forInSum: 2051 ms.
       forInSumSafe: 2215 ms.
      
      Compared to numbers from V8 5.8 which is the last version running with
      Crankshaft
      
       forIn: 1641 ms.
       forInHasOwnProperty: 1719 ms.
       forInHasOwnPropertySafe: 1802 ms.
       forInSum: 2226 ms.
       forInSumSafe: 2409 ms.
      
      and V8 6.0 which is the current stable version with TurboFan:
      
       forIn: 1713 ms.
       forInHasOwnProperty: 5417 ms.
       forInHasOwnPropertySafe: 5324 ms.
       forInSum: 7556 ms.
       forInSumSafe: 11067 ms.
      
      It also improves the throughput on the string-fasta benchmark by
      around 7-10%, and there seems to be a ~5% improvement on the
      Speedometer/React benchmark locally.
      
      For this to work, the ForInPrepare bytecode was split into
      ForInEnumerate and ForInPrepare, which is very similar to how it was
      handled in Fullcodegen initially. In TurboFan we introduce a new
      operator LoadFieldByIndex that does the dynamic property load.
      
      This also removes the CheckMapValue operator again in favor of
      just using LoadField, ReferenceEqual and CheckIf, which work
      automatically with the EscapeAnalysis and the
      BranchConditionElimination.
      
      Bug: v8:6702
      Change-Id: I91235413eea478ba77ace7bd14bb2f62e155dd9a
      Reviewed-on: https://chromium-review.googlesource.com/645949
      Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
      Reviewed-by: 's avatarYang Guo <yangguo@chromium.org>
      Reviewed-by: 's avatarJaroslav Sevcik <jarin@chromium.org>
      Reviewed-by: 's avatarLeszek Swirski <leszeks@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#47768}
      f1ec44e2
  8. 31 Aug, 2017 1 commit
  9. 29 Aug, 2017 1 commit
  10. 28 Aug, 2017 2 commits
  11. 25 Aug, 2017 1 commit
    • Leszek Swirski's avatar
      [ignition] Always write the deferred command result register · e5df5bd0
      Leszek Swirski authored
      For deferred commands (such as in try-finally), some deferred commands
      save and restore the accumulator using a result register (e.g. return,
      throw, rethrow), while others don't (e.g. break, continue,
      fall-through).
      
      However, conditionally reading this result register that may not ever be
      written caused it to be considered live from the start of the function,
      as far as the liveness analysis could statically tell.
      
      Now, we write the result register for all deferred commands, including
      the fall-through. As a micro-optimization, we re-use the Smi command
      tokeen to clobber the result, rather than emitting an LdaUndefined.
      
      Bug: chromium:758472
      Change-Id: I2ea65e2249b40ee6403216e654a8bb88d50bec3b
      Reviewed-on: https://chromium-review.googlesource.com/635592
      Commit-Queue: Leszek Swirski <leszeks@chromium.org>
      Reviewed-by: 's avatarRoss McIlroy <rmcilroy@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#47612}
      e5df5bd0
  12. 23 Aug, 2017 2 commits
  13. 21 Aug, 2017 1 commit
  14. 17 Aug, 2017 1 commit
  15. 11 Aug, 2017 3 commits
    • Ross McIlroy's avatar
      [Interpreter] Remove new.target from fixed frame slot. · c820b89b
      Ross McIlroy authored
      Removes the new.target slot from the interpreter's fixed frame. Instead
      adds a field to BytecodeArray to get the bytecode's incoming
      new.target or generator object register. The InterpreterEntryTrampoline
      then sets this register with the incoming new.target (or generator object)
      when the function is called. This register can be directly the new.target
      or generator object variable if they are LOCAL location, otherwise it is a
      temporary register which is then moved to the variable's location during the
      function prologue.
      
      This fixes a hack in the deoptimizer where we would set the new.target fixed
      slot to undefined in order to avoid extending it's lifetime through the
      optimized code - now it's just a standard register and can be optimized away
      as normal.
      
      Bug=v8:6644
      
      Change-Id: Ieb8cc34cccefd9fb6634a90cbc77c6002a54f2ae
      Reviewed-on: https://chromium-review.googlesource.com/608966
      Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
      Reviewed-by: 's avatarMichael Starzinger <mstarzinger@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#47320}
      c820b89b
    • Ross McIlroy's avatar
      [fullcodegen] Delete FullCodegen. · 1458e8b0
      Ross McIlroy authored
      Deletes the now unused Full-codegen compiler. Also removes some macro
      assembler instructions which are no longer used.
      
      Note: there is still additional cleanup work to do after this lands
      (e.g., remove support for FCG frames support and FCG
      debugger support, etc.), but this will be done in followup CLs to keep
      this patch managable.
      
      BUG=v8:6409
      
      Change-Id: I8d828fe7a64d29f2c1252d5fda968a630a2e9ef2
      Reviewed-on: https://chromium-review.googlesource.com/584773
      Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
      Reviewed-by: 's avatarYang Guo <yangguo@chromium.org>
      Reviewed-by: 's avatarMichael Starzinger <mstarzinger@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#47307}
      1458e8b0
    • Benedikt Meurer's avatar
      [turbofan] Collect and use SignedSmall input feedback for Divide. · 622852e5
      Benedikt Meurer authored
      For Divide operations like
      
        r = a / b
      
      where r has only truncated uses (i.e. only used in bitwise operations),
      we used to generate a Float64Div unless we statically knew something
      about a and b, even if a and b have always been integers so far.
      Crankshaft was able to generate an integer division here, because
      Fullcodegen collected feedback independently for inputs and outputs of
      binary operations.
      
      This adds new BinaryOperationFeedback::kSignedSmallInputs, which is used
      specifically for Divide to state that we have seen only SignedSmall
      inputs thus far, but the outputs weren't always in the SignedSmall
      range.
      
      The issue was discovered in a WebGL Triangulation library and reported
      via https://twitter.com/mourner/status/895708603117518848 after Node
      8.3.0 was released with I+TF.
      
      R=jarin@chromium.org
      
      Bug: v8:6698
      Change-Id: I830e421a3bf91fc8fa3665cbb706bc13675a6d2b
      Reviewed-on: https://chromium-review.googlesource.com/612063
      Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
      Reviewed-by: 's avatarJaroslav Sevcik <jarin@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#47302}
      622852e5
  16. 10 Aug, 2017 1 commit
  17. 09 Aug, 2017 2 commits
  18. 08 Aug, 2017 2 commits
  19. 02 Aug, 2017 1 commit
  20. 01 Aug, 2017 3 commits
    • Caitlin Potter's avatar
      Reland "[async-iteration] implement spec-change to `yield` in async generators" · ac6ed35a
      Caitlin Potter authored
      Per https://github.com/tc39/proposal-async-iteration/pull/102/files:
      
      AsyncGeneratorResolve no longer unwraps a value component. Instead, the value is
      unwrapped before the builtin call via Await, allowing Promise rejections to
      affect the generator control flow.
      
      Thus, all `yield <expr>` implicitly become `yield await <expr>`.
      
      Additionally, `return <expr>` becomes `return await <expr>`. Finally, when the
      generator is resumed with `.return()`, the parameter passed to .return() is
      awaited before generator execution properly continues).
      
      BUG=v8:6187, v8:5855
      R=littledan@chromium.org, neis@chromium.org, adamk@chromium.org
      TBR=rmcilroy@chromium.org, neis@chromium.org
      
      Cq-Include-Trybots: master.tryserver.v8:v8_linux_noi18n_rel_ng
      Change-Id: Id7718028fd555481f9f4ca0dbecfa788e3057c48
      Reviewed-on: https://chromium-review.googlesource.com/594500Reviewed-by: 's avatarCaitlin Potter <caitp@igalia.com>
      Reviewed-by: 's avatarRoss McIlroy <rmcilroy@chromium.org>
      Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
      Commit-Queue: Caitlin Potter <caitp@igalia.com>
      Cr-Commit-Position: refs/heads/master@{#47058}
      ac6ed35a
    • jgruber's avatar
      Reland "[builtins] Remove Builtins::Name() accessors" · fcaa2c2e
      jgruber authored
      This is a reland of 2f79e035
      Original change's description:
      > [builtins] Remove Builtins::Name() accessors
      > 
      > Instead of auto-generating the Name() convenience accessor, use a macro to
      > avoid wasting code space.
      > 
      >   BUILTIN_CODE(isolate, Name)
      > 
      > expands to
      > 
      >   isolate->builtins()->builtin_handle(Builtins::kName);
      > 
      > This reduces the size of libv8.so by 134,752 bytes on a x64 release build.
      > 
      > Bug: v8:6624
      > Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
      > Change-Id: Idff7ee5c45e344e73412c0f47e92553c7c7ff75f
      > Reviewed-on: https://chromium-review.googlesource.com/593607
      > Reviewed-by: Andreas Haas <ahaas@chromium.org>
      > Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
      > Commit-Queue: Jakob Gruber <jgruber@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#47010}
      
      TBR=bmeurer@chromium.org,ahaas@chromium.org
      
      Bug: v8:6624
      Change-Id: I4733731e56dc8873ee06c2b36cac1918c0a658b2
      Reviewed-on: https://chromium-review.googlesource.com/594087
      Commit-Queue: Jakob Gruber <jgruber@chromium.org>
      Reviewed-by: 's avatarAndreas Haas <ahaas@chromium.org>
      Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#47037}
      fcaa2c2e
    • Sathya Gunasekaran's avatar
      [parser] Provide better error when destructuring callable · c805d5e3
      Sathya Gunasekaran authored
      The patch changes CallPrinter's AST traversal to continue even after
      the first positive match for an AST node. This helps us check for the
      subsequent GetIterator AST node in case of destructuring.
      
      We can not differentiate between the function call failing and the
      GetIterator failing based on source position info. This would involve
      runtime checks costing performance.
      
      Instead of providing an incorrect error, we provide both the
      possiblities to user and allow them to disambiguate.
      
      Previously,
        d8> function f() { return 5; }
        undefined
        d8> var [a] = f();
        (d8):1: TypeError: f is not a function
        var [a] = f();
                  ^
        TypeError: f is not a function
            at (d8):1:11
      
      
      Now,
        d8> function f() { return 5; }
        undefined
        d8> var [a] = f();
        (d8):1: TypeError: f is not a function or its return value is not iterable
        var [a] = f();
                  ^
        TypeError: f is not a function or its return value is not iterable
            at (d8):1:11
      
      Bug: v8:6616, v8:6513
      Change-Id: I3d6427f10cae54951b0ad0e5ddcbe802bb7191c1
      Reviewed-on: https://chromium-review.googlesource.com/594894
      Commit-Queue: Sathya Gunasekaran <gsathya@chromium.org>
      Reviewed-by: 's avatarAdam Klein <adamk@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#47025}
      c805d5e3
  21. 31 Jul, 2017 4 commits
    • Michael Achenbach's avatar
      Revert "[async-iteration] implement spec-change to `yield` in async generators" · 2d79d2c3
      Michael Achenbach authored
      This reverts commit 409f84c9.
      
      Reason for revert: Breaks nosnap debug:
      https://build.chromium.org/p/client.v8/builders/V8%20Linux%20-%20nosnap%20-%20debug/builds/14288
      
      Original change's description:
      > [async-iteration] implement spec-change to `yield` in async generators
      > 
      > Per https://github.com/tc39/proposal-async-iteration/pull/102/files:
      > 
      > AsyncGeneratorResolve no longer unwraps a value component. Instead, the
      > value is unwrapped before the builtin call via Await, allowing Promise
      > rejections to affect the generator control flow.
      > 
      > Thus, all `yield <expr>` implicitly become `yield await <expr>`.
      > 
      > Additionally, `return <expr>` becomes `return await <expr>`. Finally, when
      > the generator is resumed with `.return()`, the parameter passed to .return()
      > is awaited before generator execution properly continues).
      > 
      > BUG=v8:5855
      > R=​littledan@chromium.org, neis@chromium.org, adamk@chromium.org
      > 
      > Cq-Include-Trybots: master.tryserver.v8:v8_linux_noi18n_rel_ng
      > Change-Id: Ife084076c3ed434b5467e6aeba14082f8b410ad5
      > Reviewed-on: https://chromium-review.googlesource.com/523844
      > Commit-Queue: Caitlin Potter <caitp@igalia.com>
      > Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
      > Reviewed-by: Georg Neis <neis@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#47011}
      
      TBR=rmcilroy@chromium.org,adamk@chromium.org,yangguo@chromium.org,neis@chromium.org,littledan@chromium.org,gsathya@chromium.org,caitp@igalia.com
      
      Change-Id: Ie6ad7e5410a3a89aab7a5dc68de36eb27b9354fe
      No-Presubmit: true
      No-Tree-Checks: true
      No-Try: true
      Bug: v8:5855
      Cq-Include-Trybots: master.tryserver.v8:v8_linux_noi18n_rel_ng
      Reviewed-on: https://chromium-review.googlesource.com/593952Reviewed-by: 's avatarMichael Achenbach <machenbach@chromium.org>
      Commit-Queue: Michael Achenbach <machenbach@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#47013}
      2d79d2c3
    • Jakob Gruber's avatar
      Revert "[builtins] Remove Builtins::Name() accessors" · 17a26c0b
      Jakob Gruber authored
      This reverts commit 2f79e035.
      
      Reason for revert: Conflicts with successor CL.
      
      Original change's description:
      > [builtins] Remove Builtins::Name() accessors
      > 
      > Instead of auto-generating the Name() convenience accessor, use a macro to
      > avoid wasting code space.
      > 
      >   BUILTIN_CODE(isolate, Name)
      > 
      > expands to
      > 
      >   isolate->builtins()->builtin_handle(Builtins::kName);
      > 
      > This reduces the size of libv8.so by 134,752 bytes on a x64 release build.
      > 
      > Bug: v8:6624
      > Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
      > Change-Id: Idff7ee5c45e344e73412c0f47e92553c7c7ff75f
      > Reviewed-on: https://chromium-review.googlesource.com/593607
      > Reviewed-by: Andreas Haas <ahaas@chromium.org>
      > Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
      > Commit-Queue: Jakob Gruber <jgruber@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#47010}
      
      TBR=yangguo@chromium.org,ahaas@chromium.org,jgruber@chromium.org,bmeurer@chromium.org
      
      Change-Id: Ia9ef5c755b26c3f4e143d87a7c51033614ea435e
      No-Presubmit: true
      No-Tree-Checks: true
      No-Try: true
      Bug: v8:6624
      Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
      Reviewed-on: https://chromium-review.googlesource.com/594048Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
      Commit-Queue: Jakob Gruber <jgruber@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#47012}
      17a26c0b
    • Caitlin Potter's avatar
      [async-iteration] implement spec-change to `yield` in async generators · 409f84c9
      Caitlin Potter authored
      Per https://github.com/tc39/proposal-async-iteration/pull/102/files:
      
      AsyncGeneratorResolve no longer unwraps a value component. Instead, the
      value is unwrapped before the builtin call via Await, allowing Promise
      rejections to affect the generator control flow.
      
      Thus, all `yield <expr>` implicitly become `yield await <expr>`.
      
      Additionally, `return <expr>` becomes `return await <expr>`. Finally, when
      the generator is resumed with `.return()`, the parameter passed to .return()
      is awaited before generator execution properly continues).
      
      BUG=v8:5855
      R=littledan@chromium.org, neis@chromium.org, adamk@chromium.org
      
      Cq-Include-Trybots: master.tryserver.v8:v8_linux_noi18n_rel_ng
      Change-Id: Ife084076c3ed434b5467e6aeba14082f8b410ad5
      Reviewed-on: https://chromium-review.googlesource.com/523844
      Commit-Queue: Caitlin Potter <caitp@igalia.com>
      Reviewed-by: 's avatarRoss McIlroy <rmcilroy@chromium.org>
      Reviewed-by: 's avatarGeorg Neis <neis@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#47011}
      409f84c9
    • jgruber's avatar
      [builtins] Remove Builtins::Name() accessors · 2f79e035
      jgruber authored
      Instead of auto-generating the Name() convenience accessor, use a macro to
      avoid wasting code space.
      
        BUILTIN_CODE(isolate, Name)
      
      expands to
      
        isolate->builtins()->builtin_handle(Builtins::kName);
      
      This reduces the size of libv8.so by 134,752 bytes on a x64 release build.
      
      Bug: v8:6624
      Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
      Change-Id: Idff7ee5c45e344e73412c0f47e92553c7c7ff75f
      Reviewed-on: https://chromium-review.googlesource.com/593607Reviewed-by: 's avatarAndreas Haas <ahaas@chromium.org>
      Reviewed-by: 's avatarBenedikt Meurer <bmeurer@chromium.org>
      Commit-Queue: Jakob Gruber <jgruber@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#47010}
      2f79e035
  22. 27 Jul, 2017 1 commit
  23. 25 Jul, 2017 4 commits
  24. 24 Jul, 2017 1 commit
    • Benedikt Meurer's avatar
      [turbofan] Add IC support for Call/ConstructWithSpread. · 5ee1b7ad
      Benedikt Meurer authored
      Properly hook up the (existing) IC slots for the CallWithSpread and
      ConstructWithSpread bytecodes, and change the interpreter to collect
      feedback (call counts and regular target function feedback) for those.
      There's no integration with the Array constructor yet, since that
      requires some yak shaving to thread through the AllocationSite to the
      Array constructor stub. Once we have a solution for that, we can also
      remove the current code duplication in the Call/Construct IC logic.
      
      Also properly hook up the newly available feedback in TurboFan. This
      will fix not only the missing target feedback, but more importantly
      the tear-up decisions for optimization are correct now in the presence
      of spread calls, and even more importantly the inlining heurstic has
      proper call frequencies for those.
      
      Some follow-up changes will be necessary to make sure we use the
      feedback even for corner cases that aren't handled properly yet. Also
      we should consider collecting feedback about the map of the spread
      at some point to be able to always inline the spread calls.
      
      Bug: v8:6399, v8:6527, v8:6630
      Change-Id: I818dbcb411fd3951d8e9d31f5d7e794f8d60fa00
      Reviewed-on: https://chromium-review.googlesource.com/582647Reviewed-by: 's avatarJaroslav Sevcik <jarin@chromium.org>
      Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#46832}
      5ee1b7ad