Commit Graph

76260 Commits

Author SHA1 Message Date
v8-ci-autoroll-builder
0ce56922a5 Update V8 DEPS (trusted-versions)
Rolling v8/third_party/fuchsia-sdk/sdk: version:8.20220705.3.1..version:8.20220706.2.1

R=v8-waterfall-sheriff@grotations.appspotmail.com,mtv-sf-v8-sheriff@grotations.appspotmail.com

Change-Id: I4e01266cbfacd70405ddaa228182872749fc7d36
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3750516
Bot-Commit: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Commit-Queue: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#81568}
2022-07-07 03:50:27 +00:00
Dominic Cooney
1fac1301ce iOS: Use sysctlbyname to check if jscvt is supported
Bug: v8:13004
Change-Id: I6b29094a7fcea75d46328e686961e7a1f25343fd
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3746216
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Dominic Cooney <dpc@fb.com>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81567}
2022-07-06 22:39:47 +00:00
Jakob Kummerow
1545a71603 [wasm] Add ModuleDisassembler
Unused as of this CL; users will follow.

Bug: v8:12917
Change-Id: I6c615fc53e782f7f00c8a20a00aabea08f3e4605
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3742699
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81566}
2022-07-06 17:47:57 +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
Leszek Swirski
76356780aa [maglev] Add a maglev-specific safepoint mechanism
Maglev groups all its tagged spill slots together, and the number of
them doesn't change. This means that the generality of the existing
safepoint mechanism is massive overkill for maglev code.

This patch adds a maglev-specific safepoint table, which is the
safepoint of a code object if-and-only-if that code object has maglev
code. This safepoint stores the number of tagged and untagged slots
once, globally, and individual entries are just used for deopts and for
storing the state of pushed registers (this is currently unused, but
will be used in the future for pushing registers in deferred calls).

Bug: v8:7700
Change-Id: I15f84a6e957357825e84e33238f8a36f2e0b3012
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3747858
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81564}
2022-07-06 16:38:27 +00:00
Michael Achenbach
c04fba9354 [infra] Run gcc-bot tests on Focal image
We don't build with bundled sysroot on gcc builders, hence we need to
match the sysroot on tester bots. There is already a number of
Focal bots in chromium.tests and the capacity needed for these gcc
bots is insignificant.

No-Try: true
Bug: chromium:1307180
Change-Id: Id9d3d08bdb09923cf919b17286c949c6ac9005ed
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3747872
Reviewed-by: Alexander Schulze <alexschulze@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81563}
2022-07-06 16:19:07 +00:00
Jakob Kummerow
9195b00035 [wasm] Disallow using stack-backed handles in runtime-wasm.cc
We currently don't have a way to visit parameter stack slots being
passed from Wasm to the runtime during GC, so while we usually access
them as if they were handles, they're not actually GC-safe in this
case. Until we find a way to fix this differently, force manual creation
of safe handles.

Bug: v8:13036
Change-Id: I9ffec58348d912bd56fb199e9d0bc90bf753b87c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3745372
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Auto-Submit: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81562}
2022-07-06 16:05:37 +00:00
Michael Achenbach
ace6a5904a [infra] Remove obsolete builder configs
Remove configs for bots that were removed. Dedicated focal bots and
x86 gcc bots.

Bug: chromium:1307180, v8:13005
Change-Id: I482829f6644642b3d9fe1b380b2a3edaba2045d4
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3747869
Reviewed-by: Alexander Schulze <alexschulze@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81561}
2022-07-06 16:03:57 +00:00
Shu-yu Guo
9e1f89c0f9 Remove unused RelocInfoWriter::WriteData
Change-Id: I7996f49f5358d8be684a39b64020bc6bef82b7bb
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3739228
Commit-Queue: Shu-yu Guo <syg@chromium.org>
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81560}
2022-07-06 15:01:18 +00:00
Shu-yu Guo
725c163d8e [heap] Fix recording OLD_TO_SHARED slots of Code-embedded pointers
Code in client heaps can embed pointers to shared objects. In non-shared
GC, these pointers can be weak. During shared GC, unconditionally
consider Code-embedded client->shared pointers as strong so we don't
have to deoptimize and clear embedded objects in all client Isolates'
Code instances.

Bug: v8:13027
Change-Id: Id34d7e707153191639e8e531fc12d917b9382a26
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3739231
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Shu-yu Guo <syg@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81559}
2022-07-06 14:49:56 +00:00
Andy Wingo
6db9f2ba0e [stringrefs] Implement string.new_wtf16_array
See https://github.com/WebAssembly/stringref/issues/1.

