Commit Graph

45659 Commits

Author SHA1 Message Date
Michael Achenbach
8f7ccb6c1e [build] Support mips toolchain for cross-compiling
This enables compiling V8 stand-alone for mips (big endian)
on an ia32 host with gn args:

custom_toolchain="//:mips-bundled"
v8_use_snapshot=false
v8_enable_i18n_support=false
icu_use_data_file=false
is_debug=false
target_cpu="mips"

Bug: chromium:632390
Change-Id: I0b59126d742a2979dd0fcbcdd3a574008a09479a
Reviewed-on: https://chromium-review.googlesource.com/904990
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51167}
2018-02-08 08:25:47 +00:00
v8-autoroll
20183df53f Update V8 DEPS.
Rolling v8/build: 7e86dc4..3ba6ca6

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/1d86294..b4a4bed

Rolling v8/tools/clang: 2a49b96..357315f

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

Change-Id: I4616ff3d23772623d26d69ed3d5228db8a3e677c
Reviewed-on: https://chromium-review.googlesource.com/908069
Commit-Queue: v8 autoroll <v8-autoroll@chromium.org>
Reviewed-by: v8 autoroll <v8-autoroll@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51166}
2018-02-08 05:02:16 +00:00
Deepti Gandluri
2b67f8de57 [ia32] Fix disassembler tests to test instruction disassembly
Change-Id: I1fe7ba0a942c6da2d1c85c2391762cb434098cf1
Reviewed-on: https://chromium-review.googlesource.com/907346
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Deepti Gandluri <gdeepti@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51165}
2018-02-08 00:25:16 +00:00
Caitlin Potter
601f5f7897 Make JSFunctionPrint() output Builtin names
This change has been useful when inspecting on_reject callbacks in
Isolate::InternalPromiseHasUserDefinedRejectHandler, it's probably
going to be helpful for other things too.

BUG=
R=adamk@chromium.org, littledan@chromium.org

Change-Id: I7c5bac87a3b8bd3ce19d71cf73397a93109976ba
Reviewed-on: https://chromium-review.googlesource.com/907641
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Caitlin Potter <caitp@igalia.com>
Cr-Commit-Position: refs/heads/master@{#51164}
2018-02-07 23:07:39 +00:00
Sergiy Byelozyorov
c509e05792 Whitespace CL
TBR=sergiyb@chromium.org

Bug: chromium:616879
Change-Id: I2cc9f55d1d244fa448d928574a8033e36af13028
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/907572
Reviewed-by: Sergiy Byelozyorov <sergiyb@chromium.org>
Commit-Queue: Sergiy Byelozyorov <sergiyb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51163}
2018-02-07 22:34:49 +00:00
Deepti Gandluri
8fa509d311 [x64] Fix Disassembler tests to actually test disassembly
Currently the disassembler tests continue on unimplemented instructions, fix
to abort instead as most bugs in the disassemblers will appear as unimplemented
instructions.

 - Localize testing disassembler method to abort on unimplemented
 - Fix failing x64 disassembler tests

Change-Id: I703cca9709c528327ec381d05a78cf3314ea4fa9
Reviewed-on: https://chromium-review.googlesource.com/907489
Reviewed-by: Ben Titzer <titzer@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Deepti Gandluri <gdeepti@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51162}
2018-02-07 22:18:09 +00:00
Sergiy Byelozyorov
7fe83f31e1 Whitespace CL
TBR=sergiyb@chromium.org

Bug: chromium:793324
Change-Id: I0d898a6c9bf04b5b6e7bbb706ab62a34317cf393
Reviewed-on: https://chromium-review.googlesource.com/907550
Reviewed-by: Sergiy Byelozyorov <sergiyb@chromium.org>
Commit-Queue: Sergiy Byelozyorov <sergiyb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51161}
2018-02-07 21:33:29 +00:00
Junliang Yan
19a3a44da0 PPC/s390: ignore wasm/regress-808980 on ppc and s390
wasm code manager is known to have issue on reloc tagging and
also constant pool. Ignore until fix go in.

