Commit Graph

73865 Commits

Author SHA1 Message Date
Frank Tang
a4bdc77fe8 [intl] Part 3 of NumberFormat v3
Add NumberFormat.prototype.formatRange(ToParts)?

https://github.com/tc39/proposal-intl-numberformat-v3

https://chromestatus.com/guide/edit/5707621009981440

Design Doc: https://docs.google.com/document/d/19jAogPBb6W4Samt8NWGZKu47iv0_KoQhBvLgQH3xvr8/edit


Bug: v8:10776
Change-Id: I9bb163c0c15ccac9d3a2d5e55ad38aa5c06bbaa6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3429464
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79373}
2022-03-04 22:53:20 +00:00
Shu-yu Guo
82c4c977b3 [shared-struct] Handle HeapNumbers in Object::IsShared
HeapNumbers that are in the shared heap were incorrectly considered
!IsShared().

TBR=jkummerow@chromium.org

Bug: v8:12547
Change-Id: Ie4b9575445d841a7045c947ff4439bf53a22869d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3504085
Commit-Queue: Shu-yu Guo <syg@chromium.org>
Auto-Submit: Shu-yu Guo <syg@chromium.org>
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79372}
2022-03-04 22:30:50 +00:00
Leszek Swirski
b9af6604c3 [maglev] Allow graph building to bail out
Start allowing heavier testing of maglev by allowing graph building to
bail out if passed an unsupported bytecode.

Bug: v8:7700
Change-Id: I7e3d2c5a8896d4f4e0da5ef444c95a286f9ac117
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3500417
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79371}
2022-03-04 15:16:01 +00:00
Leszek Swirski
5704f86c58 [test] Pretty print object properties on assert failure
Because I don't get much out of "Object() != Object()"

Change-Id: I5a765b9cb0a272d30edcd834ec7b60d2fd03190b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3497352
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79370}
2022-03-04 14:30:51 +00:00
Leszek Swirski
d05a38f9ad [runtime] Fix sandboxing violation in CopyDataPropertiesWithExclProp
The newly optimised CopyDataPropertiesWithExcludedProperties acceses the
excluded properties directly on the stack, to avoid pushing them twice.
This meant that we had to pass a stack pointer into the runtime, which
we couldn't do directly because all arguments to runtime functions
should be tagged.

We tried to work around this by passing the stack pointer in a Foreign,
but this violated the V8 sandbox. Fortunately, the stack pointer is
aligned, so it looks like a Smi to the GC. So, we can pass it directly
on the stack as a runtime argument but doing a bit of bitcasting.

Cq-Include-Trybots: luci.v8.try:v8_linux64_heap_sandbox_dbg_ng
Bug: v8:11614
Change-Id: I87c4a34a15ae863277142aa29f48b1dd546014e0
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3497745
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79369}
2022-03-04 14:15:30 +00:00
Seth Brenith
37ce416f31 [ext-code-space] Restore tagging of Code objects in heap snapshot
The heap snapshot generator is meant to apply descriptive names to Code
objects, but was using CodeDataContainer instead. Attempting to set the
name of the CodeDataContainer instances did nothing because they already
had the name "system / CodeDataContainer".

Bug: v8:11880
Change-Id: If7bd115bde36386d283d319c1ee28df565a39569
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3498849
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Seth Brenith <seth.brenith@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#79368}
2022-03-04 13:53:52 +00:00
Tobias Tebbi
01b809d2fd [torque] fix bug in formatter
Change-Id: I05e7d0776eaa4722c5a5b9820ee6b34d9319d2ce
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3497816
Reviewed-by: Marja Hölttä <marja@chromium.org>
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79367}
2022-03-04 13:11:50 +00:00
Benedikt Meurer
05dfa28993 [inspector] Do not resurrect Script objects.
Previously, the inspector would resurrect `v8::internal::Script` objects
when the weak callback is invoked, in order to access their fields and
read out the source (either a String in case of JavaScript or the module
bytes in case of WebAssembly). With https://crrev.com/c/3494242 we no
longer need to access the `v8::internal::Script` now, and so we can stop
relying on the `WeakCallbackType::kFinalizer` logic.

