1. 12 Aug, 2019 11 commits
    • Jakob Gruber's avatar
      [isolate-data] Move the StackGuard to IsolateData · ef24a565
      Jakob Gruber authored
      IsolateData guarantees a fixed root-relative offset for its contents,
      thus allowing more efficient code generation for accesses to these
      addresses. The stack limit, located within the StackGuard, is used by
      all stack checks in CSA.
      
      This CL moves the StackGuard inside IsolateData to make such efficient
      loads of the limit possible.
      
      Bug: v8:9595,v8:9534
      Change-Id: I9abe26b88952709c88bf625cc6c028497815a58c
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1741648Reviewed-by: 's avatarJakob Kummerow <jkummerow@chromium.org>
      Commit-Queue: Jakob Gruber <jgruber@chromium.org>
      Auto-Submit: Jakob Gruber <jgruber@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#63160}
      ef24a565
    • Yang Guo's avatar
      Use relative paths to OWNERS files · 04a6f872
      Yang Guo authored
      R=machenbach@chromium.org
      
      Bug: chromium:992584
      Change-Id: I301013731a502689f2edd5c90e5e7bf2136198c5
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1745337Reviewed-by: 's avatarMichael Achenbach <machenbach@chromium.org>
      Commit-Queue: Yang Guo <yangguo@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#63159}
      04a6f872
    • Jakob Gruber's avatar
      [compiler] Widen optimization for external reference loads · 33e1a6e9
      Jakob Gruber authored
      Turbofan applies the following optimization to external reference
      loads on arm64 and x64: if the root-relative offset to an external
      reference's address is known to be constant (and the root register has
      been initialized), calculate the external reference as |kRootRegister
      + <offset>| instead of loading it from the external reference table.
      
      There are two main cases to consider:
      
      1. External references to arbitrary addresses in the native address
      space, e.g. libc_memcpy. These kinds of external references have a
      fixed address within the same running process, but may (and likely
      will) change between processes (e.g.: mksnapshot and later chromium),
      and the root-relative offset is different for each Isolate within the
      same process.
      
      These kinds of external references can be optimized as above when
      *not* generating code which will later be serialized, and *not*
      generating isolate-independent code.
      
      2. External references to addresses within the fixed-size region of
      the Isolate (essentially: within IsolateData). Since these move with
      the Isolate, their root-relative offset is guaranteed to be constant
      at all times.
      
      The optimization can always be applied to these cases as long as the
      root register has been initialized.
      
      Prior to this CL, we only recognized and optimized for case 1. This CL
      additionally adds support for 2.
      
      An example of improved code generated due to this CL:
      
      Before:
      // r13 is the kRootRegister on x64.
      // 0x3010 is the root-relative offset to Isolate::context_address.
      leaq rdx, [r13+0x3010]
      movq r8, [rdx]
      
      After:
      movq rdx, [r13+0x3010]
      
      Bug: v8:9534
      Change-Id: Idfcca751e98a56c0e5ead2c701c12a677df75399
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1748727
      Commit-Queue: Jakob Gruber <jgruber@chromium.org>
      Auto-Submit: Jakob Gruber <jgruber@chromium.org>
      Reviewed-by: 's avatarTobias Tebbi <tebbi@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#63158}
      33e1a6e9
    • Jakob Gruber's avatar
      [compiler] Add helper functions HasAddressingMode, HasRegisterInput · 54eca658
      Jakob Gruber authored
      This adds two helper functions in code-generator-{ia32,x64}:
      
      - HasAddressingMode: is the addressing mode not equal to kNone?
      - HasRegisterInput: is the specified input in a register?
      
      Bug: v8:9534
      Change-Id: I690ee52e247b347a7ef5ba0c98bba47c321ca6b5
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1748726
      Commit-Queue: Jakob Gruber <jgruber@chromium.org>
      Reviewed-by: 's avatarTobias Tebbi <tebbi@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#63157}
      54eca658
    • Jakob Gruber's avatar
      [compiler] Refactor stack check handling · 0aa204fe
      Jakob Gruber authored
      This CL unifies how stack checks are handled in the Turbofan pipeline
      across architectures, in preparation for properly handling stack
      overflows caused by deoptimization in follow-up work. It will also
      open up possibilities to simplify related logic.
      
      How this used to work: JSStackCheck was lowered to a UintLessThan
      with the stack pointer (sp) and stack limit as inputs. On x64 and ia32,
      this node pattern was later recognized during instruction selection
      and rewritten to dedicated operators. On other platforms, including
      arm and arm64, special logic exists to avoid useless
      register-to-register moves when accessing the sp.
      
      This CL introduces a new StackPointerGreaterThan operator, which takes
      the stack limit as its sole input. This is what JSStackCheck now lowers
      to. This is threaded through to code generation, where we emit the
      appropriate code (in the future, we will apply an additional offset to
      the sp here).
      
      In follow-up CLs, we can remove or replace remaining uses of
      LoadStackPointer in CSA, Wasm, and the interpreter; and then remove
      the LoadStackPointer operator, related node matchers, related register
      constraints, and the pseudo-smi stack limit roots.
      
      Bug: v8:9534
      Change-Id: I0e3f1beeed65b163c4ee5787600bed8c3cc671e1
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1738863Reviewed-by: 's avatarGeorg Neis <neis@chromium.org>
      Commit-Queue: Jakob Gruber <jgruber@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#63156}
      0aa204fe
    • Mathias Bynens's avatar
      Roll Test262 · 408bafcb
      Mathias Bynens authored
      Bug: v8:7834
      Change-Id: I23d8d6f4b2d00f82f11615c5a17d29b24fdf3175
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1748730
      Commit-Queue: Mathias Bynens <mathias@chromium.org>
      Reviewed-by: 's avatarSathya Gunasekaran  <gsathya@chromium.org>
      Reviewed-by: 's avatarMichael Achenbach <machenbach@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#63155}
      408bafcb
    • Santiago Aboy Solanes's avatar
      [ptr-compr][turbofan][cleanup] Make use of InsertChange functions · 53f6e02a
      Santiago Aboy Solanes authored
      We weren't fully using InsertChangeCompressedToTagged and similar, which
      in turn made it so that we were using more NewNode. This CL unifies the
      way that we generate the insertion of Change nodes regarding decompressions.
      
      Dribe-by fix: make InsertChangeCompressedPointerToTaggedPointer actually
      use Pointer.
      
      Bug: v8:7703
      Change-Id: I1d8835a54914cdab93f652ff17e39e8271a585df
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1741661Reviewed-by: 's avatarTobias Tebbi <tebbi@chromium.org>
      Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#63154}
      53f6e02a
    • Santiago Aboy Solanes's avatar
      [turbofan] Better typing of OSR context pointer · b597d6fa
      Santiago Aboy Solanes authored
      The Osr context is a pointer, and we can make it clear in the Typer.
      
      Known pitfall: If we have a context within a context, the innner context
      pointer is typed as Any.
      
      Change-Id: Ia4d7e43ef42ef03f835e4b71d32d117ae835feee
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1741659Reviewed-by: 's avatarTobias Tebbi <tebbi@chromium.org>
      Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#63153}
      b597d6fa
    • Tobias Tebbi's avatar
      [build] disable unittests failing on Win64 release · bc68618c
      Tobias Tebbi authored
      Bug: chromium:992783
      Change-Id: I54ac01dfaa6717a2600cf40af95d6e74872ad2b5
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1748731Reviewed-by: 's avatarTamer Tas <tmrts@chromium.org>
      Commit-Queue: Tamer Tas <tmrts@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#63152}
      bc68618c
    • Ross McIlroy's avatar
      [Parsing] Avoid updating parsing stats in CollectSourcePositions. · 585ad977
      Ross McIlroy authored
      We have already parsed a function when we call CollectSourcePositions, so we
      shouldn't update the parsing statistics again otherwise we will double-count.
      Also, CollectSourcePositions needs to be made native-context independent, and
      Blink's CountUsage counter requires a context to have been entered when it is
      called and so isn't context independent.
      
      BUG=chromium:992063
      
      Change-Id: Idda50b98a8308f022cb90e1a18afb43982e95298
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1746472
      Auto-Submit: Ross McIlroy <rmcilroy@chromium.org>
      Commit-Queue: Leszek Swirski <leszeks@chromium.org>
      Reviewed-by: 's avatarLeszek Swirski <leszeks@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#63151}
      585ad977
    • Ana Peško's avatar
      [regexp] Naive tiering-up · 71acda22
      Ana Peško authored
      This CL implements a naive tiering-up strategy where the interpreter
      is used for the first execution for every regex, and the compiler is
      used for every execution after that. The only exception is if a
      global replace is being executed on a regex, we eagerly tier-up to
      native code right away.
      
      To use the tier-up logic --regexp-tier-up needs to be set. It is
      currently disabled by default.
      
      Bug v8:9566
      
      Change-Id: Ib64ed77cbfcde10411161c0541dfa2501a0a93bd
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1710661Reviewed-by: 's avatarPeter Marshall <petermarshall@chromium.org>
      Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
      Reviewed-by: 's avatarMichael Starzinger <mstarzinger@chromium.org>
      Commit-Queue: Ana Pesko <anapesko@google.com>
      Cr-Commit-Position: refs/heads/master@{#63150}
      71acda22
  2. 09 Aug, 2019 16 commits
  3. 08 Aug, 2019 13 commits