Change-Id: I4d7ddafba3cf8bc81c73a7b156cba39985bce48d
Reviewed-on: https://chromium-review.googlesource.com/906950
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Junliang Yan <jyan@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#51160}
2018-02-07 20:43:09 +00:00
Sergiy Byelozyorov
1ed14848fe Whitespace CL
TBR=sergiyb@chromium.org

No-Try: true
Bug: chromium:616879
Change-Id: I126279d9290958baffc4df4a03642e89c2e60fed
Reviewed-on: https://chromium-review.googlesource.com/906730
Commit-Queue: Sergiy Byelozyorov <sergiyb@chromium.org>
Reviewed-by: Sergiy Byelozyorov <sergiyb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51159}
2018-02-07 20:27:49 +00:00
Benedikt Meurer
14108f4c2e [builtins] Mega-revert to address the Dev blocker in crbug.com/808911.
- Revert "[builtins] Save one word in contexts for Promise.all."
  This reverts commit 7632da067b.
- Revert "[builtins] Also use the Promise#then protector for Promise#finally()."
  This reverts commit d4f072ced3.
- Revert "[builtins] Don't mess with entered context for MicrotaskCallbacks."
  This reverts commit 6703dacdd6.
- Revert "[debugger] Properly deal with settled promises in catch prediction."
  This reverts commit 40dd065823.
- Revert "[builtins] Widen the fast-path for Promise builtins."
  This reverts commit db0556b7e8.
- Revert "[builtins] Unify PerformPromiseThen and optimize it with TurboFan."
  This reverts commit a582199c5e.
- Revert "[builtins] Remove obsolete PromiseBuiltinsAssembler::AppendPromiseCallback."
  This reverts commit 6bf8885290.
- Revert "[builtins] Turn NewPromiseCapability into a proper builtin."
  This reverts commit 313b490ddd.
- Revert "[builtins] Inline InternalPromiseThen into it's only caller"
  This reverts commit f7bd6a2fd6.
- Revert "[builtins] Implement Promise#catch by really calling into Promise#then."
  This reverts commit b23b098fa0.
- Revert "[promise] Remove incorrect fast path"
  This reverts commit 0f6eafe855.
- Revert "[builtins] Squeeze JSPromise::result and JSPromise::reactions into a single field."
  This reverts commit 8a677a2831.
- Revert "[builtins] Refactor promises to reduce GC overhead."
  This reverts commit 8e7737cb58.

Tbr: hpayer@chromium.org
Bug: chromium:800651, chromium:808911, v8:5691, v8:7253
Change-Id: I8c8ea5ed32ed62f6cd8b0d027a3707ddd891e5f1
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
Reviewed-on: https://chromium-review.googlesource.com/906991
Commit-Queue: Yang Guo <yangguo@chromium.org>
Commit-Queue: Adam Klein <adamk@chromium.org>
Reviewed-by: Adam Klein <adamk@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51158}
2018-02-07 19:46:59 +00:00
Karl Schimpf
7f981c6c21 [wasm] Add remaining saturating conversions
Adds the remaining saturating float to int conversion opcodes.

Bug: v8:7226
Change-Id: If84e564a7816eb4aedbc336f5c2e614da22bb10a
Reviewed-on: https://chromium-review.googlesource.com/905472
Commit-Queue: Karl Schimpf <kschimpf@chromium.org>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51157}
2018-02-07 19:45:39 +00:00
Sergiy Byelozyorov
b7cf8ef868 Whitespace CL
TBR=sergiyb@chromium.org

No-Try: true
Bug: chromium:616879
Change-Id: Ic697e7863fb5ef870979ea82b4e6de3efb5cfbd2
Reviewed-on: https://chromium-review.googlesource.com/906773
Commit-Queue: Sergiy Byelozyorov <sergiyb@chromium.org>
Reviewed-by: Sergiy Byelozyorov <sergiyb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51156}
2018-02-07 19:35:28 +00:00
Adam Klein
f1a551800f [parser] More carefully handle destructuring in arrow params
This patch attempts to reduce the special handling of destructuring
assignments in arrow function parameters by "adopting" them from
wherever they were initially parsed into the arrow function's
FunctionState/Scope. This avoids incorrectly re-setting the
Scope of such assignments multiple times for arrow functions
that are nested inside other arrow params themselves.

