Commit Graph

59305 Commits

Author SHA1 Message Date
Hans Wennborg
d9186855f1 Use update.py --package= instead of download_lld_mac.py and download_objdump.py
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}
2019-11-06 15:13:09 +00:00
Michael Starzinger
125f727c72 [wasm][test] Remove obsolete TODO from interpreter cctest.
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}
2019-11-06 14:53:14 +00:00
Santiago Aboy Solanes
5f84573003 [ptr-compr] Add int comparison cases in DecompressionOptimizer
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}
2019-11-06 14:52:09 +00:00
Michael Achenbach
a892854610 [foozzie] Add instruction-scheduling stress to correctness-fuzzing experiments
NOTRY=true

Bug: v8:9946
Change-Id: If5b5470709edeaa13f7dea4ca83948e28356f352
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1901268
Reviewed-by: Georg Neis <neis@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64810}
2019-11-06 14:45:47 +00:00
Michael Starzinger
330445cee4 [test][x64] Test disassembly of indirect call again.
R=clemensb@chromium.org
TEST=cctest/test-disasm-x64/DisasmX64

Change-Id: I011d0d5e25c472c5a62ad73edd42165e55b34e2b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1900460
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64809}
2019-11-06 14:38:41 +00:00
Igor Sheludko
94a8519a9a [tests] Skip tests that timeouts with --force-slow-path pt.2
No-Tree-Checks: true
No-Try: true
Change-Id: Ic756f1716a9667f10970e35992db5399ed54cacc
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1901267
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64808}
2019-11-06 14:28:58 +00:00
Georg Neis
ed0dce9d2f [tests] Exercise Turbofan's instruction scheduling
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}
2019-11-06 14:21:54 +00:00
Santiago Aboy Solanes
1b010ba367 [turbofan] Block second jump optimization's machine graph verification
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}
2019-11-06 14:16:13 +00:00
Michael Starzinger
2679ebdc5f [wasm][test] Introduce separate test-api-wasm.cc file.
R=clemensb@chromium.org
TEST=cctest/test-api-wasm

Change-Id: I4f3c7e215304bd9b89bb7fd21cda06fa3a18abac
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1900458
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64805}
2019-11-06 14:11:43 +00:00
Georg Neis
b81a61631f Imply --turbo-instruction-scheduling by its stress mode flag
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}
2019-11-06 14:03:39 +00:00
Igor Sheludko
56dd1fec8b [tests] Skip tests that timeouts with --force-slow-path
No-Tree-Checks: true
No-Try: true
Change-Id: Ibf9af30908eac161827b77052582c5c8a86ce401
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1900463
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64803}
2019-11-06 14:02:33 +00:00
Santiago Aboy Solanes
c7a7ed22b3 [ptr-compr] Add Phi case in DecompressionOptimizer
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}
2019-11-06 13:19:41 +00:00
Simon Zünd
702f2bad8b Connect REPL mode to the V8 inspector
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}
2019-11-06 13:12:11 +00:00
Michael Achenbach
941afb6920 [test] Deprecate v8-testing.h
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}
2019-11-06 12:56:51 +00:00
Igor Sheludko
e309b2d995 [builtins] Port %TypedArray%.prototype.set to Torque
... in an uintptr friendly way.

Drive-by-fix:
1) IsForceSlowPath() check is integrated into Cast<FastJSArray>
2) disable tests incompatible with --force-slow-path in "slow_path" variant

Bug: v8:8906, v8:4153
Change-Id: I427f117073bc295120aa52fb3fe023ee04d58302
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1899988
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64799}
2019-11-06 12:51:21 +00:00
Dominik Inführ
d530395262 [heap] Fix clearing of invalidated objects during Mark-Compact
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}
2019-11-06 11:49:51 +00:00
Zhao Jiazhong
732fd6cdc9 [mips][Liftoff] Implement i64.clz and i64.ctz
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}
2019-11-06 10:22:34 +00:00
Michael Starzinger
8b3b3bdb16 [wasm] Use {SmallVector} in {WasmGraphBuilder::Return}.
R=clemensb@chromium.org

Change-Id: Idcbf3494849c1a359fab8ed72ad2a97626bf5212
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1899781
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64796}
2019-11-06 09:47:14 +00:00
Mike Stanton
849992652a [builtins] Don't emit line number info on Windows
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}
2019-11-06 09:32:29 +00:00
Victor Gomes
8534e52d41 [compiler] Fallback to slow path for any unexpected opcode in TryGetScopeInfo
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}
2019-11-06 09:31:24 +00:00
Simon Zünd
fbcc2e874d Introduce REPL mode
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}
2019-11-06 09:17:04 +00:00
Liviu Rau
38e59494e1 Reland "Activate is_offcial_build option for perf builders"
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}
2019-11-06 08:14:04 +00:00
Liviu Rau
a3da62c166 Whitespace change to trigger perf builders
NOTRY=true
NOTREECHECKS=true
NOPRESUBMIT=true