Bug: chromium:1295659
Fixed: chromium:1302195
Doc: https://bit.ly/v8-inspector-script-caching
Change-Id: I6a444bfcdf6cd23b30043f7386d6c18b7afec659
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3497324
Reviewed-by: Simon Zünd <szuend@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79366}
2022-03-04 12:55:00 +00:00
Leszek Swirski
7f5c3f7b81 [maglev] Fix maglev include for bazel
Bug: v8:7700
Change-Id: I1ebb7b0404526e45622b488248a244d75d93a4d7
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3501892
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79365}
2022-03-04 10:25:42 +00:00
Keith Smiley
7c7f83f1f4 [bazel] Add darwin_arm64 to list of cpus
This fixes bazel builds on Apple Silicon hosts

https://github.com/envoyproxy/envoy/issues/19916

Change-Id: I9651538bec8a98e4b350c5f8ee1a40ed91dff461
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3502848
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79364}
2022-03-04 09:36:06 +00:00
Benedikt Meurer
c4d1feee52 [inspector] Introduce v8::debug::ScriptSource.
This introduces a new (inspector-only) `v8::debug::ScriptSource`,
which represents the source for a given `v8::debug::Script` (in
case of JavaScript it's a `v8::internal::String` while in case of
WebAssembly it's a `Managed<v8::internal::wasm::NativeModule>`).
Every `v8_inspector::V8DebuggerScript` now holds on weakly to the
`v8::debug::Script` and strongly to its `ScriptSource`, making it
possible to access the source even after the `Script` dies.

This is preliminary work to allow for the removal of the special
GC feature that a `WeakCallbackType::kFinalizer` callback can
resurrect the object (this change is split into a separate follow
up CL https://crrev.com/c/3497324).

Bug: chromium:1295659, chromium:1302195
Doc: https://bit.ly/v8-inspector-script-caching
Change-Id: I503d0d9283e2da392023f06f79b8ff35953e7935
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3494242
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79363}
2022-03-04 09:35:02 +00:00
Manos Koukoutos
bf1565d708 [wasm] Implement the Extended Constants proposal
This proposal adds i32 and i64 addition, subtraction, and multiplication
to the list of constant expressions.
See https://github.com/WebAssembly/extended-const.

Bug: v8:12089
Change-Id: I23a27a54a15fd37ee1d553992ab3b355eb9d317c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3497665
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79362}
2022-03-04 08:49:52 +00:00
Hao Xu
6b565a04f2 [x64] Narrow operand for comparing WordAnd with a constant
In x64, the result of WordAnd with a positive integer constant is known
to be sign(zero)-extended. Comparing this result with another positive
integer constant can have narrowed op according to the value of the
constants.

This CL do this narrow for WordAnd. It also makes the narrow in Word
comparison to deal with X64Cmp and X64Test.

Bug: v8:12650
Change-Id: I77f4ada9a9f94d78b3a78911e279a647c561cce4
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3462081
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Commit-Queue: Hao A Xu <hao.a.xu@intel.com>
Cr-Commit-Position: refs/heads/main@{#79361}
2022-03-04 05:23:52 +00:00
v8-ci-autoroll-builder
960cac9780 Update V8 DEPS.
Rolling v8/build: e6ef2e3..d6d9d1b

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/1ec1fe1..4756e38

Rolling v8/third_party/depot_tools: b65bfd5..e210b54

Rolling v8/tools/clang: 3a67a50..1f05f8e

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

Change-Id: Ie85d4ba287a44ee06ad2e9075d3fd97937401778
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3502850
Commit-Queue: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Bot-Commit: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#79360}
2022-03-04 03:57:31 +00:00
Frank Tang
2144c5357a [Temporal] Implement Temporal.Now.*
Bug: v8:11544
Change-Id: I5dda2845618cc7c709fb9ddac337472e112407e4
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3374281
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79359}
2022-03-04 02:25:31 +00:00
Frank Tang
326a63a984 [intl] NumberFormat v3 mark unimplement for string
Add unimplementation macro for String case till the resolution of
https://github.com/tc39/proposal-intl-numberformat-v3/pull/82