It also generally seems better, in that we now only rewrite
destructuring assignments for a single function at a time.

Bug: chromium:807096
Change-Id: I6bef5613f99e3e8c130fc0aa2ee5d6fcf2efd34b
Reviewed-on: https://chromium-review.googlesource.com/900168
Reviewed-by: Marja Hölttä <marja@chromium.org>
Reviewed-by: Caitlin Potter <caitp@igalia.com>
Commit-Queue: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51155}
2018-02-07 18:14:28 +00:00
Sathya Gunasekaran
e1ce6ab582 [class] Fix lazy parsing of private fields
Declare the private field variable in the preparser as well, to be
consistent with the parser.

Bug: v8:5386
Change-Id: I961ddf14e47b99701e2463cab0f4d4de140e1e3a
Reviewed-on: https://chromium-review.googlesource.com/905843
Reviewed-by: Marja Hölttä <marja@chromium.org>
Commit-Queue: Sathya Gunasekaran <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51154}
2018-02-07 18:12:50 +00:00
Leszek Swirski
2a90c39a66 [turbofan] Only save live registers on suspend
When suspending, rather than saving all registers up to a certain index,
only save the ones that are live according to the liveness analysis.
Others are saved as optimized out constants, and are skipped during the
GenaratorStore lowering. Symmetrically, only restore live registers when
resuming.

Change-Id: Icc2df905b0fe2fe5c372097bd67d5316edcd1b54
Reviewed-on: https://chromium-review.googlesource.com/905662
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51153}
2018-02-07 18:07:30 +00:00
Yang Guo
876f37c3de [debug] implement break on entry for builtin functions.
We reuse most of the infrastructure to set break points, with minor
differences when we encounter functions where we can only break on entry:
- PrepareFunctionForBreakPoints simply deopts all functions.
- Break point objects have the canonical source position 0.
- Break point is set/checked/cleared via bit on the DebugInfo.
- Debug::Break do not continue stepping since stepping is implemented via
  regular break points and therefore do not interfere with break on entry.

I promise to add more tests.

Bug: v8:178
Change-Id: Ifc8231995c771286db0b848b811e1c3ad3b12494
Reviewed-on: https://chromium-review.googlesource.com/906245
Commit-Queue: Yang Guo <yangguo@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51152}
2018-02-07 17:45:48 +00:00
Ross McIlroy
8238562b60 [MIPS] [TurboFan] Ensure instruction start is in fixed register.
Port https://chromium-review.googlesource.com/c/v8/v8/+/888700 to MIPS

Change-Id: I16cd2de41c790dea307efa7c78125dec1c4304a4
Reviewed-on: https://chromium-review.googlesource.com/906768
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51151}
2018-02-07 17:12:58 +00:00
Peter Marshall
3b8a5879a4 [cleanup] Remove builtin wrappers and use ThrowError helpers in CSA.
Cleanup CL that removes unnecessary builtins that were just wrapping
the throwing of errors. Use the ThrowTypeError and ThrowRangeError
helpers more consistently from CSA.

Change-Id: I2d0c3647340c88c457b27e16c0a81567869b7ec7
Reviewed-on: https://chromium-review.googlesource.com/906769
Commit-Queue: Peter Marshall <petermarshall@chromium.org>
Reviewed-by: Franziska Hinkelmann <franzih@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51150}
2018-02-07 16:26:27 +00:00
Clemens Hammacher
df95bdb789 [wasm] [interpreter] Budget grow_memory like 1000 instructions
If the interpreter has an upper limit of instructions to execute, treat
grow_memory like 1000 other instructions in order to account for the
huge execution time of grow_memory.

R=ahaas@chromium.org

