Commit Graph

45719 Commits

Author SHA1 Message Date
Gabriel Charette
954146a5cf Make TimeTicks::Now() high-resolution whenever possible with low-latency.
It was already always high-resolution on POSIX but was never high
resolution on Windows. Windows does support low latency high-resolution
timers for the majority of our user base.

TimeTicks::HighResolutionNow() was only explicitly requested in testing
frameworks. As such I left the call in place but made it DCHECK that
it's running on a Windows machine on which high-resolution clocks are
used. This confirms that none of our test fleet has regressed with this
change (the previous HighResolutionNow() used to be slightly more
aggressive and also do it in a few configurations where we now fallback
to low-resolution now).

This implementation was copied as-is (modulo minor v8 API
compatibility tweaks). These implementations were the same in the
past but had diverged when, sadly, the same bug was fixed separately
years apart, in Chromium and V8:
chromium: https://codereview.chromium.org/1284053004 + https://codereview.chromium.org/2393953003
v8: https://codereview.chromium.org/1304873011

This is a prerequisite to add metrics around parallel task execution
(low-resolution clocks are useless at that level, but we also don't want
to incur high-latency clocks on machines that can't afford it cheaply).

Bug: chromium:807606
Change-Id: Id18e7be895d8431ebd0e565a1bdf358fe7838489
Reviewed-on: https://chromium-review.googlesource.com/897485
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Commit-Queue: Gabriel Charette <gab@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51027}
2018-02-01 11:55:42 +00:00
Tobias Tebbi
0320986a80 [turbofan] mark Deoptimize{If,Unless} nodes if they are safety checks
Change-Id: I2e9a6e706d75a579033a3bdaf275a5af4512c8d1
Reviewed-on: https://chromium-review.googlesource.com/897492
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51026}
2018-02-01 11:40:12 +00:00
Michal Majewski
bb9d073a2c [test] Always run with test processors
System tests updated to pass. I will cleanup the code in a
separate CL removing the old code.

Bug: v8:6917
Change-Id: Ie49efe06c43faade846e322b35c4a2068137a88b
Reviewed-on: https://chromium-review.googlesource.com/897565
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michał Majewski <majeski@google.com>
Cr-Commit-Position: refs/heads/master@{#51025}
2018-02-01 10:46:32 +00:00
Michal Majewski
0d013072f7 [test] Set exit code to 0 even with remaining tests
Bug: v8:6917
Change-Id: Ibc6a7e049a17b8f9bef6b2f5cb187c11f89cf638
Reviewed-on: https://chromium-review.googlesource.com/897564
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michał Majewski <majeski@google.com>
Cr-Commit-Position: refs/heads/master@{#51024}
2018-02-01 10:39:12 +00:00
Michal Majewski
804cc9f385 [test] Remove context usage from test processors
Bug: v8:6917
Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
Change-Id: Id5a7b41502dfd4be43496b1edb958522a8eb0c31
Reviewed-on: https://chromium-review.googlesource.com/895588
Commit-Queue: Michał Majewski <majeski@google.com>
Reviewed-by: Sergiy Byelozyorov <sergiyb@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51023}
2018-02-01 10:35:02 +00:00
Michaël Zasso
d81938ff37 Fix debug build when allocation timeout is disabled
See https://chromium-review.googlesource.com/c/v8/v8/+/869932

Bug: v8:6972
Change-Id: I012210a31265adb7f7038a9b447f24e2d40ebca7
Reviewed-on: https://chromium-review.googlesource.com/895762
Reviewed-by: Franziska Hinkelmann <franzih@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Franziska Hinkelmann <franzih@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51022}
2018-02-01 10:13:02 +00:00
Ilija Pavlovic
79645fefd9 MIPS: Prevent trampolines in LDC1 and SDC1.
Because of complexity macro instructions LDC1 and SDC1, which use
temporary registers on MIPS32, trampolines are prevented in these
instructions.

TEST=
BUG=

