1. 30 Jul, 2021 1 commit
    • Clemens Backes's avatar
      [base] Avoid pthread_rwlock_t on Mac · 3a44f269
      Clemens Backes authored
      pthread_rwlock_t can deadlock on Mac if signals are sent to the process
      in the wrong moment. Since we use processes e.g. for sampling profiling
      (in both d8 and in Chrome), we hence cannot safely use pthread_rwlock_t
      on Mac. Instead, fall back to a non-shared pthread_mutex_t.
      
      Interestingly, this shows no measurable performance impact in Wasm
      compilation on my MBP.
      
      R=mlippautz@chromium.org
      
      Bug: v8:11399
      Change-Id: Ie8bfd5288bba8c4f3315ee4502b39b59d39c9bbd
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3060480Reviewed-by: 's avatarVictor Gomes <victorgomes@chromium.org>
      Commit-Queue: Clemens Backes <clemensb@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#76015}
      3a44f269
  2. 29 Jul, 2021 1 commit
  3. 28 Jul, 2021 1 commit
  4. 26 Jul, 2021 1 commit
  5. 23 Jul, 2021 3 commits
    • Vicky Kontoura's avatar
      [web snapshot] Support classes · 8439314d
      Vicky Kontoura authored
      This CL adds support for classes with methods.
      
      More specifically:
      - A new ValueSerializer is added and classes are serialized separetely
      from functions, although the common parts are handled in the same way
      and abstracted away.
      - The function prototype is serialized as an object and any missing
      information is set up again during deserialization.
      - FunctionFlagsToFunctionKinds() is updated to allow for more function
      kinds.
      - Context serialization is updated to support serializing BlockContexts
      and creating ScopeInfos of type CLASS_SCOPE.
      - Map serialization is updated to support properties with custom
      attributes.
      
      Bug: v8:11525, v8:11706
      Change-Id: I16ca7cbc17b1811721081cda05124ce36073f9be
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3006416
      Commit-Queue: Vicky Kontoura <vkont@google.com>
      Reviewed-by: 's avatarCamillo Bruni <cbruni@chromium.org>
      Reviewed-by: 's avatarMarja Hölttä <marja@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#75893}
      8439314d
    • Paolo Severini's avatar
      [compiler] Wrong receiver in API calls with --turbo-optimize-apply · 6a5568b4
      Paolo Severini authored
      Enabling --turbo-optimize-apply breaks tests because we are
      passing the wrong receiver;
      in JSCallReducer::ReduceCallOrConstructWithArrayLikeOrSpread
      we create a Call node with the wrong ConvertReceiverMode, we
      pass kNullOrUndefined while it should be kAny. This may break
      calls to API or in general calls to functions that use the
      receiver.
      
      Bug: chromium:1231108, v8:9974
      Change-Id: Ib35a1bf8746ad254b6d63274f3ae11b12aa83de8
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3043690
      Commit-Queue: Paolo Severini <paolosev@microsoft.com>
      Reviewed-by: 's avatarGeorg Neis <neis@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#75886}
      6a5568b4
    • Maya Lekova's avatar
      Reland "[fastcall] Implement support for TypedArray arguments" · 66856bac
      Maya Lekova authored
      This is a reland of 84d5b027
      
      It removes support for 8-byte types which were causing
      unaligned reads.
      
      Original change's description:
      > [fastcall] Implement support for TypedArray arguments
      >
      > This CL adds TypedArrays as supported arguments for fast API calls.
      > It implements "exact type" matching, i.e. if Float32Array is expected
      > and e.g. Int32Array is passed instead, the generated code bails to the
      > slow callback.
      >
      > Bug: chromium:1052746, chromium:1018624
      > Change-Id: I01d4e681d2b367cbb57b06effcb591c090a23295
      > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2999094
      > Commit-Queue: Maya Lekova <mslekova@chromium.org>
      > Reviewed-by: Georg Neis <neis@chromium.org>
      > Reviewed-by: Camillo Bruni <cbruni@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#75756}
      
      Bug: chromium:1052746, chromium:1018624
      Change-Id: I872716d95bde8c340cf04990a3e4ae8ec8cd74a2
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3035090Reviewed-by: 's avatarGeorg Neis <neis@chromium.org>
      Reviewed-by: 's avatarCamillo Bruni <cbruni@chromium.org>
      Commit-Queue: Maya Lekova <mslekova@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#75877}
      66856bac
  6. 22 Jul, 2021 1 commit
  7. 20 Jul, 2021 1 commit
  8. 19 Jul, 2021 1 commit
    • Jakob Gruber's avatar
      [compiler] Make JSFunction bg-serialized · 0dba97f8
      Jakob Gruber authored
      This wraps up the transition away from kSerialized ref kinds.
      
      Since JSFunctionRef is a complex type, we don't attempt full
      consistency on the background thread. Instead, we serialize functions
      on the background in a partially-racy manner, in which consistency
      between different JSFunction fields is *not* guaranteed. Consistency
      is later verified through a new compilation dependency kind during
      finalization.
      
      Bug: v8:7790, v8:12004
      Change-Id: Ic2b78af9c9fe183c8769d323132bb304b151dc75
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2968404
      Commit-Queue: Jakob Gruber <jgruber@chromium.org>
      Reviewed-by: 's avatarIgor Sheludko <ishell@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#75789}
      0dba97f8
  9. 16 Jul, 2021 3 commits
  10. 15 Jul, 2021 1 commit
  11. 14 Jul, 2021 1 commit
  12. 13 Jul, 2021 2 commits
  13. 12 Jul, 2021 1 commit
  14. 09 Jul, 2021 1 commit
  15. 08 Jul, 2021 3 commits
    • Patrick Thier's avatar
      Reland "Reland "Reland "Improve error messages for property access on null/undefined""" · c0fd89c3
      Patrick Thier authored
      This is a reland of 819c3ae2
      
      Original change's description:
      > Reland "Reland "Improve error messages for property access on null/undefined""
      >
      > This is a reland of 8b18c5e6
      >
      > Original change's description:
      > > Reland "Improve error messages for property access on null/undefined"
      > >
      > > This is a reland of 24c626c1
      > >
      > > Original change's description:
      > > > Improve error messages for property access on null/undefined
      > > >
      > > > Only print the property name when accessing null/undefined if we can
      > > > convert it to a string without causing side effects.
      > > > If we can't, omit the property name in the error message.
      > > > This should avoid confusion when the key is an object with toString().
      > > > E.g. undefined[{toString:()=>'a'}] doesn't print 'read property [object
      > > > Object]' anymore, which was misleading since the property accessed would
      > > > be 'a', but we can't evaluate the key without side effects.
      > > >
      > > > Bug: v8:11365
      > > > Change-Id: If82d1adb42561d4851e2bd2ca297a1c71738aee8
      > > > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2960211
      > > > Reviewed-by: Toon Verwaest <verwaest@chromium.org>
      > > > Commit-Queue: Patrick Thier <pthier@chromium.org>
      > > > Cr-Commit-Position: refs/heads/master@{#75250}
      > >
      > > Bug: v8:11365
      > > Change-Id: Ie2312337f4f1915faa31528a728d90833d80dbd1
      > > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2979599
      > > Reviewed-by: Toon Verwaest <verwaest@chromium.org>
      > > Commit-Queue: Patrick Thier <pthier@chromium.org>
      > > Cr-Commit-Position: refs/heads/master@{#75571}
      >
      > Bug: v8:11365
      > Change-Id: I90360641ecd870bd93247aa6d91dfb0ad049cfb8
      > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3008219
      > Auto-Submit: Patrick Thier <pthier@chromium.org>
      > Commit-Queue: Toon Verwaest <verwaest@chromium.org>
      > Reviewed-by: Toon Verwaest <verwaest@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#75604}
      
      Bug: v8:11365
      Change-Id: I002b537144f328ccbbdcd655e26e5dc87c49c6f5
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3013935Reviewed-by: 's avatarToon Verwaest <verwaest@chromium.org>
      Commit-Queue: Patrick Thier <pthier@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#75645}
      c0fd89c3
    • Clemens Backes's avatar
      [wasm] Disable trap handling for memory64 · 72af112c
      Clemens Backes authored
      Trap handling is not implemented yet for memory64. Make sure that no
      code tries to use it, by setting {NativeModule::bounds_checks_}
      accordingly.
      This requires some changes to tests to make sure that the
      {WasmModule::is_memory64} field is set before creating the corresponding
      {NativeModule}.
      
      R=ahaas@chromium.org
      
      Bug: v8:10949
      Change-Id: I11d9544b603fc471e3368bb4e7487da4711293a0
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3011167Reviewed-by: 's avatarAndreas Haas <ahaas@chromium.org>
      Commit-Queue: Clemens Backes <clemensb@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#75632}
      72af112c
    • Leszek Swirski's avatar
      Revert "Reland "Reland "Improve error messages for property access on null/undefined""" · 7ac7b72b
      Leszek Swirski authored
      This reverts commit 819c3ae2.
      
      Reason for revert: Sorry Patrick, still failing on some layout tests :( https://test-results.appspot.com/data/layout_results/mac-rel/726365/blink_web_tests%20%28retry%20shards%20with%20patch%29/layout-test-results/results.html
      
      Original change's description:
      > Reland "Reland "Improve error messages for property access on null/undefined""
      >
      > This is a reland of 8b18c5e6
      >
      > Original change's description:
      > > Reland "Improve error messages for property access on null/undefined"
      > >
      > > This is a reland of 24c626c1
      > >
      > > Original change's description:
      > > > Improve error messages for property access on null/undefined
      > > >
      > > > Only print the property name when accessing null/undefined if we can
      > > > convert it to a string without causing side effects.
      > > > If we can't, omit the property name in the error message.
      > > > This should avoid confusion when the key is an object with toString().
      > > > E.g. undefined[{toString:()=>'a'}] doesn't print 'read property [object
      > > > Object]' anymore, which was misleading since the property accessed would
      > > > be 'a', but we can't evaluate the key without side effects.
      > > >
      > > > Bug: v8:11365
      > > > Change-Id: If82d1adb42561d4851e2bd2ca297a1c71738aee8
      > > > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2960211
      > > > Reviewed-by: Toon Verwaest <verwaest@chromium.org>
      > > > Commit-Queue: Patrick Thier <pthier@chromium.org>
      > > > Cr-Commit-Position: refs/heads/master@{#75250}
      > >
      > > Bug: v8:11365
      > > Change-Id: Ie2312337f4f1915faa31528a728d90833d80dbd1
      > > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2979599
      > > Reviewed-by: Toon Verwaest <verwaest@chromium.org>
      > > Commit-Queue: Patrick Thier <pthier@chromium.org>
      > > Cr-Commit-Position: refs/heads/master@{#75571}
      >
      > Bug: v8:11365
      > Change-Id: I90360641ecd870bd93247aa6d91dfb0ad049cfb8
      > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3008219
      > Auto-Submit: Patrick Thier <pthier@chromium.org>
      > Commit-Queue: Toon Verwaest <verwaest@chromium.org>
      > Reviewed-by: Toon Verwaest <verwaest@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#75604}
      
      Bug: v8:11365
      Change-Id: I7d7c0f201288384c2aa38a51418b582a64213ae0
      No-Presubmit: true
      No-Tree-Checks: true
      No-Try: true
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3013352
      Auto-Submit: Leszek Swirski <leszeks@chromium.org>
      Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
      Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
      Cr-Commit-Position: refs/heads/master@{#75626}
      7ac7b72b
  16. 07 Jul, 2021 4 commits
  17. 06 Jul, 2021 3 commits
  18. 05 Jul, 2021 2 commits
  19. 02 Jul, 2021 2 commits
    • Zhi An Ng's avatar
      Revert "[build] Separate out inspector as a shared library" · 50fb0a2f
      Zhi An Ng authored
      This reverts commit 92bfb63c.
      
      Reason for revert: Broke build https://ci.chromium.org/ui/p/v8/builders/ci/V8%20Linux%20-%20shared/43249/overview
      
      Original change's description:
      > [build] Separate out inspector as a shared library
      >
      > This makes src/inspector:inspector into a v8_component producing a
      > shared library in component builds. To enable this, all of its exported
      > are now marked with V8_INSPECTOR_EXPORT.
      >
      > This also inverts the dependency between src/inspector:inspector and
      > :v8_base_without_compiler, and instead makes d8 and some tests depend on
      > inspector rather than getting it via v8.
      >
      > As a result, the no_check_targets exclusions list in .gn is reduced.
      >
      > Ultimately embedders like chromium should depend on :v8 and optionally
      > src/inspector:inspector, but to allow that transition to occur, this
      > renames :v8 to :v8_lib and introduces a new :v8 which depends on v8 and
      > inspector. Once all embedders have changed to reflect the new structure,
      > this part can be reverted.
      >
      > Bug: v8:11917
      > Change-Id: Ia8b15f07fb15acc5e1f111b1a80248def4285fd0
      > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2999088
      > Reviewed-by: Clemens Backes <clemensb@chromium.org>
      > Reviewed-by: Michael Achenbach <machenbach@chromium.org>
      > Reviewed-by: Yang Guo <yangguo@chromium.org>
      > Commit-Queue: Dan Elphick <delphick@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#75532}
      
      Bug: v8:11917
      Change-Id: I0ed27ed95211d13b8b3438a8c0a42d577806c475
      No-Presubmit: true
      No-Tree-Checks: true
      No-Try: true
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3003452
      Auto-Submit: Zhi An Ng <zhin@chromium.org>
      Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
      Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
      Cr-Commit-Position: refs/heads/master@{#75533}
      50fb0a2f
    • Dan Elphick's avatar
      [build] Separate out inspector as a shared library · 92bfb63c
      Dan Elphick authored
      This makes src/inspector:inspector into a v8_component producing a
      shared library in component builds. To enable this, all of its exported
      are now marked with V8_INSPECTOR_EXPORT.
      
      This also inverts the dependency between src/inspector:inspector and
      :v8_base_without_compiler, and instead makes d8 and some tests depend on
      inspector rather than getting it via v8.
      
      As a result, the no_check_targets exclusions list in .gn is reduced.
      
      Ultimately embedders like chromium should depend on :v8 and optionally
      src/inspector:inspector, but to allow that transition to occur, this
      renames :v8 to :v8_lib and introduces a new :v8 which depends on v8 and
      inspector. Once all embedders have changed to reflect the new structure,
      this part can be reverted.
      
      Bug: v8:11917
      Change-Id: Ia8b15f07fb15acc5e1f111b1a80248def4285fd0
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2999088Reviewed-by: 's avatarClemens Backes <clemensb@chromium.org>
      Reviewed-by: 's avatarMichael Achenbach <machenbach@chromium.org>
      Reviewed-by: 's avatarYang Guo <yangguo@chromium.org>
      Commit-Queue: Dan Elphick <delphick@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#75532}
      92bfb63c
  20. 01 Jul, 2021 6 commits
  21. 30 Jun, 2021 1 commit
    • Manos Koukoutos's avatar
      Reland "[wasm] Refactor initializer expression handling" · 7981dc33
      Manos Koukoutos authored
      This is a reland of 071a1acf
      
      Changes compared to original:
      Expect SIMD test to fail if SIMD is not supported.
      
      Original change's description:
      > [wasm] Refactor initializer expression handling
      >
      > Design doc: https://bit.ly/3xPxWUe
      >
      > This CL introduces two main changes:
      > - Initializer expressions are now decoded by WasmFullDecoder. With
      >   wasm-gc, initializer expressions are no longer just constants, and
      >   require complex decoding (including stack tracking). This resulted in
      >   extensive code duplication.
      > - Initializer expressions are not stored explicitly by module-decoder as
      >   an AST (WasmInitExpr), but rather as a WireBytesRef, and are decoded
      >   again during module instantiation. This should reduce memory
      >   consumption for globals and other module elements with initializer
      >   expressions (which has been observed in the 40MB range in some
      >   real-world benchmarks.
      >
      > Summary of changes:
      > - Add a static parameter {kFunctionBody, kInitExpression} to the
      >   WasmDecoder. Use it to specialize validation to function bodies/init.
      >   expressions.
      > - Introduce a new Interface for the WasmFullDecoder for init.
      >   expressions.
      > - Differentiate between constant and non-constant opcodes in
      >   WasmFullDecoder.
      > - Change representation of init. expressions in WasmModule to
      >   WireBytesRef.
      > - Reimplement EvaluateInitExpression in module-instantiate to re-decode
      >   initializer expressions.
      > - Remove some now-invalid module decoder tests.
      >
      > Pending changes:
      > - Also refactor initializer expressions for element segment entries.
      > - Reintroduce deleted tests.
      >
      > Bug: v8:11895
      > Change-Id: I76512bfe1386c8338667d30fa6db93880a1e4b42
      > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2972910
      > Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
      > Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#75476}
      
      Bug: v8:11895
      Change-Id: I2dface5ff28d5a2d439a65d3e5cb83135c061bb9
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2997722
      Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
      Reviewed-by: 's avatarJakob Kummerow <jkummerow@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#75492}
      7981dc33