Commit Graph

14333 Commits

Author SHA1 Message Date
jameslahm
e8f9ff8507 [test] Move cctest/test-api-wasm to unittests/
... api/api-wasm-unittest.

Bug: v8:12781
Change-Id: I6d6eafcbc67e114fc1fa9b1f1f8dea21ab831ee6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3748165
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: 王澳 <wangao.james@bytedance.com>
Cr-Commit-Position: refs/heads/main@{#81937}
2022-07-25 16:10:47 +00:00
jameslahm
09bf4f272f [test] Move cctest/test-weaksets to unittests/
... objects/weaksets-unittest.

Bug: v8:12781
Change-Id: I355deaff33e4bfe7125af587654cae39f2d719d8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3784616
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: 王澳 <wangao.james@bytedance.com>
Cr-Commit-Position: refs/heads/main@{#81928}
2022-07-25 15:00:08 +00:00
Clemens Backes
588fa294ef [API] Prepare deprecation of second OnCriticalMemoryPressure
The new method is not implemented in Chrome or Node, and the issue has
no activity since 2018, so let's rip out the incomplete new API.

Drive-by: Sprinke a few V8_LIKELY and V8_UNLIKELY.

R=mlippautz@chromium.org

Bug: chromium:634547
Change-Id: I0dabad520d459277d7196fa69c1bbceaf4d53596
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3780528
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81923}
2022-07-25 12:59:56 +00:00
Omer Katz
262d5fc3ae [heap] Fix PagedNewSpace initialization
Whenever PagedNewSpace allocates a page, the page is added to the free
list. Preallocating pages on space initialization means the pages are
added to the free list before the map for free space is initialized.
Then, when allocating from the free list, a DCHECK fails
(free-list.cc:508).

This CL delays page preallocation until `EnsureCurrentCapacity` is
called. When using PagedNewSpace, we will call this method from
`Heap::CreateHeapObjects` after the maps are allocated and before any
allocations in new space are attempted.

Bug: v8:12612
Change-Id: I33f825ddd831640b12e4c0f7b849262a335df51e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3780541
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Omer Katz <omerkatz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81919}
2022-07-25 12:16:46 +00:00
ishell@chromium.org
b71b8887e2 [heap-snapshot] Prepare for Code-less builtins
Drive-by fixes:
* categorize CodeDataContainer objects as kCode,
* when external code space is enabled report CodeDataContainers as
  (%s builtin handle),
* replace a sequence of obj.IsXXX() with a respective sequence of
  InstanceTypeChecker::IsXXX().

Bug: v8:11880
Change-Id: Ib50b168eb28af5f8388be7f9b9f4feba2ee784af
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3780534
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81898}
2022-07-22 21:22:41 +00:00
Matthias Liedtke
86da4f8f60 [test][wasm-gc] remove remaining rtt canon tests
Bug: v8:7748
Change-Id: I067e9d6a56dd58dbd0f45607f62b5ef36c69ff6f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3776690
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Auto-Submit: Matthias Liedtke <mliedtke@google.com>
Commit-Queue: Matthias Liedtke <mliedtke@google.com>
Cr-Commit-Position: refs/heads/main@{#81888}
2022-07-22 11:39:21 +00:00
jameslahm
323ce8bfd2 [test] Move cctest/test-api-icu to unittests/
... api/api-icu-unittest.

Bug: v8:12781
Change-Id: Ibfc420e9d5ff0fce67f710b89a214332c7be65cc
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3748164
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: 王澳 <wangao.james@bytedance.com>
Cr-Commit-Position: refs/heads/main@{#81883}
2022-07-22 08:36:41 +00:00
Simon Zünd
c53c20fe64 [inspector] Implement Async Stack Tagging API v2
This CL adds a new method to the `console` that is available
when DevTools is open. In TypeScript notation the API is:

```
namespace console {
  // Creates a new `Task` and associates the current async
  // stack trace with the created `Task`.
  scheduleTask(name: string): Task;
}

interface Task {
  // Executes an arbitrary payload and forwards the return value
  // back to the caller. Any async stack trace captured during
  // 'f' has the site of the corresponding `scheduleTask` as
  // its parent.
  run<T>(f: () => T): T;
}
```

The API is a saner user-facing API for our async stack trace
mechanism:
  * scheduleAsyncTask corresponds to scheduleTask
  * startAsyncTask/stopAsyncTask are called implicitly before `f`
    is executed.
  * cancelAsyncTask is called implicitly when `Task` is GC'ed

The API is behind the flag --experimental-async-stack-tagging-api

Bug: chromium:1334585
Change-Id: Ic6054279a108756caed6b4b5f2d1fe4a1bdbaf78
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3776678
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Reviewed-by: Kim-Anh Tran <kimanh@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81881}
2022-07-22 06:28:24 +00:00
Omer Katz
8211602c33 [heap] Replace non-null pointers in Space with references
Bug: v8:12612
Change-Id: I4d9de4446d343040ae29e25d23a09cf4c740bde0
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3743448
Commit-Queue: Omer Katz <omerkatz@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Auto-Submit: Omer Katz <omerkatz@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81874}
2022-07-21 17:24:27 +00:00
Omer Katz
ce570aa526 [heap] Implement PagedNewSpace
See a description of the different classes and how they integrate in
https://docs.google.com/document/d/1wNj_akGSh6RBMC2RvH8HIlSUqkjWrpGkxI_BTZ-zdXE/edit#