Bug: v8:12868
Change-Id: Icd197b4872a72ae84878b2ac48a66f7026ab90cd
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3745369
Commit-Queue: Andy Wingo <wingo@igalia.com>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81558}
2022-07-06 14:32:26 +00:00
Joyee Cheung
81c14eb85d [runtime] return when failed access callback doesn't throw
When the failed access callback is configured but it doesn't throw,
we should return instead of expecting an exception, otherwise
it would crash because there isn't one.

This patch also adds --throw-on-failed-access-check and
--noop-on-failed-access-check in d8 to mimic the behavior
of the failed access check callback in chromium.

Bug: chromium:1339722
Change-Id: Ie1db9d2fb364c6f8259eb9b8d81a21071c280a80
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3737305
Commit-Queue: Joyee Cheung <joyee@igalia.com>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81557}
2022-07-06 14:01:36 +00:00
Manos Koukoutos
3ec0f9365e Remove some unused includes (2)
Mainly src/compiler-dispatcher, src/d8, src/debug, src/runtime.
Drive-by: Restore CONDITIONAL_WRITE_BARRIER invocation, which was
accidentally changed.

Bug: v8:13006
Change-Id: If07334b654b9ba2d4bec14a11cfdeeb1aa953b7d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3745402
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81556}
2022-07-06 13:58:57 +00:00
Thibaud Michaud
d0b75e25da [wasm][stack-switching] Fix nested suspenders
Fix some issues with nested suspenders:
- Fix scratch register conflict when returning from an inner suspender
- The outer suspender should stay in 'Active' state
- Suspenders should become 'Inactive' when they return

CC=ahaas@chromium.org

Bug: v8:12191
Change-Id: Ic6c6108c4f8df3d32417d7813eb04e0e2a46d27a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3743386
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81555}
2022-07-06 13:48:06 +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
Danylo Boiko
f61d1afec6 [turbolizer] Turboshaft view initial commit
General:
- Graph view refactoring
Turboshaft:
- Blocks representation
- Inline nodes representation
- Minimum required turboshaft toolbox actions
- Layout caching

Bug: v8:7327
Change-Id: I2ac07965ac775c68c522cfc9367b7ce0ff18672a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3726287
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Commit-Queue: Danylo Boiko <danielboyko02@gmail.com>
Cr-Commit-Position: refs/heads/main@{#81553}
2022-07-06 13:11:46 +00:00
Michael Achenbach
6639962a32 [build] Silence gcc warnings on coverage bot.
GCC warnings are already treated as failures on other bots. They don't
add value on the coverage bot and only block creating reports.

Bug: v8:13005
Change-Id: I2d55288a4790e8cd508cdb8340265c696e44b671
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3747864
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Auto-Submit: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81552}
2022-07-06 13:09:06 +00:00
Liu Yu
2ac469ae5d [loong64][mips64][fastcall] Support EnforceRange annotation
Port commit 8559a04f4c

Change-Id: I74bbbaddb196bba0945cc857e708534e4eb3f9b3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3747466
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Commit-Queue: Maya Lekova <mslekova@chromium.org>
Auto-Submit: Liu Yu <liuyu@loongson.cn>
Cr-Commit-Position: refs/heads/main@{#81551}
2022-07-06 12:28:25 +00:00
Michael Achenbach
f4b58389f6 [infra] Drop header-includes check from gcc bots
There is already a builder v8_linux64_header_includes_dbg blocking CQ
and a CI counterpart for this feature. Also switching it on for gcc
doesn't add value, just a slow-down of the gcc bots.

No-Try: true
Bug: v8:13005
Change-Id: Id20112928b8db406ce998cf463ddb3f95aa8e361
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3747859
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81550}
2022-07-06 12:16:26 +00:00
Jakob Kummerow
d1a6638afa [wasm] Fix linking of "SectionName()"
Speculative fix as I can't repro the failures locally.

Change-Id: I0a06ee02435e5131c44c7b4bef142cb4385d3243
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3747861
Auto-Submit: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81549}
2022-07-06 11:22:16 +00:00
Michael Achenbach
a2d293b84a [build] Disable gcc warnings for unittests
This is a workaround to silence gcc failures stemming from googletest
headers.