Change-Id: I40f50853f8dad195814007894ba1ad7c77c01892
Reviewed-on: https://chromium-review.googlesource.com/897422
Reviewed-by: Ivica Bogosavljevic <ivica.bogosavljevic@mips.com>
Commit-Queue: Ivica Bogosavljevic <ivica.bogosavljevic@mips.com>
Cr-Commit-Position: refs/heads/master@{#51021}
2018-02-01 09:19:09 +00:00
Yang Guo
a3e20cf2b7 [gyp] remove unused variables from v8.gyp.
R=machenbach@chromium.org

Change-Id: I9ecd8ef2e34a49b969e3fe38a7daea06ef4b7274
Reviewed-on: https://chromium-review.googlesource.com/895536
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51020}
2018-02-01 09:17:18 +00:00
Gabriel Charette
18c1942371 Do not block in non-main thread tasks in ItemParallelJobTests.
Otherwise bots with a low number of cores will hang trying to schedule
a mere 4 tasks.
This change allowing scheduling of an arbitrary number of test tasks,
the count was also augmented to better stress test the system.

Bug: chromium:805932
Change-Id: Ia10cd583c0675c256b4fd5d2765b50855d77a7f9
Reviewed-on: https://chromium-review.googlesource.com/895584
Commit-Queue: Gabriel Charette <gab@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51019}
2018-02-01 09:09:29 +00:00
Mike Stanton
9f1c497344 [FeedbackVector] Remove FeedbackVectorSpecBase
The case that required it is no longer in the tree.

Change-Id: Ie4c82f2799c381a5a5f2f57e7e3255ebb69f02b6
Reviewed-on: https://chromium-review.googlesource.com/893262
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Michael Stanton <mvstanton@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51018}
2018-02-01 08:59:58 +00:00
Yang Guo
b5835ced4e [gyp] fix broken source list for openbsd.
R=machenbach@chromium.org

Fixes https://github.com/nodejs/node/issues/15784

Change-Id: I4453023a5a6c8ace45b898ea227870fb6cbc20b2
Reviewed-on: https://chromium-review.googlesource.com/893261
Commit-Queue: Yang Guo <yangguo@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51017}
2018-02-01 08:45:59 +00:00
Ulan Degenbaev
239dd8124b New API for capturing embedder object graph in heap snapshot.
That patch introduces EmbedderGraph interface that embedders can use to
represent C++ objects that retain or are retained by V8 JS objects.

The heap snapshot generator adds nodes and edges of the EmbedderGraph to
the heap snapshot, allowing arbitrarily complex retaining paths that
cross V8/Embedder boundary.

The new functionality is enabled only if the embedder sets the
BuildEmbedderGraph callback.


Bug: chromium:749490

Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
Change-Id: I10a1fa000d6d4ba47fc19d84c7cfc2c619d496fc
Reviewed-on: https://chromium-review.googlesource.com/890521
Reviewed-by: Alexei Filippov <alph@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51016}
2018-02-01 08:05:14 +00:00
jgruber
ca1d44e35f [builtins] Add --stress-off-heap-code to test off-heap code
If enabled, this mode moves code for isolate-independent builtins off
the JS heap at Isolate creation. The Code object itself is rewritten
to tail-call the off-heap instruction stream.

Drive-by-fix: Support lazy deserialization in asm-wasm instantiation.

Bug: v8:6666
Change-Id: Ic109527ff478cfc6e8942e924413fc7532da6eaf
Reviewed-on: https://chromium-review.googlesource.com/888562
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51015}
2018-02-01 08:04:09 +00:00
Tobias Tebbi
2778b46081 Reland "[turbofan] disable indirect jumps in Turbofan generated switches"
This is a reland of 957ac3641c.

To avoid a race condition TSAN found when accessing FLAG_turbo_disable_switch_jump_table
in the InstructionSelector, this now threads the flag through the CompilationInfo.

Original change's description:
> [turbofan] disable indirect jumps in Turbofan generated switches
>
> Bug:
> Change-Id: I326bf518f895e7c030376210e7797f3dd4a9ae1f
> Reviewed-on: https://chromium-review.googlesource.com/873643
> Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
> Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#50984}

Change-Id: I76c2804f140cc116e30881bfd05365a09240e605
Reviewed-on: https://chromium-review.googlesource.com/895643
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51014}
2018-02-01 08:03:04 +00:00
v8-autoroll
1efdab8201 Update V8 DEPS.
Rolling v8/build: 2e93695..8222c43

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/7c98d04..f384e37

TBR=machenbach@chromium.org,hablich@chromium.org,sergiyb@chromium.org

