1. 01 Aug, 2016 1 commit
    • ahaas's avatar
      [wasm] Use a LazyInstance in wasm-linkage.cc to avoid a data race. · 282cdf28
      ahaas authored
      The initialization of static variables that were used originally caused
      a data race because multiple threads tried to initialize the variables
      at the same time. The use of a LazyInstance guarantees that the
      variables get initialized exactly once.
      
      The same problem also existed in c-linkage.cc. There I fixed the problem
      by using a local variable instead of a static variable.
      
      BUG=v8:5242
      R=titzer@chromium.org
      
      Review-Url: https://codereview.chromium.org/2202433003
      Cr-Commit-Position: refs/heads/master@{#38221}
      282cdf28
  2. 11 Jul, 2016 1 commit
    • danno's avatar
      [turbofan] Add MachineType to LinkageLocation · 3e2085eb
      danno authored
      By adding MachineType to LinkageLocation, it is possible not only to reason
      about the location of a LinkageLocation on the stack, but also about it's
      size. This will be useful in follow-on CLs that attempt to merge some of the
      parameter passing logic of tail calls and normal (non-tail) calls.
      
      As a nice side-effect, it is no longer necessary to separately keep a
      MachineSignature in a CallDescriptor, because the MachineTypes contianed in
      LinkageLocation for all of the Descriptor's parameters and return types are
      sufficient. This CL therefore removes the MachineSignature from the
      CallDescriptor and adjusts all the calling code accordingly, simplifying and
      de-duplicating code in a bunch of places.
      
      R=titzer@chromium.org, bmeurer@chromium.org
      LOG=N
      
      Review-Url: https://codereview.chromium.org/2124023003
      Cr-Commit-Position: refs/heads/master@{#37633}
      3e2085eb
  3. 29 Mar, 2016 1 commit
    • titzer's avatar
      [wasm] Fix arm64 frame alignment. · c9f59780
      titzer authored
          In JavaScript code and stubs, JSSP mirrors the CSP but may be unaligned.
          But in WASM code only CSP is used, like native code, and it must be
          aligned.
          Calls into WASM from JS need to carefully align the C stack
          pointer (csp) and restore the previous JSSP, while calls from WASM
          to JS need to compute a new JSSP and restore their CSP after the
          call.
      
      R=ahaas@chromium.org
      BUG=
      
      Review URL: https://codereview.chromium.org/1811283003
      
      Cr-Commit-Position: refs/heads/master@{#35096}
      c9f59780
  4. 04 Mar, 2016 1 commit
  5. 24 Feb, 2016 1 commit
  6. 15 Feb, 2016 1 commit
  7. 01 Feb, 2016 1 commit
  8. 10 Dec, 2015 1 commit
    • jarin's avatar
      [turbofan] Make MachineType a pair of enums. · bb2a830d
      jarin authored
      MachineType is now a class with two enum fields:
      - MachineRepresentation
      - MachineSemantic
      
      Both enums are usable on their own, and this change switches some places from using MachineType to use just MachineRepresentation. Most notably:
      - register allocator now uses just the representation.
      - Phi and Select nodes only refer to representations.
      
      Review URL: https://codereview.chromium.org/1513543003
      
      Cr-Commit-Position: refs/heads/master@{#32738}
      bb2a830d
  9. 02 Oct, 2015 3 commits
    • danno's avatar
      Re-reland: Remove register index/code indirection · 5cf1c0bc
      danno authored
      Previous to this patch, both the lithium and TurboFan register
      allocators tracked allocated registers by "indices", rather than
      the register codes used elsewhere in the runtime. This patch
      ensures that codes are used everywhere, and in the process cleans
      up a bunch of redundant code and adds more structure to how the
      set of allocatable registers is defined.
      
      Some highlights of changes:
      
      * TurboFan's RegisterConfiguration class moved to V8's top level
        so that it can be shared with Crankshaft.
      * Various "ToAllocationIndex" and related methods removed.
      * Code that can be easily shared between Register classes on
        different platforms is now shared.
      * The list of allocatable registers on each platform is declared
        as a list rather than implicitly via the register index <->
        code mapping.
      
      Committed: https://crrev.com/80bc6f6e11f79524e3f1ad05579583adfd5f18b2
      Cr-Commit-Position: refs/heads/master@{#30913}
      
      Committed: https://crrev.com/7b7a8205d9a00c678fb7a6e032a55fecbc1509cf
      Cr-Commit-Position: refs/heads/master@{#31075}
      
      Review URL: https://codereview.chromium.org/1287383003
      
      Cr-Commit-Position: refs/heads/master@{#31087}
      5cf1c0bc
    • danno's avatar
      Revert of Reland: Remove register index/code indirection (patchset #20... · 00e07b00
      danno authored
      Revert of Reland: Remove register index/code indirection (patchset #20 id:380001 of https://codereview.chromium.org/1287383003/ )
      
      Reason for revert:
      Failures on MIPS
      
      Original issue's description:
      > Remove register index/code indirection
      >
      > Previous to this patch, both the lithium and TurboFan register
      > allocators tracked allocated registers by "indices", rather than
      > the register codes used elsewhere in the runtime. This patch
      > ensures that codes are used everywhere, and in the process cleans
      > up a bunch of redundant code and adds more structure to how the
      > set of allocatable registers is defined.
      >
      > Some highlights of changes:
      >
      > * TurboFan's RegisterConfiguration class moved to V8's top level
      >   so that it can be shared with Crankshaft.
      > * Various "ToAllocationIndex" and related methods removed.
      > * Code that can be easily shared between Register classes on
      >   different platforms is now shared.
      > * The list of allocatable registers on each platform is declared
      >   as a list rather than implicitly via the register index <->
      >   code mapping.
      >
      > Committed: https://crrev.com/80bc6f6e11f79524e3f1ad05579583adfd5f18b2
      > Cr-Commit-Position: refs/heads/master@{#30913}
      >
      > Committed: https://crrev.com/7b7a8205d9a00c678fb7a6e032a55fecbc1509cf
      > Cr-Commit-Position: refs/heads/master@{#31075}
      
      TBR=akos.palfi@imgtec.com,bmeurer@chromium.org,jarin@chromium.org,paul.lind@imgtec.com,titzer@chromium.org
      NOPRESUBMIT=true
      NOTREECHECKS=true
      NOTRY=true
      
      Review URL: https://codereview.chromium.org/1380863004
      
      Cr-Commit-Position: refs/heads/master@{#31083}
      00e07b00
    • danno's avatar
      Remove register index/code indirection · 7b7a8205
      danno authored
      Previous to this patch, both the lithium and TurboFan register
      allocators tracked allocated registers by "indices", rather than
      the register codes used elsewhere in the runtime. This patch
      ensures that codes are used everywhere, and in the process cleans
      up a bunch of redundant code and adds more structure to how the
      set of allocatable registers is defined.
      
      Some highlights of changes:
      
      * TurboFan's RegisterConfiguration class moved to V8's top level
        so that it can be shared with Crankshaft.
      * Various "ToAllocationIndex" and related methods removed.
      * Code that can be easily shared between Register classes on
        different platforms is now shared.
      * The list of allocatable registers on each platform is declared
        as a list rather than implicitly via the register index <->
        code mapping.
      
      Committed: https://crrev.com/80bc6f6e11f79524e3f1ad05579583adfd5f18b2
      Cr-Commit-Position: refs/heads/master@{#30913}
      
      Review URL: https://codereview.chromium.org/1287383003
      
      Cr-Commit-Position: refs/heads/master@{#31075}
      7b7a8205
  10. 30 Sep, 2015 1 commit
  11. 24 Sep, 2015 2 commits
    • danno's avatar
      Revert of Remove register index/code indirection (patchset #17 id:320001 of... · 3ac27431
      danno authored
      Revert of Remove register index/code indirection (patchset #17 id:320001 of https://codereview.chromium.org/1287383003/ )
      
      Reason for revert:
      Failures on greedy RegAlloc, Fuzzer
      
      Original issue's description:
      > Remove register index/code indirection
      >
      > Previous to this patch, both the lithium and TurboFan register
      > allocators tracked allocated registers by "indices", rather than
      > the register codes used elsewhere in the runtime. This patch
      > ensures that codes are used everywhere, and in the process cleans
      > up a bunch of redundant code and adds more structure to how the
      > set of allocatable registers is defined.
      >
      > Some highlights of changes:
      >
      > * TurboFan's RegisterConfiguration class moved to V8's top level
      >   so that it can be shared with Crankshaft.
      > * Various "ToAllocationIndex" and related methods removed.
      > * Code that can be easily shared between Register classes on
      >   different platforms is now shared.
      > * The list of allocatable registers on each platform is declared
      >   as a list rather than implicitly via the register index <->
      >   code mapping.
      >
      > Committed: https://crrev.com/80bc6f6e11f79524e3f1ad05579583adfd5f18b2
      > Cr-Commit-Position: refs/heads/master@{#30913}
      
      TBR=akos.palfi@imgtec.com,bmeurer@chromium.org,jarin@chromium.org,paul.lind@imgtec.com,titzer@chromium.org
      NOPRESUBMIT=true
      NOTREECHECKS=true
      NOTRY=true
      
      Review URL: https://codereview.chromium.org/1365073002
      
      Cr-Commit-Position: refs/heads/master@{#30914}
      3ac27431
    • danno's avatar
      Remove register index/code indirection · 80bc6f6e
      danno authored
      Previous to this patch, both the lithium and TurboFan register
      allocators tracked allocated registers by "indices", rather than
      the register codes used elsewhere in the runtime. This patch
      ensures that codes are used everywhere, and in the process cleans
      up a bunch of redundant code and adds more structure to how the
      set of allocatable registers is defined.
      
      Some highlights of changes:
      
      * TurboFan's RegisterConfiguration class moved to V8's top level
        so that it can be shared with Crankshaft.
      * Various "ToAllocationIndex" and related methods removed.
      * Code that can be easily shared between Register classes on
        different platforms is now shared.
      * The list of allocatable registers on each platform is declared
        as a list rather than implicitly via the register index <->
        code mapping.
      
      Review URL: https://codereview.chromium.org/1287383003
      
      Cr-Commit-Position: refs/heads/master@{#30913}
      80bc6f6e
  12. 07 Aug, 2015 1 commit
  13. 03 Aug, 2015 1 commit
  14. 31 Jul, 2015 1 commit
  15. 30 Jul, 2015 2 commits
    • danno's avatar
      [turbofan]: Add better encapsulation to LinkageLocation · 3c9f69d3
      danno authored
      Add factory methods for different types of LinkageLocations, and ensure that
      accesses to the underlying data in the location are classified by type and
      funneled through explicit accessors.
      
      Also change the representation of LinkageLocation to use a BitField rather
      than using a reserved section of the integer range.
      
      Review URL: https://codereview.chromium.org/1262343002
      
      Cr-Commit-Position: refs/heads/master@{#29938}
      3c9f69d3
    • titzer's avatar
      [turbofan] Factor C call descriptor building into compiler/c-linkage.cc. · c215c956
      titzer authored
      This is the first step in cutting the Gordian linkage/linkage-impl knot.
      
      This basically changes the axis along which we organize call descriptor
      building logic from having platform-specific files dedicated to all call
      descriptor types to having call-descriptor-type-specific files that have
      
      The next step is to factor the JS, code stub, and runtime call descriptors
      similarly, dumping them into:
        compiler/js-linkage.cc
        compiler/runtime-linkage.cc
        compiler/code-stub-linkage.cc
      
       or, alternatively, all of them just into compiler/js-linkage.cc.
      
      This also anticipates a wasm-linkage.cc file in the future.
      
      R=bmeurer@chromium.org,danno@chromium.org
      BUG=
      
      Review URL: https://codereview.chromium.org/1266603002
      
      Cr-Commit-Position: refs/heads/master@{#29931}
      c215c956