Commit Graph

58450 Commits

Author SHA1 Message Date
Patrick Thier
3e40f8f091 Add check for class constructor to CallFunction
Raise an exception if CallFunction is invoked with a class constructor.
The check was initially removed in [1] but there are cases where we
could end in CallFunction with class constructors from optimized code.

[1] https://crrev.com/c/3186434

Bug: chromium:1271384
Change-Id: I0d700c4b1d117334c1c4c14719e24cd1f2c5e3a2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3291313
Commit-Queue: Patrick Thier <pthier@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/main@{#77967}
2021-11-18 12:44:10 +00:00
Tobias Tebbi
622dc9b7c2 [turbofan] fix type assertion for OtherUndetectable type
Undetectables are always callable in V8, so the previous type check
didn't make sense.

Bug: chromium:1267230
Change-Id: Idb557bb05ee4c3b332d1fe61b40557122660261a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3291303
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#77966}
2021-11-18 11:48:26 +00:00
Manos Koukoutos
95c1647a45 [wasm] Update permitted calls in unrolled loops
We prevent unrolling of loops with indirect calls. We expand the set of
permitted wasm builtins in unrolled loops.

Bug: v8:11298
Change-Id: I70b8ff3b16d9b0d3a4ea2d103f8ffb74083fd2a9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3289152
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/main@{#77965}
2021-11-18 11:39:06 +00:00
Paolo Severini
9c8741567d [wasm][turbofan] Disable inlining of JS->Wasm calls by default
Bug: chromium:1271456
Change-Id: Ie1a5e62b941a8ba3da9b75cfe28a194b214df15e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3290583
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#77964}
2021-11-18 10:38:26 +00:00
Marja Hölttä
f6c15e1f22 [web snapshots] Fix error reporting
We have 4 different cases:
1) Explicit web snapshots (--web-snapshot) & errors in the snapshot
2) Explicit web snapshots & errors in the embedded script
3) Auto-detected web snapshots (--experimental-web-snapshots) & errors
in the snapshot
4) Auto-detected web snapshots & errors in the embedded script

Before this CL: cases 2 & 4 resulted in a DCHECK failing and the error
in case 3 wasn't reported correctly.

This CL implements consistent error reporting for all of them.