Bug: chromium:1307180
Change-Id: Ia6eb08f170f65c2fde6e4c287f9781d9df559b35
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3738220
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81548}
2022-07-06 09:32:55 +00:00
Michael Achenbach
544fca5fa7 [infra] Add 64bit gcc release bots
No-Try: true
Bug: v8:13005
Change-Id: Ie941d501ca6bdb8dc40d2188fb62741440fa6caf
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3747857
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Alexander Schulze <alexschulze@chromium.org>
Auto-Submit: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81547}
2022-07-06 09:24:46 +00:00
v8-ci-autoroll-builder
8a6a9e8c18 Update V8 DEPS (trusted-origins)
Rolling v8/build: 9ea9d49..f855a2b

R=v8-waterfall-sheriff@grotations.appspotmail.com,mtv-sf-v8-sheriff@grotations.appspotmail.com

Change-Id: I6dfb1ac58aad1c11620d42efcd9e0c340eaae762
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3746083
Bot-Commit: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Commit-Queue: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#81546}
2022-07-06 04:47:41 +00:00
v8-ci-autoroll-builder
ee99132a7f Update V8 DEPS (trusted-versions)
Rolling v8/third_party/android_sdk/public: PGPmqJtSIQ84If155ba7iTU846h5WJ-bL5d_OoUWEWYC..IPzAG-uU5zVMxohpg9-7-N0tQC1TCSW1VbrBFw7Ld04C

Rolling v8/third_party/fuchsia-sdk/sdk: version:8.20220701.2.1..version:8.20220705.3.1

R=v8-waterfall-sheriff@grotations.appspotmail.com,mtv-sf-v8-sheriff@grotations.appspotmail.com

Change-Id: Id0df943e5c230c0ad061fe88716c646756ab8d37
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3746082
Bot-Commit: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Commit-Queue: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#81545}
2022-07-06 03:50:51 +00:00
Lu Yahan
600f753385 [riscv64] Port [fastcall] Support EnforceRange annotation
Port commit 8559a04f4c

Change-Id: Ibeafd18e3bed0907536b93d1fd4c5db98bef41ba
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3746292
Commit-Queue: ji qiu <qiuji@iscas.ac.cn>
Auto-Submit: Yahan Lu <yahan@iscas.ac.cn>
Reviewed-by: ji qiu <qiuji@iscas.ac.cn>
Cr-Commit-Position: refs/heads/main@{#81544}
2022-07-06 02:15:02 +00:00
Milad Fa
9723c929f3 S390 [simd][liftoff] Implement relaxed q15mulr
Changes for TF instruction selector will be pasted
in the CL comments and will get applied once all
relaxed opcodes have been implemented in codegen/liftoff.

Change-Id: I61f393b4df7d6b2dbe14632e71b3f317379b4ae6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3743507
Commit-Queue: Milad Farazmand <mfarazma@redhat.com>
Reviewed-by: Milad Farazmand <mfarazma@redhat.com>
Reviewed-by: Junliang Yan <junyan@redhat.com>
Cr-Commit-Position: refs/heads/main@{#81543}
2022-07-05 20:58:11 +00:00
ishell@chromium.org
cb762adc4f [tests] Skip tests that fail in --stress-snapshot mode
Bug: v8:13038
Change-Id: I98832b00523535b57cde67d4d389aa361bc19a46
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3745405
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Auto-Submit: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81542}
2022-07-05 18:01:53 +00:00
Nikolaos Papaspyrou
e8cea8c876 [tools][gm] Fix aliases for modes with a suffix
Minor bug fix in alias support (crrev.com/c/3723506), which broke
modes with suffixes, e.g. x64.release-css or x64.rel-css

No-Try: True
Change-Id: I16fdc83dde269f66f4bb7260de0d2649aaece27e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3732929
Commit-Queue: Nikolaos Papaspyrou <nikolaos@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81541}
2022-07-05 17:24:41 +00:00
Michael Lippautz
16b5842425 [cppgc] Use global OOM handler for GCInfoTable
GCInfoTable is a process-global table storing Oilpan type information.
Table operations may fail in OOM scenarios which were previously just
caught in regular CHECKs. Change to use a global OOM handler that is set
up to use V8's handler.

Bug: chromium:1283199
Change-Id: Id33263ef7cd4028d60a071f5ab3b165e59ac9593
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3745368
Reviewed-by: Anton Bikineev <bikineev@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81540}
2022-07-05 17:11:15 +00:00
Manos Koukoutos
32e6b48fca Reland "Remove some unused includes"
This is a reland of commit 2d74bfa4a0