Bug: v8:10776
Change-Id: Ic59d532bb78a9f56a0c121e71e0f9e585bb8c9d7
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3497619
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79358}
2022-03-04 02:08:01 +00:00
Camillo Bruni
ecc3cd256a [tools] Improve gcmole part II
Prepare gcmole.cc for the next update:
- Print possible GC locations when discovering stale/dead variables
- Make error messages less confusing for the modern V8 engineer
- Prepare gcmole to read suspects.allowlist instead of .whitelist
- Use more readable variable names
- Only log non-found types with --verbose
- Change the currently unusued gccauses format in gcmole.py and
  support loading it back in gcmole.cc
- Implemented first basic gc call-chain printing (disabled by default)

GCmole packaging:
- Add debug mode to bootstrap.sh build script
- Update gcmole.py run instructions in bootstrap.sh and package.sh

Bug: v8:10009
Change-Id: I369d48baa2980455d2e8f57e7a803d0384fe83f1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3480095
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79357}
2022-03-04 01:06:11 +00:00
legendecas
8e18ea3913 [builtins] Fix binding function with native data property accessors
When the function is created with FunctionTemplate and set name with
native data property accessors, binding the function should throw
immediately if the native accessor throws.

Bug: v8:11989
Change-Id: Ief282202aa5b8515f581fd5478886ed5f001fd4f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3492966
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Commit-Queue: Chengzhong Wu <legendecas@gmail.com>
Cr-Commit-Position: refs/heads/main@{#79356}
2022-03-04 00:50:51 +00:00
Deepti Gandluri
a0b25ebd75 [wasm-relaxed-simd] Prototype relaxed min/max for ARM
Prototype F32x4Relaxed(Min/Max) and F64x2Relaxed(Min/Max)
operations for ARM. F32x4 variants map directly to vmin/vmax
hardware instructions which are also used for F32x4(Min/Max)
operations. The F64x2 variants are mapped in this implementation
to Pmin/Pmax instructions as detailed in the github issue.
https://github.com/WebAssembly/relaxed-simd/issues/33

Bug: v8:12284
Change-Id: I5ea939385fa0ae97bbdf776fc0b763cabb1b293c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3501347
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Deepti Gandluri <gdeepti@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79355}
2022-03-03 22:37:19 +00:00
Nico Hartmann
aaedd8b788 Revert "[turbofan] Enable --verify-simplified-lowering in debug"
This reverts commit 23b178b540.

Reason for revert: Speculative revert due to https://ci.chromium.org/ui/p/chromium/builders/try/linux-rel/945522/overview

Original change's description:
> [turbofan] Enable --verify-simplified-lowering in debug
>
> Bug: v8:12619
> Change-Id: I3b9f82a21c9454ff37036e8abcf73862e38f1fc9
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3494243
> Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
> Auto-Submit: Nico Hartmann <nicohartmann@chromium.org>
> Commit-Queue: Nico Hartmann <nicohartmann@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#79338}

Bug: v8:12619
Change-Id: Ia879b53e1b0a07109f0420fdf954b110f45abf58
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3497339
Auto-Submit: Nico Hartmann <nicohartmann@chromium.org>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#79354}
2022-03-03 18:04:11 +00:00
Jakob Gruber
995217a31b [maglev] Add a skeleton MaglevConcurrentDispatcher impl
A dispatcher that currently does nothing, installed on the Isolate.

The implementation is close to the baseline concurrent compiler; but
boilerplate is short enough that a common base class is not worth the
additional complexity.

Bug: v8:7700
Change-Id: Ia34781e24cb6b1f72e5560fb0afe107bb0486092
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3497690
Auto-Submit: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79353}
2022-03-03 17:32:21 +00:00
Deepti Gandluri
eda743d06b [wasm-relaxed-simd-arm] Prototype relaxed lane select
With the previous change to using the mask as the first
input to the node, the lane select ARM codegen is equivalent
to V128Select. Also enable cctests to run on ARM.

Bug: v8:12284
Change-Id: I5572f4845307ff20cc2a0a58d3ccf162caa436b5
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3500655
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Deepti Gandluri <gdeepti@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79352}
2022-03-03 17:16:51 +00:00
David Benjamin
3561874da1 Use numpy 1.2x.supported.1 in V8
This fixes 'fetch v8' on Arm Macs.

