1. 28 Apr, 2017 1 commit
  2. 27 Apr, 2017 3 commits
  3. 26 Apr, 2017 2 commits
  4. 25 Apr, 2017 3 commits
    • Clemens Hammacher's avatar
      [wasm] Move wasm-macro-gen.h to test/common/wasm · fc6d4a1f
      Clemens Hammacher authored
      This header file is only used from tests.
      Also, move the LoadStoreOpcodeOf method (only used in tests) from
      wasm-opcodes.h to wasm-macro-gen.h.
      
      R=ahaas@chromium.org
      
      Change-Id: I8d4691be494b5c1fbe3084441329850930bad647
      Reviewed-on: https://chromium-review.googlesource.com/486861
      Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
      Reviewed-by: 's avatarAndreas Haas <ahaas@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#44845}
      fc6d4a1f
    • Clemens Hammacher's avatar
      [wasm] [cleanup] Move LocalDeclEncoder to own compilation unit · e8df147f
      Clemens Hammacher authored
      wasm-macro-gen.h is mainly used from tests, but LocalDeclEncoder is
      also used from various other places.
      This CL moves the LocalDeclEncoder to an own compilation unit. We want
      to later move wasm-macro-gen.h to the tests folder.
      It also refactors the LocalDeclEncoder to reuse the
      LEBHelper::write_u32v and LEBHelper::sizeof_u32v methods instead of
      reimplementing it.
      
      R=ahaas@chromium.org
      
      Change-Id: Ia4651436f0544578da7c1c43596d343571942e97
      Reviewed-on: https://chromium-review.googlesource.com/486724Reviewed-by: 's avatarAndreas Haas <ahaas@chromium.org>
      Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#44838}
      e8df147f
    • Clemens Hammacher's avatar
      [wasm] [interpreter] Precompute side table for breaks · 92bf8327
      Clemens Hammacher authored
      Instead of dynamically tracking the block nesting, precompute the
      information statically.
      The interpreter was already using a side table to store the pc diff for
      each break, conditional break and others. The information needed to
      adjust the stack was tracked dynamically, however. This CL also
      precomputes this information, as it is statically known.
      Instead of just storing the pc diff in the side table, we now store the
      pc diff, the stack height diff and the arity of the target block.
      
      Local measurements show speedups of 5-6% on average, sometimes >10%.
      
      R=ahaas@chromium.org
      BUG=v8:5822
      
      Change-Id: I986cfa989aabe1488f2ff79ddbfbb28aeffe1452
      Reviewed-on: https://chromium-review.googlesource.com/485482Reviewed-by: 's avatarAndreas Haas <ahaas@chromium.org>
      Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#44837}
      92bf8327
  5. 24 Apr, 2017 3 commits
  6. 21 Apr, 2017 1 commit
  7. 19 Apr, 2017 1 commit
    • Adam Klein's avatar
      Remove "calls eval" bit from ParseInfo and PreParseData · 9b512732
      Adam Klein authored
      There's no reason to keep track, for a preparsed function itself,
      whether that function calls eval. All that matters is that the ancestor
      scopes are marked as having an inner scope which calls eval. The function
      will have its "calls eval" bit persisted if/when it's fully parsed.
      
      The only "behavioral" change in this patch is the removal of a DCHECK.
      
      Bug: v8:6092
      Change-Id: I17e396c8a265030fe0ad941707e4a97972e6650b
      Reviewed-on: https://chromium-review.googlesource.com/481223
      Commit-Queue: Adam Klein <adamk@chromium.org>
      Reviewed-by: 's avatarMarja Hölttä <marja@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#44732}
      9b512732
  8. 18 Apr, 2017 2 commits
  9. 13 Apr, 2017 1 commit
    • bmeurer's avatar
      [turbofan] Let ChangeFloat64ToTagged canonicalize to Smi if possible. · 385734bf
      bmeurer authored
      When the incoming value to ChangeFloat64ToTagged is in Smi range, we
      represent it as Smi instead of a HeapNumber. This addresses a range of
      problems where TurboFan unnecessarily deoptimizes because an operation
      learned Smi feedback in Ignition, but was then confronted with a tagged
      HeapNumber in TurboFan, just because the value was also represented as
      unboxed double somewhere in the meantime.
      
      BUG=v8:6256
      R=yangguo@chromium.org
      
      Review-Url: https://codereview.chromium.org/2815283002
      Cr-Commit-Position: refs/heads/master@{#44631}
      385734bf
  10. 12 Apr, 2017 2 commits
  11. 11 Apr, 2017 8 commits
  12. 10 Apr, 2017 6 commits
    • Leszek Swirski's avatar
      [ignition] Add call bytecodes for undefined receiver · 751e8935
      Leszek Swirski authored
      Adds a collection of call bytecodes which have an implicit undefined
      receiver argument, for cases such as global calls where we know that the
      receiver has to be undefined. This way we can skip an LdaUndefined,
      decrease bytecode register pressure, and set a more accurate
      ConvertReceiverMode on the interpreter and TurboFan call.
      
      As a side effect, the "normal" Call bytecode now becomes a rare case
      (only with calls and super property calls), so we get rid of its 0-2
      argument special cases and modify CallProperty[N] to use the
      NotNullOrUndefined ConvertReceiverMode.
      
      Change-Id: I9374a32fefd66fc0251b5193bae7a6b7dc31eefc
      Reviewed-on: https://chromium-review.googlesource.com/463287
      Commit-Queue: Leszek Swirski <leszeks@chromium.org>
      Reviewed-by: 's avatarMichael Starzinger <mstarzinger@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#44530}
      751e8935
    • Andreas Haas's avatar
      Terminate the decoding loop more gracefully. · 72d5f384
      Andreas Haas authored
      The decoder has the assumption that it always holds that pc <= end.
      However, in the FunctionBodyDecoder, end was set to start to terminate
      the decoding loop. Thereby the assumption was violated, which caused a
      crash. I set end to pc now to end the decoding loop, which preserves
      the assumption and terminates the loop.
      
      BUG=chromium:709741
      TEST=unittests/FunctionBodyDecoderTest.Regression709741
      R=clemensh@chromium.org
      
      Change-Id: I5bfd61bdc4809fc16f12ca8611876c66a79aaa36
      Reviewed-on: https://chromium-review.googlesource.com/472723
      Commit-Queue: Andreas Haas <ahaas@chromium.org>
      Reviewed-by: 's avatarClemens Hammacher <clemensh@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#44524}
      72d5f384
    • Clemens Hammacher's avatar
      [wasm] Refactor wasm::Result type · d50ebde7
      Clemens Hammacher authored
      - Store std::string instead of std::unique_ptr<char[]> for the error
        message.
      - Remove ErrorCode, which was just kSuccess and kError anyway. Error is
        now detected on whether error_msg_ is empty or not.
      - Refactor constructors for perfect forwarding; this will allow us to
        implement Result<std::unique_ptr<X*>>.
      - Refactor Decoder::toResult for perfect forwarding.
      - Remove output operators (operator<<) for Result; it was only used in
        the error case anyway. Print error message directly instead.
        The operator was problematic since it assumed the existence of an
        output operator for every T which is used in Result<T>.
      - Remove ModuleError and FunctionError, introduce general static
        Result<T>::Error method instead.
      
      R=ahaas@chromium.org
      
      Change-Id: I1e0f602a61ee9780fee2a3ed33147d431fb092ba
      Reviewed-on: https://chromium-review.googlesource.com/472748
      Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
      Reviewed-by: 's avatarAndreas Haas <ahaas@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#44518}
      d50ebde7
    • Ross McIlroy's avatar
      Reland: [Interpreter] Move BinaryOp Smi transformation into BytecodeGenerator."" · 496864f8
      Ross McIlroy authored
      This relands commit d3e9aade. The original CL was reverted speculatively but didn't cause the buildbot failure.
      
      Original change's description:
      > [Interpreter] Move BinaryOp Smi transformation into BytecodeGenerator.
      > 
      > Perform the transformation to <BinaryOp>Smi for Binary ops which take Smi
      > literals in the BytecodeGenerator. This enables us to perform the
      > transformation for literals on either side for commutative operations, and
      > Avoids having to do the check on every bytecode in the peephole optimizer.
      > 
      > In the process, adds Smi bytecode variants for all binary operations, adding
      >  - MulSmi
      >  - DivSmi
      >  - ModSmi
      >  - BitwiseXorSmi
      >  - ShiftRightLogical
      > 
      > BUG=v8:6194
      > 
      > Change-Id: If1484252f5385c16957004b9cac8bfbb1f209219
      > Reviewed-on: https://chromium-review.googlesource.com/466246
      > Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
      > Reviewed-by: Yang Guo <yangguo@chromium.org>
      > Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
      > Reviewed-by: Igor Sheludko <ishell@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#44477}
      
      TBR=rmcilroy@chromium.org,machenbach@chromium.org,yangguo@chromium.org,mstarzinger@chromium.org,mythria@chromium.org,v8-reviews@googlegroups.com,ishell@chromium.org
      # Not skipping CQ checks because original CL landed > 1 day ago.
      BUG=v8:6194
      
      Change-Id: I2ccaefa1ce58d3885f5c2648755985c06f25c1d8
      Reviewed-on: https://chromium-review.googlesource.com/472746Reviewed-by: 's avatarRoss McIlroy <rmcilroy@chromium.org>
      Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#44511}
      496864f8
    • Andreas Haas's avatar
      [wasm] Refactor the Result object · e313bc17
      Andreas Haas authored
      Instead of storing {start} and {error_pc} we now store the
      {error_offset}, which is anyways the only value we use.
      
      R=clemensh@chromium.org
      
      Change-Id: Ifd9791eff5c9efce2e7e2a1989bf3b5eaa464a02
      Reviewed-on: https://chromium-review.googlesource.com/471527
      Commit-Queue: Andreas Haas <ahaas@chromium.org>
      Reviewed-by: 's avatarClemens Hammacher <clemensh@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#44510}
      e313bc17
    • Wiktor Garbacz's avatar
      [compiler-dispatcher] Just parse functions without SFI. · c8bc0cac
      Wiktor Garbacz authored
      This is inital work in order to utilize CompilerDispatcher in parallel
      parsing.
      
      BUG=v8:6093
      
      Change-Id: I6aae4f32ddb2314585d09039c1c5d7e658dc896f
      Reviewed-on: https://chromium-review.googlesource.com/469709Reviewed-by: 's avatarMarja Hölttä <marja@chromium.org>
      Reviewed-by: 's avatarJochen Eisinger <jochen@chromium.org>
      Commit-Queue: Wiktor Garbacz <wiktorg@google.com>
      Cr-Commit-Position: refs/heads/master@{#44509}
      c8bc0cac
  13. 07 Apr, 2017 5 commits
    • jkummerow's avatar
      Reland "[snapshot] Move builtins generation into mksnapshot" · 5f9af1e7
      jkummerow authored
      and out of the main library. This saves about 5% of binary size
      (800KB on x64, 373KB on android_arm).
      
      Only the GN build is supported; the GYP build is maintained working
      but does not support the feature.
      
      Previously landed as 4782bc0d / r44412.
      
      BUG=v8:6055
      CQ_INCLUDE_TRYBOTS=master.tryserver.v8:v8_linux_nosnap_rel;
      
      Review-Url: https://codereview.chromium.org/2760233005
      Cr-Commit-Position: refs/heads/master@{#44489}
      5f9af1e7
    • Michael Achenbach's avatar
      Revert "[Interpreter] Move BinaryOp Smi transformation into BytecodeGenerator." · 084471ce
      Michael Achenbach authored
      This reverts commit d3e9aade.
      
      Reason for revert: Speculative for:
      https://build.chromium.org/p/client.v8.ports/builders/V8%20Linux%20-%20arm64%20-%20sim%20-%20nosnap%20-%20debug/builds/4449
      
      Bisect points to this CL.
      
      Original change's description:
      > [Interpreter] Move BinaryOp Smi transformation into BytecodeGenerator.
      > 
      > Perform the transformation to <BinaryOp>Smi for Binary ops which take Smi
      > literals in the BytecodeGenerator. This enables us to perform the
      > transformation for literals on either side for commutative operations, and
      > Avoids having to do the check on every bytecode in the peephole optimizer.
      > 
      > In the process, adds Smi bytecode variants for all binary operations, adding
      >  - MulSmi
      >  - DivSmi
      >  - ModSmi
      >  - BitwiseXorSmi
      >  - ShiftRightLogical
      > 
      > BUG=v8:6194
      > 
      > Change-Id: If1484252f5385c16957004b9cac8bfbb1f209219
      > Reviewed-on: https://chromium-review.googlesource.com/466246
      > Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
      > Reviewed-by: Yang Guo <yangguo@chromium.org>
      > Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
      > Reviewed-by: Igor Sheludko <ishell@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#44477}
      
      TBR=rmcilroy@chromium.org,yangguo@chromium.org,mstarzinger@chromium.org,mythria@chromium.org,ishell@chromium.org,v8-reviews@googlegroups.com
      NOPRESUBMIT=true
      NOTREECHECKS=true
      NOTRY=true
      BUG=v8:6194
      
      Change-Id: If57dbdbe40be77804bf437463b855d3167e2d473
      Reviewed-on: https://chromium-review.googlesource.com/471308Reviewed-by: 's avatarMichael Achenbach <machenbach@chromium.org>
      Commit-Queue: Michael Achenbach <machenbach@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#44488}
      084471ce
    • Ross McIlroy's avatar
      [Interpreter] Remove nop elision from peephole and be smarter about emitting nops. · 8dc308d0
      Ross McIlroy authored
      Rather than doing nop elision in the peephole optimizer, be smarter about
      emitting nops for elided register transfers in the bytecode optimizer.
      
      BUG=v8:6194
      
      Change-Id: Ib1a7168a0d143e4f2da7c6d43080998793c30822
      Reviewed-on: https://chromium-review.googlesource.com/468929
      Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
      Reviewed-by: 's avatarLeszek Swirski <leszeks@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#44479}
      8dc308d0
    • Ross McIlroy's avatar
      [Interpreter] Move BinaryOp Smi transformation into BytecodeGenerator. · d3e9aade
      Ross McIlroy authored
      Perform the transformation to <BinaryOp>Smi for Binary ops which take Smi
      literals in the BytecodeGenerator. This enables us to perform the
      transformation for literals on either side for commutative operations, and
      Avoids having to do the check on every bytecode in the peephole optimizer.
      
      In the process, adds Smi bytecode variants for all binary operations, adding
       - MulSmi
       - DivSmi
       - ModSmi
       - BitwiseXorSmi
       - ShiftRightLogical
      
      BUG=v8:6194
      
      Change-Id: If1484252f5385c16957004b9cac8bfbb1f209219
      Reviewed-on: https://chromium-review.googlesource.com/466246
      Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
      Reviewed-by: 's avatarYang Guo <yangguo@chromium.org>
      Reviewed-by: 's avatarMichael Starzinger <mstarzinger@chromium.org>
      Reviewed-by: 's avatarIgor Sheludko <ishell@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#44477}
      d3e9aade
    • jarin's avatar
      [turbofan] Add type to the allocation operator. · e97b29a4
      jarin authored
      This gives us more precise type information, so we can avoid some type
      guards to refine the type information back.
      
      The motivation for this is to help escape analysis by not introducing
      redundant type guards (which escape analysis cannot handle yet even
      though it could and should do).
      
      Motivating example:
      
      In the example below, the out-of-object property array for properties
      fld5 and fld6 gets type Any when it is created by "o.fld5 = 5" (for
      object literals, we store 4 properties in-objeca, the rest goes out
      of object).
      
      When we run load elimination for the load the out-of-object property
      array (to store 6 into o.fld6), load elimination inserts TypeGuard to
      enforce the Type::Internal() type. This makes escape analysis bail out
      on this object, and we do not eliminate the object creation.
      
      function f() {
        var o = {};
        o.fld1 = 1;
        o.fld2 = 2;
        o.fld3 = 3;
        o.fld4 = 4;
        o.fld5 = 5;
        o.fld6 = 6;
      }
      
      f();
      f();
      %OptimizeFunctionOnNextCall(f);
      f();
      
      Review-Url: https://codereview.chromium.org/2797993006
      Cr-Commit-Position: refs/heads/master@{#44470}
      e97b29a4
  14. 06 Apr, 2017 2 commits