Change-Id: I6b305ee31207bee9fcc8ed36a7347b9ed3452fdc
Reviewed-on: https://chromium-review.googlesource.com/896804
Reviewed-by: v8 autoroll <v8-autoroll@chromium.org>
Commit-Queue: v8 autoroll <v8-autoroll@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51013}
2018-02-01 05:00:39 +00:00
jing.bao
835a53e462 [wasm]Fix simd lowering for S128Select and ReplaceLane
Change-Id: I46a46bacda356b838f3b7a7a9c7fb79f703dbae3
Reviewed-on: https://chromium-review.googlesource.com/892497
Reviewed-by: Aseem Garg <aseemgarg@chromium.org>
Reviewed-by: Bill Budge <bbudge@chromium.org>
Commit-Queue: Jing Bao <jing.bao@intel.com>
Cr-Commit-Position: refs/heads/master@{#51012}
2018-02-01 02:29:59 +00:00
Kanghua Yu
26fc3d5839 [x64] Reduce unnecessary LEA instruction in prologue
--- Optimized code ---
optimization_id = 26
kind = OPTIMIZED_FUNCTION
compiler = turbofan
...
    leaq rcx,[rip+0x0]             => TO BE REDUCED
    movq rcx,[rcx-0x37]            => movq rcx,[rip-0x37]
    testb [rcx+0xf],0x1
    jnz CompileLazyDeoptimizedCode

Change-Id: I06c10ebd33af6524c4ad9ce466fd0880268f4a83
Reviewed-on: https://chromium-review.googlesource.com/880642
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Kanghua Yu <kanghua.yu@intel.com>
Cr-Commit-Position: refs/heads/master@{#51011}
2018-02-01 01:50:09 +00:00
Sathya Gunasekaran
0f6eafe855 [promise] Remove incorrect fast path
Previously we would directly take the result from a fulfilled native
promise bypassing the microtask queue. This is observably different
from the spec.

Note: Our variant of the bluebird benchmark is heavily favored towards
fulfilled native promises because we don't use setTimeout (unlike the
original benchmark). I suspect this pattern doesn't appear often in
the wild so it's fine to take this hit for now.

PSA for Perf sheriffs: this is going to tank some benchmarks.

Bug: chromium:800651, v8:5691, v8:6007
Change-Id: Ic273bf2195529424b0d87359d28d5267060d5252
Reviewed-on: https://chromium-review.googlesource.com/895416
Commit-Queue: Sathya Gunasekaran <gsathya@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51010}
2018-01-31 19:19:56 +00:00
Nico Weber
b596ca4bf6 Explicitly suppress -Wimplicit-fallthrough for v8.
No behavior change since that warning isn't enabled anywhere yet, and
it's opt-in.  This is a prerequisite for
https://chromium-review.googlesource.com/c/chromium/src/+/895726

Whil here, also remove -Wsign-compare, since that's enabled by default for -Wextra
(http://llvm-cs.pcc.me.uk/tools/clang/include/clang/Basic/DiagnosticGroups.td#723)
and v8 builds with the chromium_code config which sets -Wextra.

Bug: chromium:177475
Change-Id: I32f140296cab13ed57be08168a3f6b1d1218e4e6
Reviewed-on: https://chromium-review.googlesource.com/895704
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Nico Weber <thakis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51009}
2018-01-31 19:11:26 +00:00
Benedikt Meurer
b23b098fa0 [builtins] Implement Promise#catch by really calling into Promise#then.
We still avoid the "then" lookup using the current fast-path
mega-guard in the baseline case, but in TurboFan we simply
constant-fold the "then" lookup in the JSCallReducer. So all
further optimizations on Promise#then in TurboFan will automatically
apply to Promise#catch as well.

Bug: v8:7253
Change-Id: Idf7252157375a0ae3a91c7a3b42c30c5f367c0a8
Reviewed-on: https://chromium-review.googlesource.com/895446
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Michael Stanton <mvstanton@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51008}
2018-01-31 18:58:16 +00:00
Junliang Yan
2c7de3243d PPC/s390: [Intepreter] Add poisoning to bytecode operand reads.
Port c9941af275