Difference compared to original: Restore one needed include.

Original change's description:
> Remove some unused includes
>
> Mostly src/api, src/asmjs. src/ast, src/base, src/wasm.
>
> Bug: v8:13006
> Change-Id: If4e85afe003fda9f8a681077827c3502e939fe57
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3742702
> Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
> Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
> Reviewed-by: Toon Verwaest <verwaest@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#81523}

Bug: v8:13006
Change-Id: I88c45059572fa25af4e0999f479ba5c28572db7f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3746077
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81539}
2022-07-05 16:44:13 +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
Luis Fernando Pardo Sixtos
6151ae0127 [shared-struct] Support shared arrays in Atomics.{load,store,exchange}
Atomics.load, Atomics.store, and Atomics.exchange now accept shared
array objects as their 1st argument.

Currently these are implemented in C++ and not yet in CSA.

Bug: v8:12547
Change-Id: I54ed8816a696a4f45dda964739b1cfd917d39dc0
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3723974
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Luis Fernando Pardo Sixtos <lpardosixtos@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#81537}
2022-07-05 15:49:01 +00:00
Andy Wingo
995063d175 [stringrefs] Fix array-to-string instruction
To make an array from a string, we were passing an interior pointer to
the array's contents to NewStringFromUtf8 -- but the allocation could
cause that interior pointer to become invalid.

As part of the fix, also start to refactor to put the notion of UTF-8
variants closer to unibrow.  This will allow us to unify more
UTF-8/WTF-8/sloppy UTF-8 code paths.

Bug: v8:12868, v8:13028, v8:13036
Change-Id: I61f53a6882b5ebe1d0b38594412cb35ff0e28a94
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3742701
Commit-Queue: Andy Wingo <wingo@igalia.com>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81536}
2022-07-05 15:45:10 +00:00
Milad Fa
9d69f6f705 PPC/s390: [fastcall] Support EnforceRange annotation
Port 84e078c6cf

Original Commit Message:

    This CL implements checks in case EnforceRange is requested for a
    given parameter by using TryTruncate* operators. It implements 2 such
    truncations on x64 and arm64 - TryTruncateFloat64ToInt32 and
    TryTruncateFloat64ToUint32.

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

Change-Id: Iaf6834b9cfe3d43298adfe2c71ec3d55aa14f935
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3743467
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Commit-Queue: Milad Farazmand <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/main@{#81535}
2022-07-05 15:20: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
Jakob Kummerow
7890a89d47 [wasm] Add FunctionBodyDisassembler
Unused as of this CL; users will follow.

Bug: v8:12917
Change-Id: I82658ea8a401834a5b3661068766bbdfec54d5a4
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3726214
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81533}
2022-07-05 14:47:31 +00:00
Jakob Kummerow
c52224fd34 [tools][wasm] wami: fix MSVC build
Change-Id: I3ae32354c592e4a605f1d0c34f4dd3d9cad16795
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3745404
Auto-Submit: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Manos Koukoutos <manoskouk@chromium.org>
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81532}
2022-07-05 14:44:30 +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
Marja Hölttä
f3f47a9fef [super IC] Add tests for a security bug
Bug: chromium:1309467,chromium:1308360,v8:9237
Change-Id: I77b004e263a9bed98a0dfe5936bdad055bde36a6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3745365
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81530}
2022-07-05 14:17:18 +00:00
Maya Lekova
8559a04f4c Reland "[fastcall] Support EnforceRange annotation"
This is a reland of commit 84e078c6cf. It fixes an undefined behaviour and guards against NaNs in d8-test.cc.

Original change's description:
> [fastcall] Support EnforceRange annotation
>
> This CL implements checks in case EnforceRange is requested for a
> given parameter by using TryTruncate* operators. It implements 2 such
> truncations on x64 and arm64 - TryTruncateFloat64ToInt32 and
> TryTruncateFloat64ToUint32.
>
> Bug: chromium:1052746
> Change-Id: I32f34d9dc1265af568cc576663620a8f7f8245f6
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3721618
> Reviewed-by: Toon Verwaest <verwaest@chromium.org>
> Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
> Commit-Queue: Maya Lekova <mslekova@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#81512}