Bug: v8:12612
Change-Id: I0f2141f4ada5c964e985d109133902172d1ab605
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3641178
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Omer Katz <omerkatz@chromium.org>
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81872}
2022-07-21 14:33:47 +00:00
ishell@chromium.org
91f98a8f7c [ext-code-space] Remove more Code <-> CodeT roundtrips
... in various components.

Bug: v8:11880
Change-Id: I1e4411ec38a4b15e505bda35a92987972e89d9d0
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3777718
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Patrick Thier <pthier@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81863}
2022-07-21 10:16:13 +00:00
Lu Yahan
90c0b95860 [riscv64] Fix popcount
Change-Id: I0b7b4daf5b88341ba56076137b8d34bdfcd45c1a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3773329
Reviewed-by: ji qiu <qiuji@iscas.ac.cn>
Commit-Queue: ji qiu <qiuji@iscas.ac.cn>
Cr-Commit-Position: refs/heads/main@{#81860}
2022-07-21 06:00:42 +00:00
Matthias Liedtke
b9768c0d53 [test][wasm-gc] replace remaining new and cast instructions using rtt
Bug: v8:7748
Change-Id: I09e9d919751945e99e0178168358a3f269fa34a3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3776679
Auto-Submit: Matthias Liedtke <mliedtke@google.com>
Commit-Queue: Matthias Liedtke <mliedtke@google.com>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81850}
2022-07-20 12:21:15 +00:00
Matthias Liedtke
81bd4a559b [test][wasm-gc] Replace ref.(cast|test) usages with static variant
Bug: v8:7748
Change-Id: Iec95162ec86a0d96fdd64764864604fc3e26cc39
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3771902
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Auto-Submit: Matthias Liedtke <mliedtke@google.com>
Commit-Queue: Matthias Liedtke <mliedtke@google.com>
Cr-Commit-Position: refs/heads/main@{#81821}
2022-07-19 16:18:41 +00:00
ishell@chromium.org
c02a9fb179 [ext-code-space] Allow AbstractCode to be CodeDataContainer
... when external code space is enabled.
Currently this mode is guarded by V8_REMOVE_BUILTINS_CODE_OBJECTS flag
which is set to false until Code-less builtins are supported.

Drive-by:
* remove unnecessary methods from AbstractCode,
* avoid CodeDataContainer <-> Code roundtrips when accessing writable
  state of Code objects via CodeT.

Bug: v8:11880
Change-Id: Iae3ff3b2feae68d875cbe9f82a6bb076460dd2f8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3769832
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81814}
2022-07-19 14:37:56 +00:00
Manos Koukoutos
009bffc9c3 Add missing include for perfetto builds
Bug: v8:13006
Change-Id: Ia59bf5ca93403e055c65e4f28afc1b0f803bc531
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3771901
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81807}
2022-07-19 12:55:16 +00:00
Frank Tang
df2109cb5c [Temporal] Parser sync to PR1952 and PR2187
Spec text:
https://tc39.es/proposal-temporal/#sec-temporal-iso8601grammar

