Commit Graph

31699 Commits

Author SHA1 Message Date
Matthias Liedtke
186068ad3f String.p.toLocaleLowerCase: Perform locale validation also on empty string
The fast path implementation for toLocaleLowercase (added in
333db24b55, https://crrev.com/c/3952317)
skipped the locale validation if the string to be converted is the empty
string.
This CL addresses it by delaying the early return for empty string to be
performed after the locale validation.

Bug: chromium:1409058
Change-Id: I2f2839dc836d8de662d308c86099707bf9ddfd9e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4184199
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Auto-Submit: Matthias Liedtke <mliedtke@chromium.org>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85434}
2023-01-23 13:55:09 +00:00
Jakob Kummerow
b4ae834223 [bigint] Implement NoSideEffectsToString
When our various debugging and error reporting facilities want to
perform a side effect free conversion of a value (which could be
a BigInt) to a String, then the usual BigInt::ToString is not a
great fit because it reacts to termination requests.
This patch adds a method BigInt::NoSideEffectsToString, which uses
a low upper bound instead of termination requests.

Fixed: chromium:1406774
Change-Id: Ibc5d37027823e4a03c470f1dd0a63c16c552850c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4177099
Auto-Submit: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85433}
2023-01-23 13:47:15 +00:00
Matthias Liedtke
3e64021c7e [wasm-gc] Add cache lookup to wrapper compilation
Bug: v8:7748
Change-Id: I3599be973b8f20d6fe3a9a7a25f18c06e1bc2a87
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4177096
Reviewed-by: Manos Koukoutos <manoskouk@chromium.org>
Commit-Queue: Matthias Liedtke <mliedtke@chromium.org>
Auto-Submit: Matthias Liedtke <mliedtke@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85431}
2023-01-23 12:05:51 +00:00
Omer Katz
21ab8287a6 Mark slow tests for tsan debug bot
Bug: v8:13665
Change-Id: I228e847de411d2b18b1529b6c25208ae2d7f8ce0
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4187217
Commit-Queue: Omer Katz <omerkatz@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85430}
2023-01-23 10:17:58 +00:00
Michael Achenbach
29b3bd3826 [test] Include shard info in test records
This will allow on the infra side to easier link to the respective
shard on a test failure. Without that it's a hassle to find out on
which shard the failing test ran.

This also simplifies how the global test_config stores information.
Some information was duplicated, but is now rather shared through
properties if the owning object is already present.

Bug: v8:13681
Change-Id: I52f01a4fac74627575d80f25923faba99eb6a1fb
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4181030
Reviewed-by: Liviu Rau <liviurau@google.com>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85429}
2023-01-23 09:50:01 +00:00
Jakob Linke
7a3a6e88bd Revert "[turbofan] Optimize access to the length property of functions"
This reverts commit 7eb8937bca.

Reason for revert: crbug.com/1408957

Original change's description:
> [turbofan] Optimize access to the length property of functions
>
> When compiling to JavaScript a language that supports curryfication, it
> is convenient to be able to efficiently get the arity of a function to
> check for partial application.
>
> Change-Id: I6611b523b2c3795f1f8fb123f63f5b6d604d793d
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4111447
> Reviewed-by: Jakob Linke <jgruber@chromium.org>
> Commit-Queue: Jakob Linke <jgruber@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#85409}

Fixed: chromium:1408957
Change-Id: I5200392af7532a864afd73fb0e88be9a2153a312
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4187075
Commit-Queue: Jakob Linke <jgruber@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#85428}
2023-01-23 08:58:42 +00:00
Dominik Inführ
d31e52879b [heap] Introduce getters for MemoryReducer::State
This CL hides the ctor of the MemoryReducer::State class and only
provides factory methods for creating states. This simplifies creation
of states and makes it impossible to misuse the API.

Direct field accesses are also replaced with invocations of their
corresponding getter methods. The getter method will check whether
the current state is allowed to access that field.

Bug: v8:13653
Change-Id: I252a6d75d0ddb4813b16a706061ad1951cfa35ea
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4181026
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85426}
2023-01-23 07:54:44 +00:00
Joyee Cheung
3f3b10b6ac [ic] store the slow handler for proxies in DefineKeyedOwnIC
Previously we stored kProxy in this case, which resulted in
set semantics for proxies.