Bug: chromium:807383
Change-Id: Id513a41257734a3041bef45bbc00c461fdec6787
Reviewed-on: https://chromium-review.googlesource.com/905605
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51149}
2018-02-07 15:58:17 +00:00
Junliang Yan
59bff287fc s390: [builtins] Add tests for embedding with .byte directive
Port 7c14a408f9

Original Commit Message:

    It turns out that .incbin can be problematic for build systems, in
    that the included binary file is not detected as a build-time
    dependency.

    The alternative is .byte inclusion, which we test here.

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

Change-Id: Ie42da993ae61964eb3f02f328333ec140902d929
Reviewed-on: https://chromium-review.googlesource.com/906688
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Junliang Yan <jyan@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#51148}
2018-02-07 15:52:38 +00:00
jgruber
90da4e72ae [builtins] Remove .incbin test
The .byte directive will be used instead of .incbin since the latter
comes with complications involving build-time dependency detection.

Drive-by-edits: Move macro definitions closer to their use-sites.

TBR=rmcilroy@chromium.org

Cq-Include-Trybots: luci.v8.try:v8_win64_msvc_compile_rel;master.tryserver.chromium.linux:linux_chromium_rel_ng
Bug: v8:6666
Change-Id: Ibda0b3577688248dbf627cb69965d28309193859
Reviewed-on: https://chromium-review.googlesource.com/906488
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51147}
2018-02-07 15:47:37 +00:00
Mike Stanton
03efbd4cd4 [TurboFan] Array.prototype.reduce[Right] was missing a deopt point
We need a deopt point for the case when we fail to find an initial
element from which to begin the reduction step.

Bug: v8:7384
Change-Id: I5e476ddc433be690577677b018639c4c0c70809b
Reviewed-on: https://chromium-review.googlesource.com/906508
Reviewed-by: Michael Stanton <mvstanton@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Michael Stanton <mvstanton@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51146}
2018-02-07 14:20:37 +00:00
Choongwoo Han
f339f744b2 [typedarray] Remove unused C++ implementations
There are functions that were called by TypedArraySpeciesCreate that
is deleted now. This CL removes Create, HasJSTypedArrayPrototype,
DefaultConstructor in JSTypedArray, which is not used anymore.

Change-Id: Ib4785cc52a8f18f2a3dfc3f27e39a23260cb2a4f
Reviewed-on: https://chromium-review.googlesource.com/905712
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
Commit-Queue: Peter Marshall <petermarshall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51145}
2018-02-07 13:50:57 +00:00
Peter Marshall
796cf1a3ef [cleanup] Remove some unused runtime functions and error wrappers.
We don't need these wrappers - we can just use ThrowTypeError from CSA
instead. There were also a bunch of unused runtime functions which we
can just delete.

This CL has no behavior changes.

Change-Id: I5efefd726aff4cca8e8feba6cd05fe8ff5663931
Reviewed-on: https://chromium-review.googlesource.com/906470
Reviewed-by: Franziska Hinkelmann <franzih@chromium.org>
Commit-Queue: Peter Marshall <petermarshall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51144}
2018-02-07 13:32:47 +00:00
Sergiy Byelozyorov
84580949a6 Place all release script temp files into a common workdir
This makes it easier to restart an aborted merge.

R=machenbach@chromium.org
TEST=ran tools/release/script_test.py locally

Bug: v8:7410
Change-Id: I26b1b09e0000c9c689ad80be32ced9e35634bcec
Reviewed-on: https://chromium-review.googlesource.com/905665
Commit-Queue: Sergiy Byelozyorov <sergiyb@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51143}
2018-02-07 12:58:57 +00:00
Predrag Rudic
7352b3f897 MIPS[64] Port:"[cctest] Support testing Simd128 moves and swaps"
Port 0761b55d21

Original Commit Message:

"Extend the code-generator tests to cover AssembleMove and AssembleSwap with
Simd128 registers and stack slots, for targets that support them.

For this to work however, we need support for passing Simd128 stack parameters
in TurboFan which this patch implements for Arm and x86. PPC and S390 both do
not support the Simd128 representation and it appears MIPS and MIPS64's
implementation of AssembleMove and AssembleSwap do not support it either.

