1. 14 Nov, 2019 1 commit
  2. 13 Nov, 2019 1 commit
  3. 11 Nov, 2019 1 commit
  4. 06 Nov, 2019 1 commit
  5. 04 Nov, 2019 1 commit
  6. 31 Oct, 2019 2 commits
  7. 23 Oct, 2019 1 commit
  8. 22 Oct, 2019 1 commit
    • Tobias Tebbi's avatar
      [torque] replace name mangling with unique numbering · 419b4e7e
      Tobias Tebbi authored
      Name mangling is hard to get right and not easy to read.
      This CL replaces the remaining name mangling of types and generics
      with simpler names that are not always unique, but then fixes them
      up by appending a unique counter.
      
      For struct types, this required an @export annotation since we use some
      struct types in CSA.
      
      Drive-by-fixes:
      
      - Overwrite the copy constructor of Type to clear the list
      of alias names when creating a new type.
      
      - Change the existing append-a-number scheme to have different
        counters for each name. This the number of changed names when adding
        something and is more readable.
      
      Bug: v8:7793
      Change-Id: Ied11ea1a251130f4562ddc0d81967368349e0bf6
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1866650
      Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
      Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#64449}
      419b4e7e
  9. 18 Oct, 2019 2 commits
  10. 17 Oct, 2019 1 commit
  11. 23 Sep, 2019 1 commit
  12. 26 Aug, 2019 1 commit
    • Tobias Tebbi's avatar
      Reland "[torque] introduce JSAny type for user-accessible JavaScript values" · 1ef99b93
      Tobias Tebbi authored
      Changes in the reland: Rebased and added a check that JavaScript-linkage
      builtins use JSAny in parameters and return type, plus the necessary
      cleanups for this test to pass.
      
      Design Doc: https://docs.google.com/document/d/1z6j0pWHnNIfId0v00uWN2HBrGRDJxJfYuCr5K7Kr1xA
      
      This reverts commit 4418a7b9.
      
      Original change's description:
      > Revert "[torque] introduce JSAny type for user-accessible JavaScript values"
      >
      > This reverts commit 79b00555.
      >
      > Reason for revert: needs more discussion
      >
      > Original change's description:
      > > [torque] introduce JSAny type for user-accessible JavaScript values
      > >
      > > This CL introduces a JSAny type for user-exposed JavaScript values and
      > > a few new types to define it. Especially, it splits Symbol into
      > > PrivateSymbol (not exposed) and PublicSymbol (JavaScript exposed
      > > symbols).
      > >
      > > The change is mostly mechanical, but a few things are interesting:
      > > - PropertyKey and JSPrimitive were designed to coincide with the spec
      > >   notions of IsPropertyKey() and primitive value, respectively.
      > > - Since Name is an open type, we define AnyName to be the known
      > >   subtypes of Name. This is not too elegant, but by using AnyName
      > >   instead of Name, typeswitch can properly conclude something if a
      > >   subtype of Name is excluded.
      > >
      > > Small drive-by changes, which were necessary:
      > > - Allow subtyping on label parameters.
      > > - Fix the formatting of typeswitch, it was broken with union types
      > >   in case types.
      > >
      > > Bug: v8:7793
      > > Change-Id: I14b10507f8cf316ad85e048fe8d53d1df5e0bb13
      > > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1735322
      > > Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
      > > Reviewed-by: Jakob Gruber <jgruber@chromium.org>
      > > Cr-Commit-Position: refs/heads/master@{#63114}
      >
      > TBR=neis@chromium.org,jgruber@chromium.org,tebbi@chromium.org
      >
      > Change-Id: Ifde7881d74afe407628f40047997339d54cb2424
      > No-Presubmit: true
      > No-Tree-Checks: true
      > No-Try: true
      > Bug: v8:7793
      > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1741652
      > Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
      > Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#63115}
      
      TBR=neis@chromium.org,jgruber@chromium.org,tebbi@chromium.org
      
      # Not skipping CQ checks because original CL landed > 1 day ago.
      
      Bug: v8:7793
      Change-Id: Icca34e3824f55009b984d9348fd21884400f0081
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1769316
      Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
      Reviewed-by: 's avatarTobias Tebbi <tebbi@chromium.org>
      Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#63395}
      1ef99b93
  13. 07 Aug, 2019 2 commits
    • Tobias Tebbi's avatar
      Revert "[torque] introduce JSAny type for user-accessible JavaScript values" · 4418a7b9
      Tobias Tebbi authored
      This reverts commit 79b00555.
      
      Reason for revert: needs more discussion
      
      Original change's description:
      > [torque] introduce JSAny type for user-accessible JavaScript values
      > 
      > This CL introduces a JSAny type for user-exposed JavaScript values and
      > a few new types to define it. Especially, it splits Symbol into
      > PrivateSymbol (not exposed) and PublicSymbol (JavaScript exposed
      > symbols).
      > 
      > The change is mostly mechanical, but a few things are interesting:
      > - PropertyKey and JSPrimitive were designed to coincide with the spec
      >   notions of IsPropertyKey() and primitive value, respectively.
      > - Since Name is an open type, we define AnyName to be the known
      >   subtypes of Name. This is not too elegant, but by using AnyName
      >   instead of Name, typeswitch can properly conclude something if a
      >   subtype of Name is excluded.
      > 
      > Small drive-by changes, which were necessary:
      > - Allow subtyping on label parameters.
      > - Fix the formatting of typeswitch, it was broken with union types
      >   in case types.
      > 
      > Bug: v8:7793
      > Change-Id: I14b10507f8cf316ad85e048fe8d53d1df5e0bb13
      > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1735322
      > Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
      > Reviewed-by: Jakob Gruber <jgruber@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#63114}
      
      TBR=neis@chromium.org,jgruber@chromium.org,tebbi@chromium.org
      
      Change-Id: Ifde7881d74afe407628f40047997339d54cb2424
      No-Presubmit: true
      No-Tree-Checks: true
      No-Try: true
      Bug: v8:7793
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1741652Reviewed-by: 's avatarTobias Tebbi <tebbi@chromium.org>
      Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#63115}
      4418a7b9
    • Tobias Tebbi's avatar
      [torque] introduce JSAny type for user-accessible JavaScript values · 79b00555
      Tobias Tebbi authored
      This CL introduces a JSAny type for user-exposed JavaScript values and
      a few new types to define it. Especially, it splits Symbol into
      PrivateSymbol (not exposed) and PublicSymbol (JavaScript exposed
      symbols).
      
      The change is mostly mechanical, but a few things are interesting:
      - PropertyKey and JSPrimitive were designed to coincide with the spec
        notions of IsPropertyKey() and primitive value, respectively.
      - Since Name is an open type, we define AnyName to be the known
        subtypes of Name. This is not too elegant, but by using AnyName
        instead of Name, typeswitch can properly conclude something if a
        subtype of Name is excluded.
      
      Small drive-by changes, which were necessary:
      - Allow subtyping on label parameters.
      - Fix the formatting of typeswitch, it was broken with union types
        in case types.
      
      Bug: v8:7793
      Change-Id: I14b10507f8cf316ad85e048fe8d53d1df5e0bb13
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1735322
      Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
      Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#63114}
      79b00555
  14. 19 Jun, 2019 1 commit
  15. 14 Jun, 2019 3 commits
  16. 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
  17. 11 Jun, 2019 2 commits
  18. 06 Jun, 2019 1 commit
    • Simon Zünd's avatar
      [torque] Add lint errors for unused variable and label bindings · 0e53739c
      Simon Zünd authored
      This CL adds lint errors when 'let' bindings, arguments and labels
      are not used. Note that errors for 'const' bindings will be added
      later.
      
      In cases where arguments are actually needed to match the signature,
      the warning can be silenced by prefixing identifiers with "_". This
      might be needed for generic specializations or builtins called from
      TurboFan. Trying to use a variable or label that was marked with
      "_" results in a compilation error.
      
      Implicit arguments are not linted. They are implemented using exact
      string matching. Prefixing an implicit argument with "_" in a callee
      would break all callers as the names would no longer match.
      
      Drive-by: Fix all new lint errors in the existing Torque code.
      
      Bug: v8:7793
      Change-Id: I68b3c59c76b956e9f88709e9388a40a19546ce52
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1645092
      Commit-Queue: Simon Zünd <szuend@chromium.org>
      Reviewed-by: 's avatarTobias Tebbi <tebbi@chromium.org>
      Reviewed-by: 's avatarSigurd Schneider <sigurds@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#62027}
      0e53739c
  19. 27 May, 2019 3 commits
    • 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
  20. 16 May, 2019 1 commit
  21. 14 May, 2019 1 commit
  22. 04 Apr, 2019 1 commit
    • Tobias Tebbi's avatar
      [torque] named arguments for constructors · e87e3b1f
      Tobias Tebbi authored
      This changes the syntax for constructing structs and classes to explicitly
      mention the fieldnames, similar to JavaScript object literals.
      The fields still have to be listed in the same order as in the struct/class
      declaration.
      As in Javascript, {foo: foo} can be abbreviated as {foo}.
      
      Example:
      
      macro NewJSArray(implicit context: Context)(
          map: Map, elements: FixedArrayBase): JSArray {
        return new JSArray{
          map,
          properties_or_hash: kEmptyFixedArray,
          elements,
          length: elements.length
        };
      }
      
      Drive-by cleanup: Make struct and class constructors follow the same pattern
                        in the parser and the AST.
      
      Bug: v8:9018 v8:7793
      Change-Id: I22ff7f68270e4f406aa80731a709d41ea52f52bb
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1551999Reviewed-by: 's avatarSigurd Schneider <sigurds@chromium.org>
      Reviewed-by: 's avatarDaniel Clifford <danno@chromium.org>
      Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#60622}
      e87e3b1f
  23. 04 Mar, 2019 1 commit
  24. 01 Mar, 2019 1 commit
    • Mike Stanton's avatar
      [Torque] Move some TypedArray builtins to Torque · 40c9cce4
      Mike Stanton authored
      This CL moves the following builtins from CSA to Torque:
      
      TypedArray.prototype.forEach
      TypedArray.prototype.reduce
      TypedArray.prototype.reduceRight
      
      A space-saving decision was made in the design -- instead of emitting
      versions of the central loop for each ElementsKind, a function
      pointer which knows how to read from the appropriate TypedArray
      ElementsKind is constructed at the outset, and passed into the
      loop. This enormously reduces codesize for the TypedArray builtins.
      We'll have to see if the overhead of the builtin call affects
      performance too adversely.
      
      BUG: v8:8906
      Change-Id: I808cd70f58ddbde18f85e5b2a9be0b883a3f6647
      Reviewed-on: https://chromium-review.googlesource.com/c/1484292Reviewed-by: 's avatarSimon Zünd <szuend@chromium.org>
      Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
      Commit-Queue: Michael Stanton <mvstanton@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#59970}
      40c9cce4
  25. 27 Feb, 2019 4 commits
  26. 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
  27. 18 Feb, 2019 2 commits
    • Daniel Clifford's avatar
      [torque] Implement simple automatic index operators · 76e722c1
      Daniel Clifford authored
      In the process, cleanup the StoreFixedArray* operators
      and change most FixedArray element accesses so that
      they explicitly use the '.objects' and '.floats'
      fields.
      
      Bug: v8:7793
      Change-Id: I3e45a9b7536ec76e1413b7e508d79a56b37604ff
      Reviewed-on: https://chromium-review.googlesource.com/c/1460948
      Commit-Queue: Daniel Clifford <danno@chromium.org>
      Reviewed-by: 's avatarTobias Tebbi <tebbi@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#59649}
      76e722c1
    • 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
  28. 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