Bug: chromium:1408310
Change-Id: Id9f215b4c3c08416b6d6c5f4605839668a5df340
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4178811
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Joyee Cheung <joyee@igalia.com>
Cr-Commit-Position: refs/heads/main@{#85422}
2023-01-20 22:30:24 +00:00
Joyee Cheung
4d0d31f41b [class] support out-of-scope private member access in debug-evaluate
Previously in the DevTools console, users could inspect a preview of all private class members on an instance, but if they wanted to evaluate or inspect a  specific private class member out of a long list, they had to be debugging and in a scope that has access to those private names.

This patch adds support for extraordinary access of out-of-scope private member access in debug-evaluate, specifically for Debugger.evaluateOnCallframe() (for console calls invoked during debugging) and Runtime.evaluate() (for console calls invoked when the user is not debugging). This kind of access is not otherwise allowed in normal execution, but in the DevTools console it makes sense to relax the rules a bit for a better developer experience.

To support this kind of extraordinary access, if the parsing_while_debugging or is_repl_mode flag is set, when we encounter a private name reference that's in a top-level scope or an eval scope under a top-level scope, instead of throwing immediately, we bind the reference to a dynamic lookup variable, and emit bytecode that calls to %GetPrivateName() or %SetPrivateName() in the runtime to perform lookup of the private name as well as the load/store operations accordingly.

If there are more than on private name on the receiver matching the description (for example, an object with two `#field` private names from different classes), we throw an error for the ambiguity (we can consider supporting selection among the conflicting private names later, for the initial support we just throw for simplicity).

If there are no matching private names, or if the found private class member does not support the desired operation (e.g. attempting to write to a read-only private accessor), we throw an error as well.

If there is exactly one matching private name, and the found private class member support the desired operation, we dispatch to the proper behavior in the runtime calls.

Doc: https://docs.google.com/document/d/1Va89BKHjCDs9RccDWhuZBb6LyRMAd6BXM3-p25oHd8I/edit

Bug: chromium:1381806
Change-Id: I7d1db709470246050d2e4c2a85b2292e63c01fe9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4020267
Commit-Queue: Joyee Cheung <joyee@igalia.com>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85421}
2023-01-20 22:26:44 +00:00
Jérôme Vouillon
7eb8937bca [turbofan] Optimize access to the length property of functions
When compiling to JavaScript a language that supports curryfication, it
is convenient to be able to efficiently get the arity of a function to
check for partial application.

Change-Id: I6611b523b2c3795f1f8fb123f63f5b6d604d793d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4111447
Reviewed-by: Jakob Linke <jgruber@chromium.org>
Commit-Queue: Jakob Linke <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85409}
2023-01-19 19:16:48 +00:00
Olivier Flückiger
2670e3d0cc [static-roots] Test to ensure mksnapshot creates a predictable r/o heap
To replace the test that ensured it accidentally and was removed in
https://chromium-review.googlesource.com/c/v8/v8/+/4178814

Bug: v8:13466
Change-Id: Ie5b123af94d12ffc444358f6631d67334e46b711
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4178826
Reviewed-by: Jakob Linke <jgruber@chromium.org>
Auto-Submit: Olivier Flückiger <olivf@chromium.org>
Commit-Queue: Olivier Flückiger <olivf@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85407}
2023-01-19 17:27:58 +00:00
Matthias Liedtke
5628a2be90 [wasm-stringrefs] Add string.new_utf8_try
The built-in wasm function behaves similar to string.new_utf8
but in case of invalid characters returns `null` instead of
throwing an exception.

Bug: v8:12868
Change-Id: Idde9bc2563d6bff1ab163ca8ed2219b6db23ca28
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4177105
Auto-Submit: Matthias Liedtke <mliedtke@chromium.org>
Commit-Queue: Matthias Liedtke <mliedtke@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85406}
2023-01-19 17:10:06 +00:00
Thibaud Michaud
0bfae5d165 [gap-resolver] Emit move based on destination representation
If the phi moves are the same for all predecessors, the move optimizer
will merge them by picking an arbitrary move among them,
moving it to the phi's block, and eliminating the moves in the
predecessor blocks.
However, phi inputs may have different width, and this can result in a
mismatch between the source and destination representation.
Always emit gap moves based on the destination operand's
representation, to ensure that in this case the wider phi inputs are not
truncated.

