It is becoming difficult to continue supporting the compiler dispatcher
and background compile task unittests alongside the off-thread
finalization work, so disable those tests when that flag is enabled.
Bug: chromium:1011762
Change-Id: Iba9aaa29b08723afb90edc127609fef1d63ceed5
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2539908
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#71211}
Just as OS::Abort, OS::ExitProcess never returns. This is a minor
cleanup which is not expected to reduce binary size considerably, since
we do not call this function often. It is just nice to annotate it
correctly.
On windows, the {TerminateProcess} call is known to not return if
called on the current process. Add an {UNREACHABLE} to enforce this.
R=mlippautz@chromium.org
Bug: v8:11074
Change-Id: I5c079fc459685c65f932404ce536ea28ad188073
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2536634
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#71210}
- allow arrays to be allocated in LargeObjectSpace
- check requested array allocation length against maximum
- fix array element offsets for pointer-typed elements
- fix GC handling of arrays when there are forwarding pointers
- module builder: fix rtt.sub global initializer expressions
- debug printing: print "UNIMPLEMENTED" instead of crashing
- WasmGCTester: make some exceptions easier to diagnose
Bug: v8:7748, chromium:1141376
Change-Id: Ie0281658748f3dd5e5d90d85bab78f0ea2fc3865
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2534815
Reviewed-by: Manos Koukoutos <manoskouk@chromium.org>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#71208}
- Reuse DOM nodes if possible
- Delay slow DOM node removal to not block the UI
- Fix global time range syncing when adding timelines to the state
- Use a Proxy to cache CSS colors instead of querying CSS properties
on every access
- Set className on newly create DOM nodes instead of adding to the
classList
- Use bound functions for event handlers that are added multiple times
- Speed up Chunk.getBreackdown
- Use CSS gradient for timeline-track chunk backgrounds, which is an
order of magnitude faster than the serialised canvas approach
Bug: v8:10644
Change-Id: Ie2d6d5b404f18e920c10c0a6460669fd4d0b20e8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2539947
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#71207}
Constant-time subtype checks are only valid for struct/array
objects. Previously, the code checked for JS_FUNCTION_TYPE to
specifically catch funcrefs. With this patch, anything except
struct/array objects is excluded, in preparation for anyref
support. Additionally, this dynamic check is now only emitted
when static type information is not enough.
Bug: v8:7748
Change-Id: Ia2920902ee1d9e9714a4b8297a963ba3d6d3312a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2536290
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Manos Koukoutos <manoskouk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#71206}
This CL adds partial support for objects whose slow mode dictionaries
are OrderedNameDictionaries. This is the case for all slow mode objects
if V8_DICT_MODE_PROTOTYPES is enabled.
In particular, this part deals with those runtime functions called by
the DefineClass builtin, located in literal-objects.cc and
runtime-classes.cc.
Bug: v8:7569
Change-Id: Ie4c479fd6f8872eea9f190590408a4aafd1c77e6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2523321
Commit-Queue: Frank Emrich <emrich@google.com>
Reviewed-by: Marja Hölttä <marja@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#71205}
This resolves issues building gcmole under LLVM 8.0.0 with gcc 10 (see
https://bugs.gentoo.org/708730).
Change-Id: I932def25fb3cc841cf21414a513fbe2a2fa8a8dc
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2539946
Reviewed-by: Tamer Tas <tmrts@chromium.org>
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Commit-Queue: Tamer Tas <tmrts@chromium.org>
Cr-Commit-Position: refs/heads/master@{#71204}
Ports updates to weak container handling in blink performed in [1].
These changes were needed to resolve timeouts for android.
See [1] for more details.
[1] https://chromium-review.googlesource.com/c/chromium/src/+/2516363
Bug: chromium:1056170
Change-Id: I2b2c451d494438a37886a3c2bc73481bc9228664
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2538211
Commit-Queue: Omer Katz <omerkatz@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#71202}
As Wasm code increasingly needs to deal with various HeapObject
subtypes, the WasmGraphAssembler is a good place to consolidate
common helper methods like LoadMap or LoadFixedArrayElement.
This is clearly inspired by the CodeStubAssembler, and there is
clearly room for much more refactoring in this direction.
This CL does not intend to change any functionality.
Bug: v8:11074
Change-Id: I1b768c5791bde7041bc9f41a3069afb1844cdb46
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2532083
Reviewed-by: Manos Koukoutos <manoskouk@chromium.org>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#71201}
... and use Name::hash() where the hash is expected to be computed.
In particular, when we are dealing with internalized strings or symbols.
Bug: v8:11074
Change-Id: Ida22f134fee0ddf2c9b962d1bcca6aa0b632af5f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2529451
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#71200}
Split globals.js into two parts, one being skipped on NCI due to
assertions about optimization status.
Change-Id: Ifc572526d9c6aed369802a65d12c4456cde65ce0
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2539909
Auto-Submit: Georg Neis <neis@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#71199}
Main changes:
- Remove the kUninitialized and kInvalidated cell type aliases. They
were confusing because their meaning depended on the current value in
the cell. I think kUninitialized was obsolete anyways.
- Remove a DCHECK from the compiler. The property that was asserted,
while true, is irrelevant.
- Remove the obsolete function GetConstantType. The only left use was
in the object printer, but it's pointless there because we already
print the value anyways.
Change-Id: Ic718c8ba39aeb5bf18f588535dfb755a023cb144
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2536647
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#71198}
Add a requirement to String::GetChars that we either have a string
access lock, or a string access lock is not needed. This prevents us
from reading strings during internalization that may be in the middle
of being made external.
To avoid taking the lock too often when known to be unnecessary (e.g.
for strings that were only just created), there's now a static
SharedStringAccessGuardIfNeeded::NotNeeded(). This is hopefully ugly
enough that it's used sparingly.
One fix required for this is to enter the Isolate when tearing down
IsolateData in inspector tests -- this is so that the V8Inspector
instance being torn down will see the current Isolate and be able to
verify its thread id against the current thread.
Bug: chromium:1011762, chromium:1148680
Change-Id: Ic5d29c1b066ebae5a351c7b4bb116b9b1bf61889
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2536465
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Santiago Aboy Solanes <solanes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#71197}
- Add tests comparing super property access to normal property access
- Shift the work so that the framework takes less time and the thing
we're trying to measure takes more time.
- Optimize / disable the optimization for the target function, not the
whole test framework.
- Reduce the amount of boilerplate code in the tests.
Bug: v8:9237
Change-Id: Idde133298c9b8ffb3d49945ef9c67f5039634598
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2536635
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/master@{#71196}
Fix the ASAN crahs when there are 9 or more items to be formatted by
ListFormat.
chromium DEPS rolled in
https://chromium-review.googlesource.com/c/chromium/src/+/2536432
This CL is mainly to add unit test to ensure it fix.
Cq-Include-Trybots: luci.v8.try:v8_linux64_asan_rel_ng,v8_mac64_asan_rel_ng,v8_win64_asan_rel_ng;luci.chromium.try:android-asan,win-asan,win-libfuzzer-asan-relBug: chromium:1146068
Change-Id: I4dfbd6ea0efe5b398196f95abc520bb93e16a7cd
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2528476
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#71192}
This is the 2nd step in series of CLs to move the SharedFunctionInfo
class to kNeverSerialized and make it concurrently accessible from
the background thread. This CL:
* Changes optimization of GetTemplateObject in JSCreateLowering to
only perform the optimization of a template object exists in the
SharedFunctionInfo[Ref], but skips the optimization if one is
missing instead of allocating a new one on demand.
Bug: v8:7790
Change-Id: Ic37d8333676e54b3f8d69416480df12bd90723ea
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2463229
Commit-Queue: Nico Hartmann <nicohartmann@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Reviewed-by: Santiago Aboy Solanes <solanes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#71189}
Instead of caching only the default formatter, cache the last used
formatter if possible.
This is better because it's a common use case to create a formatter
in a different language and reuse it a lot, rather than create
several formatters in various languages.
Running the following benchmark:
```
let i = 0;
function toLocaleString() {
i++;
return i.toLocaleString();
}
i = 0;
function toLocaleStringWithLocale() {
i++;
return i.toLocaleString('en-US');
}
const functions = [toLocaleString, toLocaleStringWithLocale];
for (const f of functions) {
let start = performance.now();
for (let i = 0; i < 10e5; i++) {
f();
}
let end = performance.now();
print(`${f.name}: ${end - start}`);
}
```
sees the following improvements:
With this patch:
toLocaleString: 384.292
toLocaleStringWithLocale: 450.48900000000003
Without this patch:
toLocaleString: 341.952
toLocaleStringWithLocale: 23439.694
This a little over 50x improvement.
Bug: chromium:926075
Change-Id: I0e316e959c90243e175df985854832a7abddbf54
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2536461
Commit-Queue: Sathya Gunasekaran <gsathya@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#71188}
The new platform can be used in combination with --single-threaded.
It disables background threads and thus avoids waiting on mutexes
and condition variables completely, which is useful for V8 embedders
that fork the V8 process after initialization.
As a bonus the new platform allows use to test --single-threaded and
has already uncovered an existing bug in parallel pointer updating code.
Change-Id: I3446fa027d2a077641cdaac0cd08062a1acae176
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2416501
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#71187}
It is only used during initialization.
Bug: v8:7790
Change-Id: I2105ad01413e3b398b3252d14e83c930c0dd3e74
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2536637
Reviewed-by: Santiago Aboy Solanes <solanes@chromium.org>
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Auto-Submit: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#71186}
Don't deopt when a PropertyCell changes from readonly to writable.
Turbofan doesn't depend on readonly-ness unless the property is
also non-configurable, in which case such a change can't happen.
Change-Id: I3d1078a8adf1ec1b16d973dd71c4295d71003a8d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2531791
Commit-Queue: Georg Neis <neis@chromium.org>
Auto-Submit: Georg Neis <neis@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#71184}
This will allow us to target the new executable from existing JS fuzzers
(like the ochang fuzzer). Let's see if this gives more interesting JS
input files.
R=machenbach@chromium.orgCC=szuend@chromium.org
Bug: chromium:1142437
Change-Id: Id5bcfe660a487fbb9d6b80d167f43324cc284e1f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2536632
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#71182}
Change-Id: I2c9f3ac81710b89543b392819a6cce03eaba6cae
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2536639
Commit-Queue: Georg Neis <neis@chromium.org>
Auto-Submit: Georg Neis <neis@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#71181}
This is a reland of 04cdcd5a88
Got reverted in https://crrev.com/c/v8/v8/+/2534294 due to
TSAN issues. Those are solved in https://crrev.com/c/v8/v8/+/2537693.
Original change's description:
> [compiler] Move InternalizedString to kNeverSerialized
>
> Bug: v8:7790
> Change-Id: I8311b1f4b8239d0688a4b9b9057d6082942bbc00
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2534471
> Reviewed-by: Georg Neis <neis@chromium.org>
> Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#71159}
Bug: v8:7790
Change-Id: I95d68e23e4bc81399bcdcf7ce2fdcf49ddfb66c5
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2536641
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#71180}
Isolate::thread_id() may be invoked on a background thread to perform
a check if the thread is the main thread.
This also removes the copy constructor of ThreadLocalTop and clears
its fields explicitly.
Change-Id: I2207bf1ebd655805841fce9f23d23cff7be8f13b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2537693
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Santiago Aboy Solanes <solanes@chromium.org>
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#71177}
Previously, CodeStubAssembler::AllocateOrderedHashTable() would
allocate hash tables of the (statically known) minimum capacity in-
dicated by the concrete table type.
This CL adds AllocateOrderedHashTableWithCapacity, which is inspired by
AllocateNameDictionary. It takes a Node<IntPtrT> indicating the desired
capacity.
Bug: v8:7569
Change-Id: I4bf28f69286e52773319a1ae37d33b2f55175a84
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2503950
Commit-Queue: Frank Emrich <emrich@google.com>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/master@{#71175}
We now cast it into a DescriptorArrayData where appropiate, as we do
with all the other Data members.
Bug: v8:7790
Change-Id: I5be0aab9c4e80ae246c58a8df719308a0d475e6c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2534816
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#71174}
In a previous CL the logic for generating the description for Trusted Types was added to Blink. Therefore, the corresponding logic remaining in V8 can be deleted safely.
Previous CL: https://chromium-review.googlesource.com/c/v8/v8/+/2502342
Bug: chromium:1048143
Change-Id: I1693fa1d213066cbc1fe822f890d2d7aaf7ce0f6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2502869
Reviewed-by: Daniel Vogelheim <vogelheim@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Commit-Queue: Alfonso Castaño <alcastano@google.com>
Cr-Commit-Position: refs/heads/master@{#71173}
Makes ExternalReference count as a subclass of RawPtrT to enable
either to be passed to these functions as base argument.
BUG=v8:6949,v8:11074
Change-Id: I126856815ff7cdc0612e3c3fcdfdd4938cc19bfa
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2534820
Auto-Submit: Ross McIlroy <rmcilroy@chromium.org>
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Reviewed-by: Santiago Aboy Solanes <solanes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#71171}
Change-Id: I0aede0a2a188fc17492c10c0c13568c052282548
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2534822
Commit-Queue: Georg Neis <neis@chromium.org>
Auto-Submit: Georg Neis <neis@chromium.org>
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#71170}
Currently, we assume that stack trace creation always succeeds while
filling in the `exceptionDetails` structure. Stack trace creation can
fail under some circumstances so this CL introduces a null check.
R=clemensb@chromium.org
Bug: chromium:1147552
Change-Id: I4055d5276bbb7bf178b648bfc7bd84a288626c09
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2532310
Commit-Queue: Simon Zünd <szuend@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#71169}
The first operand of the select op isn't restricted to any particular
replacement SimdType, since we can convert any type to Int32x4.
Change-Id: I1821b2ebdc1a192518a2ecc0cb13951a98bb3337
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2534211
Reviewed-by: Bill Budge <bbudge@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#71167}
Per https://tc39.es/proposal-import-assertions/#sec-assert-clause-to-assertions,
import assertions should be sorted by the import assertion [[Key]]s,
in order to prevent hosts from relying on a changing order of the
assertions to determine behavior.
Prior to this change, the assertions were being sorted by pointer. With
this CL, the keys are sorted using a code point ordering so that the
order of the assertions received by the host will be stable and
non-surprising.
This CL also switches the SourceTextModuleDescriptor's ModuleRequestMap,
RegularExportMap, and RegularImportMap to use the code point order
comparison rather than their former shortlex sort. This change will not
be externally visible, but it seems best to make these consistent.
In order to avoid #including the fairly large ast-value-factory.h
into ast/modules.h, I changed ImportAssertions into a separate class
definition rather than keeping it as a typedef. The alternative would
be to define a common AstRawStringComparer in ast-value-factory.h and
then #include ast-value-factory.h in both ast/modules.h and
parsing/parser.h so that the ImportAssertions typedef would have a
full, shared definition of the AstRawStringComparer type.
Bug: v8:10958
Change-Id: I29c9544aa0a4340c56e1ee631be6cabb2a2eb921
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2533038
Commit-Queue: Dan Clark <daniec@microsoft.com>
Reviewed-by: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/master@{#71165}
It creates a SharedMutexGuard if the boolean parameter in the
constructor is true.
Bug: v8:7790
Change-Id: I77647f648717af05b1239576b690aec6f4e8b268
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2531790
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#71162}