As per the design of the tests, the set of values to perform moves on are
represented in a FixedArray of Smis (for kTagged) and HeapNumbers (for kFloat32
and kFloat64). They are converted to raw values for the moves to be performed
on, to be then converted back into a FixedArray. For the kSimd128
representation, we represent values as a FixedArray of 4 Smis, each representing
a lane. They are converted to a raw Simd128 vector using the `I32x4ReplaceLane`
and `I32x4ExtractLane` operations.

Finally, these tests need Simd128 variables mixed with the CodeStubAssembler
which is not a use-case officially supported. And as a result, the `RecordWrite`
stub does not guarantee to preserve Simd128 registers. To get around this, we
have to be careful to skip write barriers when dealing with Simd128 parameters
inside the "teardown" function, and we've had to move all allocations to the
"setup" function.

Thanks to this, we are able to catch bugs such as this one
https://bugs.chromium.org/p/v8/issues/detail?id=6843."

Change-Id: If867dedf4a2c72cb75c58effda93e3eec432fd67
Reviewed-on: https://chromium-review.googlesource.com/906469
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Ivica Bogosavljevic <ivica.bogosavljevic@mips.com>
Cr-Commit-Position: refs/heads/master@{#51142}
2018-02-07 12:53:57 +00:00
Choongwoo Han
756c8c4e1b [typedarray] Migrate %TypedArray%.of to CSA
- Remove %TypedArray%.of in js/typedarray.js
- Implement %TypedArray%.of in builtins/builtins-typedarray-gen.cc
- This CL makes TA.of 1.5x faster

Bug: v8:5929
Change-Id: Ie165114a0ab9b4ec9ed70840c4c6a42d1eeed101
Reviewed-on: https://chromium-review.googlesource.com/897227
Commit-Queue: Peter Marshall <petermarshall@chromium.org>
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51141}
2018-02-07 12:45:37 +00:00
Georg Neis
f4e42f9d31 [bigint,compiler] Fix endianness issue in bitfield access.
See https://chromium-review.googlesource.com/c/v8/v8/+/904725.

Change-Id: I6b017c0a8d1c521a83e0c6b5315e1c9689bb4f19
Bug: v8:6791
Reviewed-on: https://chromium-review.googlesource.com/906422
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51140}
2018-02-07 11:52:37 +00:00
Peter Marshall
a2aac98ddf [typedarray] Share SpeciesCreateByLength between CSA code.
Move the class declaration for SpeciesCreateByLength to a header file
so that we can share more TypedArray CSA code.

Delete the C++ implementation of species create for typed arrays
because it is no longer used.

Change-Id: I7c43b8ef144ba9a8ce12516f7cb8fb570491cb26
Reviewed-on: https://chromium-review.googlesource.com/904987
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Peter Marshall <petermarshall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51139}
2018-02-07 11:26:56 +00:00
Sergiy Byelozyorov
54f1b2019b Whitespace CL
TBR=sergiyb@chromium.org

Bug: chromium:809620
Change-Id: I8321d33b645fe1b66f2841c447e6b70a73c5a3ab
Reviewed-on: https://chromium-review.googlesource.com/906244
Commit-Queue: Sergiy Byelozyorov <sergiyb@chromium.org>
Reviewed-by: Sergiy Byelozyorov <sergiyb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51138}
2018-02-07 09:57:56 +00:00
Choongwoo Han
dce3956675 [typedarray] Refactoring for switch cases
Introduce DispatchTypedArrayByElementsKind function to avoid repeated
macro uses of CSA switch statements for typed array elements kind.