R=tebbi@chromium.org
CC=dmercadier@chromium.org

Bug: chromium:1407571
Change-Id: I0263cd5024e8e1340fb971267b133a2a91090f8f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4178824
Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85403}
2023-01-19 14:32:57 +00:00
Olivier Flückiger
d76342dd56 [static-roots] Remove unused Isolate::InitWithReadOnlySnapshot
In the end we managed to have static root builds without a two stage
isolate setup. Thus, the mode for creating isolates with an existing
read only page is unused. Also, no other usecase for this mode emerged.

Bug: v8:13598
Bug: v8:13466
Change-Id: I0a8174ba9383db7364b6e4545702aafc6f48170c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4178814
Commit-Queue: Olivier Flückiger <olivf@chromium.org>
Reviewed-by: Jakob Linke <jgruber@chromium.org>
Auto-Submit: Olivier Flückiger <olivf@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85396}
2023-01-19 12:49:49 +00:00
Nikolaos Papaspyrou
472429e623 [heap] Fix saving the callee-saved registers on stack
This CL reinstates the trampoline for pushing the values of
callee-saved registers on the stack, which is used for stack scanning.
It reintroduces the set of architecture-specific functions
PushAllRegistersAndIterateStack, removed in crrev.com/c/3989143.
The reason for this change is that the simpler architecture-specific
functions SaveCalleeSavedRegisters failed to correctly save the
values of the registers, in the presence of C++ compiler optimizations.

It also removes the stack context, introduced in crrev.com/c/4017512,
and uses again the trampoline for iterating through the stack.

Bug: v8:13257
Change-Id: I9e656a9b3ba6616168602300f2180b4f340593f3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4171639
Commit-Queue: Nikolaos Papaspyrou <nikolaos@chromium.org>
Reviewed-by: Omer Katz <omerkatz@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85394}
2023-01-19 12:29:05 +00:00
Olivier Flückiger
6830f99903 [static-roots] Check static map in instance type checks
A first stab at using some static maps to have faster instance type
checks in C++ code. This adds an instance type check variant which
uses the map without loading the instance_type field, when the
instance type corresponds to a single static map.

Changes the format of the static roots table to be more in line with
other code and orders the names by address.

Bug: v8:13466
Change-Id: I5417071efd24ee52d51146ef0887d32cb9b62fcd
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4177102
Reviewed-by: Jakob Linke <jgruber@chromium.org>
Commit-Queue: Olivier Flückiger <olivf@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85392}
2023-01-19 12:20:21 +00:00
Seth Brenith
c462b8fba1 Fix failing test test-debug-helper/GetObjectProperties
This test sets a value to zero to simulate not knowing where read-only
space starts, since v8::debug_helper code often must work with only
partial information. However, the zero value persisted to another part
of the test which expected a precise result, and could cause a test
failure if an object happened to be allocated at the same offset from
its containing chunk as a known read-only object. This CL fixes the
test to only use the zero value during the steps that need it.

Bug: v8:13646
Change-Id: I90f1593bf9b5bb36177ee904a910a183384a4e64
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4178630
Reviewed-by: Marja Hölttä <marja@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85385}
2023-01-19 10:00:28 +00:00
Jaroslav Sevcik
1009874faa [inspector] Omit call frames in instrumentation pause messages
Creating the full call frames is expensive. The client should only
need the script id. As the script id is passed in the 'data.scriptId'
field of the message, we can omit call frames from the instrumentation
pause event.

Bug: chromium:1408105
Change-Id: I11827865168946e1f412f7d351a0d359e2ac80ed
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4174085
Reviewed-by: Kim-Anh Tran <kimanh@chromium.org>
Commit-Queue: Jaroslav Sevcik <jarin@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85382}
2023-01-19 06:39:10 +00:00
Hao Xu
263493add5 [wasm][revec] Reorder load chain to avoid breaking effect dependency
There exists load chain as below that can not be packed due to the
effect dependency to irrelevant load:

  [Load1] -> [Irrelevant Load] -> [Load2]

