Commit Graph

51008 Commits

Author SHA1 Message Date
Junliang Yan
abb6db889c PPC64/s390x: re-enable I64Atomic test on ppc64/s390x
This reverts commit b8a5ae4749.

Change-Id: If5953398586af66f827103326891f7b4b39b78d1
Reviewed-on: https://chromium-review.googlesource.com/c/1262999
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Junliang Yan <jyan@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#56416}
2018-10-05 15:08:23 +00:00
Benedikt Meurer
1f0cd95278 [async] Initial async generator support for --async-stack-traces.
This forces .generator_object variable to stack slot 0 for async
generator functions so that the stack trace construction logic
can extract the JSAsyncGeneratorObject appropriately.

Bug: v8:7522
Change-Id: I37b52836bb512bcf5cd7e10e1738c8e7895b06ea
Ref: nodejs/node#11865
Design-Document: http://bit.ly/v8-zero-cost-async-stack-traces
Reviewed-on: https://chromium-review.googlesource.com/c/1264556
Reviewed-by: Yang Guo <yangguo@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56415}
2018-10-05 13:41:53 +00:00
Maya Lekova
2a2c9e5f79 [async-await] Refactor await optimization and include async generators
Design doc:
https://docs.google.com/document/d/1kL08cz4lR6gO5b2FATNK3QAfS8t-6K6kdk88U-n8tug/edit

This CL is a follow-up after the original implementation, see CL:
https://chromium-review.googlesource.com/c/v8/v8/+/1106977

It includes a fix for the missing async generators optimization,
as well as cleanup of the manual patching of the builtins. It also includes
mjsunit test for all usages of the new behaviour.

Bug: v8:8267

Change-Id: I999f341acb746c6da5216e44b68a519656fd5403
Reviewed-on: https://chromium-review.googlesource.com/c/1261124
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Maya Lekova <mslekova@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56414}
2018-10-05 13:25:56 +00:00
Ivica Bogosavljevic
3eceaf0349 Export OFStreamBase in ostream.h
GCC 4.9.2 on MIPS generates a reference to OFStreamBase()
d8.cc. In debug mode OFStreamBase is local to libv8_base and
linking fails.

Change-Id: I93bb93d03a4cc81c59f94cf2168c92557845e87d
Reviewed-on: https://chromium-review.googlesource.com/c/1258903
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Ivica Bogosavljevic <ibogosavljevic@wavecomp.com>
Cr-Commit-Position: refs/heads/master@{#56413}
2018-10-05 13:24:51 +00:00
Peter Marshall
4942076091 [cleanup] Don't declare inline runtime functions by default
For each intrinsic/runtime function we define in runtime.h, an inline
version is automatically declared. We only ever use 24 of the inline
functions. Even though we don't call the other ones, macro magic means
they still take up space by existing in various arrays and tables like
kIntrinsicFunctions. They also create code in switch statements.

Some drive-by cleanups:
 - Remove the switch in NameForRuntimeId() and just use the table of
   runtime functions to lookup the name directly.
 - Remove tests for IsFunction, ClassOf and StringAdd intrinsics as
   they are the last users of the inline versions of these.
 - Remove the MaxSmi inline version as it is only used in tests.

Saves 64 KiB binary size.

Change-Id: I4c870ddacd2655ffcffa97d93200ed8f853752f5
Reviewed-on: https://chromium-review.googlesource.com/c/1261939
Commit-Queue: Peter Marshall <petermarshall@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56412}
2018-10-05 13:10:56 +00:00
Benedikt Meurer
4fd92b252b [turbofan] Do not consume SignedSmall feedback in TurboFan anymore.
This changes TurboFan to treat SignedSmall feedback similar to Signed32
feedback for binary and compare operations, in order to simplify and
unify the machinery.

This is an experiment. If this turns out to tank performance, we will
need to revisit and ideally revert this change.

Bug: v8:7094
Change-Id: I885769c2fe93d8413e59838fbe844650c848c3f1
Reviewed-on: https://chromium-review.googlesource.com/c/1261442
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56411}
2018-10-05 12:41:22 +00:00
Toon Verwaest
3c8eaa19ee [parser] Restructure checks in ParseAndClassifyIdentifier
Change-Id: I7662e9d500070a2bbe49562a9efbb459247819d5
Reviewed-on: https://chromium-review.googlesource.com/c/1264655
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56410}
2018-10-05 12:35:15 +00:00
Jaroslav Sevcik
fe75770276 [turbofan] Only poison loads and branches participating in property access
This cuts down the perf cost on Octane from 18% to 13%. The baseline is the no mitigation
Octane score, the array access mitigation cost was about 4%. This means we would be
getting a bit more than 1/3 of the poisoning regression back.