Support 'T' prefix in time-only strings and require it in cases of ambiguity
Remove TemporalDateString and TemporalRelativeToString from parser
Change algorithm of ParseTemporalDateString

Related spec changes:
https://github.com/tc39/proposal-temporal/pull/1952
https://github.com/tc39/proposal-temporal/pull/2187


Bug: v8:11544
Change-Id: I7430afabb7dd78930b339b818bad7c7721decb99
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3636361
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81792}
2022-07-18 21:12:02 +00:00
ishell@chromium.org
8a44f0e5d5 [ext-code-space] Add cage_base parameter to AbstractCode methods
... in order to avoid expensive computation of cage_base for Code
objects and in order to avoid issues with wrong cage base values
computed from Code objects in external code space.
Drive-by: cage-bas'ify some accessors in JSFunction and Code.

This is a step towards Code-less embedded builtins.

Bug: v8:11880
Change-Id: I95dd8bcd4680e09c7463e1bc7d72dcbf9f2e5c1c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3769831
Reviewed-by: Patrick Thier <pthier@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Reviewed-by: Anton Bikineev <bikineev@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81788}
2022-07-18 17:17:17 +00:00
Matthias Liedtke
e43a5f0ee2 [test][wasm-gc] Replace (array|struct).new_[default_]with_rtt
Bug: v8:7748
Change-Id: Ib8fadc272178fb0d49f7d5fab7d1953e2328a1ad
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3770107
Auto-Submit: Matthias Liedtke <mliedtke@google.com>
Commit-Queue: Matthias Liedtke <mliedtke@google.com>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81787}
2022-07-18 16:35:53 +00:00
Manos Koukoutos
2d1c3ed604 [test] Remove some unused includes
Mostly test/cctest/.

Bug: v8:13006
Change-Id: I8853d38feb79bed6234a4354ab25a13255a1871b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3755149
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81777}
2022-07-18 12:59:03 +00:00
Liviu Rau
b3477fdd01 [test] Refactor testrunner (4)
- Removed duplication and unnecessary indirection from all suites testcfgs.
 - Introduced a more comprehensive context to cover both command context and other platform specific concerns.
 - Propagated above context to TestLoader to allow for test counting command execution on all platforms.
 - Wrapped original pool with another class to give it a new interface and allow injecting different implementations in the future.
 - Consolidated progress indicators under a single processor in the pipeline.
 - Consolidated result retention requirements calculation outside of pipeline chain.
 - Refactored LoaderProc and got it under tests.
 - Added some more tests for the standard runner.
 - Extracted BuildConfig class.


Bug: v8:12785
Change-Id: I87be040e91f792a983662bb5a10d55b36a14ea7f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3701595
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Liviu Rau <liviurau@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81770}
2022-07-18 09:52:24 +00:00
Samuel Groß
f3737bbb12 [sandbox] Initialize sandbox during V8::Initialize
As sandboxed pointers are now default-enabled when the sandbox is
enabled, it is no longer possible to deactivate the sandbox at runtime.
This CL therefore removes all the logic that was required to support a
sandbox that could be disabled at runtime, moves the initialization of
the sandbox into V8::Initialize, and deprecates V8::InitializeSandbox.

This change also makes the sandbox initialization deterministic if
FLAG_random_seed is supplied.

Bug: v8:10391
Change-Id: Ibd49f7c251b7c58c642f18a551ecc2c391740970
Cq-Include-Trybots: luci.v8.try:v8_linux64_heap_sandbox_dbg_ng,v8_linux_arm64_sim_heap_sandbox_dbg_ng
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3762583
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Samuel Groß <saelo@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81746}
2022-07-15 09:29:32 +00:00
Marja Hölttä
00704f5a03 [api] Add more efficient API for accesssing ArrayBuffer raw data
Raw data access is already possible via GetBackingStore()->GetData().
This API exposes a more efficient way for accessing
JSArrayBuffer::backing_store (which, despite the confusing name, is no
the BackingStore but its raw data pointer).