We can avoid breaking this dependency by reordering the load chain so
[Load1] and [Load2] can be packed:

  [Load1] -> [Load2] -> [Irrelevant Load]

Bug: v8:12716
Change-Id: I298a8fd3d44d0a147479e1f80ac67b6a491740ec
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4134474
Commit-Queue: Hao A Xu <hao.a.xu@intel.com>
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85379}
2023-01-19 02:29:35 +00:00
Milad Fa
0dbff5d07b PPC/s390: Various post-Code rename cleanups
Port c0367102a3

Original Commit Message:

    The biggest chunk of this CL is related to the CodeBuilder now
    returning a Code object instead of an InstructionStream. Most
    codegen-related parts of the codebase had to be updated, including
    compiler.cc, pipeline.cc, and many tests. The good news is,
    we now have 400 fewer references to InstructionStream.

    Smaller changes:
    - Remove ToAbstractCode
    - Remove dead code
    - Update comments
    - Update method and variable names

R=jgruber@chromium.org, joransiu@ca.ibm.com, junyan@redhat.com, midawson@redhat.com
BUG=
LOG=N

Change-Id: Ib81459f65b474acb2f4f4e9bc547139e54877615
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4177048
Commit-Queue: Milad Farazmand <mfarazma@redhat.com>
Reviewed-by: Junliang Yan <junyan@redhat.com>
Cr-Commit-Position: refs/heads/main@{#85378}
2023-01-18 19:56:42 +00:00
Johan Levin
84697034b6 RegExp.flags: check individual flags in correct order
ECMA262 22.2.6.4 specifies that the individual boolean-valued flags
should be checked in a particular order by the RegExp.flags getter.
'hasIndices' should be first - not last.

Bug: v8:13666

Change-Id: Ic4894dce84dc2454213d06c7356db0ded792a5be
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4171640
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Commit-Queue: Shu-yu Guo <syg@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85376}
2023-01-18 18:43:39 +00:00
Jakob Linke
c0367102a3 Various post-Code rename cleanups
The biggest chunk of this CL is related to the CodeBuilder now
returning a Code object instead of an InstructionStream. Most
codegen-related parts of the codebase had to be updated, including
compiler.cc, pipeline.cc, and many tests. The good news is,
we now have 400 fewer references to InstructionStream.

Smaller changes:
- Remove ToAbstractCode
- Remove dead code
- Update comments
- Update method and variable names

Bug: v8:13654
Change-Id: Ieb12bc698af576e07016e4c5c8c9d494e5addb0e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4174091
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Auto-Submit: Jakob Linke <jgruber@chromium.org>
Commit-Queue: Adam Klein <adamk@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85372}
2023-01-18 16:26:26 +00:00
Milad Fa
60a8726ed6 PPC/s390: Rename Code to InstructionStream
Port 2c7272fdde

Original Commit Message:

    .. as part of the big Code/CodeDataContainer name shuffle.  In the
    next step, CodeDataContainer will be renamed to Code.

R=jgruber@chromium.org, joransiu@ca.ibm.com, junyan@redhat.com, midawson@redhat.com
BUG=
LOG=N

Change-Id: I91b66eaf41aa3fdb897a43a830dbbfba8219b2c6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4174852
Reviewed-by: Junliang Yan <junyan@redhat.com>
Commit-Queue: Milad Farazmand <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/main@{#85369}
2023-01-18 15:28:30 +00:00
Matthias Liedtke
d43139d41d [wasm-gc] Subtyping: Fix dcheck for nofuncref in type union
Follow-up CL for e9024ad26c.

Bug: v8:7748
Change-Id: I3a05b6acb382f51cccf87022a59278a16a464255
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4177100
Auto-Submit: Matthias Liedtke <mliedtke@chromium.org>
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Commit-Queue: Matthias Liedtke <mliedtke@chromium.org>
Reviewed-by: Manos Koukoutos <manoskouk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85368}
2023-01-18 15:25:54 +00:00
Manos Koukoutos
e9024ad26c [wasm-gc] Fix and extend type union
Bug: v8:7748
Change-Id: Ia0486dd543bdb2c9eb42899fd57aae22297f8cd2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4177095
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Reviewed-by: Matthias Liedtke <mliedtke@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85367}
2023-01-18 14:23:57 +00:00
Camillo Bruni
e3c6e32ec0 [mjsunit] Mark regress-1353555 as non-predictable
Bug: v8:13670
Change-Id: Iebf17dcdb2b843f0e6f2820f045f3c5879a7d8d1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4174086
Auto-Submit: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Patrick Thier <pthier@chromium.org>
Commit-Queue: Patrick Thier <pthier@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85366}
2023-01-18 14:16:52 +00:00
Andreas Haas
10f3039bdb [wasm] Implementation of code flushing with explicit call
This CL introduces an initial implementation of code flushing, which
can be triggered from JavaScript with an explicit runtime call. The
runtime call allows easier testing. So far all Liftoff code gets
deallocated at a code flushing event. Experiments will show if this is
a good strategy.

