- 29 Jul, 2022 31 commits
-
-
Joyee Cheung authored
This is a reland of commit 07e11a64. The original change removed the fill_thehole_and_call_runtime bailout in StringBuiltinsAssembler::StringToArray() so when the string is external and cannot be unpacked, the FixedArray won't be filled with holes before we call into the runtime, thus failing a heap verification if a GC happens before the array is filled. This reland adds back the bailout for this case. Bug: v8:12718, chromium:1330410 Original change's description: > [heap] pre-populate the single_character_string_cache > > This simplifies the code and removes the runtime overhead of > spontaneously adding strings to the cache. > > Bug: v8:12718 > Change-Id: I2ed49bd82e3baf2563eeb8f463be72c0308c52c5 > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3616553 > Reviewed-by: Dominik Inführ <dinfuehr@chromium.org> > Reviewed-by: Leszek Swirski <leszeks@chromium.org> > Reviewed-by: Jakob Kummerow <jkummerow@chromium.org> > Reviewed-by: Tobias Tebbi <tebbi@chromium.org> > Commit-Queue: Joyee Cheung <joyee@igalia.com> > Cr-Commit-Position: refs/heads/main@{#80803} Change-Id: I25e8724d511a8d0d971fa2a9b6ba8a0eafce4413 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3793525Reviewed-by: Jakob Kummerow <jkummerow@chromium.org> Reviewed-by: Dominik Inführ <dinfuehr@chromium.org> Commit-Queue: Joyee Cheung <joyee@igalia.com> Reviewed-by: Tobias Tebbi <tebbi@chromium.org> Reviewed-by: Leszek Swirski <leszeks@chromium.org> Cr-Commit-Position: refs/heads/main@{#82082}
-
Clemens Backes authored
If we grow memory (out-of-place, so only without trap handling and only if the maximum is >1GB) and the previous size is close to the maximum, then the minimum growth we calculate can be bigger than the allowed maximum. In this situation, the {std::clamp} has undefined behaviour, since the provided lower limit is bigger then the upper limit. Thus apply {std::min} and {std::max} in an order such that {max_pages} has precedence over {min_growth}. R=thibaudm@chromium.org Bug: chromium:1348335 Change-Id: I4f9e9ce10a0685892248eaf0e06ffd2e84b9a069 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3793396 Commit-Queue: Clemens Backes <clemensb@chromium.org> Reviewed-by: Thibaud Michaud <thibaudm@chromium.org> Cr-Commit-Position: refs/heads/main@{#82081}
-
Peter Kasting authored
This fixes some instances of -Wundefined-inline in the C++20 build. Bug: chromium:1284275 Change-Id: I134e866183e1e42b9726153964af9910d03cd3b8 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3791525Reviewed-by: Michael Lippautz <mlippautz@chromium.org> Commit-Queue: Peter Kasting <pkasting@chromium.org> Auto-Submit: Peter Kasting <pkasting@chromium.org> Cr-Commit-Position: refs/heads/main@{#82080}
-
Jakob Kummerow authored
Due to popular demand. As a necessary byproduct, this drops our former experimental in-progress support for accessing struct fields from JS as `.field0` etc. If we need something similar in the future, we'll have to build a new mechanism for it that scales to >1020 fields. Bug: v8:7748 Change-Id: I08b2051bd9f76cf7128f3d4c74910ca891c38130 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3793616Reviewed-by: Manos Koukoutos <manoskouk@chromium.org> Commit-Queue: Jakob Kummerow <jkummerow@chromium.org> Cr-Commit-Position: refs/heads/main@{#82079}
-
Dominik Inführ authored
So far all OLD_TO_SHARED slots were deleted after a shared GC. The remembered set was rebuilt in the next shared GC from scratch. This CL changes this behavior to only remove slots that don't point into the shared heap anymore. We still need to remove the full OLD_TO_SHARED slot set for young generation pages though. During a shared GC we use the OLD_TO_SHARED remembered set to cache references into the shared heap even for pages in the young generation to avoid the second new space object iteration. Bug: v8:11708 Change-Id: If92fca25e8fe7e7bf5fc5562c974b0d4c121cb02 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3790967 Commit-Queue: Dominik Inführ <dinfuehr@chromium.org> Reviewed-by: Michael Lippautz <mlippautz@chromium.org> Cr-Commit-Position: refs/heads/main@{#82078}
-
Clemens Backes authored
Call test functions immediately, and make them print their name before execution. R=thibaudm@chromium.org Change-Id: I2057e2b3c2032c342a86705dbda8992aa54493e5 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3793612 Commit-Queue: Clemens Backes <clemensb@chromium.org> Reviewed-by: Thibaud Michaud <thibaudm@chromium.org> Cr-Commit-Position: refs/heads/main@{#82077}
-
Victor Gomes authored
It also changes Abort to be a ControlNode. Bug: v8:7700 Change-Id: I836c353f8110140c023c582ea91c456e23196921 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3793397Reviewed-by: Leszek Swirski <leszeks@chromium.org> Commit-Queue: Leszek Swirski <leszeks@chromium.org> Commit-Queue: Victor Gomes <victorgomes@chromium.org> Auto-Submit: Victor Gomes <victorgomes@chromium.org> Cr-Commit-Position: refs/heads/main@{#82076}
-
Clemens Backes authored
This reverts commit cd617a58. Reason for revert: SIMD needs to be skipped if not supported: https://ci.chromium.org/ui/p/v8/builders/ci/V8%20Linux/47699/overview Original change's description: > [test][wasm] Increase coverage for value types in signature > > Change-Id: I19105432a71b5850264624c23d7bb732193100f3 > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3791046 > Reviewed-by: Jakob Kummerow <jkummerow@chromium.org> > Auto-Submit: Matthias Liedtke <mliedtke@chromium.org> > Commit-Queue: Matthias Liedtke <mliedtke@chromium.org> > Cr-Commit-Position: refs/heads/main@{#82071} Change-Id: I0dc0cd479a2396ac65a14550468254eb5c5c7484 No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3793398 Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> Auto-Submit: Clemens Backes <clemensb@chromium.org> Cr-Commit-Position: refs/heads/main@{#82075}
-
Clemens Backes authored
The {LiftoffAssembler::Load} method already receives an {i64_offset} parameter which skips the UXTW (zero extension of 32-bit addresses) in the memory operand. The same needs to happen on stores. On 32-bit platforms, we cannot have addresses >=4GB anyway (they would be detected as OOB before reaching the point in question), so this is not a problem. On x64, all 32-bit registers are zero-extended already (which is debug-checked in the generated code), so this is also no problem (and we just ignore the additional parameter). R=jkummerow@chromium.org Bug: v8:10949 Change-Id: I3c2266dde1bf9d182b6759893f7f64540ae12261 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3791051 Commit-Queue: Clemens Backes <clemensb@chromium.org> Reviewed-by: Jakob Kummerow <jkummerow@chromium.org> Cr-Commit-Position: refs/heads/main@{#82074}
-
Matthias Liedtke authored
Table<any> is not allowed any more and may therefore not be generated by the fuzzer. Instead, the new type is table<externref>. Bug: chromium:1348437 Change-Id: Ibf788222fc777508e59178db48e6497a18b250d8 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3793610 Commit-Queue: Manos Koukoutos <manoskouk@chromium.org> Auto-Submit: Matthias Liedtke <mliedtke@chromium.org> Reviewed-by: Manos Koukoutos <manoskouk@chromium.org> Cr-Commit-Position: refs/heads/main@{#82073}
-
Manos Koukoutos authored
This is required by the MVP spec. In the future, it might be possible to pass values for any immutable fields. Bug: v8:7748 Change-Id: Ie7705b48e9d6ebb87d5e1b0a2a10556302395db6 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3793383Reviewed-by: Jakob Kummerow <jkummerow@chromium.org> Commit-Queue: Manos Koukoutos <manoskouk@chromium.org> Cr-Commit-Position: refs/heads/main@{#82072}
-
Matthias Liedtke authored
Change-Id: I19105432a71b5850264624c23d7bb732193100f3 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3791046Reviewed-by: Jakob Kummerow <jkummerow@chromium.org> Auto-Submit: Matthias Liedtke <mliedtke@chromium.org> Commit-Queue: Matthias Liedtke <mliedtke@chromium.org> Cr-Commit-Position: refs/heads/main@{#82071}
-
Clemens Backes authored
Many platform-dependent LiftoffAssembler methods do not use all parameters. Comment out the name of unused ones, to make it easier to see which implementation uses which parameters. Also, remove {is_load_mem} from arm's {LoadInternal}, because it is unused there. R=jkummerow@chromium.org Bug: v8:10949 Change-Id: I57281237c493cc35c3cd31d814bca9bef510fdd2 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3791049Reviewed-by: Jakob Kummerow <jkummerow@chromium.org> Commit-Queue: Clemens Backes <clemensb@chromium.org> Cr-Commit-Position: refs/heads/main@{#82070}
-
Tobias Tebbi authored
Bug: v8:13114 Change-Id: I69ec1cbc8021e4c86aec705466f028cc95a05261 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3793395 Commit-Queue: Tobias Tebbi <tebbi@chromium.org> Auto-Submit: Tobias Tebbi <tebbi@chromium.org> Reviewed-by: Nico Hartmann <nicohartmann@chromium.org> Commit-Queue: Nico Hartmann <nicohartmann@chromium.org> Cr-Commit-Position: refs/heads/main@{#82069}
-
Victor Gomes authored
Support slow path for the following bytecodes: - LdaLookupSlot - LdaLookupContextSlot - LdaLookupGlobalSlot - LdaLookupSlotInsideTypeof - LdaLookupContextSlotInsideTypeof - LdaLookupGlobalSlotInsideTypeof - DefineKeyedOwnPropertyInLiteral - CollectTypeProfile - Debugger Bug: v8:7700 Change-Id: Idf661ca739de184df2eb22e1fb7247c71c6dd438 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3793393 Auto-Submit: Victor Gomes <victorgomes@chromium.org> Commit-Queue: Victor Gomes <victorgomes@chromium.org> Reviewed-by: Leszek Swirski <leszeks@chromium.org> Cr-Commit-Position: refs/heads/main@{#82068}
-
Clemens Backes authored
If dynamic tiering or lazy compilation is enabled (which is the default), the initial code space needs to be big enough to also hold the lazy compilation jump table. Otherwise a CHECK will fail later when trying to allocate that table (in UseLazyStub). R=ahaas@chromium.org Bug: chromium:1348472, chromium:1348214 Change-Id: If7a091a5782f1b2099d35d1a06292dddbaeb0598 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3793389 Commit-Queue: Clemens Backes <clemensb@chromium.org> Reviewed-by: Andreas Haas <ahaas@chromium.org> Cr-Commit-Position: refs/heads/main@{#82067}
-
Leszek Swirski authored
If a value is expected to be in a particular register for a register merge, allow for it to be moved there from another register, without expecting it to be spilled. Bug: v8:7700 Change-Id: I9ef5e77b3a744a6284f4790ec9d5a7c60739a710 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3793391Reviewed-by: Victor Gomes <victorgomes@chromium.org> Commit-Queue: Leszek Swirski <leszeks@chromium.org> Commit-Queue: Victor Gomes <victorgomes@chromium.org> Auto-Submit: Leszek Swirski <leszeks@chromium.org> Cr-Commit-Position: refs/heads/main@{#82066}
-
Dominik Inführ authored
In addition to the marking barrier we now also need the shared barrier for properly tracking the old-to-shared remembered set. So invoke the full write barrier for set_map and set_map_after_allocation. Bug: v8:11708 Change-Id: Ic234e7fad3733ab1348298f5fcc2b76e44cf4b8d Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3793388Reviewed-by: Michael Lippautz <mlippautz@chromium.org> Commit-Queue: Dominik Inführ <dinfuehr@chromium.org> Cr-Commit-Position: refs/heads/main@{#82065}
-
Manos Koukoutos authored
Currently, we canonicalize types for call_indirect by looking in the current module for a signature of the same shape. This is not enough as of wasm-gc. Instead, the canonical identifier representing a type has to be computed via isorecursive canonicalization. This change is implemented behind a flag for now. Future work: Also integrate export wrappers with isorecursive canonical types. We need to store wrappers in instance-independent storage. Drive-by: - Always emit type check for call_indirect. We did not emit a check only when typed-function-references was enabled, but not gc. This is not something that will be possible long-term. - Fix some wasm cctests. Bug: v8:7748 Change-Id: I7cced187009ac148c833dff5e720a8bb9a717e68 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3784600Reviewed-by: Jakob Kummerow <jkummerow@chromium.org> Commit-Queue: Manos Koukoutos <manoskouk@chromium.org> Cr-Commit-Position: refs/heads/main@{#82064}
-
Lu Yahan authored
This is a reland of commit 859ff489 Original change's description: > [riscv][Cleanup] Use CmpInstanceTypeRange in MacroAssembler > > Bug: v8:11325 > > Change-Id: I2eae55b49ea01567460bd0adfbb819c893ce7cd7 > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3793210 > Auto-Submit: Yahan Lu <yahan@iscas.ac.cn> > Reviewed-by: ji qiu <qiuji@iscas.ac.cn> > Commit-Queue: ji qiu <qiuji@iscas.ac.cn> > Cr-Commit-Position: refs/heads/main@{#82054} Bug: v8:11325 Change-Id: I9db48ed2783a875b617d4161ce7405c0c32bebbe Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3793466 Commit-Queue: ji qiu <qiuji@iscas.ac.cn> Reviewed-by: ji qiu <qiuji@iscas.ac.cn> Cr-Commit-Position: refs/heads/main@{#82063}
-
Victor Gomes authored
Bug: v8:7700 Change-Id: I51f3da86cb71ec5980c799a77ce280d83ca42cd7 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3793387 Auto-Submit: Victor Gomes <victorgomes@chromium.org> Commit-Queue: Victor Gomes <victorgomes@chromium.org> Reviewed-by: Leszek Swirski <leszeks@chromium.org> Cr-Commit-Position: refs/heads/main@{#82062}
-
Dominik Inführ authored
Remove the return value from various UpdateSlot methods. These methods were always returning REMOVE_SLOT anyways. Bug: v8:11708 Change-Id: I5398f0df14e93e3e74a13aea42d7c422ffc100a0 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3793384Reviewed-by: Michael Lippautz <mlippautz@chromium.org> Commit-Queue: Dominik Inführ <dinfuehr@chromium.org> Cr-Commit-Position: refs/heads/main@{#82061}
-
Clemens Backes authored
We sometimes create jobs that initially hold no work. In those cases, use CreateJob instead of PostJob. New background threads will later be spawned when NotifyConcurrencyIncrease is called. R=etiennep@chromium.org Bug: v8:13096 Change-Id: Ieb9f9e03d01af6a72fe5785be72c523a553d0f1d Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3762578Reviewed-by: Thibaud Michaud <thibaudm@chromium.org> Commit-Queue: Clemens Backes <clemensb@chromium.org> Cr-Commit-Position: refs/heads/main@{#82060}
-
Victor Gomes authored
Bug: v8:7700 Change-Id: Ifab7c3ba40e8dcb5e1811a239b4970c6763c9df2 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3793385Reviewed-by: Leszek Swirski <leszeks@chromium.org> Commit-Queue: Leszek Swirski <leszeks@chromium.org> Auto-Submit: Victor Gomes <victorgomes@chromium.org> Commit-Queue: Victor Gomes <victorgomes@chromium.org> Cr-Commit-Position: refs/heads/main@{#82059}
-
Clemens Backes authored
Embedders must override the method, because returning a nullptr will make V8 crash. Hence the method should be abstract. Bug: v8:12425 Change-Id: I79e1759acd2a5f41424145637ee1fbd161889ec1 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3779694Reviewed-by: Michael Lippautz <mlippautz@chromium.org> Commit-Queue: Clemens Backes <clemensb@chromium.org> Cr-Commit-Position: refs/heads/main@{#82058}
-
Peter Kasting authored
This eliminates some "bitwise operation between different enumeration types" warnings in c++20, where such ops are deprecated. Bug: chromium:1284275 Change-Id: Ie7f1d5e9430029bc694cef0358d217871670a8d3 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3791964Reviewed-by: Leszek Swirski <leszeks@chromium.org> Auto-Submit: Peter Kasting <pkasting@chromium.org> Commit-Queue: Leszek Swirski <leszeks@chromium.org> Cr-Commit-Position: refs/heads/main@{#82057}
-
Yahan Lu authored
This reverts commit 859ff489. Reason for revert: Assert Failed in debug Original change's description: > [riscv][Cleanup] Use CmpInstanceTypeRange in MacroAssembler > > Bug: v8:11325 > > Change-Id: I2eae55b49ea01567460bd0adfbb819c893ce7cd7 > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3793210 > Auto-Submit: Yahan Lu <yahan@iscas.ac.cn> > Reviewed-by: ji qiu <qiuji@iscas.ac.cn> > Commit-Queue: ji qiu <qiuji@iscas.ac.cn> > Cr-Commit-Position: refs/heads/main@{#82054} Bug: v8:11325 Change-Id: I57caf4ca86ac1b8b3afa94650c156e375158a3e9 No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3793465 Auto-Submit: Yahan Lu <yahan@iscas.ac.cn> Commit-Queue: Yahan Lu <yahan@iscas.ac.cn> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> Cr-Commit-Position: refs/heads/main@{#82056}
-
v8-ci-autoroll-builder authored
Rolling v8/buildtools/third_party/libunwind/trunk: https://chromium.googlesource.com/external/github.com/llvm/llvm-project/libunwind/+log/2a908ee..012c343 Rolling v8/third_party/fuchsia-sdk/sdk: version:9.20220727.1.1..version:9.20220728.1.1 R=v8-waterfall-sheriff@grotations.appspotmail.com,mtv-sf-v8-sheriff@grotations.appspotmail.com Change-Id: Ia1a09b06b140e7d670628d335882a0343210eda0 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3792172 Commit-Queue: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com> Bot-Commit: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com> Cr-Commit-Position: refs/heads/main@{#82055}
-
Lu Yahan authored
Bug: v8:11325 Change-Id: I2eae55b49ea01567460bd0adfbb819c893ce7cd7 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3793210 Auto-Submit: Yahan Lu <yahan@iscas.ac.cn> Reviewed-by: ji qiu <qiuji@iscas.ac.cn> Commit-Queue: ji qiu <qiuji@iscas.ac.cn> Cr-Commit-Position: refs/heads/main@{#82054}
-
Lu Yahan authored
This very large changeset adds support for RISCV32. Bug: v8:13025 Change-Id: Ieacc857131e6620f0fcfd7daa88a0f8d77056aa9 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3736732Reviewed-by: Michael Achenbach <machenbach@chromium.org> Commit-Queue: Yahan Lu <yahan@iscas.ac.cn> Reviewed-by: ji qiu <qiuji@iscas.ac.cn> Reviewed-by: Andreas Haas <ahaas@chromium.org> Reviewed-by: Hannes Payer <hpayer@chromium.org> Reviewed-by: Nico Hartmann <nicohartmann@chromium.org> Cr-Commit-Position: refs/heads/main@{#82053}
-
Frank Tang authored
Bug: v8:7834 Change-Id: I79646de331fde36626dd5604b38ef8dc60dafc3d Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3793003 Commit-Queue: Frank Tang <ftang@chromium.org> Reviewed-by: Adam Klein <adamk@chromium.org> Cr-Commit-Position: refs/heads/main@{#82052}
-
- 28 Jul, 2022 9 commits
-
-
Milad Fa authored
Change-Id: I4bbe5be6c6f13ee5664fa231d8dd9d59aa0ef579 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3792166Reviewed-by: Junliang Yan <junyan@redhat.com> Commit-Queue: Milad Farazmand <mfarazma@redhat.com> Cr-Commit-Position: refs/heads/main@{#82051}
-
Frank Tang authored
This is a reland of commit 33043888 Original change's description: > [test262] Roll test262 > > https://chromium.googlesource.com/external/github.com/tc39/test262/+log/3ddfa0cd..e41d581c > > Bug: v8:7834 > Change-Id: Id1c5b07f109ab6f60498eb7185becc508d16af1e > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3786907 > Reviewed-by: Shu-yu Guo <syg@chromium.org> > Commit-Queue: Frank Tang <ftang@chromium.org> > Cr-Commit-Position: refs/heads/main@{#81980} Bug: v8:7834 Change-Id: Ic7e0378b11a05161b69965cff06985b9a2d954fe Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3788719Reviewed-by: Adam Klein <adamk@chromium.org> Commit-Queue: Frank Tang <ftang@chromium.org> Cr-Commit-Position: refs/heads/main@{#82050}
-
Frank Tang authored
Also need to change how we got the prototype of Intl.NumberFormat and Intl.PluralRules to install function in bootstrapper.cc code to avoid assertion in JSReceiver casting. For m106 Flag: harmony_intl_number_format_v3 https://chromestatus.com/feature/5707621009981440 Design doc: https://docs.google.com/document/d/19jAogPBb6W4Samt8NWGZKu47iv0_KoQhBvLgQH3xvr8 and https://docs.google.com/document/d/14zxGub6Os6nARzH6XstOZX05w2537sZo_ZSSlGjGpBM R2T: https://groups.google.com/a/chromium.org/g/blink-dev/c/vy6rCuh3r_0/m/1Q2FHx9hBAAJ I2S: https://groups.google.com/a/chromium.org/g/blink-dev/c/mN6o7uk2hjM/m/I6-C006lBwAJ LGTMs from API Owners: bratell.d@gmail.com, miketaylr@chromium.org, mkwst@chromium.org Bug: v8:10776 Change-Id: I2c11e1c53390bdc6246caf084661d82e08a4d94c Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3790120 Commit-Queue: Frank Tang <ftang@chromium.org> Reviewed-by: Adam Klein <adamk@chromium.org> Cr-Commit-Position: refs/heads/main@{#82049}
-
Manos Koukoutos authored
arrayref, dataref and i31ref get changed to (ref null t). Bug: v8:7748 Change-Id: Iae0e6969a1f71ccf1f193c267d761b7a1796f67b Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3788093 Commit-Queue: Manos Koukoutos <manoskouk@chromium.org> Reviewed-by: Jakob Kummerow <jkummerow@chromium.org> Cr-Commit-Position: refs/heads/main@{#82048}
-
Etienne Pierre-doray authored
CreateJob() doesn't schedule anything until Join() or Notify*() is called. CreateJob().Join() will thus schedule the right number of workers for the job right away (taking into account the main thread contributes), whereas PostJob().Join() schedules 1 worker that won't be necessary once doing Join() and the main thread kicks in. This has the effect of reducing 1 unnecessary context switch each time the jobs are schedule. Bug: chromium:1287665 Change-Id: Ie262f8904cc8ac78d9e5cbd23ef28dc5b013a625 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3746080Reviewed-by: Michael Lippautz <mlippautz@chromium.org> Commit-Queue: Etienne Pierre-Doray <etiennep@chromium.org> Cr-Commit-Position: refs/heads/main@{#82047}
-
Marja Hölttä authored
It was delegating to GetDerivedMap but not handling the possible error coming from it. Bug: v8:11111,chromium:1347722 Change-Id: I348ed721281d8edd324f0e364d8ed45602cb9f54 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3791063Reviewed-by: Jakob Kummerow <jkummerow@chromium.org> Auto-Submit: Marja Hölttä <marja@chromium.org> Commit-Queue: Jakob Kummerow <jkummerow@chromium.org> Cr-Commit-Position: refs/heads/main@{#82046}
-
Seth Brenith authored
This is a reland of commit e895b7af The unit test has been updated to work correctly when --stress-incremental-marking is enabled. Original change's description: > Background merging of deserialized scripts > > Recently, https://crrev.com/c/v8/v8/+/3681880 added new API functions > with which an embedder could request that V8 merge newly deserialized > script data into an existing Script from the Isolate's compilation > cache. This change implements those new functions. This functionality is > still disabled by default due to the flag > merge_background_deserialized_script_with_compilation_cache. > > The goal of this new functionality is to reduce memory usage when > multiple frames load the same script with a long delay between (long > enough for the script to have been evicted from Blink's in-memory cache > and for the top-level SharedFunctionInfo to be flushed). In that case, > there are two Script objects for the same script: one which was found in > the Isolate compilation cache (the "old" script), and one which was > recently deserialized (the "new" script). The new script's object graph > is essentially standalone: it may point to internalized strings and > readonly objects such as the empty feedback metadata, but otherwise > it is unconnected to the rest of the heap. The merging logic takes any > useful data from the new script's object graph and attaches it into the > old script's object graph, so that the new Script object and any other > duplicated objects can be discarded. More specifically: > > 1. If the new Script has a SharedFunctionInfo for a particular function > literal, and the old Script does not, then the old Script is updated > to refer to the new SharedFunctionInfo. > 2. If the new Script has a compiled SharedFunctionInfo for a particular > function literal, and the old Script has an uncompiled > SharedFunctionInfo, then the old SharedFunctionInfo is updated to > point to the function_data and feedback_metadata from the new > SharedFunctionInfo. > 3. If any used object from the new object graph points to a > SharedFunctionInfo, where the old object graph contains a matching > SharedFunctionInfo for the same function literal, then that pointer > is updated to point to the old SharedFunctionInfo. > > The document at [0] includes diagrams showing an example merge on a very > small script. > > Steps 1 and 2 above are pretty simple, but step 3 requires walking a > possibly large set of objects, so this new API lets the embedder run > step 3 from a background thread. Steps 1 and 2 are performed later, on > the main thread. > > The next important question is: in what ways can the old script's object > graph be modified during the background execution of step 3, or during > the time after step 3 but before steps 1 and 2? > > A. SharedFunctionInfos can go from compiled to uncompiled due to > flushing. This is okay; the worst outcome is that the function would > need to be compiled again later. Such a risk is already present, > since V8 doesn't keep IsCompiledScopes for every compiled function in > a background-deserialized script. > B. SharedFunctionInfos can go from uncompiled to compiled due to lazy > compilation. This is also okay; the merge completion logic on the > main thread will just keep this lazily compiled data rather than > inserting compiled data from the newly deserialized object graph. > C. SharedFunctionInfos can be cleared from the Script's weak array if > they are no longer referenced. This is mostly okay, because any > SharedFunctionInfo that is needed by the background merge is strongly > referenced and therefore can't be cleared. The only problem arises if > the top-level SharedFunctionInfo gets cleared, so the merge task must > deliberately keep a reference to that one. > D. SharedFunctionInfos can be created if they are needed due to lazy > compilation of a parent function. This change is somewhat troublesome > because it invalidates the background thread's work and requires a > re-traversal on the main thread to update any pointers that should > point to this lazily compiled SharedFunctionInfo. > > At a high level, this change implements three previously unimplemented > functions in BackgroundDeserializeTask (in compiler.cc) and updates one: > > - BackgroundDeserializeTask::SourceTextAvailable, run on the main > thread, checks whether there is a matching Script in the Isolate > compilation cache which doesn't already have a top-level > SharedFunctionInfo. If so, it saves that Script in a persistent > handle. > - BackgroundDeserializeTask::ShouldMergeWithExistingScript checks > whether the persistent handle from the first step exists (a fast > operation which can be called from any thread). > - BackgroundDeserializeTask::MergeWithExistingScript, run on a > background thread, performs step 3 of the merge described above and > generates lists of persistent data describing how the main thread can > complete the merge. > - BackgroundDeserializeTask::Finish is updated to perform the merge > steps 1 and 2 listed above, as well as a possible re-traversal of the > graph if required due to newly created SharedFunctionInfos in the old > Script. > > The merge logic has nothing to do with deserialization, and indeed I > hope to reuse it for background compilation tasks as well, so it is all > contained within a new class BackgroundMergeTask (in compiler.h,cc). It > uses a second class, ForwardPointersVisitor (in compiler.cc) to perform > the object visitation that updates pointers to SharedFunctionInfos. > > [0] https://docs.google.com/document/d/1UksB5Vm7TT1-f3S9W1dK_rP9jKn_ly0WVm_UDPpWuBw/edit > > Bug: v8:12808 > Change-Id: Id405869e9d5b106ca7afd9c4b08cb5813e6852c6 > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3739232 > Reviewed-by: Leszek Swirski <leszeks@chromium.org> > Commit-Queue: Seth Brenith <seth.brenith@microsoft.com> > Cr-Commit-Position: refs/heads/main@{#81941} Bug: v8:12808 Change-Id: Id2036dfa4eba8670cac899773d7a906825fa2c50 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3787266Reviewed-by: Leszek Swirski <leszeks@chromium.org> Commit-Queue: Seth Brenith <seth.brenith@microsoft.com> Cr-Commit-Position: refs/heads/main@{#82045}
-
Leszek Swirski authored
1. A remainder equal to zero means no deopt. 2. We need the input value in the input register, so we need to treat rax as a clobbered temporary instead of a fixed input. Bug: v8:7700 Change-Id: I9a7b7f3cc48e17b262aa7f9084fa864ad505be54 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3788099 Commit-Queue: Leszek Swirski <leszeks@chromium.org> Reviewed-by: Toon Verwaest <verwaest@chromium.org> Auto-Submit: Leszek Swirski <leszeks@chromium.org> Cr-Commit-Position: refs/heads/main@{#82044}
-
Milad Fa authored
Port ec6368bf R=yahan@iscas.ac.cn, joransiu@ca.ibm.com, junyan@redhat.com, midawson@redhat.com BUG= LOG=N Change-Id: I268121f4b3ec66ca3b545551c337066ec5d7cdc5 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3791905 Commit-Queue: Milad Farazmand <mfarazma@redhat.com> Reviewed-by: Joran Siu <joransiu@ca.ibm.com> Reviewed-by: Junliang Yan <junyan@redhat.com> Cr-Commit-Position: refs/heads/main@{#82043}
-