Bug: v8:10343
Change-Id: I695cea91e2c3de75ce6c86bac6e413ce6617958b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3764341
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81745}
2022-07-15 09:03:11 +00:00
Matthias Liedtke
2935b22fe2 [wasm-gc] Add 'none' type for nullref
This adds a new type 'none' as part of the WASM GC MVP.
The type can only be used in combination with a nullable reference, e.g.
'ref.null none'.
A 'nullref' is implicitly convertible to any nullable reference type.

Bug: v8:7748
Change-Id: Ic5ab6cc27094b3c9103ce3584452daa34633612f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3755136
Auto-Submit: Matthias Liedtke <mliedtke@google.com>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81670}
2022-07-12 17:54:58 +00:00
Joyee Cheung
f3cad8cec6 [serializer] allow SnapshotCreator to destruct without a blob
Previously SnapshotCreator demanded a blob to be created before
it can be destructed in debug build, this patch removes the
DCHECK so that the embedder can choose not to create the blob
when e.g. the snapshot building isn't successful due to errors.

Change-Id: I72939be1e0d79b257b9761f48a72e45325a1f6d8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3716682
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Joyee Cheung <joyee@igalia.com>
Cr-Commit-Position: refs/heads/main@{#81644}
2022-07-11 16:14:33 +00:00
Thibaud Michaud
ff44012623 [wasm] Move Suspender functions to WebAssembly
Suspender.{returnPromiseOnSuspend,suspendOnReturnedPromise}
are not tied to a specific suspender anymore, so move them to
WebAssembly.{returnPRomiseOnSuspend,suspendOnReturnedPromise}.

With this change, the suspender property is not needed anymore on the
function data. Convert it to a boolean flag that just indicates whether
a function uses the JS Promise Integration API.

R=ahaas@chromium.org

Bug: v8:12191
Change-Id: I1b6d8e3190ebf5049dbc7eedee448999cf077509
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3748660
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81639}
2022-07-11 14:52:43 +00:00
Manos Koukoutos
0ed101e015 Remove some unused includes (4)
Mostly src/codegen, src/compiler, src/interpreter, src/libplatform.

Drive-by: Remove some unreachable code.

Bug: v8:13006
Change-Id: I1a9467f7e42531c545f660d35416c388e8ef9d3c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3749193
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81613}
2022-07-08 15:26:40 +00:00
Samuel Groß
818a36bb9d [sandbox] Sandboxify WasmInstanceObject::globals_start
This field points to the start of an ArrayBuffer backing store, which
is guaranteed to be located inside the sandbox if it is enabled. As
such, this simply turns the field into a sandboxed pointer field.

Bug: chromium:1342548
Change-Id: I5a76e23cfc83b2a04cd461def1cd04337ccf5cf7
Cq-Include-Trybots: luci.v8.try:v8_linux64_heap_sandbox_dbg_ng,v8_linux_arm64_sim_heap_sandbox_dbg_ng
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3749190
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Samuel Groß <saelo@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81579}
2022-07-07 10:57:29 +00:00
Matthias Liedtke
a4fdd9f5de [wasm][test] test-gc.cc: Replace struct.new_with_rtt
with struct.new

Bug: v8:7748
Change-Id: Icc4868910832556f4c31081fb4af336f492db28e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3747868
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Auto-Submit: Matthias Liedtke <mliedtke@google.com>
Commit-Queue: Matthias Liedtke <mliedtke@google.com>
Cr-Commit-Position: refs/heads/main@{#81565}
2022-07-06 17:40:07 +00:00
Clemens Backes
e4f07c0997 [wasm][streaming] Check section order of code section
The streaming decoder did not properly check the ordering of sections
relative to the code section.
This CL fixes that for both empty and non-empty code sections.
The special path for empty code sections is not actually needed, so
remove it to simplify code paths.

Drive-by:
1. Refactor the existing code for checking section ordering to make it
   more structured and readable.
2. Ensure that we either call {DecodeCodeSection} or {StartCodeSection},
   but not both.
3. Remove {set_code_section}, merge it into {StartCodeSection}.
4. Simplify calls to {CalculateGlobalOffsets} (make them unconditional
   and remove one redundant one).

R=ahaas@chromium.org

Bug: chromium:1336380
Change-Id: Ia2c5c115d43d2b5315e3b3c9e4a21175a36aa326
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3747860
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81554}
2022-07-06 13:43:17 +00:00
snek
d89d185fad [fastcall] expose wasm memory to cfunction
Load current Memory start/size off of the wasm instance when entering
fast calls, so they can use that info for whatever they need to do.
Fast calls from JS set the memory to null, and the memory does not
need to be piped from wasm to slow callbacks as wasm always calls
the fast function.