Bug: chromium:1407659
Change-Id: I2c19a25ab5da1cf3b6d027d14cc6e719f33e300b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4171627
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85365}
2023-01-18 13:14:53 +00:00
Matthias Liedtke
b0cd98500d [wasm] Fix static out of bounds check in decoder
Bug: chromium:1408337
Change-Id: Id6026097bf6a367601ec2837d11754d784212f30
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4176734
Commit-Queue: Matthias Liedtke <mliedtke@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Auto-Submit: Matthias Liedtke <mliedtke@chromium.org>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85364}
2023-01-18 13:11:32 +00:00
Nico Hartmann
8331582414 [turboshaft] Remove weak liveness from dead code elimination
Bug: v8:12783, chromium:1407349
Change-Id: If90c5323e36641c2fe7ae6ea79985dc09cf9e2eb
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4176736
Reviewed-by: Darius Mercadier <dmercadier@chromium.org>
Auto-Submit: Nico Hartmann <nicohartmann@chromium.org>
Commit-Queue: Nico Hartmann <nicohartmann@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85362}
2023-01-18 11:24:20 +00:00
Michael Lippautz
ba401bb42b [heap] Remove LocalEmbedderHeapTracer
Bug: v8:13207
Change-Id: I54c6f501337a502407f8c137ec59f55a6f8d3416
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4174081
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85358}
2023-01-18 09:36:32 +00:00
Jakob Linke
c53c026e6e Rename CodeDataContainer to Code
This completes the big Code/CodeDataContainer name shuffle.

Bug: v8:13654
Change-Id: If033e9153e751ab0d2a38572da2ce2f7029bc359
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4173569
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Auto-Submit: Jakob Linke <jgruber@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85354}
2023-01-18 08:44:08 +00:00
Liu Yu
08aa1e2891 [loong64][mips64] Rename Code to InstructionStream
Port commit 2c7272fdde

Bug: v8:13654
Change-Id: I06b714c21db9e688ee7955f32061dd99c9374278
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4173355
Auto-Submit: Liu Yu <liuyu@loongson.cn>
Reviewed-by: Zhao Jiazhong <zhaojiazhong-hf@loongson.cn>
Commit-Queue: Zhao Jiazhong <zhaojiazhong-hf@loongson.cn>
Cr-Commit-Position: refs/heads/main@{#85353}
2023-01-18 07:46:59 +00:00
Andreas Haas
589591026a [wasm][cleanup] Clean up signature of WasmTierUpFunction
The runtime function took two parameters, the instance and the function
index. The function index, however, seems to be unnatural information,
as the function index is a value that only has meaning with the binary
format of a wasm module, and not for the embedder of a wasm module.

This CL changes the signature of the runtime function to a single
parameter, the wasm function that should be optimized.

R=manoskouk@chromium.org

Bug: v8:12926
Change-Id: I6802cb6c8ffc586f4997a4a069735785ce59583d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4171625
Reviewed-by: Manos Koukoutos <manoskouk@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85352}
2023-01-18 07:10:47 +00:00
Clemens Backes
dbeb7ed3cc [wasm] Remove redundant set_function_validated
Liftoff will only be called on valid functions, but does not validate
itself. So we should not set the function to "validated" after executing
Liftoff compilation. Instead, we can DCHECK that the function was
validated before.