Change-Id: I31d143cdf223fe164f2b248099ad874f83e8317b
Reviewed-on: https://chromium-review.googlesource.com/906163
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Peter Marshall <petermarshall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51137}
2018-02-07 09:51:46 +00:00
Junliang Yan
9288ad88bb PPC/s390: define VisitF32x4Neg and VisitF32x4Abs
Change-Id: Ib7f5d752b772f15386d9b1f50749b8c0381e2354
Reviewed-on: https://chromium-review.googlesource.com/905338
Reviewed-by: Joran Siu <joransiu@ca.ibm.com>
Commit-Queue: Junliang Yan <jyan@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#51136}
2018-02-07 07:23:13 +00:00
v8-autoroll
b82b4c629f Update V8 DEPS.
Rolling v8/build: ac54aef..7e86dc4

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/6d0f862..1d86294

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

Change-Id: I31f5c4d20ffb67468a5d086fa2d7071e4a7752a3
Reviewed-on: https://chromium-review.googlesource.com/906122
Reviewed-by: v8 autoroll <v8-autoroll@chromium.org>
Commit-Queue: v8 autoroll <v8-autoroll@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51135}
2018-02-07 04:59:24 +00:00
Eric Holk
6525dd389c [wasm] Report out of memory conditions correctly for NewNativeModule
We are seeing rare crashes due to dereferencing a null pointer shortly after
calling NewNativeModule. The most likely cause is that we failed the allocation
and returned a null pointer. Now we will use V8::FatalProcessOutOfMemory so that
this gets handled correctly.

Bug: chromium:809002
Change-Id: I7e11897c4b93a1fb9eab3b5f16fb42c27e719f87
Reviewed-on: https://chromium-review.googlesource.com/905685
Reviewed-by: Bill Budge <bbudge@chromium.org>
Commit-Queue: Eric Holk <eholk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51134}
2018-02-07 00:04:32 +00:00
Gabriel Charette
384a5223b7 [v8::ItemParallelJob] Add an instant trace event to log num_tasks/num_items for ease of trace diagnosis.
R=mlippautz@chromium.org

Bug: chromium:651354
Change-Id: I5762813f6bd7b3c549f22ee8e43c59ca9edbe915
Reviewed-on: https://chromium-review.googlesource.com/904523
Commit-Queue: Gabriel Charette <gab@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51133}
2018-02-06 22:02:19 +00:00
Gabriel Charette
7d58b3c46c Isolate ItemParallelJob implementation in CC file.
This CL is a pure code move based on top of
https://chromium-review.googlesource.com/c/v8/v8/+/899365

Having it all in the header was becoming more and more tedious:
requiring large rebuilds for impl changes and
requiring exporting unrelated symbols merely so that unittests
could link
@ https://chromium-review.googlesource.com/c/v8/v8/+/899365
and https://chromium-review.googlesource.com/c/v8/v8/+/904523/2

R=mlippautz@chromium.org

Bug: chromium:651354
Change-Id: Ib34043d061dd3b1221cd06799eddc888090fe1c1
Reviewed-on: https://chromium-review.googlesource.com/904167
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Gabriel Charette <gab@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51132}
2018-02-06 21:55:49 +00:00
Gabriel Charette
85b8daed63 Add V8.GC.ParallelTaskLatencyMicroSeconds metric.
It will record the time-to-schedule-after-job-start for different
task types to try to highlight use cases where contention might
be a problem (and show improvements to it later).

Also introducing AsyncTimedHistogram to support this use case whose
reported timings go beyond a single scope (i.e. the async version of
ScopedTimedHistogram).

Bug: chromium:807606
Change-Id: Ib4d581fa8b001723dfe8c91102280e9608b4fabb
Reviewed-on: https://chromium-review.googlesource.com/899365
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Gabriel Charette <gab@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51131}
2018-02-06 21:53:49 +00:00
Gabriel Charette
f7758dfa02 Log error instead of DCHECK in absence of high resolution ticks clock.
Turns out this path is used in the wild for logs and counters.

We may eventually want to split TimedHistograms based on low resolution
clocks to avoid polluting metrics but for now just make it a warning
to raise awereness when debugging in such an environment.

R=hpayer@chromium.org