Bug: chromium:856973, chromium:887213
Change-Id: Ibd99f66ae832c6080f2c2e5b33a1a7610907466f
Reviewed-on: https://chromium-review.googlesource.com/c/1251401
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Jaroslav Sevcik <jarin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56409}
2018-10-05 12:25:52 +00:00
Hannes Payer
6cf351e8fe [heap] Never read out of the [x,y) range during Bitmap operations.
Bug=chromium:852420

Change-Id: Ia810292e4f9592836e7ce734686cadc69328b1c3
Reviewed-on: https://chromium-review.googlesource.com/c/1262475
Commit-Queue: Hannes Payer <hpayer@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56408}
2018-10-05 11:26:59 +00:00
Sigurd Schneider
b79147d5f2 [multi-return-fuzzer] Fix clusterfuzz issue in test
Change-Id: I20ee0d411155e23d87c731f0d909b14c55088c4c

R=ahaas@chromium.org
Also-By: ahaas@chromium.org

Bug: chromium:892435
Change-Id: I70ca2982ea0ddc39fecfbab983a7295707fe8873
Reviewed-on: https://chromium-review.googlesource.com/c/1264283
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56407}
2018-10-05 10:49:10 +00:00
Toon Verwaest
e04030979c [parser] Simplify DestructuringAssignment rewriting
Move the entry-point for destructuring assignment out of the recursion so we
can avoid swapping ASSIGNMENT scope to ASSIGNMENT_ELEMENT.

Also rewrite Assignment directly without wrapping in RewritableExpression
first.

Change-Id: Iae768ad1b2a6fb40ce37142867d7034f924354e4
Reviewed-on: https://chromium-review.googlesource.com/c/1264284
Reviewed-by: Marja Hölttä <marja@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56406}
2018-10-05 10:26:53 +00:00
Leszek Swirski
c189d31de5 [parser] Add leszeks to OWNERS
Change-Id: I6e30593a907605d970fdb6250b0020cddac94e37
Reviewed-on: https://chromium-review.googlesource.com/c/1261443
Reviewed-by: Marja Hölttä <marja@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56405}
2018-10-05 09:45:05 +00:00
Toon Verwaest
3921281ed9 [parser] Drop conditionally adding rewritten assignment to parent block
After rewriting a rewritable assignment expression we possibly add the
resulting do-expression in two places: the rewritten expression and the parent
block. That would observably generate duplicate code. Luckily this can't happen
since the only recursive paths that would call this function again change the
context to ASSIGNMENT_ELEMENT from ASSIGNMENT. Hence simply DCHECK_NULL(block_)
and reset it to nullptr at the end.

Change-Id: I17b84dedcd7daf800d9ccb90e3dd975e84b12717
Reviewed-on: https://chromium-review.googlesource.com/c/1264282
Reviewed-by: Marja Hölttä <marja@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56404}
2018-10-05 09:43:47 +00:00
Toon Verwaest
24fb7b4772 [parser] Avoid superfluous var decl proxy creation
var declarations that walk through with scopes are special in that the variable
will always end up in the outer declaration scope, but the initializer for the
var will possibly target the with scope. Hence we can't simply use the resolved
variable proxy from the declaration for the initialization. However, if we know
that the var declaration lives in the scope where it will be declared (the
common case), there can't be a with scope in between. Hence we are free to
reuse the proxy.

Change-Id: I434abcd5df1a44313a8b8da3303cf5748299de4b
Reviewed-on: https://chromium-review.googlesource.com/c/1261450
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56403}
2018-10-05 08:56:50 +00:00
Toon Verwaest
8caaeb373e [parser] Reuse identifier variable proxy for rewritten declaration
When parsing an identifier as an expression we'll immediately create an
unresolved VariableProxy in the parsing scope. If this variable ends up
becoming a declaration, e.g., due to arrow function parameter, we'll move it
into the function scope for that arrow function. Then to actually create the
declarations we rewrite the "pattern". When we declare the variable, the proxy
is automatically resolved to the variable we create from it. That means it
can't be in the unresolved list anymore.