Bug: v8:11525
Change-Id: If2e5039d9769b9cad2175dfd5c4f91edf61111ae
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3277877
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/main@{#77963}
2021-11-18 10:25:38 +00:00
Patrick Thier
c0756abf29 [turbofan] Extend Type system BitsetType to 64 bit.
Extend BitsetType of TF's type system from 32 to 64 bit.
At the moment all 32 bits are used, so we can't add any new types.
This CL only adds support for > 32 types to C++. The bitset is also
mirrored in Torque. In the Torque definition, we just expose an
unstructured uint32 for the higher bits of the bitfield, because Toruqe
can't deal with 64 bit types on 32 bit platforms (yet) and we also can't
have multiple 1-bit bitfields within a single class (yet).

Bug: v8:12392, chromium:1262750
Change-Id: If571491443e86e4e47eb88d3f15eca485344d12d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3281922
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Patrick Thier <pthier@chromium.org>
Cr-Commit-Position: refs/heads/main@{#77962}
2021-11-18 10:02:56 +00:00
Shu-yu Guo
bb0f74d336 [heap] Support AllocationType::kSharedOld in LocalHeap and LocalFactory
This is in anticipation for sharing internalized and
in-place-internalizable strings across Isolates. When such strings are
shared, background compilation threads need to be able to allocate
strings in the shared old space.

Bug: v8:12007
Change-Id: I93179c9674cc16e5a6125049d20e61495bc1f3a9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3283615
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Commit-Queue: Shu-yu Guo <syg@chromium.org>
Cr-Commit-Position: refs/heads/main@{#77959}
2021-11-18 01:34:08 +00:00
Ng Zhi An
9151e2bcc7 [wasm-relaxed-simd][arm64] Implement relaxed lane select
We move the mask to be the first input of the node in wasm-compiler.cc,
this matches the order for S128Select, which makes code-gen for
arm/arm64 simpler (directly lower to BSL with no more shuffle of
inputs). This requires tweaking of input indices in the instruction
selector for ia32/x64, but no change in codegen.

Bug: v8:12284
Change-Id: I1f6f1a9fe0869509be77f77b6f54a0c636a0f92d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3272640
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Cr-Commit-Position: refs/heads/main@{#77958}
2021-11-18 00:07:47 +00:00
jiepan
7187ae4750 [x64] Implement 256-bit assembler for v(p)blendv*
Bug: v8:12228
Change-Id: I9f7bb60fb2647f44c41c8c9e35a534ecd60c426a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3289150
Reviewed-by: Zhi An Ng <zhin@chromium.org>
Commit-Queue: Jie Pan <jie.pan@intel.com>
Cr-Commit-Position: refs/heads/main@{#77957}
2021-11-18 00:01:37 +00:00
Ng Zhi An
9fc11f9163 [cleanup] Rename RelocInfo::NONE to RelocInfo::NO_INFO to fix -Wshadow
NONE clashes with the PropertyAttributes::NONE, which is defined in
v8::internal namespace. PropertyAttributes have too many call sites
and depend on using the enums as masks, making it hard to convert
to an enum class. So we are changing the name instead.

Bug: v8:12244
Change-Id: Iec0be12c626549cca137aceeaee0e30fafab8b05
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3284003
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Cr-Commit-Position: refs/heads/main@{#77956}
2021-11-17 19:11:40 +00:00
Ng Zhi An
7610dca4af [ia32] Introduce vinstr helper that takes a VectorLength
fma_instr is now no longer required

Change-Id: Iab47aa6afcc53c78acf15c7ab71f6b9ba45263c8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3286003
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/main@{#77955}
2021-11-17 18:36:41 +00:00
Ng Zhi An
b2dee3510f [cleanup] Make IcCheckType an enum class
Fixes -Wshadow warnings for ELEMENT.

Bug: v8:12244,v8:12245
Change-Id: Ic3dfa96b44fc18f0db10752639a54aeca324667c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3276928
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/main@{#77954}
2021-11-17 16:41:00 +00:00
Michael Lippautz
048092586b heap: Fix monolith build
Fix monolith build complaning about used implicit copy ctor when copy
operator is explicitly defined.

Bug: v8:12402
Change-Id: Iec30882af1c825c277a2e538400c85348daa6301
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3289624
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Auto-Submit: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#77951}
2021-11-17 15:25:41 +00:00
Clemens Backes
3be28afbb9 [wasm] Include source URL in tracing
For streaming compilation, include the source URL in tracing, to
help identifying problems with caching.

R=ahaas@chromium.org

Change-Id: Iefda71890024a4fc9ec933c34c5870ba697bbff9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3289148
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#77950}
2021-11-17 14:10:02 +00:00
Milad Fa
ae569cf877 PPC/s390: Update comments about argument count in interface descriptors
Port 2e955523d1

Original Commit Message:

    Comments in interface-descriptors stated that the argument count is
    without the receiver, which is no longer true (see [1]).

    [1] https://crrev.com/c/3140608

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

Change-Id: I1bbce6672f19a3e508676e4b23cf9910542cbb21
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3285407
Reviewed-by: Patrick Thier <pthier@chromium.org>
Reviewed-by: Joran Siu <joransiu@ca.ibm.com>
Commit-Queue: Milad Fa <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/main@{#77949}
2021-11-17 14:01:02 +00:00
Michael Lippautz
62a0841b9a cppgc: Gracefully finish running GC on ~Heap
Change-Id: I38cd955d3e41861d955c529ec56890b45effccf0
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3284897
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Omer Katz <omerkatz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#77948}
2021-11-17 13:37:32 +00:00
Tobias Tebbi
6181ce59fc [builtins] add Torque fast-path for String.prototype.localeCompare
This fast path works for ASCII-only strings and is similar to the
existing fast-path in C++. Important differences:
- The locale check is done at Turbofan optimization time instead of
  at runtime
- Use tables of size 256 instead of 128 to save a bounds-check when
  handling one-byte strings.
- It first performs an equality check that's optimized for detecting
  inequality quickly by comparing the strings from both ends. If the
  equality check succeeds, we are done. Otherwise chances are high
  that the strings differ according to collation level L1 already.
  Therefore, we first do an L1 check and perform the L3 check
  only when L1 didn't find a difference. This is based on the assumption
  that few strings are identical except for different capitalization.
- Use the Torque version of string flattening instead of the runtime
  version.

Bug: v8:12196
Change-Id: I2d043c1138846783f6d567b736d34063ba9301e5
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3268465
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#77946}
2021-11-17 12:55:13 +00:00
Leszek Swirski
85ab0ad778 Reland "[runtime] Reset clobbered argument in DefineClass"
This is a reland of 9b5f398554

Reland fixes:
 * Store a Handle instead of a raw pointer in the scope, to make sure
   the saved object stays alive.

Original change's description:
> [runtime] Reset clobbered argument in DefineClass
>
> The caller of DefineClass may not expect its arguments to be mutated, so
> add an arguments mutation scope which resets the argument clobbered by
> DefineClass.
>
> Bug: chromium:1268738
> Change-Id: I03e9cd82535ca1f83353012a92e80f822566e64e
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3283077
> Auto-Submit: Leszek Swirski <leszeks@chromium.org>
> Commit-Queue: Igor Sheludko <ishell@chromium.org>
> Reviewed-by: Igor Sheludko <ishell@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#77921}

Bug: chromium:1268738
Change-Id: I934ba2063bf2b0e66a3c42f274419ddd178e4b54
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3289146
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/main@{#77945}
2021-11-17 12:03:32 +00:00
Jakob Kummerow
05813641db [wasm-gc] Enable speculative inlining when GC is enabled
This makes --experimental-wasm-gc imply --wasm-speculative-inlining,
which in turn implies --wasm-inlining and --wasm-dynamic-tiering as
prerequisites.
The former implication is weak, i.e. can be overridden on the command
line.

Bug: v8:7748
Change-Id: Iedc7c9916947f26e17bdd29dbf3b413dbaa05e6c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3275571
Reviewed-by: Manos Koukoutos <manoskouk@chromium.org>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/main@{#77944}
2021-11-17 12:00:32 +00:00
Manos Koukoutos
f6edda0987 [wasm] Run Int64Lowering on inlined code
On 32-bit architectures, we need to run Int64Lowering on the inlinee
code to make it compatible with the caller code.
Since Int64Lowering now runs while a GraphReducer is active, only one of
them can use node marks to store node states. Therefore, we move the
Int64Lowering node states to an internal map.

Bug: v8:12166
Change-Id: I53b85442d503e71fa533e06568f4b9db572a4401
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3283072
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#77941}
2021-11-17 11:08:32 +00:00
Kim-Anh Tran
f74ea020d5 [bytecode-generator] Move source code position for classes
Move the source code position for classes to the point where the block
context has already been created. Previously, there would be a mismatch
between the context and the scope when using the ScopeIterator.

We paused at a point where, according to the source position, we already
are in a class scope, but according to the bytecode (context), we would
not yet have created the block context for the class.


Also-by: leszeks@chromium.org, jarin@chromium.org
Fixed: chromium:1259878
Change-Id: I58b84f4dcfa8c4f51e16812c7a8caa21da99f262
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3284887
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Patrick Thier <pthier@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Kim-Anh Tran <kimanh@chromium.org>
Cr-Commit-Position: refs/heads/main@{#77940}
2021-11-17 09:40:32 +00:00
Andreas Haas
83c3489d3d [wasm] Cleanup Callback removal
The changes were requested in https://crrev.com/c/3264288 after the CL
landed.

R=clemensb@chromium.org

Bug: v8:12289
Change-Id: I863c7253ffb28ac878f5f91f24d6d1f0236da9a4
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3285405
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/main@{#77939}
2021-11-17 08:53:24 +00:00
Lu Yahan
436e236c41 [riscv64][wasm] Add f64x2 neg/mul/lt/le for wasm
And refactoring simd instr in code-generator
Bug: v8:11976

Change-Id: If5292e9e205374280ec5c86a481649078e348a80
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3274593
Commit-Queue: ji qiu <qiuji@iscas.ac.cn>
Reviewed-by: ji qiu <qiuji@iscas.ac.cn>
Cr-Commit-Position: refs/heads/main@{#77936}
2021-11-17 03:01:27 +00:00
Ng Zhi An
c846b290c8 [heap] Change MarkingTreatmentMode to an enum class
This fixes a -Wshadow warning with an inline enum in regexp-compiler.cc.

Bug: v8:12244,v8:12245
Change-Id: I8b53a94a1945addb958b230abe01b10d4533edae
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3285732
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/main@{#77935}
2021-11-17 00:01:12 +00:00
Ng Zhi An
04527796fa [ia32][x64][cleanup] Clean up disassembly of fma instructions
Declare more macro lists to split up W0 and W1, then disassemble using
the macro lists.

Change-Id: I4a73c24ea63c5a7b7489b81ee5ec7026c1765091
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3270598
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/main@{#77934}
2021-11-16 19:36:39 +00:00
Ng Zhi An
2a12753c2b [ia32][wasm-relaxed-simd] Implement qfma qfms
Implement f32x4.qfma, f32x4.qfms, f64x2.qfma, f64x2.qfms.

These were already implement in macro-assembler-x64, so move the
implementation to shared-macro-assembler.

x64 has a macro list in fma-instr, copy this to ia32, and then use this
macro list to define existing vfma{ss,sd} instructions in
assembler-ia32.

Disassembly support is intentionally omitted in this patch, I will add
this in a follow-up. The currently disassembly in x64 is quite verbose
and I would like to make use of macro-list but it requires breaking up
the macro list into smaller parts, so I will do that refactoring for
both ia32 and x64 in the follow-up.

Bug: v8:12284
Change-Id: I3654ea108a123467506c5837072b6b63ecbc74da
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3255664
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/main@{#77932}
2021-11-16 18:56:19 +00:00
Ng Zhi An
ef8e3e45c9 [cleanup][codegen] Fix -Wshadow warnings
These helper macros declare the same variable (asm_code_comment),
when used in 2 scopes (one inside another), we get a shadow variable.
In all the current usages, we always have a ASM_CODE_COMMENT in
the outer scope (which adds a comment with the function name),
and in the inner scope uses a string. It is sufficient to fix these
cases by giving the first case (function name) a different variable
name.

Bug: v8:12244,v8:12245
Change-Id: Ib23d9796f10937f27ce29913c0fa648501edbda8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3283620
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/main@{#77930}
2021-11-16 18:14:36 +00:00
Ng Zhi An
10b36d8c2f [cleanup][objects] Make FunctionKind an enum class
Bug: v8:12244,v8:12245
Change-Id: Id74afa611b2b8556ef86c715497b6daddc8ea7a0
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3276931
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Omer Katz <omerkatz@chromium.org>
Reviewed-by: Marja Hölttä <marja@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/main@{#77928}
2021-11-16 16:18:28 +00:00
Ng Zhi An
224f22153d [diagnostics] Remove redundant DisallowGarbageCollection
And fixes a -Wshadow warning too.

Bug: v8:12244,v8:12245
Change-Id: I940600c21c81fd757794dc934eaf6e918d058bc8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3283621
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/main@{#77927}
2021-11-16 16:12:58 +00:00
Ng Zhi An
9b13ecd57f [cleanup] Make an enum class CodeReference::Kind
Bug: v8:12244,v8:12245
Change-Id: I5b412b18df312eeb46a9af954acfa65fb403929e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3284007
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/main@{#77926}
2021-11-16 16:05:11 +00:00
Camillo Bruni
afb49bae49 [flags] Improve flag to verify and create snapshot checksums
- Rename --skip-snapshot-checksum to --verify-snapshot-checksum to
  avoid double negations in most of the code
- Conditionally create and verify checksums in SerializedCodeData
- Remove unused Deserializer::GetChecksum

Bug: chromium:1270752
Change-Id: I8360e0dd5f25dac68bf68909155771b302184a4b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3284883
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/main@{#77925}
2021-11-16 15:06:37 +00:00
Nico Hartmann
6ffcdddbc2 Revert "[runtime] Reset clobbered argument in DefineClass"
This reverts commit 9b5f398554.

Reason for revert: https://ci.chromium.org/ui/p/v8/builders/ci/V8%20Linux64%20GC%20Stress%20-%20custom%20snapshot/39804/overview

Original change's description:
> [runtime] Reset clobbered argument in DefineClass
>
> The caller of DefineClass may not expect its arguments to be mutated, so
> add an arguments mutation scope which resets the argument clobbered by
> DefineClass.
>
> Bug: chromium:1268738
> Change-Id: I03e9cd82535ca1f83353012a92e80f822566e64e
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3283077
> Auto-Submit: Leszek Swirski <leszeks@chromium.org>
> Commit-Queue: Igor Sheludko <ishell@chromium.org>
> Reviewed-by: Igor Sheludko <ishell@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#77921}

Bug: chromium:1268738
Change-Id: I878bd78f8ed265c18cd01e3105a69c8a8f876208
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3284886
Owners-Override: Nico Hartmann <nicohartmann@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Commit-Queue: Nico Hartmann <nicohartmann@chromium.org>
Cr-Commit-Position: refs/heads/main@{#77924}
2021-11-16 13:58:29 +00:00
Leszek Swirski
f5d6ace664 [interpreter] Fix register printing for short Star
Register printing under --trace-ignition used register operands to
decide which register to print. But, for short Star bytecodes (Star1,
Star2, etc) the register is implicit in the bytecode. Add support for
these.

Change-Id: I788ffd729e251f2c8795b5660ac773329502bb5e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3283071
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#77922}
2021-11-16 13:34:24 +00:00
Leszek Swirski
9b5f398554 [runtime] Reset clobbered argument in DefineClass
The caller of DefineClass may not expect its arguments to be mutated, so
add an arguments mutation scope which resets the argument clobbered by
DefineClass.

Bug: chromium:1268738
Change-Id: I03e9cd82535ca1f83353012a92e80f822566e64e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3283077
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/main@{#77921}
2021-11-16 13:22:04 +00:00
Igor Sheludko
df5efab1ed [ext-code-space] Fix code range allocation logic
Previously the code range could be allocated close but still outside
of the "short builtins call" region which would enforce copying of
builtins blob into the code range.
This CL ensures that the calculated hint address takes the required
base alignment into account and thus allocates the core range inside
of preferred region (see Isolate::GetShortBuiltinsCallRegion()).

Bug: v8:11880
Change-Id: I3cbd6a81501efd420063b963a8c4b5c328ae0785
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3283065
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/main@{#77919}
2021-11-16 09:19:24 +00:00
Igor Sheludko
579c3b0ff7 [heap][cleanup] Rename kWordAligned to kTaggedAligned
Also introduce USE_ALLOCATION_ALIGNMENT_BOOL constant which is true
only for those configurations that require aligned allocations and
use it for statically falling back to unaligned allocations on those
configurations that do not require aligned allocations.

This is a prerequisite for introducing the real kWordAligned mode for
kSystemPointerSize aligned allocations.

Bug: v8:8875
Change-Id: I155d12435f344324bc1bf19da88ee823c8f2ca6c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3283064
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/main@{#77918}
2021-11-16 09:14:24 +00:00
Lu Yahan
55cd86486a [riscv64] Move template into non-namespace scope
Fix node build failed


Change-Id: I3f465bcdaa17b0f1a6c497e9ab5ef9e50cbe5017
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3281721
Reviewed-by: ji qiu <qiuji@iscas.ac.cn>
Commit-Queue: ji qiu <qiuji@iscas.ac.cn>
Cr-Commit-Position: refs/heads/main@{#77917}
2021-11-16 08:31:55 +00:00
Milad Fa
85a85cf092 AIX: workaround the aix FP glibc bug
Due to a bug on AIX, some of the glibc FP functions do not
preserve the sign bit when a negative input is passed by
value and the output is rounded to 0:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97086

This CL continue the fixes previously added here:
https://crrev.com/c/2468618

Change-Id: I2afa1f67ac1d29ec0606de6d6ebcf05be0664b8d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3282308
Reviewed-by: Zhi An Ng <zhin@chromium.org>
Commit-Queue: Milad Fa <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/main@{#77915}
2021-11-16 03:23:24 +00:00
Ng Zhi An
6c6a602451 [regexp] Fix -Wshadow warnings
Bug: v8:12244,v8:12245
Change-Id: I38c9a767bd17f76bbf269ad79adc6798d94753a2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3273529
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/main@{#77914}
2021-11-15 22:33:43 +00:00
Ng Zhi An
1033ab21a0 [objects] Fix -Wshadow warnings
Bug: v8:12244,v8:12245
Change-Id: I1cf8425c213b1ba83df53c4b362bf4d3d7f22de8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3276923
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/main@{#77913}
2021-11-15 22:09:23 +00:00
Ng Zhi An
fb4b1efd1c [heap] Fix -Wshadow warnings
Bug: v8:12244,v8:12245
Change-Id: I5eb07a60881db655ea70dc83189ed1a0447f0bea
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3278688
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/main@{#77912}
2021-11-15 22:00:04 +00:00
Ng Zhi An
c25070c2a1 [cleanup] Fix some -Wshadow warnings
Bug: v8:12244,v8:12245
Change-Id: Icfdf2666220ac06c01b6220b4ac99b9ad00818dc
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3278687
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/main@{#77911}
2021-11-15 19:48:29 +00:00
Ng Zhi An
6577c5e9e2 [builtins][date] Fix -Wshadow warnings
Bug: v8:12244,v8:12245
Change-Id: I5fdc754432c7f619f4a32f92eb2da81beb23e8ce
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3278689
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/main@{#77910}
2021-11-15 19:46:43 +00:00
Frank Tang
8bcb3f57b5 Reland "[cleanup] Remove harmony-intl-dateformat-day-period"
This is a reland of 5e041b8269

Original change's description:
> [cleanup] Remove harmony-intl-dateformat-day-period
>
> harmony-intl-dateformat-day-period is shipped in M92
>
> Bug: v8:12109
> Change-Id: I7d24463c0cc353c4baf52326159beb04592b81b5
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3099087
> Reviewed-by: Shu-yu Guo <syg@chromium.org>
> Commit-Queue: Frank Tang <ftang@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#76468}

Bug: v8:12109
Change-Id: Iff4a9c706d0b0092f077d67e4e840292bd8024a9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3276921
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/main@{#77909}
2021-11-15 19:38:18 +00:00
Milad Fa
c8b918f6f1 PPC/S390: Argument Count Consistency
Port: 255aaed95b

Original Commit Message:

   The receiver is now always included in the actual argument
   count and the formal parameter count.
   kDontAdaptArgumentsSentinel is changed from UINT16_MAX to 0
   to preserve the maximum allowed declared parameters.
   The build flag activating the changes is not set for any
   architecture yet.

Bug: v8:11112
Change-Id: Ib106775014a886da80684dcb83ed704bb898a244
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3271635
Reviewed-by: Junliang Yan <junyan@redhat.com>
Reviewed-by: Patrick Thier <pthier@chromium.org>
Commit-Queue: Milad Fa <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/main@{#77907}
2021-11-15 19:32:33 +00:00
Ng Zhi An
bb9766450d [objects] Make PropertyKind an enum class to fix -Wshadow
Bug: v8:12244,v8:12245
Change-Id: I3029cfb8e9afdcb5e53aa406359aa7246c23ea40
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3274021
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/main@{#77906}
2021-11-15 19:05:14 +00:00
Dominik Inführ
ac48648715 [heap] Handle new_space() in Heap LAB methods
Let Heap::MakeHeapIterable() and Heap::FreeLinearAllocationAreas() also
handle the new space to be more uniform between spaces. Also removes
Heap::EnsureFillerObjectAtTop() in favor of
NewSpace::MakeLinearAllocationAreaIterable().

Bug: v8:10315
Change-Id: I7d28c1e95e433c4bc5a4a1a1f3aa8d71c43b8887
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3281926
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#77905}
2021-11-15 17:28:13 +00:00
Samuel Groß
33381ffdbf Allow customizing the RegionAllocator's split and merge operations
This change allows clients of the RegionAllocator to provide callbacks
that are invoked when regions are split or merged.
This will later be needed on Windows when a RegionAllocator is used to
manage a placeholder mapping as these need to be split and merged (using
the VirtualFree API) as well.


Bug: chromium:1218005
Change-Id: I228b41bdb43c4a9ef0db04de9b121dea6b5f12f9
Cq-Include-Trybots: luci.v8.try:v8_linux64_heap_sandbox_dbg_ng
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3264287
Commit-Queue: Samuel Groß <saelo@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#77903}
2021-11-15 13:59:14 +00:00
Liu Yu
5ee6b7a701 [loong][mips][regexp] Fix stack growth for global regexps
Port commit 3e3a027da1

Beside, some registers are changed to callee-saved, and the previous
related save and restore operations are removed.

Bug: v8:11382

Change-Id: Ic3161f8173771c1b7c190c77cbaf2534f52ec422
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3281673
Reviewed-by: Zhao Jiazhong <zhaojiazhong-hf@loongson.cn>
Commit-Queue: Zhao Jiazhong <zhaojiazhong-hf@loongson.cn>
Auto-Submit: Liu yu <liuyu@loongson.cn>
Cr-Commit-Position: refs/heads/main@{#77902}
2021-11-15 12:48:04 +00:00
Dominik Inführ
5f20156341 [heap] Sweep code pages only on the main thread
Code pages need to be swept on the main thread for now. Originally this
was done to prevent RWX on code pages, but there might be more other
smaller issues like the linked bug. Most likely this restriction isn't
a problem for concurrent SP at the moment, so stick with this
invariant for now.

Bug: chromium:1269558, v8:12054
Change-Id: Icf7a7ce9714b9ef07b1a5070f0b0dd963b6d3011
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3279682
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#77901}
2021-11-15 12:45:13 +00:00