1. 13 Sep, 2021 1 commit
  2. 17 Aug, 2021 1 commit
  3. 04 Aug, 2021 1 commit
  4. 28 May, 2021 1 commit
  5. 20 Nov, 2020 1 commit
  6. 29 Sep, 2020 1 commit
  7. 13 Aug, 2020 1 commit
  8. 28 May, 2020 1 commit
  9. 28 Feb, 2020 1 commit
    • Seth Brenith's avatar
      Complete Torque definition of JSArrayBuffer · da900ffe
      Seth Brenith authored
      Previously, our Torque definition of JSArrayBuffer included only the
      first two fields. This allowed access to those two fields, but was
      somewhat confusing and obviously didn't let Torque code access the
      other fields. This change:
      
      - Completes the JSArrayBuffer layout definition;
      - Moves the associated bitfield struct definition to Torque;
      - Moves a couple of JSArrayBuffer macros to Torque;
      - Adds a reducer case so that the code generated using these new macros
        is not worse than what was generated previously.
      
      Change-Id: Ib19c3ba789a33801fa9d0d064cd21d62a1e03e30
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2053769
      Commit-Queue: Seth Brenith <seth.brenith@microsoft.com>
      Reviewed-by: 's avatarTobias Tebbi <tebbi@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#66503}
      da900ffe
  10. 06 Nov, 2019 1 commit
  11. 04 Nov, 2019 1 commit
  12. 31 Oct, 2019 1 commit
  13. 22 Oct, 2019 1 commit
  14. 17 Oct, 2019 1 commit
  15. 23 Sep, 2019 1 commit
  16. 19 Jun, 2019 1 commit
  17. 12 Jun, 2019 1 commit
    • Seth Brenith's avatar
      [torque] Stricter object field verification, part 1 · 3834c637
      Seth Brenith authored
      This change adjusts object initialization order for a few classes so
      that the GC can never see those objects in an invalid, partially-
      initialized state.
      
      AccessorInfo: Just zeros out a few fields upon construction. This is the
      simplest case.
      
      FunctionTemplateInfo: Slightly changes the order in which fields are
      set, so that the Smi field is set ahead of the call to SetCallHandler,
      which can GC. Also a pretty simple case.
      
      JSListFormat, JSPluralRules, JSRelativeTimeFormat, JSSegmenter: The spec
      requires that we start with OrdinaryCreateFromConstructor, which has
      observable side effects (it fetches the prototype from the new.target).
      So we split JSObject::New in half: the first half does all of the user-
      visible things and returns a Map, which we can pass to the second half
      when we're ready to actually allocate the object.
      
      JSTypedArray: Extends the pattern from JSListFormat into Torque code:
      start with a Map and don't allocate the object until we're ready to set
      all of its properties.
      
      Bug: v8:9311
      Change-Id: Id7703e8a0727ec756c774cfbb56af787658a111a
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1646844
      Commit-Queue: Seth Brenith <seth.brenith@microsoft.com>
      Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
      Reviewed-by: 's avatarSigurd Schneider <sigurds@chromium.org>
      Reviewed-by: 's avatarUlan Degenbaev <ulan@chromium.org>
      Reviewed-by: 's avatarBenedikt Meurer <bmeurer@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#62123}
      3834c637
  18. 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
  19. 21 May, 2019 1 commit
  20. 14 May, 2019 2 commits
  21. 04 Mar, 2019 1 commit
  22. 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
  23. 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
  24. 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
  25. 05 Feb, 2019 1 commit
  26. 04 Feb, 2019 1 commit
  27. 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
  28. 24 Jan, 2019 1 commit
  29. 23 Jan, 2019 1 commit
  30. 22 Jan, 2019 1 commit
  31. 21 Jan, 2019 1 commit
  32. 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
  33. 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
  34. 24 Oct, 2018 1 commit
  35. 18 Sep, 2018 1 commit