This requires a few changes to tests and fuzzers to correctly set the
{function_was_validated} bit.

R=ahaas@chromium.org

Change-Id: I669fca77724189c83d78bdfda9f08df9f7fd63f4
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4168411
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85349}
2023-01-17 17:20:27 +00:00
Dominik Inführ
4abbe5deeb [test] Mark shared memory tests as unpredictable
Tests with shared memory are non-deterministic and shall not be
run with --predictable.

Bug: v8:13267, v8:13669
Change-Id: I65c9e1b273ff96ea73acd817a297c08f83ba615f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4174076
Commit-Queue: Patrick Thier <pthier@chromium.org>
Reviewed-by: Patrick Thier <pthier@chromium.org>
Auto-Submit: Dominik Inführ <dinfuehr@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85345}
2023-01-17 15:47:36 +00:00
Toon Verwaest
1d8f2517e3 [parser] Don't lazy compile CreateDynamicFunction functions
Bug: chromium:1407080
Change-Id: I9b0c30a9ab8fb66510e627ab276eb1c9b3146aa0
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4174072
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Auto-Submit: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85342}
2023-01-17 14:50:21 +00:00
Jakob Linke
2c7272fdde Rename Code to InstructionStream
.. as part of the big Code/CodeDataContainer name shuffle.  In the
next step, CodeDataContainer will be renamed to Code.

Bug: v8:13654
Change-Id: Ia80ac984d46dd6c2a108098055a5cd60e22a837c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4171628
Auto-Submit: Jakob Linke <jgruber@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85337}
2023-01-17 12:45:45 +00:00
Leszek Swirski
503b56efdf [maglev] Check maps in TryBuildFastInstanceOf
Add a map check for the RHS of instanceof checks (i.e. the class) when
loading its hasInstance method. We were previously confirming the value
of the RHS, to make sure that it's a constant, but not considering the
case that the map of that class could change (e.g. because of a
prototype change or field definition).

Bug: v8:7700
Change-Id: Ia2923b99dd0524670bebcc57e4c0c209f8835d04
Fixed: chromium:1407959
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4173568
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85336}
2023-01-17 12:13:38 +00:00
Matthias Liedtke
04f19e973e [wasm-gc] Module decoder: Remove template to save binary size
Bug: v8:7748
Change-Id: Ic2eb981b28b6f5af926c7f8889da8bb9a71188ca
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4171636
Reviewed-by: Manos Koukoutos <manoskouk@chromium.org>
Commit-Queue: Matthias Liedtke <mliedtke@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85335}
2023-01-17 11:34:49 +00:00
Victor Gomes
9bd7c5e1bd [maglev] Fix visiting stack in StackGuard call
The RegisterInput (NewTarget) was not correctly visited by the GC.
This:
- Creates a sentinel safepoint to indicate that the stack is not
fully created (we are in the stack guard call).
- Generalises RegisterInputs (we assumed only NewTarget before) and
save them in the graph.
- Pass the register input count via tagged_register_indexes in
this case.

Fixed: chromium:1407606
Bug: v8:7700
Change-Id: I8f599f8c1a992ee6fd886eec1e289454649dfec8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4171626
Auto-Submit: Victor Gomes <victorgomes@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85331}
2023-01-17 10:27:40 +00:00
Jakob Linke
dd38db94df [codet] Remove the CodeT type alias
.. now that it unconditionally refers to CodeDataContainer. All
previous references to 'CodeT' (the type and as part of names) are
now updated to 'CodeDataContainer', including 'codet', 'CODET', etc.

Bug: v8:13654
Change-Id: I7abbba040091eddf3ef09028a891aed460363929
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4165619
Commit-Queue: Jakob Linke <jgruber@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85325}
2023-01-16 16:25:02 +00:00
yangwenming
7df371b2d5 [parser] Avoid function declarations being covered.
In some cases, a declaration of a function may be covered by
variables with a same name and thus bound to one parameter. This
CL records variables which should not be bound to the parameter,
are skipped when inserting shadowing variable binding initilizers.

