1. 02 May, 2018 1 commit
  2. 30 Apr, 2018 1 commit
  3. 26 Apr, 2018 3 commits
  4. 25 Apr, 2018 1 commit
    • Andreas Haas's avatar
      Reland: [refactoring] Remove the isolate from signatures of ExternalReferences · 2a3c2c73
      Andreas Haas authored
      I missed one required change which was hidden behind an #if. The fix is in
      the diff between Patch 1 and Patch 3.
      
      Original message:
      In this CL I remove the isolate from signatures of ExternalReference
      accessor functions where the isolate is not used. The uses of the
      isolate were already removed in previous CLs.
      
      Changes:
      * I split the ExternalReference list in external-reference.h into
      those which need the isolate for initialization and those which do not.
      
      * I removed the public constructors and replaced them by
        ExternalReference::Create(). The reason is to separate external
        creation more clearly from internal creation, because externally
        created ExternalReferences sometimes need redirection, whereas
        internally created ExternalReferences are just stored as they are.
        In addition, by removing the isolate from the signature of the
        public constructors, they suddenly exactly matched the interal
        constructor.
      
      * Replace all uses of the public constructors with
        ExternalReference::Create().
      
      * Remove the isolate from all call sites where necessary.
      
      
      This is a step towards making WebAssembly compilation independent of
      the isolate.
      
      R=mstarzinger@chromium.org
      
      Bug: v8:7570
      Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
      Change-Id: I750c162f5d58ed32e866722b0db920f8b9bd8057
      Reviewed-on: https://chromium-review.googlesource.com/1026673Reviewed-by: 's avatarMichael Starzinger <mstarzinger@chromium.org>
      Commit-Queue: Andreas Haas <ahaas@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#52777}
      2a3c2c73
  5. 24 Apr, 2018 2 commits
    • Andreas Haas's avatar
      Revert "[refactoring] Remove the isolate from signatures of ExternalReferences" · 7bfed2ad
      Andreas Haas authored
      This reverts commit 44ea425a.
      
      Reason for revert: https://ci.chromium.org/buildbot/client.v8.ports/V8%20Arm%20-%20debug%20builder/13575
      
      Original change's description:
      > [refactoring] Remove the isolate from signatures of ExternalReferences
      > 
      > In this CL I remove the isolate from signatures of ExternalReference
      > accessor functions where the isolate is not used. The uses of the
      > isolate were already removed in previous CLs.
      > 
      > Changes:
      > * I split the ExternalReference list in external-reference.h into
      > those which need the isolate for initialization and those which do not.
      > 
      > * I removed the public constructors and replaced them by
      >   ExternalReference::Create(). The reason is to separate external
      >   creation more clearly from internal creation, because externally
      >   created ExternalReferences sometimes need redirection, whereas
      >   internally created ExternalReferences are just stored as they are.
      >   In addition, by removing the isolate from the signature of the
      >   public constructors, they suddenly exactly matched the interal
      >   constructor.
      > 
      > * Replace all uses of the public constructors with
      >   ExternalReference::Create().
      > 
      > * Remove the isolate from all call sites where necessary.
      > 
      > 
      > This is a step towards making WebAssembly compilation independent of
      > the isolate.
      > 
      > Bug: v8:7570
      > R=​mstarzinger@chromium.org
      > 
      > Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
      > Change-Id: I14f511fc6acc50ab2d6a6641299f5ddbeabef0da
      > Reviewed-on: https://chromium-review.googlesource.com/1018982
      > Commit-Queue: Andreas Haas <ahaas@chromium.org>
      > Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#52768}
      
      TBR=mstarzinger@chromium.org,ahaas@chromium.org
      
      Change-Id: I7c0d8d420f815cede23d550dee8942ac4d7791cc
      No-Presubmit: true
      No-Tree-Checks: true
      No-Try: true
      Bug: v8:7570
      Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
      Reviewed-on: https://chromium-review.googlesource.com/1026570Reviewed-by: 's avatarAndreas Haas <ahaas@chromium.org>
      Commit-Queue: Andreas Haas <ahaas@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#52769}
      7bfed2ad
    • Andreas Haas's avatar
      [refactoring] Remove the isolate from signatures of ExternalReferences · 44ea425a
      Andreas Haas authored
      In this CL I remove the isolate from signatures of ExternalReference
      accessor functions where the isolate is not used. The uses of the
      isolate were already removed in previous CLs.
      
      Changes:
      * I split the ExternalReference list in external-reference.h into
      those which need the isolate for initialization and those which do not.
      
      * I removed the public constructors and replaced them by
        ExternalReference::Create(). The reason is to separate external
        creation more clearly from internal creation, because externally
        created ExternalReferences sometimes need redirection, whereas
        internally created ExternalReferences are just stored as they are.
        In addition, by removing the isolate from the signature of the
        public constructors, they suddenly exactly matched the interal
        constructor.
      
      * Replace all uses of the public constructors with
        ExternalReference::Create().
      
      * Remove the isolate from all call sites where necessary.
      
      
      This is a step towards making WebAssembly compilation independent of
      the isolate.
      
      Bug: v8:7570
      R=mstarzinger@chromium.org
      
      Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
      Change-Id: I14f511fc6acc50ab2d6a6641299f5ddbeabef0da
      Reviewed-on: https://chromium-review.googlesource.com/1018982
      Commit-Queue: Andreas Haas <ahaas@chromium.org>
      Reviewed-by: 's avatarMichael Starzinger <mstarzinger@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#52768}
      44ea425a
  6. 13 Apr, 2018 2 commits
    • jgruber's avatar
      [stubs] Convert DoubleToIStub and MathPowStub to builtins · a3b60675
      jgruber authored
      This is mostly a simple copy & paste of the stub implementation from
      code-stubs-arch.cc to builtins-arch.cc.
      
      The conversion allows removal of a special case for the DoubleToIStub
      within the compiler & wasm pipelines, and also makes the following
      builtins isolate-independent (in conjunction with
      https://crrev.com/c/1006581):
      
      TFC BitwiseAnd
      TFC BitwiseOr
      TFC BitwiseXor
      TFC Exponentiate
      TFC ShiftLeft
      TFC ShiftRight
      TFC ShiftRightLogical
      TFJ AtomicsAdd
      TFJ AtomicsAnd
      TFJ AtomicsCompareExchange
      TFJ AtomicsExchange
      TFJ AtomicsLoad
      TFJ AtomicsOr
      TFJ AtomicsStore
      TFJ AtomicsSub
      TFJ AtomicsXor
      TFJ MathClz32
      TFJ MathImul
      TFJ MathPow
      TFJ NumberParseInt
      TFJ StringFromCharCode
      TFJ TypedArrayFrom
      TFJ TypedArrayOf
      TFJ TypedArrayPrototypeMap
      
      Drive-by: dead code removal & TODOs in code-stubs.h.
      
      Bug: v8:6666
      Change-Id: I763cba2242bcadc2d130b0aaa16a9787212b466a
      Reviewed-on: https://chromium-review.googlesource.com/1012024
      Commit-Queue: Jakob Gruber <jgruber@chromium.org>
      Reviewed-by: 's avatarMichael Starzinger <mstarzinger@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#52591}
      a3b60675
    • jgruber's avatar
      [stubs] Remove return register argument from DoubleToIStub · 87557649
      jgruber authored
      This changes DoubleToIStub to return its result on the stack instead
      of a specific return register.
      
      In a follow-up, the DoubleToIStub could be converted into a builtin.
      
      Bug: v8:6666
      Change-Id: I7852e1586c8f7b56bc5d2545a7bf6238dd2ad650
      Reviewed-on: https://chromium-review.googlesource.com/1009702
      Commit-Queue: Jakob Gruber <jgruber@chromium.org>
      Reviewed-by: 's avatarJaroslav Sevcik <jarin@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#52587}
      87557649
  7. 11 Apr, 2018 1 commit
  8. 03 Apr, 2018 1 commit
  9. 21 Mar, 2018 1 commit
    • Mike Stanton's avatar
      [turbofan] Masking/poisoning in codegen (optimized code, mips & mips64) · 1177f703
      Mike Stanton authored
      This introduces masking of loads with speculation bit during code generation.
      At the moment, this is done only under the
      --branch-load-poisoning flag, and this CL enlarges the set of supported
      platforms from {x64, arm, arm64} to {x64, arm, arm64, mips, mips64}.
      
      Overview of changes:
      - new register configuration configuration with one register reserved for
        the speculation poison/mask (kSpeculationPoisonRegister).
      - in codegen, we introduce an update to the poison register at the starts
        of all successors of branches (and deopts) that are marked as safety
        branches (deopts).
      - in memory optimizer, we lower all field and element loads to PoisonedLoads.
      - poisoned loads are then masked in codegen with the poison register.
        (In this CL, this last step is left as a TODO. You can run with the flag,
         though mitigations will just not be effective at this time).
        * only integer loads are masked at the moment.
      
      TBR=mstarzinger@chromium.org
      
      Change-Id: Ie6eb8719bf85d49c03b4a28e2f054480195a1471
      Reviewed-on: https://chromium-review.googlesource.com/973616
      Commit-Queue: Michael Stanton <mvstanton@chromium.org>
      Reviewed-by: 's avatarMichael Starzinger <mstarzinger@chromium.org>
      Reviewed-by: 's avatarMichael Stanton <mvstanton@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#52123}
      1177f703
  10. 19 Mar, 2018 2 commits
    • Michael Stanton's avatar
      Revert "[turbofan] Masking/poisoning in codegen (optimized code, mips & mips64)" · 11831378
      Michael Stanton authored
      This reverts commit 46a3c772.
      
      Reason for revert: This is actually not quite ready. What we need is a speculation free poisoning, and if we do another branch, then I think that won't happen.
      
      Original change's description:
      > [turbofan] Masking/poisoning in codegen (optimized code, mips & mips64)
      > 
      > This introduces masking of loads with speculation bit during code generation.
      > At the moment, this is done only under the
      > --branch-load-poisoning flag, and this CL enlarges the set of supported
      > platforms from {x64, arm, arm64} to {x64, arm, arm64, mips, mips64}.
      > 
      > Overview of changes:
      > - new register configuration configuration with one register reserved for
      >   the speculation poison/mask (kSpeculationPoisonRegister).
      > - in codegen, we introduce an update to the poison register at the starts
      >   of all successors of branches (and deopts) that are marked as safety
      >   branches (deopts).
      > - in memory optimizer, we lower all field and element loads to PoisonedLoads.
      > - poisoned loads are then masked in codegen with the poison register.
      >   * only integer loads are masked at the moment.
      > 
      > Bug: chromium:798964
      > Change-Id: I211395b8305ed0ad9288d6da48fa159fa970c827
      > Reviewed-on: https://chromium-review.googlesource.com/951382
      > Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
      > Reviewed-by: Ivica Bogosavljevic <ivica.bogosavljevic@mips.com>
      > Commit-Queue: Ivica Bogosavljevic <ivica.bogosavljevic@mips.com>
      > Cr-Commit-Position: refs/heads/master@{#52042}
      
      TBR=mvstanton@chromium.org,mstarzinger@chromium.org,ivica.bogosavljevic@mips.com
      
      Change-Id: Ief4d9ef56d918172f0b545d321a64b1ab5b46915
      No-Presubmit: true
      No-Tree-Checks: true
      No-Try: true
      Bug: chromium:798964
      Reviewed-on: https://chromium-review.googlesource.com/969041Reviewed-by: 's avatarMichael Stanton <mvstanton@chromium.org>
      Commit-Queue: Michael Stanton <mvstanton@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#52045}
      11831378
    • Mike Stanton's avatar
      [turbofan] Masking/poisoning in codegen (optimized code, mips & mips64) · 46a3c772
      Mike Stanton authored
      This introduces masking of loads with speculation bit during code generation.
      At the moment, this is done only under the
      --branch-load-poisoning flag, and this CL enlarges the set of supported
      platforms from {x64, arm, arm64} to {x64, arm, arm64, mips, mips64}.
      
      Overview of changes:
      - new register configuration configuration with one register reserved for
        the speculation poison/mask (kSpeculationPoisonRegister).
      - in codegen, we introduce an update to the poison register at the starts
        of all successors of branches (and deopts) that are marked as safety
        branches (deopts).
      - in memory optimizer, we lower all field and element loads to PoisonedLoads.
      - poisoned loads are then masked in codegen with the poison register.
        * only integer loads are masked at the moment.
      
      Bug: chromium:798964
      Change-Id: I211395b8305ed0ad9288d6da48fa159fa970c827
      Reviewed-on: https://chromium-review.googlesource.com/951382Reviewed-by: 's avatarMichael Starzinger <mstarzinger@chromium.org>
      Reviewed-by: 's avatarIvica Bogosavljevic <ivica.bogosavljevic@mips.com>
      Commit-Queue: Ivica Bogosavljevic <ivica.bogosavljevic@mips.com>
      Cr-Commit-Position: refs/heads/master@{#52042}
      46a3c772
  11. 04 Jan, 2018 1 commit
  12. 04 Dec, 2017 1 commit
    • Caitlin Potter's avatar
      [builtins] implement RunMicrotasks pump as a code stub · 52ff3ae4
      Caitlin Potter authored
      - Implement RunMicrotasks in CSA to prevent a potentially large number
        of jumps between C++ and JS code while consuming te queue. Appears to
        provide a ~60% speedup in microtask-heavy code, which from limited
        testing appears to scale linearly.
      
        The code-stub microtask pump bails out to the old C++ microtask pump
        if it encounters a CallHandlerInfo microtask, and remains in C++ for
        the remainder of the queue (returning to the JS/stub implementation
        after the bailed out queue is exhausted).
      
      - Add a variation of JSEntryStub which enters the new RunMicrotasks code
        stub.
      
      - Add a new RunMicrotasks helper to Execution, which uses the
        RunMicrotasks entry stub.
      
      Bug: 
      Change-Id: I4667d4dd633d24455ea5d7cef239da0af1a7365e
      Reviewed-on: https://chromium-review.googlesource.com/650486
      Commit-Queue: Caitlin Potter <caitp@igalia.com>
      Reviewed-by: 's avatarMichael Starzinger <mstarzinger@chromium.org>
      Reviewed-by: 's avatarBenedikt Meurer <bmeurer@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#49842}
      52ff3ae4
  13. 02 Dec, 2017 1 commit
    • Mathias Bynens's avatar
      Normalize casing of hexadecimal digits · 822be9b2
      Mathias Bynens authored
      This patch normalizes the casing of hexadecimal digits in escape
      sequences of the form `\xNN` and integer literals of the form
      `0xNNNN`.
      
      Previously, the V8 code base used an inconsistent mixture of uppercase
      and lowercase.
      
      Google’s C++ style guide uses uppercase in its examples:
      https://google.github.io/styleguide/cppguide.html#Non-ASCII_Characters
      
      Moreover, uppercase letters more clearly stand out from the lowercase
      `x` (or `u`) characters at the start, as well as lowercase letters
      elsewhere in strings.
      
      BUG=v8:7109
      TBR=marja@chromium.org,titzer@chromium.org,mtrofin@chromium.org,mstarzinger@chromium.org,rossberg@chromium.org,yangguo@chromium.org,mlippautz@chromium.org
      NOPRESUBMIT=true
      
      Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_chromium_rel_ng
      Change-Id: I790e21c25d96ad5d95c8229724eb45d2aa9e22d6
      Reviewed-on: https://chromium-review.googlesource.com/804294
      Commit-Queue: Mathias Bynens <mathias@chromium.org>
      Reviewed-by: 's avatarJakob Kummerow <jkummerow@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#49810}
      822be9b2
  14. 15 Nov, 2017 1 commit
  15. 07 Nov, 2017 1 commit
  16. 06 Nov, 2017 1 commit
  17. 02 Nov, 2017 1 commit
  18. 30 Oct, 2017 2 commits
  19. 27 Oct, 2017 2 commits
  20. 26 Oct, 2017 2 commits
  21. 20 Oct, 2017 1 commit
  22. 18 Oct, 2017 2 commits
    • Pierre Langlois's avatar
      Simplify DoubleToI stub. · 9f4f3c28
      Pierre Langlois authored
      The DoubleToI stub is no longer called outside of TurboFan, and always in the
      same way:
      
        - The parameter is on top of the stack.
        - The stub is always called in a slow path.
        - It truncates.
      
      Therefore, we can simplify it to only support this case and remove dead
      code.
      
      On top of this, since the stub is always considered to be on a slow path for all
      backends, this patch takes the opportunity to remove the `skip_fastpath`
      optimisation. This would generate a stub which does not handle all inputs,
      assuming that the backend already handled some of the inputs in a fast
      path. Removing this allows the stub to have the same behaviour on all targets.
      
      On Arm, this patch reworks the stub a little. We could use ip instead of saving
      and restoring a register on the stack. Also, comments would mention that we
      assume the exponent to be greater than 31 when the it can be 30 or higher. As
      done for Arm64, let's check this at runtime in debug mode.
      
      On Arm64, we can also implement the stub without pushing and poping off the
      stack. It needs 2 general purpose and a double scratch registers which we have
      reserved already (ip0, ip1 and d30). This removes the need to check that the
      stack pointer is always 16-bytes aligned.
      
      Finally, this also fixes a potential bug on Arm64, in the
      `GetAllocatableRegisterThatIsNotOneOf` method which is now removed. We were
      picking an allocatable double register when we meant to pick a general one.
      
      Bug: v8:6644
      Change-Id: I88d4597f377c9fc05432d5922a0d7129b6d19b47
      Reviewed-on: https://chromium-review.googlesource.com/720963Reviewed-by: 's avatarBenedikt Meurer <bmeurer@chromium.org>
      Reviewed-by: 's avatarMichael Starzinger <mstarzinger@chromium.org>
      Commit-Queue: Pierre Langlois <pierre.langlois@arm.com>
      Cr-Commit-Position: refs/heads/master@{#48671}
      9f4f3c28
    • Clemens Hammacher's avatar
      [cleanup] Fix remaining (D)CHECK macro usages · 5f651082
      Clemens Hammacher authored
      This CL fixes all occurences that don't require special OWNER reviews,
      or can be reviewed by Michi.
      
      After this one, we should be able to reenable the readability/check
      cpplint check.
      
      R=mstarzinger@chromium.org
      
      Bug: v8:6837, v8:6921
      Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng;master.tryserver.v8:v8_linux_noi18n_rel_ng
      Change-Id: Ic81d68d5534eaa795b7197fed5c41ed158361d62
      Reviewed-on: https://chromium-review.googlesource.com/721120
      Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
      Reviewed-by: 's avatarMichael Starzinger <mstarzinger@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#48670}
      5f651082
  23. 13 Oct, 2017 3 commits
  24. 09 Oct, 2017 2 commits
  25. 13 Sep, 2017 1 commit
  26. 08 Sep, 2017 1 commit
  27. 07 Sep, 2017 1 commit
  28. 06 Sep, 2017 1 commit
    • Clemens Hammacher's avatar
      [assembler] Make Register et al. real classes · 9e995e12
      Clemens Hammacher authored
      Up to now, each architecture defined all Register types as structs,
      with lots of redundancy. An often found comment noted that they cannot
      be classes due to initialization order problems. As these problems are
      gone with C++11 constexpr constants, I now tried making Registers
      classes again.
      All register types now inherit from RegisterBase, which provides a
      default set of methods and named constructors (like ::from_code,
      code(), bit(), is_valid(), ...).
      This design allows to guarantee an interesting property: Each register
      is either valid, or it's the no_reg register. There are no other
      invalid registers. This is guaranteed statically by the constexpr
      constructor, and dynamically by ::from_code.
      
      I decided to disallow the default constructor completely, so instead of
      "Register reg;" you now need "Register reg = no_reg;". This makes
      explicit how the Register is initialized.
      
      I did this change to the x64, ia32, arm, arm64, mips and mips64 ports.
      Overall, code got much more compact and more safe. In theory, it should
      also increase performance (since the is_valid() check is simpler), but
      this is probably not measurable.
      
      R=mstarzinger@chromium.org
      
      Change-Id: I5ccfa4050daf4e146a557970e9d37fd3d2788d4a
      Reviewed-on: https://chromium-review.googlesource.com/650927Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
      Reviewed-by: 's avatarMichael Starzinger <mstarzinger@chromium.org>
      Reviewed-by: 's avatarIgor Sheludko <ishell@chromium.org>
      Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#47847}
      9e995e12