Bug: chromium:1295840
Change-Id: Ifa7a07eef508c0e0203de8ea8d54ddcd31815fe8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3494442
Auto-Submit: David Benjamin <davidben@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79351}
2022-03-03 15:21:21 +00:00
Marja Hölttä
fe479fe793 [rab/gsab] RAB/GSAB support in TA.p.subarray
Bug: v8:11111
Change-Id: I58b76ce0ad47eb47ccbd0244b110f7cb0450ced8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3468349
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79350}
2022-03-03 15:05:15 +00:00
Manos Koukoutos
2ba409389c [turbofan] Fix optimization of traps after if-nodes
A TrapUnless after an IfTrue, and conversely, a TrapIf after an IfFalse,
should not optimize away the respective Branch node.

Bug: v8:12624
Change-Id: I250b2f84c38295ca35e440589901ed5a58bb4e75
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3500303
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79349}
2022-03-03 15:04:12 +00:00
Camillo Bruni
4db43bfa2f [tools] Improve gcmole part I: command line
- Convert gcmole to python3-ish code
  - use local Path implementation for future full migration
- Use optparse and explicit arguments for gcmole
  - Add explicit directories flags
  - Use backwards compatible env vars as fallbacks
- Add gn target v8_gcmole_files to avoid issues with missing or
  incompatible generated files

Drive-by-fixes for running gcmole without ignored files:
- Disable gcmole in Isolate::UnwindAndFindHandle
- Partially disable gcmole in V8HeapExplorer::AddEntry

Bug: v8:10009
Change-Id: I5b4d1c6554db300190226361b6c518419109ff3d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3497320
Reviewed-by: Liviu Rau <liviurau@chromium.org>
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79348}
2022-03-03 15:01:15 +00:00
Camillo Bruni
0794551156 [gcmole] Disable gcmole for Isolate::UnwindAndFindHandler
Temporary fix to allow running gcmole on isolate.cc

Bug: v8:12676
Change-Id: I0b625e6e0419885cf20758f22d897dc2532c2606
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3497335
Auto-Submit: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79347}
2022-03-03 13:08:30 +00:00
Michael Lippautz
7bda2df688 Move utils/pointer-with-payload.h -> base/pointer-with-payload.h
The utility type is independent of V8 and useful for cppgc as well.
Move to base/ to allow reusing.

Change-Id: I9de9b4a87bb113fb4c2232d90253afb0f38faa68
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3497336
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79346}
2022-03-03 11:44:23 +00:00
Benoît Lizé
bceaab28a2 [heap] V8_OS_MACOSX -> V8_OS_MACOS
This renaming was missed in
https://chromium-review.googlesource.com/c/v8/v8/+/3468577, because the
code adding these #ifdef blocks landed in-between the renaming change
being uploaded and landed.

Bug: chromium:1298417
Change-Id: I8c2e951099dafcce7e19a59e40e36f308e2ed867
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3498349
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Benoit Lize <lizeb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79345}
2022-03-03 11:09:52 +00:00
Leszek Swirski
31abbcfb4d [maglev] Use RegList for free registers
Store the free registers as a RegList rather than stack of Register
values. This allows us to simplify some of the register freeing logic,
including passing the current free set to nodes for use as temporaries.

Drive-by: Replace ALWAYS_ALLOCATABLE_GENERAL_REGISTERS with
ALLOCATABLE_GENERAL_REGISTERS, which is the more general list (the former
is an implementation detail for optionally reserving a register for
the cage register).

Bug: v8:7700
Change-Id: I666e9a7547c2f4f4e578fbcbb4bd3fe3cb06dac5
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3497767
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79344}
2022-03-03 10:33:44 +00:00
jameslahm
89f02d7808 [builtins] add fast path GetProperty for function template
having cached_property_name

When call function_template accessor in Generic/NoFeedback,
if the function template has cached_property_name,
the holder will have data property with the cached_property_name,
we can use GetProperty to get it rather than bailout.

Bug: v8:10179
Change-Id: I8b878fff969d05eeab1c95fc4b73df6079496840
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3492396
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79343}
2022-03-03 10:10:03 +00:00
jameslahm
28371a5781 [destructuring assignment] add CopyDataPropertiesWithExcludedProperties intrinsic
- add CopyDataPropertiesWithExcludedProperties intrinsic
- add CopyDataPropertiesWithExcludedProperties_Baseline intrinsic