Bug: v8:9925
Change-Id: Iad460c70937545dd5b982f63593e186de95d7df1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1899624
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Liviu Rau <liviurau@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64791}
2019-11-06 05:52:16 +00:00
v8-ci-autoroll-builder
211b0688e4 Update V8 DEPS.
Rolling v8/build: 3a13923..7e1e30f

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/70d4ef3..1944f6e

Rolling v8/third_party/depot_tools: f6a2232..2150a69

Rolling v8/tools/clang: 35a0634..596e92a

TBR=machenbach@chromium.org,tmrts@chromium.org

Change-Id: I737a145eb557c9e8ec4ea87314e17d9d2252b8dd
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1900708
Reviewed-by: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Commit-Queue: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/master@{#64790}
2019-11-06 03:50:04 +00:00
Joshua Litt
31813fbf61 Revert "[hole-check-elimination] Simplest possible hole check elimination"
This reverts commit 10883f561a.

Reason for revert: Causes bytecode mismatch

Bug:chromium:1020538, chromium:1021457

Original change's description:
> [hole-check-elimination] Simplest possible hole check elimination
>
> doc: https://docs.google.com/document/d/1Y9uF3hS2aUrwKU56vGxlvEs_IiGgmWSzau8097Y-XBM/edit
>
> Bug: v8:7427
> Change-Id: Iedd36c146cefff7e6687fdad48d263889c5c8347
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1778902
> Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
> Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
> Reviewed-by: Toon Verwaest <verwaest@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#63913}

TBR=rmcilroy@chromium.org,leszeks@chromium.org,verwaest@chromium.org,joshualitt@chromium.org

Bug: v8:7427
Change-Id: Ib4369a3560e929692585c4546435684deae5ee9b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1899163
Commit-Queue: Joshua Litt <joshualitt@chromium.org>
Reviewed-by: Joshua Litt <joshualitt@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64789}
2019-11-05 22:22:54 +00:00
Ng Zhi An
b6edadc09b [wasm-simd] Implement f64x2 comparisons for arm
Bug: v8:9813
Change-Id: I716ed7c2802c38a4b4c8973db4e3bc50e16cec39
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1872930
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64788}
2019-11-05 22:05:54 +00:00
Ng Zhi An
92a5b3998d [wasm-simd] Implement i64x2 add sub mul for ia32
Bug: v8:9728
Change-Id: I6d8f096adc42a6d417f876d5805302b3bea3308b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1867381
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64787}
2019-11-05 22:01:54 +00:00
Milad Farazmand
91862a70e4 PPC/s390: [Liftoff] Implement i64 shift with immediate
Port 42e8c2310a

Original Commit Message:

    Especially on ia32 and x64, shifts with immediate generate much shorter
    and more efficient code.

R=clemensb@chromium.org, joransiu@ca.ibm.com, jyan@ca.ibm.com, michael_dawson@ca.ibm.com
BUG=
LOG=N

Change-Id: Iab474cdf6de91820e7f55ddd9a386efa03f03b6f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1899423
Reviewed-by: Junliang Yan <jyan@ca.ibm.com>
Commit-Queue: Milad Farazmand <miladfar@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#64786}
2019-11-05 20:20:24 +00:00
Joshua Litt
94890a0d46 [replaceAll] Implement String.prototype.replaceAll.
Implements TC39 String.prototype.replaceAll as a torque
builtin per the https://github.com/tc39/proposal-string-replaceall
proposal.

Note: matchAll changes were already added to V8 in https://chromium-review.googlesource.com/c/v8/v8/+/1846067

Bug: v8:9801
Change-Id: Ib8158eb39c854202d04710d6f9c33dcdd93fad93
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1877054
Commit-Queue: Joshua Litt <joshualitt@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64785}
2019-11-05 19:00:29 +00:00
Peter Kvitek
91c8be9599 [DevTools] Implemented DevTools protocol API to retrieve V8 RunTime Call Stats.
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}
2019-11-05 18:59:24 +00:00
Benedikt Meurer
cb51a13884 [tracing] Don't log precise script and function snapshots.
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}
2019-11-05 18:51:34 +00:00
Lei Zhang
721e3825b3 Fix 32-bit MSVC build.
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}
2019-11-05 18:46:14 +00:00
Dominik Inführ
add50f20f6 [heap] Avoid iterating all pages when freeing empty buckets
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}
2019-11-05 17:29:00 +00:00
Clemens Backes
42e8c2310a [Liftoff] Implement i64 shift with immediate
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}
2019-11-05 17:19:00 +00:00
Clemens Backes
5ca7840b87 [ia32] Fix register order on shrd
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}
2019-11-05 17:07:00 +00:00
Milad Farazmand
1472dc2e90 PPC/s390: [Liftoff] Implement i64 popcnt
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}
2019-11-05 16:35:50 +00:00
Milad Farazmand
a8052c9e0d PPC/s390: [Liftoff] Implement i32 shift with immediate
Port 9c4ffc3835

