This CL fixes the lengths of the console dir() and table() methods to
match the WHATWG Console Standard and the IDL WPTs.
R=mathias@chromium.org
Bug: chromium:948678
Change-Id: I2c603e202a3e5995eec06dadac09807f76ee9167
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1902968
Reviewed-by: Mathias Bynens <mathias@chromium.org>
Commit-Queue: Dominic Farolino <dom@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64840}
port 42e8c23https://crrev.com/c/1899770
Original Commit Message:
[Liftoff] Implement i64 shift with immediate
Especially on ia32 and x64, shifts with immediate generate much shorter
and more efficient code.
Change-Id: Ia7f20db8e3ed88efe8c09e4afc9dbadc8e3b0362
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1903289
Auto-Submit: Zhao Jiazhong <kyslie3100@gmail.com>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64838}
With this CL we prevent embedders to allocate backing stores that are
bigger than what can be handled by V8.
R=ulan@chromium.orgCC=jkummerow@chromium.org
Bug: chromium:1008840
Change-Id: Ifff5e14c42fbdae187283540a54ffbfeda935574
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1900455
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64837}
In the presence of default arguments, the body of the function gets
wrapped into another block. This caused our trailing-range-after-return
optimization to not apply, because the wrapper block had no source
range assigned. This CL correctly assignes a source range to that block,
which allows already present code to handle it correctly.
Note that this is not a real coverage bug; we've just been reporting
whitespace as uncovered. We're fixing it for consistency.
Originally reported on github.com/bcoe/c8/issues/66
Bug: v8:9952
Change-Id: Iab3905f558eb99126e0dad8072d03d0a312fdcd3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1903430
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64836}
Make every CEntry_* builtin except
CEntry_Return1_DontSaveFPRegs_ArgvOnStack_NoBuiltinExit
non-executable since they don't seem to be needed. The remaining one is
still required until Linkage::GetCEntryStubCallDescriptor is converted
to use CallBuiltinPointer.
Bug: v8:9338
Change-Id: Id1fcad95958ec3299328f7ed0e322ff2f766cfd4
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1897540
Commit-Queue: Dan Elphick <delphick@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64835}
Since the turbo_decompression_elimination flag is removed, there
are several methods in machine-type.h that get simplified, e.g
TypeCompressedTaggedPointer() can be replaced by just
"TaggedPointer()".
Also Removing the creation of Change to/from Compressed nodes.
Removing these Change nodes' logic is left to a follow-up CL.
Bug: v8:7703
Change-Id: Iff1f9aa8361189cf781a26317fd342b942fd5aa4
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1897537
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64834}
Start experiment to promote all young live objects during mark-compact.
The last CL https://crrev.com/c/1879938 got reverted because of a flaky
test, see v8:9192.
Change-Id: I16897f45fffeafbb7e70c21899976a4c026e69ba
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1903432
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64832}
Creates new APIs to get Shared Memory statistics like the size of
read-only space and potentially the memory used by shared array buffers.
Currently all shared memory statistics are zero.
Bug: v8:7464
Change-Id: Ib8d58f885beaa1d65ccef7b64dd4f3db4149bca3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1900465
Commit-Queue: Dan Elphick <delphick@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64831}
When --always-promote-young-mc is enabled, this test becomes more
flaky. Increase old space size, such that objects fit into the
old generation during mark-compact.
Bug: v8:9192
Change-Id: Iad3b914c7d5b7bafa752f3b6178684a137bd8dad
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1890101
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64830}
Reuse sweeping+free list allocation code from
SweepAndRetryAllocation in RawSlowRefillLinearAllocationArea.
Share code such that bugs like the linked one are less likely to
happen.
Bug: chromium:1020981
Change-Id: I0abfaa9f7a8f2b62ad24ca85774130f354104e93
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1901277
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64829}
This is a reland of 54379af9b0. Instead
of removing the limit completely, this limits to 128 parallel tasks
now. This avoids some special handling for the previous default value
of -1.
Original change's description:
> [wasm] Remove fixed limit on number of background tasks
>
> After fixing https://crbug.com/v8/8916, background compilation scales
> far beyond 10 threads, especially for TurboFan (where much more work is
> parallelizable). Thus, remove the limit of 10 background compilation
> tasks, and use all available threads instead.
>
> R=mstarzinger@chromium.org
>
> Bug: v8:8916
> Change-Id: I13c30777e3c85b2de7901b5eac3e6a41457a56f9
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1893348
> Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
> Commit-Queue: Clemens Backes <clemensb@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#64724}
Bug: v8:8916, chromium:1021442
Change-Id: Ie9a9368c74d26c4595c0e94e914b025e403daaa4
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1899991
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64828}
port d710756https://crrev.com/c/1895569
Original Commit Message:
[Liftoff] Implement i64 popcnt
This is the last remaining missing instruction from the MVP. This CL
adds support for ia32, x64, arm, and arm64.
For CPUs which do not support the POPCNT instruction, there exists a
fallback implementation in C.
Change-Id: I2ebc7bc93c2a915f21139248ac1234146a1e8cb9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1902887
Auto-Submit: Zhao Jiazhong <kyslie3100@gmail.com>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64827}
port 9c4ffc3https://crrev.com/c/1897539
Original Commit Message:
[Liftoff] Implement i32 shift with immediate
In fact, shifts are used most often with a fixed shift amount. This CL
adds special handling for this in Liftoff, to generate shorter and
faster code.
Change-Id: I71ae0013f88b928188e34a54da9ca93c617fd6e2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1902888
Auto-Submit: Zhao Jiazhong <kyslie3100@gmail.com>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64826}
Runtime of this test has improved since we initially skipped it. Let's
attempt unskipping on all non-debug builds.
Bug: v8:8411
Change-Id: I5d409f7359532e3d7d18f5b0a77765165478d44a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1903426
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Auto-Submit: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64825}
Lack of size information can cause debugging and observability tools to
misbehave or to fail. We can see the size for all builtins is zero with
objdump:
$ objdump -t d8 | grep Builtins_ArgumentsAdaptorTrampoline
0000000001084a00 l F .text 0000000000000000 Builtins_ArgumentsAdaptorTrampoline
^
Size is zero
Tools like bpftrace rely on the function size to guarantee a tracepoint
is added within function boundaries. Without size information, those
tools can't guarantee a tracepoint will be added safely.
Add .size directive for each builtin function, as described in
https://sourceware.org/binutils/docs-2.24/as/Size.html#Size, to fix this
issue. We can see with objdump that the size is properly set:
$ objdump -t d8 | grep Builtins_ArgumentsAdaptorTrampoline
00000000010bf820 l F .text 0000000000000140 Builtins_ArgumentsAdaptorTrampoline
R=bmeurer@chromium.org, hpayer@chromium.org, verwaest@chromium.org, yangguo@chromium.org
Change-Id: I4cd2b0a12b629498dd9d7465cc1002dda37028c7
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1898807
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64824}
The (age, context) pair has to be added atomically in to the weak
array of detached contexts. Otherwise, GC may happen after insertion
of age and observe inconsistent state.
Bug: chromium:1016703
Change-Id: Icb20bed4359904b2d976986a236558542e314bbf
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1895573
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64820}
Introduce new operator LoadTransform that holds a LoadTransformInfo param,
which describes the kind of load (normal, unaligned, protected), and a
transformation (splat or extend, signed or unsigned).
We have a new method that a full decoder needs to implement, LoadTransform,
which resuses the existing LoadType we have, but also takes a LoadTransform,
to distinguish between splats and extends at the decoder level.
This implements 4 out of the 10 suggested load splat/extend operations
(to keep the cl smaller), and is also missing interpreter support (will
be added in the future).
Change-Id: I1e65c693bfbe30e2a511c81b5a32e06aacbddc19
Bug: v8:9886
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1863863
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64819}
For now, both are implemented via a C call, just like i32_rol and
i32_ror. If they turn out to be critical for performance, we can still
implement them via hardware instructions on selected platforms.
R=jkummerow@chromium.org
Bug: v8:9919
Change-Id: I16affdfe397a08ef6a51d310f018b3a099e80e44
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1900454
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64816}
Now that builtins are embedded into the binary unconditionally, GC
visitation can be reduced. The interpreter dispatch table points
directly at embedded instruction starts. It is initialized once in
Isolate::Init, and its contents are immutable afterwards.
Visitation by GC is not needed.
Drive-by: Remove outdated comment on IsWasmRuntimeStub.
Bug: v8:7873
Change-Id: I14edc0beebb31c04f1429346b57ade9e8d838670
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1899773
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64814}
The separate download scripts for extra packages are going away and have been
replaced by update.py's new --package flag.
Bug: chromium:884608
Change-Id: I28f2f83a629a3fcda4a5524c10f9b10dd115e616
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1900462
Commit-Queue: Hans Wennborg <hans@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64813}
The test coverage in question is by now provided by a different set of
mjsunit tests, namely the "mjsunit/wasm/anyref-globals-interpreter"
suite which run all globals tests in --wasm-interpret-all mode.
R=ahaas@chromium.org
TEST=cctest/test-run-wasm-interpreter/ReferenceTypeLocals
Change-Id: I439b1ee74da3c36995bb3d5819e35d4074400868
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1901266
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64812}
There is at least one case where a Load output flows into an
In32LessThanOrEqual node without any bitcasts or truncations in the
middle. We have to consider these cases in the reducer.
Bug: v8:7703
Change-Id: I1ed9c41e80c0603fd287d096c3050c5ae27c2b3e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1879945
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64811}
Turbofan's instruction scheduling is currently only enabled for
mksnapshot and has thus little test coverage. This CL introduces two
new test variants, "instruction_scheduling" and
"stress_instruction_scheduling", and activates them on a selection of
bots.
Change-Id: I5917fc781e289377c58f584c770c91e31765b2de
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1899778
Auto-Submit: Georg Neis <neis@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Michael Stanton <mvstanton@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64807}
Previously we were only blocking verify_stub_graph and not
FLAG_turbo_verify_machine_graph. This led to failures when
FLAG_turbo_verify_machine_graph was active (e.g when it was set to
"*").
Change-Id: I27b53f0bc1b544498d1d182903301347e5669013
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1893339
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64806}
Bug: v8:9946
Change-Id: Ia7bde900a72d94e397ce0e19504a472a5c63f248
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1900453
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Auto-Submit: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64804}
Phis act as proxys: a phi's input has only 32 bits observed iff
the phi's output has only 32 bits observed. When the Tagged Phi
has only 32 bits observed, the Phi's MachineRepresentation
changes to the Compressed counterpart.
Also, update machine graph verifier so that Phis of Compressed
accept Tagged inputs as well.
Bug: v8:7703
Change-Id: I365d0b38f76edbaecbfea29f603abd2ce2224878
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1879943
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64802}
There already exists a optional boolean flag 'replMode' for the
'Runtime.evaluate' command. This CL ferries the flag from the inspector
to DebugEvaluate::Global.
The existing DebugEvaluate::GlobalREPL is removed in favor of a
the REPLMOde enum to reduce code duplication.
Bug: chromium:1018158
Change-Id: Iafb43a3015b6876a02ac0db6cdfcac2cfa388862
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1881149
Commit-Queue: Simon Zünd <szuend@chromium.org>
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64801}
The file contains testing features only used in d8. This CL prepares
deprecation and moves the logic into d8.cc.
Bug: v8:9941
Change-Id: I71de4cfd41d8f9fa209f936744cb170856365a6e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1899774
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Auto-Submit: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64800}
CompactionSpace::SweepAndRetryAllocation was sweeping the space
without clearing invalidated objects. CompactionSpace is only used
during collections, mark-compact needs invalidated objects in
swept memory to be removed.
Bug: chromium:1020981
Change-Id: Ib5b0edcdd841257cf66af6de8b6a3bf785e5c813
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1900452
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64798}
port e554dec [Liftoff] https://crrev.com/c/1893343
Original Commit Message:
These are two of the remaining missing instructions from the MVP.
This CL adds support to {LiftoffCompiler} and provides assembly
implementations for ia32, x64, arm, and arm64.
Change-Id: I9ebe177c4a8861c31f78af89d893cf9f2128b45b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1898832
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Auto-Submit: Zhao Jiazhong <kyslie3100@gmail.com>
Cr-Commit-Position: refs/heads/master@{#64797}
Currently, line number information is added to windows binaries as
DWARF data. This prevents windows tools like DUMPBIN from working,
as they don't expect to see DWARF segments. Any line number information
should be in the CodeView (PDB) format. This work is deferred until
later.
Bug: v8:9944, v8:9910
Change-Id: I87c950d9aaa543c1eb3356310289e99266f1565e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1900446
Reviewed-by: Michael Stanton <mvstanton@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Michael Stanton <mvstanton@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64795}
The bug is due to an unexpected opcode. To avoid similar issues in the future, we fallback to CheckContextExtensionSlowPath. This was the default behaviour before the CL (https://chromium-review.googlesource.com/c/v8/v8/+/1876051).
Bug: chromium:1020983
Change-Id: Ia7f0f2986ec0008d1128ad3856efbb5d9e52dfc6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1899989
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Auto-Submit: Victor Gomes <victorgomes@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64794}
Design doc: bit.ly/v8-repl-mode
This CL adds a new REPL mode that can be used via
DebugEvaluate::GlobalREPL. REPL mode only implements re-declaration
of 'let' bindings at the moment. Example:
REPL Input 1: let x = 21;
REPL Input 2: let x = 42;
This would normally throw a SyntaxError, but works in REPL mode.
The implementation is done by:
- Setting a 'repl mode' bit on {Script}, {ScopeInfo}, {ParseInfo}
and script {Scope}.
- Each global let declaration still gets a slot reserved in the
respective {ScriptContext}.
- When a new REPL mode {ScriptContext} is created, name clashes
for let bindings are not reported as errors.
- Declarations, loads and stores for global let in REPL mode are
now "load/store global" instead of accessing their respective
context slot directly. This causes a lookup in the ScriptContextTable
where the found slot for each name is guaranteed to be the same
(the first one).
Bug: chromium:1004193, chromium:1018158
Change-Id: Ia6ab526b9f696400dbb8bfb611a4d43606119a47
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1876061
Commit-Queue: Simon Zünd <szuend@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64793}