R=rmcilroy@chromium.org, joransiu@ca.ibm.com, michael_dawson@ca.ibm.com
BUG=chromium:798964
LOG=N

Change-Id: Id1f6a45169a24f06605297a404461a6cbdf78347
Reviewed-on: https://chromium-review.googlesource.com/894305
Reviewed-by: Joran Siu <joransiu@ca.ibm.com>
Commit-Queue: Junliang Yan <jyan@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#51007}
2018-01-31 18:47:07 +00:00
Sigurd Schneider
51c6315638 [js-perf-tests] Hook up new benchmarks for String.p.charCodeAt
Bug: v8:7092, v8:7326, chromium:806758
Change-Id: Id8a3bc2455875af9dfdc01619d8217e033099e7e
Reviewed-on: https://chromium-review.googlesource.com/895690
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51006}
2018-01-31 17:34:06 +00:00
Michael Achenbach
8990851521 [test] Fully fix timeout-scalefactor for numfuzzer
TBR=majeski@google.com
NOTRY=true

Bug: v8:6917
Change-Id: I8ca2297ab9641b81a91ee7f8ff594bbe4b9e369b
Reviewed-on: https://chromium-review.googlesource.com/895366
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51005}
2018-01-31 17:21:57 +00:00
Benedikt Meurer
8a677a2831 [builtins] Squeeze JSPromise::result and JSPromise::reactions into a single field.
A given JSPromise can either be in pending state, and accumulates
reactions, or in settled state, where all reactions are scheduled
as microtasks, and it carries a result. So we can use a single field
on the JSPromise instance to hold both the result and the reactions
and that field is interpreted differently depending on the status of
the JSPromise.

Bug: v8:7253
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
Change-Id: I19a7d499c88f452f0d35979ab95deb110021cde9
Reviewed-on: https://chromium-review.googlesource.com/895528
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51004}
2018-01-31 17:08:46 +00:00
Dan Elphick
96dd41a3f4 Remove explicit from Optional constructors
This allows base::nullopt to be used instead of base::Optional<Foo>()
and implicit conversion to Optional<T> from T.

Also added NOLINT comments to the implicit constructors.

Change-Id: I4c688045685e2a50e0c0d38a959570f77454ec61
Reviewed-on: https://chromium-review.googlesource.com/893268
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Dan Elphick <delphick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51003}
2018-01-31 16:51:05 +00:00
Michael Starzinger
dc08d4f870 [wasm] Introduce {JSPromise::Resolve} and {JSPromise::Reject}.
This prevents unnecessary switching back and forth between internal and
public API boundaries. It is also a step towards making all WebAssembly
internals completely independent of "scheduled exception" values.

R=ahaas@chromium.org

Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
Change-Id: I46e8cb4fad3d255d9bd20b9c343901a03a25426c
Reviewed-on: https://chromium-review.googlesource.com/895742
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51002}
2018-01-31 15:47:13 +00:00
Karl Schimpf
ef98172d5d [wasm] Implement i64.trunc_s:sat/f32
Implements the saturating opcode i64.trunc_s:sat/f32.

Also does some refactoring of the i32 saturating opcodes use a simplier
solution (calling a single method to handle all i32 values).

Also refactors code so that the remaining i64 saturating conversions
should be easy to add to the wasm compiler.

Bug: v8:7226
Change-Id: I031aca1e059b4baa989a56ecbc16941f591ff9b3
Reviewed-on: https://chromium-review.googlesource.com/887333
Commit-Queue: Karl Schimpf <kschimpf@chromium.org>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51001}
2018-01-31 15:35:13 +00:00
Michael Achenbach
fcb5b4a501 [test] Fix timeout-scalefactor for numfuzzer
TBR=majeski@google.com
NOTRY=true

Bug: v8:6917
Change-Id: I088dc4492df6c1dda1f86fbd6d7153a46a4117e0
Reviewed-on: https://chromium-review.googlesource.com/895600
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51000}
2018-01-31 15:09:03 +00:00
Michael Achenbach
ae1fbc0dc5 [build] Enable downloading mips toolchain via runhooks
This downloads the mips tool chain into tools/mips_toolchain via
runhooks if the flag download_mips_toolchain is specified for
gclient.

The currently uploaded version is 2015/1/7.

