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}
This reverts commit 5a7c5879da.
Reason for revert: The build time improved since we compile only
the d8 target now and removed the packaging step from the v8 recipe.
Original change's description:
> Revert "Activate is_offcial_build option for perf builders"
>
> This reverts commit b3c6e1acc1.
>
> Reason for revert: The build time incresed significantly. We want to investigate if we can reduce it by removing the 'packaging' step.
>
> Original change's description:
> > Activate is_offcial_build option for perf builders
> >
> > Bug: v8:9898
> > Change-Id: I41e1fcb37755906e29e6937b805cfb3018e90438
> > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1888937
> > Reviewed-by: Michael Achenbach <machenbach@chromium.org>
> > Commit-Queue: Liviu Rau <liviurau@chromium.org>
> > Cr-Commit-Position: refs/heads/master@{#64640}
>
> TBR=machenbach@chromium.org,tmrts@chromium.org,liviurau@chromium.org
>
> Change-Id: Ifbae1d7aedbfb7e4f7622c5a2bec74bc2f06e7f6
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: v8:9898
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1890092
> Reviewed-by: Michael Achenbach <machenbach@chromium.org>
> Commit-Queue: Liviu Rau <liviurau@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#64645}
TBR=machenbach@chromium.org,tmrts@chromium.org,liviurau@chromium.org
# Not skipping CQ checks because original CL landed > 1 day ago.
Bug: v8:9898
Change-Id: I02ec32d0832059a2d85199ef3a1940194f7d266a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1900450
Commit-Queue: Liviu Rau <liviurau@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64792}
The new APIs are:
enableRuntimeCallStats
disableRuntimeCallStats
getRuntimeCallStats
The RunTime Call Stats are collected per isolate.
Change-Id: I7e520e2c866288aa9f9dc74f12572abedf0d3ac8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1881601
Commit-Queue: Peter Kvitek <kvitekp@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64784}
This removes the feature that we log precise information about
functions and scripts in "v8.compile", since it comes at a
significant cost and is not going to be used anytime soon. If
we ever decide that we need this, we will have to come up with
a cheaper way of doing this.
Fixed: v8:9874
Tbr: yangguo@chromium.org
Bug: v8:8598, v8:9039, v8:9325, v8:9874
Change-Id: I3481570b6fda2a050f05d2ae84cf3e9245f67d52
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1898652
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64783}
In backing-store.cc, define GetGuardedRegion(), which is only used on
64-bit, only when V8_TARGET_ARCH_64_BIT evals to true. Then add
GetRegion(), which returns the appropriate region depending on whether
guards are enabled or not, and use it to simplify the only caller to
GetGuardedRegion().
Similarly, define |kFullGuardSize| as 64-bit only, and add
GetReservationSize() to only access |kFullGuardSize| when appropriate on
64-bit platforms.
Change-Id: Iefae7969a6138118d466a9d48e0ea62d94ff07f3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1899547
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64782}
At the end of scavenge, the GC iterates all pages to search for empty
buckets and free them. With this CL the scavenger marks buckets
(and their corresponding pages) that were empty to reduce work.
After finishing scavenging the GC only needs to revisit those marked
buckets.
Unlike (minor) mark-compact, the scavenger can't directly free those
buckets, since the evacuation and pointer updating-phases are
not separated.
Right now the pages are processed sequentially but this could be
parallelized in a subsequent CL.
Change-Id: I47ed8c0e952b06c5d960e39a6f38e745d5618656
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1889884
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64781}
Especially on ia32 and x64, shifts with immediate generate much shorter
and more efficient code.
R=jkummerow@chromium.org
Bug: v8:9919
Change-Id: I33acf287d5eb6fc5c4d39a295f410557348a4f19
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1899770
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64780}
The {shrd} instruction was implemented with switched {src} and {dst}
registers. The only users ({ShrPair} and {SarPair}) "fixed" this by
passing switched registers again.
This CL cleans this up, and adds some DCHECKs that are required for the
logic in the pair-wise shifts to work correctly.
Also, avoid an unneccessary shift by 0 on ia32.
R=jkummerow@chromium.org
Bug: v8:9919
Change-Id: I8ec31526f5adcea68f6f6ef7c8076ac2e5589a5f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1899767
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64779}
Port d710756a7f
Original Commit Message:
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.
R=clemensb@chromium.org, joransiu@ca.ibm.com, jyan@ca.ibm.com, michael_dawson@ca.ibm.com
BUG=
LOG=N
Change-Id: I8965f4312c5e8ac6510c754772ba3d60394dfc4a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1899908
Reviewed-by: Junliang Yan <jyan@ca.ibm.com>
Commit-Queue: Milad Farazmand <miladfar@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#64778}
port 352bbb1https://crrev.com/c/1893192
Original Commit Message:
Reland "Reland: [builtins] Move non-JS linkage builtins code objects into RO_SPACE"
This is a reland of 855591a54d
Fixes break in builds that verify ReadOnlyHeap by relaxing the requirement for
Code objects to be in CODE_SPACE in PagedSpaceObjectIterator::FromCurrentPage.
Original change's description:
> Reland: [builtins] Move non-JS linkage builtins code objects into RO_SPACE
>
> Reland of https://chromium-review.googlesource.com/c/v8/v8/+/1795358.
>
> [builtins] Move non-JS linkage builtins code objects into RO_SPACE
>
> Creates an allow-list of builtins that can still go in code_space
> including all TFJ builtins and a small manual list that should be pared
> down in the future.
>
> For builtins that go in RO_SPACE a Code object is created that contains an
> immediate trap instruction. Generally these Code objects are still no
> smaller than CODE_SPACE Code objects because of the Code object alignment
> requirements. This will hopefully be addressed in a follow-up CL either by
> relaxing them or removing the instruction stream completely.
>
> In the snapshot, this reduces code_space from ~152k to ~40k (-112k) and
> increases by the same amount.
>
> Change-Id: I76661c35c7ea5866c1fb16e87e87122b3e3ca0ce
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1893336
> Commit-Queue: Dan Elphick <delphick@chromium.org>
> Reviewed-by: Jakob Gruber <jgruber@chromium.org>
> Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#64700}
Change-Id: I58c10e438f164a992041960f7a54d57be500ef48
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1898831
Auto-Submit: Zhao Jiazhong <kyslie3100@gmail.com>
Reviewed-by: Bill Budge <bbudge@chromium.org>
Commit-Queue: Bill Budge <bbudge@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64776}
Currently there are two ways wasm locations are represented in the
inspector. This remains unchanged for now. Also, currently there are
multiple ways location is represented within V8, with the line number
sometimes being a function index and sometimes being 0, and the column
number being a byte offset which is sometimes function relative and
sometimes module relative. With this change, the line number is never
used within V8 (it is always 0), and the column number is always a
byte offset from the beginning of the module. This simplifies
translation logic and keeps it in one place, and will simplify future
changes to wasm location representation in the inspector API.
Bug: chromium:1013527
Change-Id: I8813d47c881988f9ab49d7529fb81fe10dbbccff
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1886915
Commit-Queue: Eric Leese <leese@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64774}
The deopt-stress mode is unused. This prepares for deprecating
corresponding api methods.
The same kind of testing can be done by using --stress-opt and
setting --deopt-every-n-times.
Bug: v8:9941
Change-Id: I6796fcfa43d0efad51ec9d9a9adc949c26805a81
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1899617
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64772}
Also tnodifies TransitionElementsKind, StoreMap and
LoadStringLengthAsSmi in code-stub-assembler.cc.
Bug: v8:9810, v8:6949
Change-Id: If7214f0a9645adc9d478fd4f7cb1257c0e01608c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1897888
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Mythri Alle <mythria@chromium.org>
Reviewed-by: Santiago Aboy Solanes <solanes@chromium.org>
Commit-Queue: Dan Elphick <delphick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64770}
When running the tests with --turbo-stress-instruction-scheduling, there are
crashes in the cases where there is no isolate, since we used the random
generator from the isolate. This change introduces a RandomNumberGenerator to
the instruction scheduler instead.
We use the value from --random-seed for seeding the random number generator.
We don't treat a zero value specially, as the feature is meant to be used with
the test system which always sets a random seed and doesn't rely on default
behaviour. This also means that the instruction scheduler will always produce
the same result for the same input within the same run, which fixes another
issue with the x64 jump optimisation: when that optimisation is enabled, the
backend is ran twice, and previously it was producing a different schedule
each time, thus collecting incorrect jump information.
Bug: v8:9884
Change-Id: I00394a7e50d0c502254b18490ebaf28a38d8f819
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1895555
Reviewed-by: Georg Neis <neis@chromium.org>
Commit-Queue: Georgia Kouveli <georgia.kouveli@arm.com>
Cr-Commit-Position: refs/heads/master@{#64769}
We were using 'strtoll' which returns a signed integer, we should have used
'strtoull' instead.
Change-Id: Ie2e48ecc1fa58cff4b61fcea30087608769a80bb
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1893333
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Pierre Langlois <pierre.langlois@arm.com>
Cr-Commit-Position: refs/heads/master@{#64765}
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.
R=jkummerow@chromium.org
Bug: v8:9919
Change-Id: Ie7a79a46e91726e15379b9a21b59775bbf5de556
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1895569
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64764}
Instead of inferring allow_codegen from the state of MaybeLocal<String>, return it separately. This allows to distinguish "could not stringify this object" from "block execution of this object", regardless of whether the object is a string or not. Currently, the hook can trigger an EvalError only if the original source was a string.
Modify the logic so that one of the three mechanisms (unconditional, non-modifying, modifying) decides alone. Before, if the non-modifying callback rejected a value, the value would be forwarded to the modifying callback, but the unconditional would not forward to the non-modifying callback. This introduces a more uniform behaviour where the three mechanisms act in decreasing priority.
Change-Id: Iaaa9873227052653d714df65f31c4de914f48b7d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1776082
Reviewed-by: Yang Guo <yangguo@chromium.org>
Reviewed-by: Daniel Vogelheim <vogelheim@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Stefano Sanfilippo <ssanfilippo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64763}