Original Commit Message:

    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.

R=clemensb@chromium.org, joransiu@ca.ibm.com, jyan@ca.ibm.com, michael_dawson@ca.ibm.com
BUG=
LOG=N

Change-Id: I20f8cfa6930bc20eb8db33a99bd07fce49f3f74d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1899907
Reviewed-by: Junliang Yan <jyan@ca.ibm.com>
Commit-Queue: Milad Farazmand <miladfar@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#64777}
2019-11-05 16:18:30 +00:00
Zhao Jiazhong
c8dfd2cf4a [mips][builtins] Move non-JS linkage builtins code objects into RO_SPACE
port 352bbb1 https://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}
2019-11-05 16:17:10 +00:00
Milad Farazmand
be9e397485 PPC/s390: [Liftoff] Implement i64.clz and i64.ctz
Port e554dec4f8

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.

R=clemensb@chromium.org, joransiu@ca.ibm.com, jyan@ca.ibm.com, michael_dawson@ca.ibm.com
BUG=
LOG=N

Change-Id: I00b9b7ef4c3b7e022e7cf57255a030949e7dca89
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1899886
Reviewed-by: Junliang Yan <jyan@ca.ibm.com>
Commit-Queue: Milad Farazmand <miladfar@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#64775}
2019-11-05 15:53:31 +00:00
Eric Leese
5c23e6b5f2 V8 Wasm locations should always be based on byte offsets
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}
2019-11-05 14:53:45 +00:00
Santiago Aboy Solanes
4fa5f2b504 [cleanup] Update Descriptor comment in builtins-handler-gen.cc
Change-Id: Iafb5cc7f634f7c56f9dfc0d64032953773453436
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1899614
Auto-Submit: Santiago Aboy Solanes <solanes@chromium.org>
Reviewed-by: Mythri Alle <mythria@chromium.org>
Commit-Queue: Mythri Alle <mythria@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64773}
2019-11-05 14:52:40 +00:00
Michael Achenbach
f99be4f42d [test] Remove --deopt-stress from d8
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}
2019-11-05 14:09:20 +00:00
Santiago Aboy Solanes
9716206049 [cleanup] Re-mark compiler/osr-big as SLOW for arm64 sim builds
Bug: v8:9937
Change-Id: Ia0ad5def3cf8e5b9209b546e1d3fb9213bbfa810
Fixed: v8:9937
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1899622
Auto-Submit: Santiago Aboy Solanes <solanes@chromium.org>
Reviewed-by: Dan Elphick <delphick@chromium.org>
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64771}
2019-11-05 14:03:50 +00:00
Dan Elphick
9f02d08f3a [cleanup] Tnodifiy builtins-handler-gen.cc
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}
2019-11-05 13:41:39 +00:00
Georgia Kouveli
6be9ac9d06 [instruction-scheduler] Add a RandomNumberGenerator to InstructionScheduler
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}
2019-11-05 13:27:09 +00:00
Igor Sheludko
7cceb72766 [builtins] Port %TypedArray%.of to Torque
Bug: v8:8996
Change-Id: I822c945c56738a1bb0561c208e321d70fd96f863
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1895568
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64768}
2019-11-05 13:13:59 +00:00
Georgia Kouveli
50c40a2852 [ptr-compr] Do not use SMI upper bits in LowerArgumentsLength
Change-Id: Ie51d9d88fd1c13048557687fcf1a76435f776b9a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1856009
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Commit-Queue: Georgia Kouveli <georgia.kouveli@arm.com>
Cr-Commit-Position: refs/heads/master@{#64767}
2019-11-05 13:05:15 +00:00
Sathya Gunasekaran
0457bed1fa [ic] Inline loads for heapnumber and cached string as ArrayIndex
Bug: chromium:1016738, chromium:1016709, v8:9449
Change-Id: I5b50f21b3e40651e16201e63b4a7010b1bf0c639
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1897890
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Commit-Queue: Sathya Gunasekaran  <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64766}
2019-11-05 13:04:09 +00:00
Pierre Langlois
d8dd3d65bc [cctest] Use 'strtoull' when decoding an address from the log.
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}
2019-11-05 12:46:39 +00:00
Clemens Backes
d710756a7f [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.

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}
2019-11-05 12:02:19 +00:00