Bug: chromium:1052746, chromium:1341851, chromium:1341891
Change-Id: I21e0e452c92cc93f8b06985a335f409855be0546
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3743518
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Maya Lekova <mslekova@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81529}
2022-07-05 14:09:21 +00:00
Junliang Yan
cdafe89ea2 ppc64: [baseline] enable sparkplug on ppc64
Change-Id: Id10cfdb8f3a380eb1cd39be569e152b3ebe41b44
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3735166
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Junliang Yan <junyan@redhat.com>
Cr-Commit-Position: refs/heads/main@{#81528}
2022-07-05 13:48:05 +00:00
Jakob Kummerow
9a30c98120 [wasm] Fix max index in function names section
Fixed: chromium:1341180
Change-Id: Ib475310b18c31e5e3e0fc5e52dab736ebb6ac55a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3738745
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81527}
2022-07-05 12:32:01 +00:00
Manos Koukoutos
69c77a4ea0 Revert "Remove some unused includes"
This reverts commit 2d74bfa4a0.

Reason for revert: https://ci.chromium.org/ui/p/v8/builders/ci/V8%20Mac%20-%20arm64%20-%20debug%20builder/7403/overview

Original change's description:
> Remove some unused includes
>
> Mostly src/api, src/asmjs. src/ast, src/base, src/wasm.
>
> Bug: v8:13006
> Change-Id: If4e85afe003fda9f8a681077827c3502e939fe57
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3742702
> Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
> Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
> Reviewed-by: Toon Verwaest <verwaest@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#81523}

Bug: v8:13006
Change-Id: I7579dc3805ed4cbcd56488c31450c7941b430b1a
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3746076
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Reviewed-by: Manos Koukoutos <manoskouk@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Owners-Override: Manos Koukoutos <manoskouk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81526}
2022-07-05 11:57:40 +00:00
Hao Xu
8d9615edf6 [CSA] Avoid sign-extending LoadIC's Smi handler when possible
Smi handler in LoadIC is decoded to IntPtrT and result in
sign-extending Smi's value when pointer compression is enabled. This
CL avoid this sign-extension by decoding the Smi to Int32T.

Change-Id: I3ddd6dcec8654d6c13d472a077a55698359d126a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3740481
Commit-Queue: Hao A Xu <hao.a.xu@intel.com>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81525}
2022-07-05 11:53:14 +00:00
Omer Katz
5febb0622f [heap] Pass AllocationCounter to Space
Extract AllocationCounter (which manages the allocation observers) out
of Space and pass it on initialization.
AllocationCounter will instead be a field of the subclasses (e.g.
PagedSpace, NewSpace).
This will allow to reuse the same AllocationCounter for the NewSpace and
PagedSpaceBase parts of PagedNewSpace (crrev.com/c/3641178).

Bug: v8:12612
Change-Id: Ie6ed10d1b138a5724cf9b469ab9c943518850ad4
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3745403
Commit-Queue: Omer Katz <omerkatz@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81524}
2022-07-05 11:52:11 +00:00
Manos Koukoutos
2d74bfa4a0 Remove some unused includes
Mostly src/api, src/asmjs. src/ast, src/base, src/wasm.

Bug: v8:13006
Change-Id: If4e85afe003fda9f8a681077827c3502e939fe57
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3742702
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81523}
2022-07-05 11:39:01 +00:00
Jakob Kummerow
25c3b1b05b [tools][wasm] wami: add --section-stats mode
Prints information about sections in a given module and their sizes.

Change-Id: I3bf02f0c8be53756364db4d2dada60bc8a510815
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3743447
Reviewed-by: Manos Koukoutos <manoskouk@chromium.org>
Auto-Submit: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81522}
2022-07-05 10:55:11 +00:00
Manos Koukoutos
efbadd6096 Do not set protected memory for all atomics
Bug: v8:12946
Change-Id: If62b67a47f63832e6edca749ce1a45cf3a85316d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3743384
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81521}
2022-07-05 10:44:47 +00:00
Al Muthanna Athamina
eb74342600 Add bots for RISC-V32
Bug: v8:13033
Change-Id: Ic2c13359a1e22846750d67342b2a682f6351b7da
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3743484
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Almothana Athamneh <almuthanna@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81520}
2022-07-05 09:48:32 +00:00
Maya Lekova
ec9fa4365d [megadom] Turn an expensive check only in DEBUG
This CL fixes a performance regression by conditionally compiling an
expensive instance check only in debug mode.

Bug: chromium:1329463
Change-Id: I2cceb7c06fa6db967923047a4dee63a93a0b72a2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3743385
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Auto-Submit: Maya Lekova <mslekova@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81519}
2022-07-05 08:36:19 +00:00