Bug: chromium:809016
Change-Id: I5f2dd511d5fce730256979d58212468f08a2d680
Reviewed-on: https://chromium-review.googlesource.com/904045
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Commit-Queue: Gabriel Charette <gab@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51130}
2018-02-06 21:23:59 +00:00
kschimpf
5eca0acc0a [wasm] Clean up float to integer conversions
Cleans up the implementation of trapping/saturating operations to
use existing models of types, instead of defining new ones. That is,
it uses MachineType to represent the kind of integer/float value the
conversion is operating on.

It also removes the need to define NumericImplementation by using
the actual opcodes to determine if the instruction is trapping or
saturating.

Finally, it now defines a single method to implement the truncating
(that doesn't use a ccall) conversions. The previous code had two
methods, one for I32 and one for I64.

Bug: v8:7226
Change-Id: Ia869416c8bd1abe76d0583c28a3105102d130b46
Reviewed-on: https://chromium-review.googlesource.com/900558
Commit-Queue: Karl Schimpf <kschimpf@chromium.org>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51129}
2018-02-06 20:53:57 +00:00
Sathya Gunasekaran
ec434d6767 [class] Ban #constructor as a private field name
Bug: v8:5368
Change-Id: Idcb13e039614167da8b5be879e5644dbcb9df271
Reviewed-on: https://chromium-review.googlesource.com/899881
Reviewed-by: Georg Neis <neis@chromium.org>
Commit-Queue: Sathya Gunasekaran <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51128}
2018-02-06 18:58:37 +00:00
Joakim Bengtsson
134cd88243 Wait on the semaphore for all finished unmapper tasks.
The task count was reset after handling the first task, so the wait
loop would end after one iteration. As a result unmapping tasks might
have been left running even after waiting for the tasks to be
completed.

Bug: v8:7412
Change-Id: I869848477946589d0370ab038d135393e816a7c0
Reviewed-on: https://chromium-review.googlesource.com/903166
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51127}
2018-02-06 18:02:58 +00:00
Jaroslav Sevcik
03cf107078 [turbofan] Properly undef macros in machine-operator.cc
Change-Id: I1bf57ab030e738f0b4320fb3b74fc8600cd34e4d
Reviewed-on: https://chromium-review.googlesource.com/904482
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51126}
2018-02-06 17:58:28 +00:00
Benedikt Meurer
7632da067b [builtins] Save one word in contexts for Promise.all.
In the contexts for the resolver closures used in Promise.all we can
save the "already visited" cell, by just setting the index slot to a
negative value, which then indicates that this element was already
done.

Bug: v8:7253
Change-Id: I1296a2216eac3b51368c1e7795dbcd2c80cc430a
Reviewed-on: https://chromium-review.googlesource.com/903928
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51125}
2018-02-06 17:53:48 +00:00
Junliang Yan
d468ff4e1f s390: Reland "Reland "[builtins] Add .incbin cctest""
Port 47e272b206