Change-Id: Ibfa33cdd7dba85300f95cbdacc9a56b3f7181663
Bug: chromium:1052746
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3719005
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Commit-Queue: snek <snek@chromium.org>
Reviewed-by: Manos Koukoutos <manoskouk@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81538}
2022-07-05 16:24:01 +00:00
jameslahm
ce16c04dc3 [test] Move cctest/test-intl to unittests/
... objects/intl-unittest.

Bug: v8:12781
Change-Id: I225054f5d0071f28d5b4d1efe8698ce5d0276c0c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3725448
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: 王澳 <wangao.james@bytedance.com>
Cr-Commit-Position: refs/heads/main@{#81534}
2022-07-05 14:51:00 +00:00
jameslahm
4c3f710833 [test] Move cctest/test-identity-map to unittests/
... utils/identity-map-unittest.

Bug: v8:12781
Change-Id: I875de2b1e589ec72d724a6d0745a5d615344b510
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3724792
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: 王澳 <wangao.james@bytedance.com>
Cr-Commit-Position: refs/heads/main@{#81531}
2022-07-05 14:41:01 +00:00
Ilya Rezvov
fb8cd26f27 [wasm-atomics] Use traps for rest of atomic operations OOB handling
Bug: v8:12946
Change-Id: I2c17c3258123417d616e7fc8a1521e006b758e08
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3731149
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Commit-Queue: Ilya Rezvov <irezvov@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81500}
2022-07-01 19:51:50 +00:00
Manos Koukoutos
ccc74bc64e [wasm-gc] Remove 'let' opcode
This opcode is being removed in favor of pre-declared non-defaultable
locals (details are still TBD).

Bug: v8:9495
Change-Id: I96ac053a1b5a852310c5dc0bbaeab0cbf5384663
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3738743
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81496}
2022-07-01 14:35:09 +00:00
Manos Koukoutos
bcd8bf90ff [wasm-gc] Introduce separate constructors for ref and (ref null)
Most often, the {ValueType::Ref} constructor was called with a
constant nullability. To make things more convenient, this CL renames
{Ref} to {RefMaybeNull}, and introduces {Ref} and {RefNull}
constructors with fixed nullability.

Bug: v8:7748
Change-Id: I664ff184ca936cc752e152c3c67546d79aa24390
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3732936
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81494}
2022-07-01 13:43:58 +00:00
Manos Koukoutos
a0a786656f [wasm-gc][refactor] Rename optRef -> refNull
This makes the internal V8 name consistent with the text-format name.

Bug: v8:7748
Change-Id: I44f7ac1eb5e634b4f829e596bf1f14caeb748d54
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3726291
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81491}
2022-07-01 12:33:23 +00:00
Ilya Rezvov
40daf5b14b [wasm-atomics] Prevent atomic load operation to be optimized out
Bug: chromium:1339276
Change-Id: Ice60167660fa52e84c78bb0bd9d2a2c85e0c377a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3733027
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Commit-Queue: Ilya Rezvov <irezvov@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81478}
2022-07-01 03:21:45 +00:00
Seth Brenith
1f97a2dfcb Reuse existing Scripts during synchronous parsing
This is a partial reland of https://crrev.com/c/3597106

With this change, an existing Script from the compilation cache can be
reused after its top-level SharedFunctionInfo was discarded, but only if
the new script is parsed on the main thread (not deserialized from code
cache data, and not parsed on a background thread).

Bug: v8:12808
Change-Id: I1edaee2095306a89e2c3b91f2fd01ac053f3c770
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3689348
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Seth Brenith <seth.brenith@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#81472}
2022-06-30 15:41:07 +00:00
Omer Katz
7626202118 [heap] Merge marking states
MinorMC maintained a separate marking state to support interleaved GCs.
Since MinorMC now assumes that interleaving is not possible, MinorMC can
use the same marking state as the full GC.

