1. 27 May, 2019 5 commits
    • Tobias Tebbi's avatar
      [torque] no longer generate assemblers per namespace · 19d8bfa5
      Tobias Tebbi authored
      Instead of generating one CodeStubAssembler-like class per namespace,
      Torque-generated macros are now free-standing functions not included
      from CSA code, and explicitly exported macros become part of the new
      TorqueGeneratedExportedMacrosAssembler, which CodeStubAssembler
      inherits from, thus making them available to all CSA code.
      
      Structs are now defined in a new header csa-types-tq.h as free-standing
      types with the prefix "TorqueStruct".
      
      This is a preparation for generating per Torque-file instead of per
      namespace.
      
      Change-Id: I60fadc493a63f85d1d340768ec6f11ae47be0cb8
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1628787
      Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
      Reviewed-by: 's avatarSigurd Schneider <sigurds@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#61865}
      19d8bfa5
    • Benedikt Meurer's avatar
      Reland "[typedarray] Move external/data pointer to JSTypedArray." · 70bd7cf0
      Benedikt Meurer authored
      This is a reland of 4b86fea5 with
      copy&paste typo in CodeStubAssembler::AllocateByteArray() fixed
      (bug led to holes in new space, which was crashing reproducibly
      on the ia32 bot).
      
      Original change's description:
      > [typedarray] Move external/data pointer to JSTypedArray.
      >
      > As the next step in supporting huge typed arrays in V8, this moves the
      > external/data pointer from the FixedTypedArrayBase backing store to the
      > JSTypedArray instance itself, and replaces the special backing stores
      > with a plain ByteArray (removing all the code for the FixedTypedArrayBase
      > class hierarchy). By doing so, we can drastically simplify the system
      > around typed arrays.
      >
      > Note: Several places in the code base used to check the instance type
      > of the elements backing store of a JSTypedArray instead of checking the
      > elements kind on the JSTypedArray map directly. Those had to be fixed,
      > since the backing store is now always a ByteArray.
      >
      > Drive-by-fix: Move all the typed elements access related code into the
      > elements.cc file to properly encapsulate the accesses.
      >
      > Doc: http://doc/1Z-wM2qwvAuxH46e9ivtkYvKzzwYZg8ymm0x0wJaomow
      > Bug: chromium:951196, chromium:965583, v8:4153, v8:7881, v8:9183
      > Change-Id: I8cc06b190c53e34155000b4560f5f3ef40621646
      > Cq-Include-Trybots: luci.chromium.try:linux-rel,win7-rel
      > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1627535
      > Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
      > Reviewed-by: Peter Marshall <petermarshall@chromium.org>
      > Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
      > Reviewed-by: Simon Zünd <szuend@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#61855}
      
      Tbr: petermarshall@chromium.org
      Bug: chromium:951196, chromium:965583, v8:4153, v8:7881, v8:9183
      Change-Id: I87fcdb28532c5f08cc227332a4d59546cb423810
      Cq-Include-Trybots: luci.chromium.try:linux-rel, win7-rel
      Cq-Include-Trybots: luci.v8.try:v8_linux_shared_compile_rel
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1631592Reviewed-by: 's avatarBenedikt Meurer <bmeurer@chromium.org>
      Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#61864}
      70bd7cf0
    • Clemens Hammacher's avatar
      Revert "[typedarray] Move external/data pointer to JSTypedArray." · e4db146a
      Clemens Hammacher authored
      This reverts commit 4b86fea5.
      
      Reason for revert: Fails on linux shared: https://ci.chromium.org/p/v8/builders/ci/V8%20Linux%20-%20shared/31045
      
      Original change's description:
      > [typedarray] Move external/data pointer to JSTypedArray.
      > 
      > As the next step in supporting huge typed arrays in V8, this moves the
      > external/data pointer from the FixedTypedArrayBase backing store to the
      > JSTypedArray instance itself, and replaces the special backing stores
      > with a plain ByteArray (removing all the code for the FixedTypedArrayBase
      > class hierarchy). By doing so, we can drastically simplify the system
      > around typed arrays.
      > 
      > Note: Several places in the code base used to check the instance type
      > of the elements backing store of a JSTypedArray instead of checking the
      > elements kind on the JSTypedArray map directly. Those had to be fixed,
      > since the backing store is now always a ByteArray.
      > 
      > Drive-by-fix: Move all the typed elements access related code into the
      > elements.cc file to properly encapsulate the accesses.
      > 
      > Doc: http://doc/1Z-wM2qwvAuxH46e9ivtkYvKzzwYZg8ymm0x0wJaomow
      > Bug: chromium:951196, chromium:965583, v8:4153, v8:7881, v8:9183
      > Change-Id: I8cc06b190c53e34155000b4560f5f3ef40621646
      > Cq-Include-Trybots: luci.chromium.try:linux-rel,win7-rel
      > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1627535
      > Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
      > Reviewed-by: Peter Marshall <petermarshall@chromium.org>
      > Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
      > Reviewed-by: Simon Zünd <szuend@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#61855}
      
      TBR=ulan@chromium.org,yangguo@chromium.org,titzer@chromium.org,sigurds@chromium.org,petermarshall@chromium.org,bmeurer@chromium.org,szuend@chromium.org
      
      Change-Id: I0bc1f935de6063acf75a0f4bb8c0ba67428603fd
      No-Presubmit: true
      No-Tree-Checks: true
      No-Try: true
      Bug: chromium:951196, chromium:965583, v8:4153, v8:7881, v8:9183
      Cq-Include-Trybots: luci.chromium.try:linux-rel, win7-rel
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1631427Reviewed-by: 's avatarClemens Hammacher <clemensh@chromium.org>
      Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#61856}
      e4db146a
    • Benedikt Meurer's avatar
      [typedarray] Move external/data pointer to JSTypedArray. · 4b86fea5
      Benedikt Meurer authored
      As the next step in supporting huge typed arrays in V8, this moves the
      external/data pointer from the FixedTypedArrayBase backing store to the
      JSTypedArray instance itself, and replaces the special backing stores
      with a plain ByteArray (removing all the code for the FixedTypedArrayBase
      class hierarchy). By doing so, we can drastically simplify the system
      around typed arrays.
      
      Note: Several places in the code base used to check the instance type
      of the elements backing store of a JSTypedArray instead of checking the
      elements kind on the JSTypedArray map directly. Those had to be fixed,
      since the backing store is now always a ByteArray.
      
      Drive-by-fix: Move all the typed elements access related code into the
      elements.cc file to properly encapsulate the accesses.
      
      Doc: http://doc/1Z-wM2qwvAuxH46e9ivtkYvKzzwYZg8ymm0x0wJaomow
      Bug: chromium:951196, chromium:965583, v8:4153, v8:7881, v8:9183
      Change-Id: I8cc06b190c53e34155000b4560f5f3ef40621646
      Cq-Include-Trybots: luci.chromium.try:linux-rel,win7-rel
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1627535
      Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
      Reviewed-by: 's avatarPeter Marshall <petermarshall@chromium.org>
      Reviewed-by: 's avatarUlan Degenbaev <ulan@chromium.org>
      Reviewed-by: 's avatarSimon Zünd <szuend@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#61855}
      4b86fea5
    • Clemens Hammacher's avatar
      [cleanup] Replace simple typedefs by using · a335f2ae
      Clemens Hammacher authored
      This replaces all typedefs that define types and not functions by the
      equivalent "using" declaration.
      
      This was done mostly automatically using this command:
      ag -l '\btypedef\b' src test | xargs -L1 \
           perl -i -p0e 's/typedef ([^*;{}]+) (\w+);/using \2 = \1;/sg'
      
      Patchset 2 then adds some manual changes for typedefs for pointer types,
      where the regular expression did not match.
      
      R=mstarzinger@chromium.org
      TBR=yangguo@chromium.org, jarin@chromium.org
      
      Bug: v8:9183
      Change-Id: I6f6ee28d1793b7ac34a58f980b94babc21874b78
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1631409
      Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
      Reviewed-by: 's avatarMichael Starzinger <mstarzinger@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#61849}
      a335f2ae
  2. 21 May, 2019 1 commit
  3. 14 May, 2019 2 commits
  4. 04 Mar, 2019 1 commit
  5. 20 Feb, 2019 1 commit
    • peterwmwong's avatar
      Reland "[builtins]: Optimize CreateTypedArray to use element size log 2 for calculations." · 02b9847f
      peterwmwong authored
      This is a reland of c9ef0405
      
      Original change's description:
      > [builtins]: Optimize CreateTypedArray to use element size log 2 for calculations.
      >
      > TypedArrayElementsInfo now represents an element's size as a log 2 and typed as
      > uintptr.  This simplifies and speeds up (avoids possible HeapNumber allocations) a
      > number of calculations:
      >
      >   - Number of Elements (length) -> Byte Length - is now a WordShl
      >   - Byte Length -> Number of Elements (length) - is now a WordShr
      >   - Testing alignment (byte offset or length)  - is now a WordAnd
      >
      > These element/byte length related calculations are encapsulated in
      > TypedArrayElementsInfo as struct methods.
      >
      > This reduces the size of CreateTypedArray by 2.125 KB (24%) on Mac x64.release:
      >   - Before: 9,088
      >   - After:  6,896
      >
      > This improves the performance of the following microbencmarks
      >   - TypedArrays-ConstructWithBuffer: ~87%
      >   - TypedArrays-SubarrayNoSpecies:   ~28%
      >
      > Bug: v8:7161
      > Change-Id: I2239fd0e0af9d3ad55cd52318088d3c7c913ae44
      > Reviewed-on: https://chromium-review.googlesource.com/c/1456299
      > Commit-Queue: Peter Wong <peter.wm.wong@gmail.com>
      > Reviewed-by: Jakob Gruber <jgruber@chromium.org>
      > Reviewed-by: Simon Zünd <szuend@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#59531}
      
      Bug: v8:7161, chromium:932034
      Change-Id: I5c3dc34c549234417f95b404e7d49b2fd496fa69
      Reviewed-on: https://chromium-review.googlesource.com/c/1476306
      Commit-Queue: Peter Wong <peter.wm.wong@gmail.com>
      Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
      Reviewed-by: 's avatarSimon Zünd <szuend@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#59728}
      02b9847f
  6. 18 Feb, 2019 1 commit
    • Jakob Gruber's avatar
      Revert "[builtins]: Optimize CreateTypedArray to use element size log 2 for calculations." · ced2e4ee
      Jakob Gruber authored
      This reverts commit c9ef0405.
      
      Reason for revert: https://crbug.com/932034
      
      Original change's description:
      > [builtins]: Optimize CreateTypedArray to use element size log 2 for calculations.
      >
      > TypedArrayElementsInfo now represents an element's size as a log 2 and typed as
      > uintptr.  This simplifies and speeds up (avoids possible HeapNumber allocations) a
      > number of calculations:
      >
      >   - Number of Elements (length) -> Byte Length - is now a WordShl
      >   - Byte Length -> Number of Elements (length) - is now a WordShr
      >   - Testing alignment (byte offset or length)  - is now a WordAnd
      >
      > These element/byte length related calculations are encapsulated in
      > TypedArrayElementsInfo as struct methods.
      >
      > This reduces the size of CreateTypedArray by 2.125 KB (24%) on Mac x64.release:
      >   - Before: 9,088
      >   - After:  6,896
      >
      > This improves the performance of the following microbencmarks
      >   - TypedArrays-ConstructWithBuffer: ~87%
      >   - TypedArrays-SubarrayNoSpecies:   ~28%
      >
      > Bug: v8:7161
      > Change-Id: I2239fd0e0af9d3ad55cd52318088d3c7c913ae44
      > Reviewed-on: https://chromium-review.googlesource.com/c/1456299
      > Commit-Queue: Peter Wong <peter.wm.wong@gmail.com>
      > Reviewed-by: Jakob Gruber <jgruber@chromium.org>
      > Reviewed-by: Simon Zünd <szuend@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#59531}
      
      TBR=peter.wm.wong@gmail.com,jgruber@chromium.org,petermarshall@chromium.org,szuend@chromium.org
      
      # Not skipping CQ checks because original CL landed > 1 day ago.
      
      Bug: v8:7161, chromium:932034
      Change-Id: I3da95447ce34f84d01629d2791868f3adcdfb387
      Reviewed-on: https://chromium-review.googlesource.com/c/1475764
      Commit-Queue: Jakob Gruber <jgruber@chromium.org>
      Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#59645}
      ced2e4ee
  7. 12 Feb, 2019 1 commit
    • peterwmwong's avatar
      [builtins]: Optimize CreateTypedArray to use element size log 2 for calculations. · c9ef0405
      peterwmwong authored
      TypedArrayElementsInfo now represents an element's size as a log 2 and typed as
      uintptr.  This simplifies and speeds up (avoids possible HeapNumber allocations) a
      number of calculations:
      
        - Number of Elements (length) -> Byte Length - is now a WordShl
        - Byte Length -> Number of Elements (length) - is now a WordShr
        - Testing alignment (byte offset or length)  - is now a WordAnd
      
      These element/byte length related calculations are encapsulated in
      TypedArrayElementsInfo as struct methods.
      
      This reduces the size of CreateTypedArray by 2.125 KB (24%) on Mac x64.release:
        - Before: 9,088
        - After:  6,896
      
      This improves the performance of the following microbencmarks
        - TypedArrays-ConstructWithBuffer: ~87%
        - TypedArrays-SubarrayNoSpecies:   ~28%
      
      Bug: v8:7161
      Change-Id: I2239fd0e0af9d3ad55cd52318088d3c7c913ae44
      Reviewed-on: https://chromium-review.googlesource.com/c/1456299
      Commit-Queue: Peter Wong <peter.wm.wong@gmail.com>
      Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
      Reviewed-by: 's avatarSimon Zünd <szuend@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#59531}
      c9ef0405
  8. 05 Feb, 2019 1 commit
  9. 04 Feb, 2019 1 commit
  10. 28 Jan, 2019 1 commit
    • peterwmwong's avatar
      [builtins] Port TypedArray TypedArrayInitializeWithBuffer to Torque · 8e13ddc6
      peterwmwong authored
      Two small changes were done as part of the port:
      - Changes TypedArrayInitializeWithBuffer from a TFS builtin to a macro.
        It was only called from ConstructByArrayBuffer and this removes the
        overhead of the TFS call.
      - Introduces a GetTypedArrayElementsInfo that retrieves both the element
        size and map. Instead of generating the elements kind switch code (
        DispatchTypedArrayByElementsKind) twice, just generate once at the
        beginning of CreateTypedArray.
      
      This reduces overall builtins size by 364 bytes (Mac x64.release)
        - Before
          1364 - TypedArrayInitializeWithBuffer
          6468 - CreateTypedArray
        - After
          7468 - CreateTypedArray
      
      This also improves performance of TypedArray JSPerf benchmarks
      (SubarrayNoSpecies, ConstructByArrayBuffer) by 5-8%.
      
      Bug: v8:7161
      Change-Id: I68eed2ea4db103f44ad9751229c29fba9bc9d24d
      Reviewed-on: https://chromium-review.googlesource.com/c/1437822
      Commit-Queue: Peter Wong <peter.wm.wong@gmail.com>
      Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#59135}
      8e13ddc6
  11. 24 Jan, 2019 1 commit
  12. 23 Jan, 2019 1 commit
  13. 22 Jan, 2019 1 commit
  14. 21 Jan, 2019 1 commit
  15. 13 Nov, 2018 1 commit
    • peterwmwong's avatar
      [builtins] Fast path TA.p.subarray creating TypedArray when default constructor is used · 7c35c03b
      peterwmwong authored
      Previously, the following call sequence was always made when creating resulting
      subsetted TypedArray:
      1) TFJ TypedArrayPrototypeSubArray
      2) TFS TypedArrayConstructor
      3) TFS CreateTypedArray
      
      This CL, skips #2 and goes straight to #3 when the default constructor (builtin) is
      safe to use (IsPrototypeTypedArrayPrototype and
      !IsTypedArraySpeciesProtectorCellInvalid).
      
      Local TypedArrays/SubarrayNoSpecies microbenchmark shows ~35-40% improvement...
      
      BEFORE
      TypedArrays-SubarrayNoSpecies(Score): 1033530
      TypedArrays-SubarrayNoSpecies(Score): 1018490
      TypedArrays-SubarrayNoSpecies(Score): 1037030
      
      AFTER
      TypedArrays-SubarrayNoSpecies(Score): 1439030
      TypedArrays-SubarrayNoSpecies(Score): 1417540
      TypedArrays-SubarrayNoSpecies(Score): 1405980
      
      Bug: v8:7161
      Change-Id: I356dace36570aa161ffe208a57a80e46714121a2
      Reviewed-on: https://chromium-review.googlesource.com/c/1331154
      Commit-Queue: Peter Wong <peter.wm.wong@gmail.com>
      Reviewed-by: 's avatarPeter Marshall <petermarshall@chromium.org>
      Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#57458}
      7c35c03b
  16. 05 Nov, 2018 1 commit
    • Tobias Tebbi's avatar
      [torque] qualified access to CSA assemblers · 23b48920
      Tobias Tebbi authored
      No longer use inheritance to associate Torque-generated assemblers
      with corresponding CSA subclasses. Instead, all references to CSA
      and CSA-derived assemblers are now explicitly qualified, by generating
      a short-lived assembler instance in-place. As a consequence, Torque
      files have to mention the assembler external macros live in.
      The CodeStubAssembler is the default for this and can be omitted.
      As a drive-by cleanup, also distinguish between names that are emitted
      in C++ and names that are intended to be read in error messages. This
      is relevant for generic instantiations, where the generated names are
      rather unreadably mangled.
      
      As a follow-up, it will be easy to allow for qualified access to
      different modules, thus implementing full namespace semantics for
      modules.
      
      Bug: v8:7793
      Change-Id: Ie6f1b6b549b510fb49be2442393d898d5f130950
      Reviewed-on: https://chromium-review.googlesource.com/c/1309636
      Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
      Reviewed-by: 's avatarDaniel Clifford <danno@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#57235}
      23b48920
  17. 24 Oct, 2018 1 commit
  18. 18 Sep, 2018 1 commit
  19. 31 Jul, 2018 1 commit
  20. 19 Jun, 2018 1 commit
  21. 06 Jun, 2018 1 commit
    • Daniel Clifford's avatar
      [torque] Implement parameter overloading in generics · 06f2a5c2
      Daniel Clifford authored
      This allows redifinitions of generics with the same name but differing parameter
      type lists, e.g.
      
        macro coerce<Dest: type>(from: HeapObject): Dest;
        coerce<int32>(from: HeapObject): int32 {...}
        macro coerce<Dest: type>(from: Smi): Dest;
        coerce<int32>(from: Smi): int32 {...}
      
      In order to allow multiple overloads of generic macros with the same name,
      a more nuanced lookup of calls has been implemented using the
      ParameterDifference utility class. There is still work to be done to unify
      when ParameterDifference is used for lookup (e.g. removing it from operator
      lookup when operators become simple aliases for macro names), but that work
      will be done in a separate CL.
      
      As part of this CL, the custom handling of "cast<>" operator in the .g4
      grammar has been removed and replaced by a handful of equivalent overloads of
      a generic "cast" macro.
      
      Bug: v8:7793
      Change-Id: Ibb2cdd3d58632b7f7f7ba683499f9688ae07f4f8
      Reviewed-on: https://chromium-review.googlesource.com/1087873
      Commit-Queue: Daniel Clifford <danno@chromium.org>
      Reviewed-by: 's avatarTobias Tebbi <tebbi@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#53562}
      06f2a5c2
  22. 05 Jun, 2018 1 commit
    • Simon Zünd's avatar
      Reland "[array] Implement Array.p.sort in Torque" · aff80345
      Simon Zünd authored
      This is a reland of df1676e6
      
      Original change's description:
      > [array] Implement Array.p.sort in Torque
      >
      > This CL implements a generic baseline version and 3 fastpaths, for
      > various elements kinds, of Array.p.sort in Torque. Details can be found
      > in the Design Doc: https://goo.gl/Ge321G.
      >
      > Performance impact on micro benchmarks depends on the element kind
      > and whether the user provides a comparison function.
      > For HoleySmi/HoleyElement we have a speedup between 1.5-1.8 across
      > the board. For Dictionary we are slower in all micro benchmarks (0.7).
      > For PackedSmi it depends on the call site and whether or not a
      > comparison function is used.
      >
      > Detailed numbers: https://goo.gl/mTyPSb
      >
      > Bug: v8:7382
      > Change-Id: I50acabd2032af0bc01d36b0de0f555d66be56a7e
      > Reviewed-on: https://chromium-review.googlesource.com/1061523
      > Commit-Queue: Simon Zünd <szuend@google.com>
      > Reviewed-by: Camillo Bruni <cbruni@chromium.org>
      > Reviewed-by: Jakob Gruber <jgruber@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#53481}
      
      Bug: v8:7382,v8:7806,chromium:849293
      Change-Id: I176cb660d92eb174bd91685cb0a39f50c4cbaa69
      Reviewed-on: https://chromium-review.googlesource.com/1086827Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
      Reviewed-by: 's avatarCamillo Bruni <cbruni@chromium.org>
      Commit-Queue: Simon Zünd <szuend@google.com>
      Cr-Commit-Position: refs/heads/master@{#53511}
      aff80345
  23. 04 Jun, 2018 2 commits
    • Jakob Gruber's avatar
      Revert "[array] Implement Array.p.sort in Torque" · 3348ed0b
      Jakob Gruber authored
      This reverts commit df1676e6.
      
      Reason for revert: https://crbug.com/v8/7382#c26
      
      Original change's description:
      > [array] Implement Array.p.sort in Torque
      > 
      > This CL implements a generic baseline version and 3 fastpaths, for
      > various elements kinds, of Array.p.sort in Torque. Details can be found
      > in the Design Doc: https://goo.gl/Ge321G.
      > 
      > Performance impact on micro benchmarks depends on the element kind
      > and whether the user provides a comparison function.
      > For HoleySmi/HoleyElement we have a speedup between 1.5-1.8 across
      > the board. For Dictionary we are slower in all micro benchmarks (0.7).
      > For PackedSmi it depends on the call site and whether or not a
      > comparison function is used.
      > 
      > Detailed numbers: https://goo.gl/mTyPSb
      > 
      > Bug: v8:7382
      > Change-Id: I50acabd2032af0bc01d36b0de0f555d66be56a7e
      > Reviewed-on: https://chromium-review.googlesource.com/1061523
      > Commit-Queue: Simon Zünd <szuend@google.com>
      > Reviewed-by: Camillo Bruni <cbruni@chromium.org>
      > Reviewed-by: Jakob Gruber <jgruber@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#53481}
      
      TBR=cbruni@chromium.org,jgruber@chromium.org,szuend@google.com
      
      Change-Id: I4c1b32a434d49caba67c80bccb068390607f90a2
      No-Presubmit: true
      No-Tree-Checks: true
      No-Try: true
      Bug: v8:7382
      Reviewed-on: https://chromium-review.googlesource.com/1085407Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
      Commit-Queue: Jakob Gruber <jgruber@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#53494}
      3348ed0b
    • Simon Zünd's avatar
      [array] Implement Array.p.sort in Torque · df1676e6
      Simon Zünd authored
      This CL implements a generic baseline version and 3 fastpaths, for
      various elements kinds, of Array.p.sort in Torque. Details can be found
      in the Design Doc: https://goo.gl/Ge321G.
      
      Performance impact on micro benchmarks depends on the element kind
      and whether the user provides a comparison function.
      For HoleySmi/HoleyElement we have a speedup between 1.5-1.8 across
      the board. For Dictionary we are slower in all micro benchmarks (0.7).
      For PackedSmi it depends on the call site and whether or not a
      comparison function is used.
      
      Detailed numbers: https://goo.gl/mTyPSb
      
      Bug: v8:7382
      Change-Id: I50acabd2032af0bc01d36b0de0f555d66be56a7e
      Reviewed-on: https://chromium-review.googlesource.com/1061523
      Commit-Queue: Simon Zünd <szuend@google.com>
      Reviewed-by: 's avatarCamillo Bruni <cbruni@chromium.org>
      Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#53481}
      df1676e6
  24. 01 Jun, 2018 1 commit
  25. 29 May, 2018 1 commit
  26. 24 May, 2018 1 commit
    • Simon Zünd's avatar
      [typedarray] Change TypedArray.p.sort implementation. · a6c71508
      Simon Zünd authored
      This CL uses the new function pointers and generic features of Torque
      to improve the performance of TypedArray.p.sort.
      
      Instead of one Load/Store builtin that dispatches at runtime based on
      the element kind, there are now many small builtins (one for each
      element kind). The sorting algorithm then uses function pointers to
      those small builtins, which get set once.
      
      Changes in the relevant benchmarks:
      
      Benchmark   Original (JS)   Current   This CL
      IntTypes             83.9     202.3     240.7
      BigIntTypes          32.1      47.2      53.3
      FloatTypes           99.3     109.3     129.3
      
      Bug: v8:7382
      Change-Id: I8684410524d546615b19f6edcbfdc615068196aa
      Reviewed-on: https://chromium-review.googlesource.com/1070069
      Commit-Queue: Simon Zünd <szuend@google.com>
      Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#53322}
      a6c71508
  27. 04 May, 2018 1 commit
    • Daniel Clifford's avatar
      [Torque]: add assert(), unreachable and debug statements · 9cd8995f
      Daniel Clifford authored
      - In debug builds, 'assert(<expr>)' evaluates and aborts execution
        if the provided Torque expression is false at runtime.
        assert(<expr>) supports the same set of expressions protocols
        as Toruqe's if statement, i.e. both bool values and BranchIf-
        style tests. Upon failure, the assertion prints the Torque
        source code of the failed expression, not the generated CSA
        code.
      - 'unreachable' calls CSA's Unreachable() and signals to Torque
        that code execution cannot continue (i.e. its statement
        returns the 'never' type). In debug builds, the line number
        and position of the statement are printed before breaking.
      - 'debug' calls CSA's DebugBreak(). In debug builds, the line
        number and position of the 'debug' are printed before breaking.
      
      Change-Id: I4efd052536bb402c097a0d5f7be56e154b5b3676
      Reviewed-on: https://chromium-review.googlesource.com/1042570
      Commit-Queue: Daniel Clifford <danno@chromium.org>
      Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#52984}
      9cd8995f
  28. 02 May, 2018 1 commit
  29. 27 Apr, 2018 1 commit
  30. 25 Apr, 2018 1 commit
    • Simon Zünd's avatar
      [typedarray] Implement TypedArray.p.sort using Torque. · 3ea1ad23
      Simon Zünd authored
      This CL implements TypedArray.p.sort in Torque. The Torque
      version works basically the same as the existing JS builtin:
      
      When no comparison function is provided, the C++ fast path builtin
      is used. Otherwise a quicksort written in Torque is used, with
      a InsertionSort fallback for smaller arrays.
      
      The JS quicksort implementation also containes a more elaborate
      third pivot calculation for larger arrays. This is currently not done.
      
      Reported benchmark results are only for those, where a custom
      comparison function is provided. The numbers for the C++ path stayed
      the same.
      
      Benchmark   Current (JS)       Torque    Speedup
      
      IntTypes            83.9        263.7        3.1
      BigIntTypes         32.1         54.6        1.7
      FloatTypes          99.3        138.7        1.4
      
      R=danno@chromium.org, jgruber@chromium.org
      
      Bug: v8:7382
      Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
      Change-Id: I7abe7ceff525bab24f302d2f06b5961cca770d24
      Reviewed-on: https://chromium-review.googlesource.com/1021691
      Commit-Queue: Simon Zünd <szuend@google.com>
      Reviewed-by: 's avatarDaniel Clifford <danno@chromium.org>
      Reviewed-by: 's avatarPeter Marshall <petermarshall@chromium.org>
      Reviewed-by: 's avatarMichael Starzinger <mstarzinger@chromium.org>
      Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#52776}
      3ea1ad23
  31. 18 Apr, 2018 1 commit
    • Simon Zünd's avatar
      Renamed builtins-typedarray* files. · 0ec7e505
      Simon Zünd authored
      This change is in preparation for implementing TypedArray builtins
      in torque. Torque makes assumptions about naming conventions regarding
      file and class names, which are currently inconsistent for TypedArrays.
      The class is called TypedArrayBuiltinsAssembler while the current file
      name suggests Typedarray... .
      
      R=jgruber@chromium.org
      
      Bug: v8:7382
      Change-Id: I3051dacb2bfbb7041482c8aa0a1104776ab4972c
      Reviewed-on: https://chromium-review.googlesource.com/1016300Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
      Commit-Queue: Simon Zünd <szuend@google.com>
      Cr-Commit-Position: refs/heads/master@{#52661}
      0ec7e505
  32. 12 Apr, 2018 1 commit
  33. 28 Feb, 2018 1 commit
  34. 23 Feb, 2018 1 commit