I/F 32x4 and 64x2 ReplaceLane opcodes are optimized
on P10.
Change-Id: I28ddc2b4e66ca39414e9c3ed2efd0eea268f1a07
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3067803
Reviewed-by: Junliang Yan <junyan@redhat.com>
Commit-Queue: Milad Fa <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/master@{#76066}
Windows.h causes massive namespace pollution with its defining of many
macros, it adds to build times, it disables warnings, and it makes it
easier to write non-portable code.
This change removes windows.h from V8's win32-headers.h. It does this
by replicating the small number of typedefs that are needed and by
defining three "proxy" types that are the same size and layout. The
V8ToWindowsType functions are used to reinterpret_cast between the
types.
Prior to this change there were over 760 v8-related source files that
include windows.h. After this change there are 16.
Bug: chromium:796644
Change-Id: I89efeed47028faae72de2da4f1dae345d8d7746c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3042215
Commit-Queue: Bruce Dawson <brucedawson@chromium.org>
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#76064}
Port f7de8c8062
Original Commit Message:
For large frames we are executing a special stack check that checks the
remaining stack space before allocating the new frame. Different
platforms used different limits for the frame size so far. Liftoff
already uses 4KB everywhere, hence use the same limit also for TurboFan.
simplification.
R=clemensb@chromium.org, joransiu@ca.ibm.com, junyan@redhat.com, midawson@redhat.com
BUG=
LOG=N
Change-Id: Ie47572277769170878c3ed5598fe61edd8524ac7
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3068955
Reviewed-by: Junliang Yan <junyan@redhat.com>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Milad Fa <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/master@{#76063}
Also introduce a separate error type for WebAssembly.Exception,
since the properties should not be added to RuntimeError.
R=jkummerow@chromium.org
Bug: v8:11992
Change-Id: I8f4ae0da9a95184366e07dc43e58a5a9ff4382ae
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3055304
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
Cr-Commit-Position: refs/heads/master@{#76061}
This ports https://crrev.com/c/3040844 to also work on Mac. All that's
needed is minor tweaks to the inline assembly. The inline assembly is
stripped down to what's actually needed. I didn't find documentation on
".pushsection" and ".popsection" on Mac. Since we do not have this on
other inline assembly (e.g. src/heap/base/asm/x64/push_registers_asm.cc)
removing this here does not regress the status quo. If this ever causes
problems, we will have to consistently add it everywhere.
The new code paths are tested by the v8_mac_arm64* CQ bots, and the
"V8 Mac - arm64 - sim - {debug,release}" waterfall bots.
R=ahaas@chromium.org, mseaborn@chromium.org
Bug: v8:11955
Change-Id: If0b78a2d2a8b365c1c77b171de0591452e4bbeec
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3063500
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#76060}
Previously the V8 inspector would only turn embedder accessors on the
prototype chain into data properties, but would not do the same for
ECMAScript builtins, which is kind of inconsistent and weird behavior.
This leaves in the hack that the inspector reports native accessor
properties as (own) data properties, but now at least the very least
does so consistently. In the absence of a better solution, we'll go
with this for now.
Bug: chromium:1076820, chromium:1199247
Change-Id: I593f909a46cb714dbec629a2944eeb892881ba6f
Before: https://imgur.com/kPuSldj.png
After: https://imgur.com/eFau45m.png
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3067319
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Kim-Anh Tran <kimanh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#76059}
The current map is safe to read, and backpointers (read inside
Map::FindFieldOwner) are immutable after initialization.
Bug: v8:7790
Change-Id: I10329a44b8fa1e831fc2b52c0bc16c81891af784
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3068949
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Auto-Submit: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#76058}
Feedback is protected by acquire-release.
Bug: v8:7790
Change-Id: I5b9e8f2fa8109207420dd715407c0791fe47db8e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3068943
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Auto-Submit: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#76057}
Based on a CL by mvstanton@.
Bug: v8:7790,v8:12030,v8:12031,v8:12041
Change-Id: I58b75bd96c724a99133bec7d3bd6cf4e0c9be6d4
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3059683
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#76055}
The `previous` field is immutable after initialization and the
context itself is read through an atomic load.
Bug: v8:7790
Change-Id: I8525cac7264573a7e9fc479613aaf268b72ab836
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3067333
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Auto-Submit: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#76054}
This is a temp fix to throw instead of DCHECK in debug build.
The correct fix depends on the landing of
https://github.com/unicode-org/icu/pull/1762
Once that land I will cherrypick into chrome to fix the function correctly.
But the current (before this CL) behavior is not harmful in release build.
It basically does not do the max nor min just return itself.
Bug: chromium:1224869
Change-Id: Iebce2ab0a5ce047e83e8fce05db8290212e64509
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3017300
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#76047}
ICU 69 moved content of nb resources to no and let
nb fallback to no. This break our original design of checking
locale availability. Hard wire to check on no if nb fail for now
until we come out with a better fix.
Bug: chromium:1215606
Change-Id: I831529d29590cc643ee0109fb2ce8948dac75613
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3068010
Commit-Queue: Frank Tang <ftang@chromium.org>
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#76044}
stress_flush_bytecode controls stress flushing of both bytecode and
baseline code. So rename the flag to better reflect its functionality
Bug: v8:11947
Change-Id: Ie6c124a476c3a7c6eabd1d75de030ee15fe78e32
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3062567
Commit-Queue: Mythri Alle <mythria@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Omer Katz <omerkatz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#76043}
Previously, when the Load IC saw a deprecated map, it would migrate to
the new map but not update the feedback vector. This would lead to a
deopt the next time the same object was seen.
With this CL, the feedback vector will be updated to the target of the
deprecated map. In order to do this, we need to mark the IC for
recomputation. Without that call, the map and handler would look the
same to IC::UpdatePolymorphicIC amd would decline to update, causing
the IC to go megamorphic instead.
Bug: v8:10816
Change-Id: I0dcf97fb278bc0b167df6ce24d5db179f599f535
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3032983
Reviewed-by: Mythri Alle <mythria@chromium.org>
Commit-Queue: Kevin Babbitt <kbabbitt@microsoft.com>
Cr-Commit-Position: refs/heads/master@{#76042}
The V8.Execute histogram is not free and can cause more overhead
than expected. This CL is guarding slower histograms behind a new
--slow-histograms flag.
For now --slow-histograms is enabled by default. Once all
chrome-side changes and benchmark changes have landed it will be
disabled by default.
--dump-counters will automatically enable --slow-histograms.
The goal is to not report slow histograms on UMA by default on stable:
- 100% reporting on canary/dev/beta
- 1% reporting on stable or specific finch experiments
Chrome-side feature: https://crrev.com/c/3065464
Bug: v8:11946
Change-Id: I23c782288e10ceb76323d72eceea9170739fd543
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3067318
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#76041}
This lands the CLs for creating V8 roll branches without TBR.
No-Try: true
Bug: chromium:1176141
Change-Id: I67defe7e0337f6beb3db2e198dc2cf87f1345ec1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3067320
Reviewed-by: Liviu Rau <liviurau@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#76038}
Instead of throwing a fatal error when setting a value in an array with
index larger than FixedArray:kMaxLength, we now throw an exception.
This CL propagates the exception in StoreInArrayLiteralIC.
Bug: chromium:1235093, chromium:1201626
Change-Id: Iaffd4eff47ad689fce2fd641ce1beaddd02d1a48
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3067220
Auto-Submit: Victor Gomes <victorgomes@chromium.org>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#76036}
This avoids having all code writable while compiling functions. We only
need it writable for copying the code to the NativeModule and for
updating the jump table(s).
R=jkummerow@chromium.org
Change-Id: Ifb212b1cd3f7702fac4b1eb9e7bc7d5b5bd5198a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3063221
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#76035}
For large frames we are executing a special stack check that checks the
remaining stack space before allocating the new frame. Different
platforms used different limits for the frame size so far. Liftoff
already uses 4KB everywhere, hence use the same limit also for TurboFan.
Drive-by: Remove an outdated and misleading comment, and other minor
simplification.
R=ahaas@chromium.org
Bug: v8:12017
Change-Id: I6548b2293ec255349bf4e08c26fd05b7e0df0497
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3063501
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#76034}
Regressed in crrev.com/152ecad8cd4d170e4091a79eaa8d70d10d94734d.
Fixed: chromium:1234931
Change-Id: I8f2b603a914fccaeaeb3dcffa63070cf8fb6f0e3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3064604
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Auto-Submit: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#76033}
Also:
* Remove forward declare and As##Name for never serialized Data classes
* Remove the Data classes
* Refactor macro list to encode being background or never serialized
Bug: v8:7790
Change-Id: Ide29d89072b247311f29948f04c4147c5c1103cc
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3056458
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#76032}
A JSFunction object may count as 'ObjectMayBeUninitialized', yet still
be safe to read for other reasons (e.g. because it has been loaded
through a chain of acquire-loads and immutable-after-initialization
guarantees).
Bug: chromium:1235071,v8:7790
Change-Id: I18c81695f001fd67e69d98dde641b71ed7b7e53d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3064606
Auto-Submit: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#76031}
Lookup the corresponding details on the given map instead of the
owner map.
Change-Id: I2dcd0b24216c2bdc5860518d34d710b771f74973
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3063234
Commit-Queue: Georg Neis <neis@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#76030}
Change-Id: I0ba9c4bf13ff13e69d960fba44f93124be5a31a7
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3063499
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#76029}
wasm-code-manager.cc is no longer included if v8_enable_webassembly ==
false, so we can remove this guard.
Bug: v8:11879
Change-Id: Ide77e7e334d2711c1cbbbbedc34c2796ffaf793d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3061358
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#76024}
Since recently, the WebAssembly instance gets cached in Liftoff code
to avoid reloading it from the stack whenever it is used. Typically the
cached instance gets invalidated at a function call and therefore does
not need to be recorded in safepoints.
However, when the DebugBreak builtin is called, the cached instance
was not invalidated. It is even incorrect to invalidate the cached
instance there because that would modify the CacheState of Liftoff.
Therefore this CL adds the register that caches the instance to the
safepoint of the call to the DebugBreak builtin.
R=clemensb@chromium.org
Bug: v8:11979
Change-Id: I7f9153e0c0e7e797b11b827111b4d61e29606071
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3063222
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#76021}
With concurrent inlining, the TransitionDependency ctor can no
longer assume that the given map is not deprecated. This is not an
issue since IsValid will check it again.
Also remove some other outdated DCHECKs and turn a few DCHECKs into
CHECKs since the properties they check are not so obvious anymore with
concurrency.
Bug: v8:12033, v8:7790
Change-Id: I932f7f6440697d693b0c0e6472406329af29b46b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3062576
Reviewed-by: Santiago Aboy Solanes <solanes@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#76020}
Replace the hard-coded blocklist ("Response.body" and "Request.body") in
the V8 inspector with proper side-effect free debug evaluate. This is
otherwise a non-functional change and in particular preserves the
behavior of reporting accessors as (own) data properties. That will be
tackled in a follow-up CL.
This CL is possible because with https://crrev.com/c/3056879 Blink now
properly marks accessors as side-effect free consistently with what the
V8 inspector had done before.
Doc: http://doc/1gLyyOlssS5zyCSEyybVC-5sp0UnNJj2hBoFyf6ryrTc
Bug: chromium:829571, chromium:1076820, chromium:1119900
Change-Id: Idb256accaf4cfb5db5982b3eb06ddcef588be635
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3062573
Auto-Submit: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Philip Pfaffe <pfaffe@chromium.org>
Reviewed-by: Philip Pfaffe <pfaffe@chromium.org>
Cr-Commit-Position: refs/heads/master@{#76019}
The original CL was flaky because deserialization did not wait correctly
for the compilation of missing functions to finish. The baseline-finished
event was set even when there were still some functions missing. The
combination of deserialization and lazy compilation was also not handled
correctly.
Original change's description:
> [wasm] Support partial serialization of modules
>
> At the moment a WebAssembly module can be serialized successfully when
> all functions were compiled with TurboFan. However, for some functions
> it may not be necessary to be compiled with TurboFan, e.g. for functions
> where Liftoff code is as good as TurboFan code.
>
> With this CL we allow WebAssembly modules to get serialized even when
> not all functions are compiled with TurboFan. Missing functions are
> marked as missing in the serlialization. Upon deserialization, missing
> functions either get compiled by Liftoff, or initialized with a
> lazy-compilation stub, depending on the V8 configuration.
>
> Bug: v8:11862
Change-Id: I79a9e8e14199cff87fce6ae41a87087e047bbc65
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3060485
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#76017}