We tried to remove the unresolved variable. Unfortunately, if there was a
sloppy eval in a parameter context, there's an additional var-block scope
created for the parameter. Rewriting happens in *that* scope. Hence we didn't
always manage to remove the unresolved variable. I suppose as a fix an
additional variable proxy was introduced; since otherwise the implicit
resolution upon declaration would trigger a dcheck in scope resolution later.

This CL removes the initial variable proxy from the correct scope, so it can be
reused for the declaration.

Change-Id: Id917afb177aef076a2947b0fdd03b5393bd29c3f
Reviewed-on: https://chromium-review.googlesource.com/c/1261937
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56402}
2018-10-05 08:55:44 +00:00
Toon Verwaest
7f4aca77f4 [parser] RewritableExpressions are only used for assignments
Change-Id: I07945944f114a32211e4f5f6fc0c5c6b88184940
Reviewed-on: https://chromium-review.googlesource.com/c/1264279
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56401}
2018-10-05 08:54:39 +00:00
Andreas Haas
3f8c6e0143 [api][cleanup] Mark Call*OnForegroundThread as V8_DEPRECATE_SOON
These functions got replaced the the taskrunner API. The new way to
post tasks is as follows:

v8::Platform* platform = ...; // e.g. V8::GetCurrentPlatform();
v8::Isolate* = ...;

std::shared_ptr<v8::TaskRunner> taskrunner = platform->GetForegroundTaskRunner(isolate);
std::unique_ptr<v8::Task> task = ...;

taskrunner->PostTask(std::move(task));

R=ulan@chromium.org

Bug: v8:8238
Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
Change-Id: I44a70fc530daae581ee31e54fd09e776ba648406
Reviewed-on: https://chromium-review.googlesource.com/c/1261936
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56400}
2018-10-05 08:38:09 +00:00
Jungshik Shin
2abb31a9d6 Use ICU to validate and canonicalize lang tag
- Get rid of an unnecessary call to uloc_canonicalize in js-locale.
- Do not use regex, but rely on ICU for the structrural validity check
with Chrome's ICU or ICU 63 or newer. Otherwise, continue to use regex.

This became possible thanks to a couple of bug fixes in ICU ToT that
were cherry-picked for Chromium's ICU.

Not yet done is to change js-locale to use CanonicalizeLocale().
That will make a few more tests pass.