Bug: v8:13459
Change-Id: Id7d147392450b177d219bfd04245b47d9e58c20e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4130416
Reviewed-by: Marja Hölttä <marja@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85321}
2023-01-16 14:11:43 +00:00
Clemens Backes
63bff6b94b [wasm][fuzzer] Fix check for max_steps (again)
After the latest fix (https://crrev.com/c/4118547), it could happen that
we stop execution even though the stored "max steps" counter did not
reach zero. This was previously not possible because we did always
subtract 1, and only terminated once we reached zero. Not we sometimes
subtract bigger numbers, and terminate if the counter is smaller than
the number we want to subtract.

This CL fixes this by first subtracting, and then checking if the
counter ran negative.

R=thibaudm@chromium.org

Bug: chromium:1405322
Change-Id: I19d7be263b000eb0a6319aaeb8838d11b8c5a3b2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4165602
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85317}
2023-01-16 13:32:47 +00:00
Manos Koukoutos
e62810f71a Skip flaky test
Bug: v8:13660
Change-Id: I0fb6950447ba13867685b152e3bca58cc849221d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4165615
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Auto-Submit: Manos Koukoutos <manoskouk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85316}
2023-01-16 13:19:26 +00:00
Al Muthanna Athamina
bbb05dde5b Skip regress/regress-1394663 until issue is resolved
Caused by repeated failure such as this https://ci.chromium.org/ui/p/v8/builders/ci/V8%20NumFuzz%20-%20debug/20417/overview even though it is reported.

Bug: chromium:1394659
Change-Id: Idd8e8dabc9c0cdc74cc91ef209b3bd476760d1de
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4165606
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Auto-Submit: Almothana Athamneh <almuthanna@chromium.org>
Commit-Queue: Almothana Athamneh <almuthanna@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85315}
2023-01-16 12:53:38 +00:00
Dominik Inführ
601913ded3 [heap] Mark main isolates WaiterQueueNode in EPT with --shared-space
With --shared-space we weren't marking the main isolate's entry in
the EPT for the WaiterQueueNode.

Bug: v8:13267, chromium:1406729
Change-Id: I833b0a9f93d6b129529dcda71084c3bff5417bad
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4162927
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85309}
2023-01-16 11:43:48 +00:00
Omer Katz
06198fa975 [heap] Add tests for OLD_TO_SHARED failures
The tests deal with recording OLD_TO_SHARED slots during page promotion
(in MinorMC) on a client heap, and retaining the corresponding shared
objects.

These tests cover issues fixed by crrev.com/c/4152485 and
crrev.com/c/4094755 (in the reland, compared to the previously submitted
version).

Bug: v8:12612
Change-Id: I7ba399d56ad75646092e6955f347a210c3dcac6e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4156473
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Commit-Queue: Omer Katz <omerkatz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85308}
2023-01-16 11:42:43 +00:00
Nico Hartmann
269c39e90a [turboshaft] Fix -0 case for turboshaft's FloatType::AllocateOnHeap
Bug: v8:12783, chromium:1407070
Change-Id: I4abe39aed967e3e50d5fac78317413c1a068f47a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4165605
Commit-Queue: Maya Lekova <mslekova@chromium.org>
Auto-Submit: Nico Hartmann <nicohartmann@chromium.org>
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85307}
2023-01-16 09:56:55 +00:00
Matthias Liedtke
debcabf7b5 [wasm-gc] Add callback for Wasm GC origin trial
The callback can be used to enable / disable Wasm GC from Chrome or
other users. For more simplicity and as many users of Wasm GC also use
stringrefs, enabling it via the callback will also stringrefs.

Bug: v8:7748
Change-Id: I474034eabe438f0ce9759c1d34dda12a99aa491e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4165090
Auto-Submit: Matthias Liedtke <mliedtke@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Matthias Liedtke <mliedtke@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85306}
2023-01-16 09:49:46 +00:00
Matthias Liedtke
928c3e7829 [wasm-gc] Support i31ref in WebAssembly.Global js interop
Bug: v8:7748
Change-Id: Id37b67170173149b59ad6bbf46218c529cc8d6c1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4162928
Reviewed-by: Manos Koukoutos <manoskouk@chromium.org>
Commit-Queue: Matthias Liedtke <mliedtke@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85290}
2023-01-13 15:51:32 +00:00