Original Commit Message:

    This is a reland of ef06feded6.

    Original change's description:
    > Reland "[builtins] Add .incbin cctest"
    >
    > This is a reland of b012816155.
    >
    > Original change's description:
    > > [builtins] Add .incbin cctest
    > >
    > > Just to ensure this is portable across all platforms.
    > >
    > > Credits go to https://github.com/graphitemaster/incbin, bits of the
    > > .incbin code were taken from there. Thanks!
    > >
    > > Reland of https://crrev.com/c/881181
    > >
    > > Bug: v8:6666
    > > Change-Id: I5c0dbf56b1c987fd88607dca69b39d65b59cdefc
    > > Reviewed-on: https://chromium-review.googlesource.com/895597
    > > Commit-Queue: Jakob Gruber <jgruber@chromium.org>
    > > Reviewed-by: Michael Achenbach <machenbach@chromium.org>
    > > Cr-Commit-Position: refs/heads/master@{#51042}
    >
    > Cq-Include-Trybots: luci.v8.try:v8_win64_msvc_compile_rel
    > Bug: v8:6666
    > Change-Id: I8fc0963e28996a84ed56c2e740d895e26611abf0
    > Reviewed-on: https://chromium-review.googlesource.com/897630
    > Commit-Queue: Jakob Gruber <jgruber@chromium.org>
    > Reviewed-by: Michael Achenbach <machenbach@chromium.org>
    > Cr-Commit-Position: refs/heads/master@{#51054}

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

Change-Id: I863d01a4a7d91f9f2128e4598f417efe49c43e7b
Reviewed-on: https://chromium-review.googlesource.com/902431
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Junliang Yan <jyan@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#51124}
2018-02-06 17:41:12 +00:00
Deepti Gandluri
3363e51958 [wasm] Add F32x4{Abs, Neg, AddHoriz}
- Remove redundant instruction from I16x8Splat
 - Force F32x4Splat to use movss, as using MacroAssembler can mix SSE/AVX
 instructions

Bug: v8:6020
Change-Id: I781c22adecf892a79b6a38c3d83fc4022f9067de
Reviewed-on: https://chromium-review.googlesource.com/898429
Reviewed-by: Bill Budge <bbudge@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Deepti Gandluri <gdeepti@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51123}
2018-02-06 17:31:42 +00:00
Peter Marshall
cf9b487355 [typedarray] Port ConstructByIterable by CSA.
This is the last piece of the TypedArray constructors that was still
written in JS.

Bug: v8:7102
Change-Id: I7c4dc867b09408caa4eec2873ea7185b6c61a525
Reviewed-on: https://chromium-review.googlesource.com/888751
Commit-Queue: Peter Marshall <petermarshall@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51122}
2018-02-06 17:06:43 +00:00
Gabriel Charette
cdecc37500 [v8::heap] Include main thread in num_tasks computations.
The num_tasks computation has long been based on NumberOfAvailableBackgroundThreads()

We used to have one background worker per core, stealing cycles from
the main thread. I fixed that @ crrev.com/534414. But now this
computation is wrong and generates one less task than it should (one
per worker but the main thread takes task  in practice).

Other usage of NumberOfAvailableBackgroundThreads() in V8 seem correct
already so this is the only tweak required.

R=mlippautz@chromium.org

Bug: chromium:808028
Change-Id: I784ed9b764017f146931547d30be4a3b180b5a2c
Reviewed-on: https://chromium-review.googlesource.com/904662
Commit-Queue: Gabriel Charette <gab@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51121}
2018-02-06 16:22:17 +00:00
Gabriel Charette
3d11bf7711 Highlight individual work items in tracing of parallel GC.
This merely re-uses the same ScopeId as the task. Tracing shows these
as a nested layer with the same name. This is not the cleanest way to
do this but it makes the trace clearer for a minimal diff.

R=mlippautz@chromium.org

Bug: chromium:651354
Change-Id: Ib30ec7d04a30657a63a49aba9698cacd9af950d3
Reviewed-on: https://chromium-review.googlesource.com/904164
Commit-Queue: Gabriel Charette <gab@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51120}
2018-02-06 15:42:17 +00:00
peterwmwong
74e754a3d8 [typedarray] Fix perf of TA.set with different type
Removes the overhead of Zone allocating temporary space
that only slightly improved performance of the overlap
(less common) case.

Bug: chromium:808360
Change-Id: Ic92f20f15decb12b916ee23267debd9adc785ee0
Reviewed-on: https://chromium-review.googlesource.com/904462
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Peter Wong <peter.wm.wong@gmail.com>
Cr-Commit-Position: refs/heads/master@{#51119}
2018-02-06 15:04:37 +00:00
Pierre Langlois
9d43ee8022 [perf-prof] Ignore source position entries with no source script.
The perf jit support assumes that if a code object has source position entries,
then it has a source file associated with them. However, the WasmToJS wrapper
stubs are exceptions to this rule which causes a crash when using `--perf-prof`
with asm.js or WASM code.

Change-Id: I047e229477844bf5357c8553ee50e22c089ab1c2
Reviewed-on: https://chromium-review.googlesource.com/897643
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Pierre Langlois <pierre.langlois@arm.com>
Cr-Commit-Position: refs/heads/master@{#51118}
2018-02-06 13:41:34 +00:00