Bug: v8:8135
Test: test262/intl402/Intl/getCanonicalLocales/*
Test: test262/intl402/Locale/*
Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
Change-Id: I45c10b298fb041e0b39a4d96309c68a7966f91c2
Reviewed-on: https://chromium-review.googlesource.com/c/1215223
Commit-Queue: Jungshik Shin <jshin@chromium.org>
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56399}
2018-10-05 08:26:39 +00:00
Andreas Haas
2729ce8b6b [cleanup] Use the new taskrunner API for idle tasks in the GC
Like https://crrev.com/c/1261145, but I forgot one use in the scavenger.

R=ulan@chromium.org

Bug: v8:8238
Change-Id: I75a1e1ef8d2bb7dddfc648c0a5b827ad466f0ad3
Reviewed-on: https://chromium-review.googlesource.com/c/1261935
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56398}
2018-10-05 08:18:59 +00:00
Michael Achenbach
b098168a2b [build] Add embedded-builtins builders
NOTRY=true

Bug: v8:8266
Change-Id: Ice4fd1ee17be2320a7e1d5d1aa6abbc2d46c4abd
Reviewed-on: https://chromium-review.googlesource.com/c/1264278
Reviewed-by: Sergiy Byelozyorov <sergiyb@chromium.org>
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56397}
2018-10-05 08:11:19 +00:00
Benedikt Meurer
4111c98e7a [async] Only try to peak into async functions/generators.
For --async-stack-traces don't try to peak into frames that don't belong
to async functions/generators, specifically don't try to peak into some
arbitrary builtin frames (the FrameInspector doesn't support that).

Bug: chromium:892472, chromium:892473, v8:7522
Change-Id: Idcdee26ff958c03b24dd2910bb92fc51cbc14e3c
Ref: nodejs/node#11865
Design-Document: http://bit.ly/v8-zero-cost-async-stack-traces
Reviewed-on: https://chromium-review.googlesource.com/c/1264276
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56396}
2018-10-05 06:36:27 +00:00
Benedikt Meurer
63345e68f8 [turbofan] Remove CheckSmi from String.fromCodePoint() lowering.
The CheckSmi in String.fromCodePoint() is unnecessary and even leads to
unnecessary deoptimizations, since the CheckBounds already does the
right thing, plus it also handles HeapNumbers (in Signed32 range) and
properly identifies zeros.

Bug: v8:8238
Change-Id: I73bf7a70c3cd718c987f112ceb928188c0534cd5
Reviewed-on: https://chromium-review.googlesource.com/c/1262675
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56395}
2018-10-05 05:27:44 +00:00
v8-ci-autoroll-builder
8e5e2c6fca Update V8 DEPS.
Rolling v8/build: 29568c1..d36c5ed

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/2dd9144..3f7d74f

Rolling v8/third_party/depot_tools: b250ec1..8e9443f

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

Change-Id: I9c4aded653d44af5507235c1c3f83f8cf087a179
Reviewed-on: https://chromium-review.googlesource.com/c/1263817
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@{#56394}
2018-10-05 03:43:43 +00:00
Frank Tang
4274d2f190 [Intl] add Intl.Segmenter - part 1
Add the JSSegmenter and hook up constructor,
supportedLocales and resolvedOptions only
Desgin Doc- https://goo.gl/fgc2Cp

TBR: bmeurer@chromium.org
Bug: v8:6891
Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
Change-Id: Ief25fb31d724c55c43c0fdf3080294fa83486e4f
Reviewed-on: https://chromium-review.googlesource.com/c/1247362
Commit-Queue: Frank Tang <ftang@chromium.org>
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56393}
2018-10-05 02:42:30 +00:00
Junliang Yan
8f65ce3bfb ppc64: fix clobbering issue on input register
R=joransiu@ca.ibm.com

Change-Id: Id53be07f0f980dc03b1106c09b6fddbf94d31088
Reviewed-on: https://chromium-review.googlesource.com/c/1262937
Reviewed-by: Joran Siu <joransiu@ca.ibm.com>
Commit-Queue: Junliang Yan <jyan@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#56392}
2018-10-05 02:37:44 +00:00
Tobias Tebbi
a4008bf009 [torque] add an intermediate representation to Torque
Bug: v8:7793
Change-Id: I5261122faf422987968ee1e405966f878ff910a1
Reviewed-on: https://chromium-review.googlesource.com/c/1245766
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Reviewed-by: Daniel Clifford <danno@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56391}
2018-10-04 21:29:18 +00:00
Frank Tang
42f17e7d95 [Intl] Make Initialize functions name consistent
Make Initialize functions name consistent for Intl.*

Bug: v8:5751
Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
Change-Id: If4736007fc8f048a087469acc5d968e6ece289ce
Reviewed-on: https://chromium-review.googlesource.com/c/1261644
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56390}
2018-10-04 20:52:41 +00:00
Alexei Filippov
e3f40ad253 [heap profiler] Refactor: do not pass parent_obj argument when not needed.
Change-Id: I13e3a54f91e8fbaf595bebb65f9a0326bbacd3eb
Reviewed-on: https://chromium-review.googlesource.com/c/1244286
Commit-Queue: Alexei Filippov <alph@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56389}
2018-10-04 19:21:18 +00:00
Frank Tang
60b0bea81c [Intl] Remove static dtors from Intl
Remove -Wexit-time-destructors warnings which triggered when global
objects cause destructors to be run at exit time.



Bug: v8:8257
Change-Id: I8407f1936cd6d13a2e30f55cfb4907a99ccca033
Reviewed-on: https://chromium-review.googlesource.com/c/1259863
Commit-Queue: Frank Tang <ftang@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56388}
2018-10-04 19:15:02 +00:00
Alexei Filippov
fb4d8c01af Reland: [heap profiler] Refactor: remove SnapshotFiller proxy
Long time ago there were two passes over heap. One was counting
objects and edge and another was filling them. Since then we have
just a single pass, but the filler object is still there.

Remove it for the sake of layering simplicity.

Reviewed-on: https://chromium-review.googlesource.com/1244380
Commit-Queue: Alexei Filippov <alph@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56246}

TBR=ulan@chromium.org

Change-Id: Ie155a79f7aaf9b2612ae89f67b793ba813c364c9
Reviewed-on: https://chromium-review.googlesource.com/c/1261882
Reviewed-by: Alexei Filippov <alph@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Alexei Filippov <alph@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56387}
2018-10-04 18:03:32 +00:00
Deepti Gandluri
f3c6753e53 [wasm-atomics] enable tests on ARM hardware
BUG:v8:8201

Change-Id: I2f0c2f7d26020188dcec6dabe0a08fc49ee0f33b
Reviewed-on: https://chromium-review.googlesource.com/c/1259406
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Deepti Gandluri <gdeepti@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56386}
2018-10-04 17:53:17 +00:00
Junliang Yan
c4f52e9100 PPC/s390: [turbofan] Remove branch_load_poisoning flag.
Port b048c16b4f

Original Commit Message:

    The goal is to remove CL to remove the confusing implications for
    full poisoning.

    This is an alternative to
    https://chromium-review.googlesource.com/c/chromium/src/+/1253341
    where chrome has to work around our implication system.

    In the optimizing compiler, we already have a bottleneck for setting
    mitigation level in src/compiler/pipeline.cc, so it is easy to change
    back to partial mitigations.

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

Change-Id: I96d0651eed2638abddb5486da1e2b55a84e97264
Reviewed-on: https://chromium-review.googlesource.com/c/1261797
Reviewed-by: Joran Siu <joransiu@ca.ibm.com>
Commit-Queue: Junliang Yan <jyan@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#56385}
2018-10-04 17:52:14 +00:00
Tobias Tebbi
91fd0840b5 [csa][torque] Follow-up to: eliminate unnecessary phi nodes in the CSA pipeline
This incorporates feedback from
https://chromium-review.googlesource.com/c/v8/v8/+/1245766/12#message-16ceead795d0ca68d3c564b8900c152e8719ecd6
that got lost due to the code being moved to https://crrev.com/c/1254121.

Change-Id: I7b74dcd5e8ffe62770b32a7c000885e96db01657
Reviewed-on: https://chromium-review.googlesource.com/c/1256968
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56384}
2018-10-04 14:51:22 +00:00
Maya Lekova
4ebeb540d7 [test] Disable a flaky command-line-api-without-side-effects test
Bug: v8:7932
Cq-Include-Trybots: luci.chromium.try:linux_chromium_headless_rel;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: I293b83758be5dadb04c149ffdf7a8a126dca0a50
Reviewed-on: https://chromium-review.googlesource.com/c/1261444
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56383}
2018-10-04 14:41:22 +00:00
v8-ci-autoroll-builder
dba634d5b7 Update test262.
Rolling v8/test/test262/data: 7e65999..ff8b10c

TBR=adamk@chromium.org,gsathya@chromium.org

Change-Id: I7c7bc6367724498f17ccfabce88b29c2f4595121
Reviewed-on: https://chromium-review.googlesource.com/c/1261876
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@{#56382}
2018-10-04 14:35:42 +00:00
Alexei Filippov
c9462a3464 [heap profiler] Refactor: Replace indices with HeapEntry*
Change-Id: I1022cceafed0b27fa2fb5f0f30a1b75fd3a27f3f
Reviewed-on: https://chromium-review.googlesource.com/c/1260258
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Alexei Filippov <alph@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56381}
2018-10-04 14:15:23 +00:00
Benedikt Meurer
7b93585922 [turbofan] Use cheaper Float64 hole checks.
Holes in double arrays are encoded using a signaling NaN bit pattern.
Previously when checking for Float64 holes we did an expensive bit
check always, but most values aren't even NaNs in reality. So we changed
the CheckFloat64Hole operator to first check if the value is a NaN at
all and only if so, perform the concrete bit check (in deferred code).

This improves the array copying test case mentioned in the bug from

  copyPacked: 123 ms.
  copyHoley: 157 ms.

to

  copyPacked: 122 ms.
  copyHoley: 125 ms.

so there's almost no penalty for double holey arrays anymore in case of
copying arrays. This change seems to yield an overall ~1% on the Kraken
benchmark.

Bug: v8:8264
Change-Id: Id7393867ec96fdc080e24d326039f80a9d7b6646
Reviewed-on: https://chromium-review.googlesource.com/c/1261519
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56380}
2018-10-04 13:07:55 +00:00
Sreten Kovacevic
94b5122a8d [mips] Implement AtomicPair operations on MIPS32R6
AtomicPair operations are only available with some instructions
introduced in version R6. Add support for needed instructions.

Change-Id: I808d6ed5b5efafd638846ec599941ebc71d90e23
Reviewed-on: https://chromium-review.googlesource.com/c/1251526
Reviewed-by: Ivica Bogosavljevic <ibogosavljevic@wavecomp.com>
Reviewed-by: Ben Titzer <titzer@chromium.org>
Commit-Queue: Sreten Kovacevic <skovacevic@wavecomp.com>
Cr-Commit-Position: refs/heads/master@{#56379}
2018-10-04 11:34:24 +00:00
Andreas Haas
c862d2c2e4 [cleanup] Use the new taskrunner API in the gc
We want to replace all uses of CallOnForegroundThread eventually by the
new TaskRunner API so that we can eventually deprecate the old API and
remove it.

R=ulan@chromium.org

Bug: v8:8238
Change-Id: I7e451eddf05f1f7f273c5cfd57d82737380f3f02
Reviewed-on: https://chromium-review.googlesource.com/c/1261145
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56378}
2018-10-04 11:18:32 +00:00
Toon Verwaest
06e73f0b27 [parser] Introduce explicit ParseBindingPattern
This makes it more explicit what we're actually parsing and allows us to omit
unnecessary checks.

Change-Id: I3e22ab4af0f23cee51cb689dd6377565e42f9bad
Reviewed-on: https://chromium-review.googlesource.com/c/1260943
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56377}
2018-10-04 11:13:52 +00:00
Toon Verwaest
ebc47c4e67 [parser] Slightly simplify Parse Object/Array Literal
Use Check rather than if peek() + Expect/Consume

Change-Id: I5bc98288a751234117a2708c17dbb68008af5838
Reviewed-on: https://chromium-review.googlesource.com/c/1261144
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56376}
2018-10-04 10:39:54 +00:00
Andreas Haas
7149b87590 [cleanup] Use the new TaskRunner API in the compiler dispatcher
We want to replace all uses of CallOnForegroundThread eventually by the
new TaskRunner API so that we can eventually deprecate the old API and
remove it.

R=leszeks@chromium.org

Bug: v8:8238
Change-Id: I6a1e55fe431225ffe4c77cd3387f3b060eb43edf
Reviewed-on: https://chromium-review.googlesource.com/c/1256866
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56375}
2018-10-04 10:28:34 +00:00
Jaroslav Sevcik
b048c16b4f [turbofan] Remove branch_load_poisoning flag.
The goal is to remove CL to remove the confusing implications for
full poisoning.

This is an alternative to
https://chromium-review.googlesource.com/c/chromium/src/+/1253341
where chrome has to work around our implication system.

In the optimizing compiler, we already have a bottleneck for setting
mitigation level in src/compiler/pipeline.cc, so it is easy to change
back to partial mitigations.

Bug: chromium:888892
Change-Id: I01de7ed7bb91e8b06f8f79cc2d90657a0600892a
Reviewed-on: https://chromium-review.googlesource.com/c/1252985
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Commit-Queue: Jaroslav Sevcik <jarin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56374}
2018-10-04 10:05:40 +00:00
Stephan Herhut
48fd454c95 [cleanup] Resurrect the c1 visualizer output
This had bit-rotten a little and did no longer work for compiling
webassembly code. Also, correct the output of live ranges so that it
can be parsed again.

Bug: v8:8238
Change-Id: I09c2d8bd604f3be12ead8b968f0b70287fad65f1
Reviewed-on: https://chromium-review.googlesource.com/c/1256864
Commit-Queue: Stephan Herhut <herhut@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56373}
2018-10-04 10:01:20 +00:00
Benedikt Meurer
c4ada3de70 [turbofan] Propagate kIdentifyZeros correctly for modulus.
For NumberModulus and SpeculativeNumberModulus there's no observable
difference between 0 and -0 for the right hand side, since both of them
result in NaN (in general the sign of the right hand side is ignored
for modulus in JavaScript). For the left hand side we can just propagate
the zero identification part of the truncation, since we only care about
-0 on the left hand side if the use nodes care about -0 too.

This further improves the Kraken/audio-oscillator test from around 67ms
to 64ms.

Bug: v8:8015, v8:8178
Change-Id: I1f51d42f7df08aaa28a9b0ddd3177df6b76be98c
Reviewed-on: https://chromium-review.googlesource.com/c/1260024
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56372}
2018-10-04 09:57:33 +00:00
Benedikt Meurer
1d2a8e96f8 [turbofan] Unify number rounding operators.
This is a follow-up cleanup to treat NumberRound like the other rounding
operations (NumberFloor, NumberCeil and NumberTrunc).

Bug: v8:8015
Change-Id: I2b2fbc7f0319497d16ccb7472595eeb68be1f51d
Reviewed-on: https://chromium-review.googlesource.com/c/1260403
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56371}
2018-10-04 09:47:27 +00:00
Benedikt Meurer
7cd2cacf50 [turbofan] Avoid unnecessary bit materialization in CheckedInt32Mod.
The slow-path of CheckedInt32Mod(x,y) when x is found to be negative
still had the power of two right hand side optimization, and thus would
perform a dynamic check on y. Now the same dynamic check was done for
the fast-path, and the word operations for this check were pure, leading
to weird bit materialization in TurboFan (due to sea of nodes). But
there's not really a point to be clever for the slow-path, so we just
insert the Uint32Mod operation directly here, which completely avoids
the problem.

This improves the Kraken/audio-oscillator test from around 73ms to 69ms.

Bug: v8:8069
Change-Id: Ie8ea667136c95df2bd8c5ba56ebbc6bd2442ff23
Reviewed-on: https://chromium-review.googlesource.com/c/1259063
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56370}
2018-10-04 09:43:03 +00:00
Benedikt Meurer
513a5bdd04 [turbofan] Fix Word32 (Signed32OrMinusZero) conversions that identify zeros.
When converting a Signed32\/MinusZero value from Word32 to Float64
representation or just passing it through as Word32 (with potential
type checks on it) we don't need to worry about -0 as long as the uses
identify 0 and -0.

Drive-by-fix: Fix the CheckChange() helper in the representation
changer test to pass Truncation::Any() by default.

Bug: chromium:891639, chromium:891612, chromium:891627, v8:8015, v8:8178
Change-Id: I06948ec0cdb8e778cb3678124ef927277a5f40ee
Reviewed-on: https://chromium-review.googlesource.com/c/1258902
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56369}
2018-10-04 09:13:18 +00:00
Dan Elphick
df625be0f7 [heap] Skip marking of read-only roots
Adds new VisitModes VISIT_ALL_BUT_READ_ONLY and
VISIT_STRONG_FOR_SERIALIZATION.

GC-related methods like MarkReachableObjects now now use
VISIT_ALL_BUT_READ_ONLY instead of VISIT_ALL. All GC-related VisitModes
skip iterating over the read-only roots.

All Serializer methods should always use a _FOR_SERIALIZATION value to
ensure they do visit the read-only roots.

Also adds RootsTable::read_only_roots_begin and end methods.

Bug: v8:7464
Change-Id: I468d7ae9f345d9fc0e10837f01dc5b92bd996412
Reviewed-on: https://chromium-review.googlesource.com/c/1256245
Reviewed-by: Yang Guo <yangguo@chromium.org>
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Commit-Queue: Dan Elphick <delphick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56368}
2018-10-04 09:09:59 +00:00
Clemens Hammacher
469c7ee975 Add cancelable lambda tasks
Often, tasks just need to call a single API method. By implementing
such tasks via a lambda, we save a lot of boilerplate. Additionally,
since lambdas are defined inside other function bodies, they have
access to private methods, which sometimes allows for better
encapsulation.

This CL introduces {CancelableLambdaTask} and
{CancelableIdleLambdaTask} and uses them to replace some custom tasks.
More can be refactored later.

R=ahaas@chromium.org

Bug: v8:8238
Change-Id: I88bd2c9bd57ebc32d082528f2e4251d741a0d021
Reviewed-on: https://chromium-review.googlesource.com/c/1256773
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56367}
2018-10-04 09:07:58 +00:00