Bug: v8:11614
Change-Id: Ie6a3db4c9edda40ecf84b8d1107e70fd7ff0d5fb
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3470349
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79342}
2022-03-03 10:05:02 +00:00
jameslahm
a523f5ca69 [runtime] Delete thread local keys in Isolate::DisposeOncePerProcess
Isolate::isolate_key_ and Isolate::per_isolate_thread_data_key_ are
created in Isolate::InitializeOncePerProcess() and should be deleted in
Isolate::DisposeOncePerProcess().

Bug: v8:11914
Change-Id: Ic3000d21f86a9d419373ef7c777c21661f544fee
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3490712
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79341}
2022-03-03 10:00:26 +00:00
Jakob Gruber
cfcac7a2ad [sparkplug] Invert the ENABLE_SPARKPLUG condition formulation
Now that only ppc lacks support, state that explicitly s.t. it's clear
which platforms are still missing.

Bug: v8:11420
Change-Id: I22a91270aaa389fc27ce5c7a3f8e8b9c44f01eb4
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3497544
Auto-Submit: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79340}
2022-03-03 09:58:52 +00:00
Leszek Swirski
3fd2428c94 [maglev] Remove LiveNodeInfo, store its data directly on ValueNode
LiveNodeInfo was stored in a Node->LiveNodeInfo map, which was never
copied or merged alongside control flow. Lookups in this map were a bit
part of register allocation time, and it was mostly duplicating data
that was already in the ValueNode.

So, instead of a separate LiveNodeInfo, store the current register
allocation state directly on the ValueNode. This involves a bit of
clobbering of state (in particular, we have to clobber the next_use id),
but that doesn't matter since regalloc is a forward pass and with this
change, it's less memory and zero map lookups.

Measuring on a (very large) function, this reduces compile time from
300ms to 200ms.

Bug: v8:7700
Change-Id: I02620f1a795bd308d1de03d694c102cb5ea3ff50
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3500617
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79339}
2022-03-03 09:36:00 +00:00
Nico Hartmann
23b178b540 [turbofan] Enable --verify-simplified-lowering in debug
Bug: v8:12619
Change-Id: I3b9f82a21c9454ff37036e8abcf73862e38f1fc9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3494243
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Auto-Submit: Nico Hartmann <nicohartmann@chromium.org>
Commit-Queue: Nico Hartmann <nicohartmann@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79338}
2022-03-03 09:25:25 +00:00
haoyuintel
35ddae0a27 [x64] Fix suboptimal instruction selection for mov reg, Smi
The movq instruction with 8 immediate bytes is used for moving negative
Smi to register previously. This CL reduce the immediate bytes by using
mov imm32 with sign extension.

To move a Smi of -1 to register, the disassembly before the commit is as:
48b8feffffffffffffff   REX.W movq rax, 0xfffffffffffffffe

The disassembly after the commit is as:
48c7c0feffffff         REX.W movq rax, 0xfffffffe