Bug: chromium:632390
Change-Id: Ied396d1a980db962773a96e9dadd3f282c7541c0
Reviewed-on: https://chromium-review.googlesource.com/892864
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#50999}
2018-01-31 14:38:43 +00:00
Michal Majewski
dbb198af92 [test] Random seed and rerun proc moved to base runner
Bug: v8:6917
Change-Id: I543c232489e6b93f5f98ccf63eea475535d82613
Reviewed-on: https://chromium-review.googlesource.com/893566
Commit-Queue: Michał Majewski <majeski@google.com>
Reviewed-by: Sergiy Byelozyorov <sergiyb@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#50998}
2018-01-31 14:35:38 +00:00
Mike Stanton
291dc3cd1f [Feedback Vector] Coalesce Nexii to Feedback Nexus.
The FeedbackNexus classes initially were one-to-one with IC classes,
but over time this got out of date. We also found Nexus' useful, so
we made more classes even for cases that weren't ICs.

The inheritence and polymorphism became confusing and led to
duplication. Better, to just talk about a (single) FeedbackNexus.

Bug: v8:7344
Change-Id: I509dc9657895d56c3859de6e6589695cdff9e73e
Reviewed-on: https://chromium-review.googlesource.com/890452
Commit-Queue: Michael Stanton <mvstanton@chromium.org>
Reviewed-by: Franziska Hinkelmann <franzih@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#50997}
2018-01-31 14:34:33 +00:00
Michal Majewski
d3083b46ee [test] Move options to test config
Bug: v8:6917
Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
Change-Id: I254d2e545709029346f585b02a9edf91d3f27893
Reviewed-on: https://chromium-review.googlesource.com/893321
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michał Majewski <majeski@google.com>
Cr-Commit-Position: refs/heads/master@{#50996}
2018-01-31 13:46:29 +00:00
Jaroslav Sevcik
0cfbaff422 Revert "[turbofan] disable indirect jumps in Turbofan generated switches"
This reverts commit 957ac3641c.

Reason for revert: Breaks roll (crbug.com/v8/7388)

Original change's description:
> [turbofan] disable indirect jumps in Turbofan generated switches
> 
> Bug: 
> Change-Id: I326bf518f895e7c030376210e7797f3dd4a9ae1f
> Reviewed-on: https://chromium-review.googlesource.com/873643
> Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
> Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#50984}

TBR=jarin@chromium.org,tebbi@chromium.org

Change-Id: Id2546e722179e6d8f2f102ce02fb18d696a79764
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/894385
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Jaroslav Sevcik <jarin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#50995}
2018-01-31 13:44:51 +00:00
Michal Majewski
35ca0a01c3 [test] Filter out incompatible tests in predictable mode
Bug: v8:6917
Change-Id: Ie18390ae0849e8d5341e4c2a7b757fae886c2986
Reviewed-on: https://chromium-review.googlesource.com/895582
Commit-Queue: Michał Majewski <majeski@google.com>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#50994}
2018-01-31 13:32:41 +00:00
Michael Starzinger
e210ee55f5 [wasm] Fix handling of pending exceptions in fuzzer.
R=clemensh@chromium.org
BUG=chromium:807508

Change-Id: I0b90b93a796c67f557e392cf6123a48cd0942bd7
Reviewed-on: https://chromium-review.googlesource.com/895303
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#50993}
2018-01-31 13:31:36 +00:00
jgruber
9222cd55f4 [fuzzers] Add hash to regexp-builtins CHECK
The hash avoids assigning all CHECK failures to the same clusterfuzz
report.

Bug: chromium:805970
Change-Id: Ia52da335ea86fbc7cc924dd81a893722a6d3d92e
Reviewed-on: https://chromium-review.googlesource.com/894323
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#50992}
2018-01-31 12:39:36 +00:00
jgruber
0b2edc4097 [fuzzers] Support parsing failures in regexp-builtins fuzzer
The fuzzer found a couple of cases that exploited comments of the
form:

  function test() {
    const re = /*.../;
    const str = '...*/...';
    let result;
    try { result = re.exec(str); } catch (e) { /* ... */ }
  }

Note that the first line does not contain a regexp literal, it starts
a comment instead. The second line terminates the comment.

This fixes detection of such cases by initializing `result` to null.

TBR=yangguo@chromium.org

Bug: chromium:805970
Change-Id: I5d46db9892e2b4e71cdc2907cebf07a2e33b7a0e
Reviewed-on: https://chromium-review.googlesource.com/894403
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#50991}
2018-01-31 12:26:56 +00:00
Camillo Bruni
8361fa5896 [runtime] Fix derived class instantiation
Bug: chromium:806388
Change-Id: Ieb343f0d532c16b6102e85222b77713f23bacf8c
Reviewed-on: https://chromium-review.googlesource.com/894942
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#50990}
2018-01-31 12:07:56 +00:00
Michal Majewski
4ca5a577e6 [test] Stressing random seed with multiple subtests in parallel
Bug: v8:6917
Change-Id: I562680ebbc4b3140fb0e5be7cab7d5ebb658bbac
Reviewed-on: https://chromium-review.googlesource.com/893272
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Sergiy Byelozyorov <sergiyb@chromium.org>
Commit-Queue: Michał Majewski <majeski@google.com>
Cr-Commit-Position: refs/heads/master@{#50989}
2018-01-31 12:06:11 +00:00
Michael Achenbach
16e3f6362d [test] Skip tests that timeout on chromebooks
TBR=gab@chromium.org
NOTRY=true

Bug: chromium:805932
Change-Id: I76e5acb5f2e749f7240abb0cb0596fdf8b72badf
Reviewed-on: https://chromium-review.googlesource.com/895602
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#50988}
2018-01-31 12:05:06 +00:00
Michal Majewski
1478c30786 [test] Return heartbeats and results during pool termination
Bug: v8:6917
Change-Id: I5cca65111141f32f8b9f241a9f482d09e1b54655
Reviewed-on: https://chromium-review.googlesource.com/893982
Commit-Queue: Michał Majewski <majeski@google.com>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#50987}
2018-01-31 11:25:26 +00:00
Clemens Hammacher
160f6009ef [Liftoff] Add support for i64 register pairs
In order to support i64 values on 32 bit platforms, we extend the
{LiftoffRegister} class to support storing pairs of GP registers on
those platforms. On 64 bit platforms, this refactoring should cause no
slowdown, as the compiler can statically determine that
{LiftoffRegister::is_pair()} is always false.

R=titzer@chromium.org

Bug: v8:6600
Change-Id: Ie9966d599271b8779959b1809ab4e129b68b80d7
Reviewed-on: https://chromium-review.googlesource.com/890261
Reviewed-by: Ben Titzer <titzer@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#50986}
2018-01-31 10:43:27 +00:00
Michal Majewski
d161bc3c14 [test] Added signal handling to test processors
Bug: v8:6917
Change-Id: If91defd11c91fd26bdbacc146992745ea772a941
Reviewed-on: https://chromium-review.googlesource.com/890938
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michał Majewski <majeski@google.com>
Cr-Commit-Position: refs/heads/master@{#50985}
2018-01-31 10:39:06 +00:00
Tobias Tebbi
957ac3641c [turbofan] disable indirect jumps in Turbofan generated switches
Bug: 
Change-Id: I326bf518f895e7c030376210e7797f3dd4a9ae1f
Reviewed-on: https://chromium-review.googlesource.com/873643
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#50984}
2018-01-31 10:31:26 +00:00
Tobias Tebbi
630a992b8d [turbofan] refactor BranchElimination to use a generic stack implementation
Bug: 
Change-Id: Ibd91a61a9fd4b673db1afe13936d68a2b4a096cd
Reviewed-on: https://chromium-review.googlesource.com/892058
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#50983}
2018-01-31 10:25:21 +00:00
Ross McIlroy
007a73548b [Flags] Enable background compile of scripts by default.
BUG=v8:5203

Change-Id: I69093626743fa1bb4865129421266f0b1aa26a0f
Reviewed-on: https://chromium-review.googlesource.com/893384
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#50982}
2018-01-31 10:20:34 +00:00
Predrag Rudic
d2ad89d846 [cctest] Skip test-run-wasm-simd if SIMD is not supported
For mips, if 'mips_arch_variant=="r6"' and if 'mips_use_msa' flag is set
to 'true', then test-run-wasm-simd tests won't be skipped for mips. It
will also force 'MIPS_SIMD' bit in CpuFeatures to be set.
ARM processors are assumed to support SIMD.

Change-Id: Iea668b97ef995ca4949ddbf2ffc734aad89d3aa3
Reviewed-on: https://chromium-review.googlesource.com/868430
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Ivica Bogosavljevic <ivica.bogosavljevic@mips.com>
Commit-Queue: Ivica Bogosavljevic <ivica.bogosavljevic@mips.com>
Cr-Commit-Position: refs/heads/master@{#50981}
2018-01-31 10:08:14 +00:00
Benedikt Meurer
8e7737cb58 [builtins] Refactor promises to reduce GC overhead.
This implements the ideas outlined in the section "Microtask queue"
of the exploration document "Promise and async/await performance" (at
https://goo.gl/WHRar2), except that the microtask queue stays a linear
FixedArray for now, to avoid running into trouble with the parallel
scavenger. This way we can already save a significant amount of
allocations, thereby reducing the GC frequency quite a bit.

All items on the microtask queue are now proper structs that subclass
Microtask, i.e. we also wrap JSFunction and MicrotaskCallback jobs
into structs. We also consistently remember the context for every
microtask (except for MicrotaskCallback where we don't have a
context), and execute it later in exactly that context (as required
by the spec anyways for the Promise related jobs). Particularly
interesting is the PromiseReactionJobTask and its subclasses, since
they are designed to have the same size as the PromiseReaction. When
we resolve a JSPromise we just take the existing PromiseReaction
instances and morph them into PromiseFulfillReactionJobTask or
PromiseRejectReactionJobTask (depending whether you "Fulfill" or
"Reject"). That way the JSPromise class is now only 6 words instead
of 10 words.

Also the PromiseReaction and the reaction tasks can either carry a
JSPromise (for the fast native case) or a PromiseCapability (for the
generic case), which means we don't always pay the overhead of having
to also remember the "deferred resolve" and "deferred reject" handlers
that are only relevant for the generic case anyways.

It also fixes a spec violation where we called "then" before we actually
enqueued the PromiseResolveThenableJob, which is observably wrong.
Calling it later has the advantage that it should be fairly
straight-forward now to completely avoid it for native Promise
instances.

This seems to save around 10-20% on the various Promise benchmarks and
micro-benchmarks. We expect to gain even more as we're now able to
inline various operations into TurboFan optimized code easily.

Bug: v8:7253
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
Change-Id: I893d24ca5bb046974b4f5826a8f6dd22f1210b6a
Reviewed-on: https://chromium-review.googlesource.com/892819
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#50980}
2018-01-31 10:05:39 +00:00
sreten.kovacevic
4d130da539 [MIPS64] Use correct register for {kInterpreterTargetBytecodeRegister}
Register t3 is not allocatable, so register a7 is used instead.

Change-Id: Ic198f038a10b4c891b417656d639477aedf6b703
Reviewed-on: https://chromium-review.googlesource.com/891823
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Ivica Bogosavljevic <ivica.bogosavljevic@mips.com>
Commit-Queue: Ivica Bogosavljevic <ivica.bogosavljevic@mips.com>
Cr-Commit-Position: refs/heads/master@{#50979}
2018-01-31 10:04:35 +00:00
Michal Majewski
5ede3cb533 Reland "[test] Random seed processor"
This is a reland of 0db74d4974.

Original change's description:
> [test] Random seed processor
> 
> 1. --total-timeout-sec now available for ./run-tests.py. It can be
> useful with infinite seed stressing
> 2. random seed dropped from the context. Now JSON progress indicator
> gets it from the list of command args.
> 
> Bug: v8:6917
> Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
> Change-Id: I73e535bc8face9b913c696b8d5e3a246fa231004
> Reviewed-on: https://chromium-review.googlesource.com/888524
> Commit-Queue: Michał Majewski <majeski@google.com>
> Reviewed-by: Michael Achenbach <machenbach@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#50964}

Bug: v8:6917
Change-Id: I1ea376a4abffce5ab65f4834ea7e6d6011765ffa
Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
Reviewed-on: https://chromium-review.googlesource.com/894204
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michał Majewski <majeski@google.com>
Cr-Commit-Position: refs/heads/master@{#50978}
2018-01-31 09:53:34 +00:00