Bug: v8:12612
Change-Id: Ibeb7df2eb24e448f811b497c9d16b3b132f87ec2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3735163
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Omer Katz <omerkatz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81468}
2022-06-30 14:16:48 +00:00
Toon Verwaest
e5dd7a400e [code-cache] Add a flag to control bytecode aging limits
Change-Id: Ia09e8c4528e59116be39be12d688f5b99a34c8e7
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3732938
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Auto-Submit: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81437}
2022-06-29 13:00:17 +00:00
Leszek Swirski
50d2276347 [msvc] Fix build by guarding gcc pragmas
Bug: chromium:1307180
Change-Id: I45e01e172c04f5c0aac40cd84605ce52cb335cdc
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3732934
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81432}
2022-06-29 09:56:07 +00:00
Leszek Swirski
c68c724810 [gcc] Suppress array bounds warning
Suppress a gcc array bounds warning in ComputeStackLimit, where we are
very intentionally accessing a location out of bounds.

Bug: chromium:1307180
Change-Id: If4b7ce182472a761f9f619824676e5e660b0277a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3732109
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81416}
2022-06-28 14:59:36 +00:00
jameslahm
9f783f229b [test] Move cctest/test-dictionary to unittests/
... objects/dictionary-unittest.

Bug: v8:12781
Change-Id: I7faeb9fedf7857b25a85bf32f14323ba3da207c0
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3706968
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: 王澳 <wangao.james@bytedance.com>
Cr-Commit-Position: refs/heads/main@{#81395}
2022-06-27 12:06:50 +00:00
jameslahm
471e739b93 [test] Move cctest/test-atomicops to unittests/
... base/atomicops-unittest.

Bug: v8:12781
Change-Id: Iac23576cca9c50c2281a2d7e781dde4750e54c03
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3711344
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: 王澳 <wangao.james@bytedance.com>
Cr-Commit-Position: refs/heads/main@{#81394}
2022-06-27 12:03:15 +00:00
Manos Koukoutos
114a03ac82 [wasm-gc] Rename array opcodes
Rename:
- array.init(_static) -> array.new_fixed(_static)
- array.init_from_data(_static) -> array.new_data(_static)
- array.init_from_elem_static -> array.new_elem_static
- (Wasm)ArrayInitFromSegment -> (Wasm)ArrayNewSegment

Bug: v8:7748
Change-Id: I5ea314d653dd0e9f7f1f556469794d880934e01b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3726207
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81393}
2022-06-27 11:32:39 +00:00
jameslahm
5c0a114a4f [test] Move cctest/test-access-check to unittests/
... api/access-check-unittest.

Bug: v8:12781
Change-Id: I25025af204cdeaba1ba2b690cbaf5ba93e59441f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3725447
Commit-Queue: 王澳 <wangao.james@bytedance.com>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81392}
2022-06-27 11:31:37 +00:00
jameslahm
7a2686016d [test] Move cctest/test-persistent-handles to
... unittests/heap/persistent-handles-unittest.

Bug: v8:12781
Change-Id: I8d7abff3a34e11c920053c71a1a2c4b9c84235d9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3724791
Commit-Queue: 王澳 <wangao.james@bytedance.com>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81391}
2022-06-27 11:30:34 +00:00
jameslahm
8dbeee0d79 [test] Move cctest/test-global-object to unittests/
... objects/global-object-unittest.

Bug: v8:12781
Change-Id: I40a8d00301531e7d1a6dce90e1226c4568c8d72c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3713521
Commit-Queue: 王澳 <wangao.james@bytedance.com>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81390}
2022-06-27 11:29:32 +00:00
jameslahm
fda71f4cf7 [test] Move cctest/test-pointer-auth-arm64 to unittests
... /codegen/pointer-auth-arm64-unittest.

Bug: v8:12781
Change-Id: Ibce77b62650c7a5f84b62282861297b9d4b2e591
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3724790
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: 王澳 <wangao.james@bytedance.com>
Cr-Commit-Position: refs/heads/main@{#81389}
2022-06-27 11:28:30 +00:00