Change-Id: Ib54a4fbe66f59f86b9f13a72431ceb38470f1017
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3500205
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Haoyu Zhang <haoyu.zhang@intel.com>
Cr-Commit-Position: refs/heads/main@{#79337}
2022-03-03 07:38:50 +00:00
v8-ci-autoroll-builder
1324c70fee Update V8 DEPS.
Rolling v8/build: aabb6b9..e6ef2e3

Rolling v8/buildtools: 893aa03..113dd1b

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/d62cc7b..1ec1fe1

Rolling v8/third_party/depot_tools: a255e40..b65bfd5

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

Change-Id: I8d3607b351e49ccf49c172bf03fcf5793e8cbdfe
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3499565
Commit-Queue: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Bot-Commit: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#79336}
2022-03-03 03:56:40 +00:00
Shu-yu Guo
8d99624454 Revert "Reland "heap: Force incremental marking in C++ only workloads""
This reverts commit 7d4c264e0e.

Reason for revert: Blocking chromium roll, failures in ASAN unittests:
https://ci.chromium.org/ui/p/chromium/builders/try/linux_chromium_asan_rel_ng/1104768/test-results

Original change's description:
> Reland "heap: Force incremental marking in C++ only workloads"
>
> This is a reland of commit 4fde332811
>
> Most recent fix made Oilpan aware of --single-threaded-gc which
> is necessary as GCs are more eagerly scheduled in tests.
>
> Original change's description:
> > heap: Force incremental marking in C++ only workloads
> >
> > ... when above a certain minimum threshold. This is to guard against
> > memory running away in scenarios where the JS heap is empty and
> > there's only high throughput C++ allocations that don't allow for a
> > memory reducer GC to kick in.
> >
> > This logic should be revisited after Oilpan's young generation
> > collector is implemented which may allow switching to a more efficient
> > shrinking strategy for initial heap setup.
> >
> > Bug: chromium:1029379, chromium:1300028, chromium:1300492
> > Change-Id: I93924fc2fe77d6226c29358d3afb1cc9d6fbf3b1
> > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3484319
> > Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
> > Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
> > Cr-Commit-Position: refs/heads/main@{#79255}
>
> Bug: chromium:1029379, chromium:1300028, chromium:1300492
> Change-Id: Ia0c443248b951240cce6dbe1f68581ff1061a7d9
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3500301
> Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
> Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#79327}

Bug: chromium:1029379, chromium:1300028, chromium:1300492
Change-Id: I3fd0a5d4ded7d3ce7cd74a50a11b3a0367477d06
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3500656
Auto-Submit: Shu-yu Guo <syg@chromium.org>
Owners-Override: Shu-yu Guo <syg@chromium.org>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#79335}
2022-03-03 00:14:10 +00:00
Michael Lippautz
6b197b0ac1 cppgc: Refactor prefinalizers
- Add a comment on the macro that registers a prefinalizer.
- Refactor the API to avoid exposing internal types needlessly.

Change-Id: Ia88e786304616848556263410a8f5398c5374533
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3497766
Reviewed-by: Omer Katz <omerkatz@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79334}
2022-03-02 19:14:39 +00:00
Camillo Bruni
2fa1f0457a [profiler] Partially disable GCmole in V8HeapExplorer::AddEntry
GetConstructorName might allocate and thus triggers gcmole warnings.
This is a temporary workaround until the called function is cleanly
fixed.

Bug: v8:12674
Change-Id: I43bd190d887abcd79116e8c328ceedfb0c9fad79
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3497769
Auto-Submit: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Commit-Queue: Shu-yu Guo <syg@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79333}
2022-03-02 19:02:50 +00:00
Jakob Gruber
32634b571c Add target code kind to --trace-opt output
.. to distinguish between Maglev and Turbofan targets. Also move one
tracing function to tiering-manager. We may want to move all
--trace-opt code into one place in the future (it's currently split
between here and compiler.cc).

Bug: v8:7700
Change-Id: I9756460124b14fc3213296d083071f338421966a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3500612
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Auto-Submit: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79332}
2022-03-02 15:25:22 +00:00
Seth Brenith
c2fa5fccb1 Use outer language mode when storing streamed script in isolate cache
Currently, a streamed script which specifies 'use strict' is stored in
the isolate script cache with a key indicating that it is strict mode.
However, the keys should be based on the context executing the script,
not the content of the script, so that the next lookup can find the
entry without having to parse the script first.

Bug: v8:12668
Change-Id: Iaa76c00c431ad54a86ffd18b61cb4f67dc457b03
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3498220
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Seth Brenith <seth.brenith@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#79331}
2022-03-02 15:01:29 +00:00
Omer Katz
6c3d4ddd3e cppgc: Objects with prefinalizers should not reside on compactable
spaces.

Change-Id: I454c719519452f1c33a7a8b0b6393ed61c8f819d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3497742
Commit-Queue: Omer Katz <omerkatz@chromium.org>
Auto-Submit: Omer Katz <omerkatz@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79330}
2022-03-02 14:23:02 +00:00
Camillo Bruni
656675313c [tools] Improve system analyzer
Profiler:
  - Track profiler tick durations
  - Various speedups due to low-level hacking
Improve code-panel:
  - Better register highlighting
  - Added address navigation and highlighting
  - Removed obsolete inline source-view
Improve script-panel:
  - Keep current source position focused when showing related entries
  - Better tool-tip with buttons to focus on grouped entries per
    source postion
  - Focus by default on other views when showing related entries
Improve timeline-panel:
  - Initialise event handlers late to avoid errors
  - Lazy initialise chunks to avoid errors when zooming-in and trying to
    create tooltips at the same time


Change-Id: I3f3c0fd51985aaa490d62f786ab52a4be1eed292
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3492521
Reviewed-by: Patrick Thier <pthier@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79329}
2022-03-02 13:41:32 +00:00
Jakob Gruber
123c38a5aa [maglev] Basic tiering to Maglev
When --maglev is set, tier up to Maglev from unoptimized tiers based on
--interrupt-budget-for-maglev, initially set to 40KB (which should very
roughly by 1/10th of the time until the TF tierup decision is made).
On the first interrupt, a non-concurrent optimization to Maglev is
requested, which the next call to the marked function will perform.

- There is no support for tiering from Maglev to TF yet.
- Maglev's language support is minimal and tests are not expected to
  pass with --maglev.
- Disable --maglev by default for now.

Drive-by: fixes related to Maglev flag definitions.

Bug: v8:7700
Change-Id: I121bb3f4f3830fdd20e1d4a12d3e04f08a99be38
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3500302
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79328}
2022-03-02 13:35:32 +00:00
Michael Lippautz
7d4c264e0e Reland "heap: Force incremental marking in C++ only workloads"
This is a reland of commit 4fde332811

Most recent fix made Oilpan aware of --single-threaded-gc which
is necessary as GCs are more eagerly scheduled in tests.

Original change's description:
> heap: Force incremental marking in C++ only workloads
>
> ... when above a certain minimum threshold. This is to guard against
> memory running away in scenarios where the JS heap is empty and
> there's only high throughput C++ allocations that don't allow for a
> memory reducer GC to kick in.
>
> This logic should be revisited after Oilpan's young generation
> collector is implemented which may allow switching to a more efficient
> shrinking strategy for initial heap setup.
>
> Bug: chromium:1029379, chromium:1300028, chromium:1300492
> Change-Id: I93924fc2fe77d6226c29358d3afb1cc9d6fbf3b1
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3484319
> Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
> Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#79255}

Bug: chromium:1029379, chromium:1300028, chromium:1300492
Change-Id: Ia0c443248b951240cce6dbe1f68581ff1061a7d9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3500301
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79327}
2022-03-02 12:48:50 +00:00
Jakob Gruber
22bbb73dbf [tiering] Centralize the optimization decision
OptimizationDecision holds the optimization {reason, code kind,
concurrency mode}. We centralize it to avoid having to recalculate in
Optimize when we already know everything in ShouldOptimize.

Bug: v8:7700
Change-Id: Ifcd902e86f844ce045bcefd4ae72ac17b42acb3a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3500300
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Auto-Submit: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79326}
2022-03-02 11:08:32 +00:00
Jakob Gruber
5cdac4b8c4 [tiering] Centralize interrupt budget decisions
.. by moving them all to TieringManager.

Bug: v8:7700
Change-Id: I03eb2d1607b06ece84a1ca98ebc723788dbc0cde
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3500220
Auto-Submit: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79325}
2022-03-02 09:16:20 +00:00
v8-ci-autoroll-builder
9923a6c269 Update V8 DEPS.
Rolling v8/build: 27d089d..aabb6b9

Rolling v8/buildtools/linux64: git_revision:e3f114f46537152cfbdb553015518d1db1b812fd..git_revision:d7c2209cebcfe37f46dba7be4e1a7000ffc342fb

Rolling v8/buildtools/third_party/libunwind/trunk: 2ea265b..d1c7f92

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/2cfdaa8..d62cc7b

Rolling v8/third_party/depot_tools: 2bad9f0..a255e40

Rolling v8/tools/luci-go: git_revision:582e828c5a8aaf5cdd0ad1d5465fb9092b71eab8..git_revision:a1616e207f0d9c24beefe848ee899b7a73efcb70

Rolling v8/tools/luci-go: git_revision:582e828c5a8aaf5cdd0ad1d5465fb9092b71eab8..git_revision:a1616e207f0d9c24beefe848ee899b7a73efcb70

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

Change-Id: Ief20092d545bbd6f48d8dda10164832cb180810d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3499125
Commit-Queue: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Bot-Commit: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#79324}
2022-03-02 03:58:31 +00:00