Commit Graph

57182 Commits

Author SHA1 Message Date
Santiago Aboy Solanes
c7966ad5a0 [test] Add micro-benchmark tests for calls with local vars
Reorganized folder as well.

Bug: v8:9451
Change-Id: I65203aa88791dd05d6ca0127d5b832ccd898aa52
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1695901
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Reviewed-by: Dan Elphick <delphick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62690}
2019-07-12 16:54:01 +00:00
Frank Tang
b9a621cd18 Stage dayPeriod and fractionalSecondDigits options.
Move to stage for
harmony_intl_dateformat_day_period
harmony_intl_dateformat_fractional_second_digits
after ECMA402 SC reach consensus July 11 2019 to treat them as Stage 3.
Aiming to flip to ship for m78. Just get ready before sending out I2S
after m77 branch off in end of July.

Bug: v8:9283, v8:9284
Change-Id: I9bb145827157af9debc75cc4fc3859a60a5a023c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1699301
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62689}
2019-07-12 16:19:21 +00:00
Jakob Kummerow
6f05773467 [wasm-c-api] Add test for traps
Change-Id: I51c25c3e41d11ac2419aac1041fe92192f8fdb9e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1698382
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62688}
2019-07-12 15:31:21 +00:00
Dan Elphick
23583f0aa7 [compiler] Extend stress mode for lazy source positions
Make stress mode collect source positions for functions that weren't
lazily compiled.

Bug: v8:8510
Change-Id: I632f4b39746a7500ced3b7de9840601c4681856e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1700063
Auto-Submit: Dan Elphick <delphick@chromium.org>
Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62687}
2019-07-12 15:19:42 +00:00
Jeremy Roman
23ff6b2fb7 Explicitly reserve those tags which cannot be trivially reused without breaking back compat.
Bug: chromium:982304
Change-Id: I1a313ca67d6e3a9430f74f519a236c7dd4f88418
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1698923
Commit-Queue: Jeremy Roman <jbroman@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62686}
2019-07-12 14:59:01 +00:00
Jakob Kummerow
37cb58b85f [wasm-c-api] Add test with multiple threads
Change-Id: Ie7a8b7fe22bed8092135c0e48cb681fbdd14b9fd
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1698381
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62685}
2019-07-12 14:47:58 +00:00
Nico Hartmann
1b2b1a67d2 [turbofan] Speculative BigIntNegate
This CL adds a speculative operator for BigInt negation that is
lowered to the respective builtin call and is optimized to native
64 bit machine operations if truncated. In particular, this change
allows negative BigInt constants (e.g. -5n) to be lowered.

Bug: v8:9407
Change-Id: Ia98fd6dee18a31ce56efbe537f4352b1582539e7
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1695463
Commit-Queue: Nico Hartmann <nicohartmann@google.com>
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62684}
2019-07-12 14:42:49 +00:00
Nico Hartmann
e3b2697e60 [turbofan] Zero-initialize BigInt padding
The code generated for ChangeUint64ToBigInt in the
EffectControlLinearizer did not initialize the optional padding
field of newly allocated BigInts. This padding field is present
on 64 bit builds without pointer compression enabled. This CL
fixes this by 0-filling the padding field if present.

Bug: v8:9407
Change-Id: I511e163e676dc966a3eb6dfb92b5065e36329225
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1695464
Reviewed-by: Georg Neis <neis@chromium.org>
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Commit-Queue: Nico Hartmann <nicohartmann@google.com>
Cr-Commit-Position: refs/heads/master@{#62683}
2019-07-12 14:38:59 +00:00
Michael Achenbach
cfe51d6bf1 [test] Add --assert-types flag to linux x64 release builders
Bug: v8:9476
Change-Id: Id3660d40fe219ee0816ac8550ee8affd1be4b95b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1698399
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62682}
2019-07-12 14:30:49 +00:00
Mike Stanton
ecf2e1cf7a [Turbofan] Brokerize tagged templates in the bytecode graph builder
The bytecode graph builder currently creates the tagged template if
it hasn't yet been done. This CL moves that work to serialization time.

Bug: v8:7790
Change-Id: I9571c5ad2f553584869056fb0cf501e03563d6f0
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1687670
Commit-Queue: Michael Stanton <mvstanton@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62681}
2019-07-12 14:09:09 +00:00
Andreas Haas
83cb73f362 Revert "[wasm] Compile JS to WASM wrappers asynchronously"
This reverts commit 9a9aa71ff5.

Reason for revert: https://ci.chromium.org/p/v8/builders/ci/V8-Blink%20Linux%2064/33101

Original change's description:
> [wasm] Compile JS to WASM wrappers asynchronously
> 
> R=​mstarzinger@chromium.org, ahaas@chromium.org
> 
> Bug: v8:9231
> Change-Id: I9e18073bbe25bf8c9c5f9ace102316e6209d0459
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1669699
> Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
> Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
> Reviewed-by: Andreas Haas <ahaas@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#62672}

TBR=mstarzinger@chromium.org,ahaas@chromium.org,thibaudm@chromium.org

Change-Id: I4c66663ca8a3f12f578c451f3c25705cebc753a7
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:9231
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1700066
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62680}
2019-07-12 14:03:51 +00:00
Michael Achenbach
0ce30904c4 Revert "Reland "[csa] add hint to CAST error message to break in mksnapshot""
This reverts commit a10a1a65a2.

Reason: Huge test time regression, see https://crbug.com/v8/9402.

Bug: v8:9402
Change-Id: Ia71309d255ed8d9c3e96a90cc5bf6cb3ad77beaf
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1698400
Auto-Submit: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62679}
2019-07-12 14:02:39 +00:00
Santiago Aboy Solanes
25aab0f3f0 [ptr-compr][codegen] Combine load and Pointer decompression when possible
Similar to https://chromium-review.googlesource.com/c/v8/v8/+/1697246 but
for the Pointer case.

The three CLs combined bring good improvements to the code generation,
both in code size and then in runtime.

Cq-Include-Trybots: luci.v8.try:v8_linux64_pointer_compression_rel_ng
Cq-Include-Trybots: luci.v8.try:v8_linux64_arm64_pointer_compression_rel_ng
Bug: v8:7703
Change-Id: I0903df55f3e19d3ee4dddb3c069ddc27b3265cd3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1698395
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62678}
2019-07-12 12:37:17 +00:00
Santiago Aboy Solanes
933286fa14 [ptr-compr][codegen] Combine load and Any decompression when possible
Similar to https://chromium-review.googlesource.com/c/v8/v8/+/1697246 but
for the Any case.

Cq-Include-Trybots: luci.v8.try:v8_linux64_pointer_compression_rel_ng
Cq-Include-Trybots: luci.v8.try:v8_linux64_arm64_pointer_compression_rel_ng
Bug: v8:7703
Change-Id: I99f839faad17da35adac8a084289b1553530d4a2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1698394
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62677}
2019-07-12 12:27:07 +00:00
Santiago Aboy Solanes
d410df568a [ptr-compr][codegen] Combine load and signed decompression when possible
In essence, it simplifies the pattern (in x64):
  movl register, ___
  movlsxlq register, register
into:
  movlsxlq register, ___

This makes the code smaller and run faster, without compromising.
We can do something similar for Arm64 too.

The cases for Pointer and Any seem to be trickier but there seems to be
room to improve as well.

Cq-Include-Trybots: luci.v8.try:v8_linux64_pointer_compression_rel_ng
Cq-Include-Trybots: luci.v8.try:v8_linux64_arm64_pointer_compression_rel_ng
Bug: v8:7703
Change-Id: I583bdfafdae9330be0a08ad1dd4c196e7de2f0d5
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1697246
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62676}
2019-07-12 12:21:57 +00:00
Mu Tao
64419b074a [mips64][codegen] Remove dead argument to Assember::stop
This CL removes Assember::stop invoking's dead argument accordingly
(https://chromium-review.googlesource.com/c/v8/v8/+/1692925).

R=clemensh@chromium.org, xwafish@gmail.com

Change-Id: I9f4d91f15e3bc9e56815a328326997a273e42fee
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1699841
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62675}
2019-07-12 12:06:27 +00:00
Igor Sheludko
00ed3a2df5 [classes] Properly handle properties count slack
Bug: chromium:979401
Change-Id: I99ab2fd04bd2e23b4d7a494cecc056ec74cb9d04
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1687422
Auto-Submit: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62674}
2019-07-12 11:57:17 +00:00
Ulan Degenbaev
9ebdcced8f [snapshot] Fix clearing of feedback vector in serializer
The serializer clears JSFunctions together with feedback vectors
assuming that there is one to one correspondence between them.

That does not work in the case when there are multiple JSFunctions
sharing the same feedback vector. This patch ensures that all such
JSFunctions are properly cleared.

Bug: v8:7857
Change-Id: Ie441089e12bda5a8be7f9bed90f7be9499938609
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1698383
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62673}
2019-07-12 11:11:13 +00:00
Thibaud Michaud
9a9aa71ff5 [wasm] Compile JS to WASM wrappers asynchronously
R=mstarzinger@chromium.org, ahaas@chromium.org

Bug: v8:9231
Change-Id: I9e18073bbe25bf8c9c5f9ace102316e6209d0459
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1669699
Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62672}
2019-07-12 10:56:13 +00:00
Sathya Gunasekaran
cc9964bb65 [ic] Add benchmark for LdaKeyedLoad
Bug: v8:9449
Change-Id: I7c50db92459df2a8a7da7b0bd2efdd2f3bed3e46
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1690952
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Sathya Gunasekaran <gsathya@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Auto-Submit: Sathya Gunasekaran <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62671}
2019-07-12 10:33:11 +00:00
Peter Marshall
3f3625f3cf [cleanup] Reduce frames.h include ball from 686 to ~270
Everyone was getting a copy of this through debug.h.

Bug: v8:9396
Change-Id: I5189cb4bf27a3381768b0be479d7b3d60dec20bb
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1695472
Commit-Queue: Peter Marshall <petermarshall@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62670}
2019-07-12 10:20:41 +00:00
Sam Clegg
436fcaa032 Fix some python nits in tools/testrunner/standard_runner.py
I noticed the indentation was off in one function, but also fixed
all the other flake8 issues in this file.

Change-Id: I2303ed87da7154484a872315f8355f57621514c4
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1697054
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Sam Clegg <sbc@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62669}
2019-07-12 10:17:31 +00:00
Sathya Gunasekaran
0461a2ac29 [ic] Fix private field lookup in generic case
Previously, we didn't have access checks for the megamorphic case cause
we'd never get to this IC state for a receiver that doesn't hold the
right private field. But now with lazy feedback allocation we share
the megamorphic case code paths for the uninitialized loads as well,
which exposes our bug.

Bug: chromium:982702
Change-Id: I419406bcfc52575260a85d05520c1662735e15f8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1697256
Reviewed-by: Mythri Alle <mythria@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Sathya Gunasekaran <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62668}
2019-07-12 09:42:11 +00:00
Darius Mercadier
b0abfb4fc7 [heap] Add fast allocation strategy (--gc-freelist-strategy=1)
This CL adds a new FreeList strategy, that can be turned on by using flag
`--gc-freelist-strategy=1`.  It is inspired by FreeListLegacy, and differs from
it in the following ways:
 - Only has 3 categories: Medium, Large and Huge.
 - Any block that would have belong to tiniest, tiny or small in FreeListLegacy
   is considered wasted.
 - Allocation is done only in Huge, Medium and Large (in that order), using a
   first-fit strategy (only the first block of each freelist is ever considered
   though).
 - Performances is supposed to be better than FreeListLegacy, but memory usage
   should be higher (because fragmentation will probably be higher).

Bug: v8:9329
Change-Id: Ib399196788f1dfaa1aeddc3dc721375dd7da65f1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1697248
Commit-Queue: Darius Mercadier <dmercadier@google.com>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62667}
2019-07-12 09:21:14 +00:00
Michael Starzinger
77a17022b8 [cleanup] Fix NOLINT(runtime/references) for MIPS simulator.
R=clemensh@chromium.org
BUG=v8:9429,v8:9396

Change-Id: I1d8b5b67e5cd1b1788e6c0dcb45762c555b6f0e0
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1695471
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62666}
2019-07-12 09:16:09 +00:00
Nico Hartmann
99df710d4c [turbofan] Push BigInt truncation over addition and heap constants
This change implements lowering of speculative BigInt addition as well as
BigInt heap constants to corresponding int64 versions, if they are used in
a context where the result is truncated to the least significant 64 bits
(e.g. using asUintN). The JSHeapBroker is extended to provide access to the
BigInt's least significant digit during concurrent compilation. The BigInt
context (required to introduce correct conversions) is recognized in the
RepresentationChanger by either the output type propagated downward or the
TypeCheckKind propagated upward. This is necessary, because the TypeCheckKind
may only be set by nodes that may potentially deopt (and sit in the effect
chain). This is the case for SpeculativeBigIntAdd, but not for BigIntAsUintN.

This CL contains a simple fix to prevent int64-lowered BigInts to flow into
state values as the deoptimizer cannot handle them yet. A more sophisticated
solution to allow the deoptimizer to materialize truncated BigInts will be
added in a following CL.

Bug: v8:9407
Change-Id: I96a293e9077962f53e5f199857644f004e3ae56e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1684183
Commit-Queue: Nico Hartmann <nicohartmann@google.com>
Reviewed-by: Georg Neis <neis@chromium.org>
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62665}
2019-07-12 09:05:29 +00:00
Georg Schmid
2e82ead865 [turbofan] Add optional runtime checks for range types
This CL adds the --assert-types flag to d8, which is intended to
insert additional runtime checks after typed nodes, verifying the
validity of our typing rules. So far, only range types are checked.

Thanks to Neil Patil for suggesting something similar.

R=neis@chromium.org, tebbi@chromium.org

Change-Id: I5eb2c482235ec8cd07ee802ca7c12c86c2d3dc40
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1678372
Commit-Queue: Georg Schmid <gsps@google.com>
Reviewed-by: Georg Neis <neis@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62664}
2019-07-12 08:32:59 +00:00
Frank Tang
d7479d79c7 Roll test262
https://chromium.googlesource.com/external/github.com/tc39/test262/+log/1ef21eb..6cb0a5

Bug: v8:7834
Change-Id: I809d7ddc0c579cf3fa8c9563d8f0ef59d4cc708b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1699302
Auto-Submit: Frank Tang <ftang@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62663}
2019-07-12 08:17:38 +00:00
Michael Achenbach
ccd3747222 [foozzie] Migrate extra-flags generation to clusterfuzz side
NOTRY=true

Bug: chromium:813833,chromium:983128
Change-Id: I449796b761f53bb15a3563604d5a4a9018035cb6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1697255
Reviewed-by: Tamer Tas <tmrts@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62662}
2019-07-12 07:40:58 +00:00
Andreas Haas
4786c5c8f1 [wasm] Support table.copy for multiple tables
Even though this is not spec'ed yet, it's good to have an implementation
so that we can use clusterfuzz on it.

I changed the parameter order (hopefully) everywhere to
(table_dst_index, table_src_index, ...). This corresponds to the
(dst, src, ...) parameter order for the entry indices.

R=binji@chromium.org

Bug: v8:7581 chromium:980475
Change-Id: I2fb36ffd4bb2f2be5b22c8366732295fa6759236
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1698386
Reviewed-by: Ben Smith <binji@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62661}
2019-07-12 07:29:18 +00:00
Jon Kunkee
13a04abacd fix: move V8_EXPORT_PRIVATE marks to prevent unresolvable references
This change fixes missing symbol errors in the Windows 10 on ARM build
of Node.js.

When a whole class is marked for export, all of its members are marked
as well. This can be a problem when inline members call undefined yet
inline members of other classes: the exported function will contain a
reference to the undefined inline function that should be satisfied at
link time, but because the other function is inline no symbol will be
produced that will satisfy that reference.

Clang gets around this by masking inlined class members from export
using /Fc:dllexportInlines-. This is why b0a2a567 worked.

Node.js' Windows builds use MSVC and so do not have access to this
flag. This results in unresolved symbols at link time.

Bug: v8:9465
Change-Id: Ief9c7ab6ba35d22f995939eb62a64d6f1992ed85
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1696771
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62660}
2019-07-12 07:17:18 +00:00
Yutaka Hirano
92e75df1a0 Reland: Serialize native errors
This is a reland of https://crrev.com/c/v8/v8/+/1692366. The original
change was reverted because it broke some blink tests. This will be
landed after suppressing them:
https://crrev.com/c/chromium/src/+/1695541

Make native errors serializable.

The implementation is mostly straightforward, but there is one
exception: the stack property. Although the property is not specified,
the spec for error cloning asks us to preserve the property if
possible. This implementation serializes the property only when it is
a string, and otherwise ignores it.

Spec: https://github.com/whatwg/html/pull/4665
Intent-to-Ship: https://groups.google.com/a/chromium.org/forum/#!topic/blink-dev/f8JngIi8qYs

Bug: chromium:970079, v8:9462
Change-Id: Ibf012754f30237f6b5acf119ef834e73727a230f
Cq-Include-Trybots: luci.v8.try:v8_linux_blink_rel
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1695202
Auto-Submit: Yutaka Hirano <yhirano@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62659}
2019-07-12 06:09:13 +00:00
v8-ci-autoroll-builder
b5dc0014d7 Update V8 DEPS.
Rolling v8/build: 40634f1..c989268

Rolling v8/buildtools: 80b545b..95c72f3

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/b79dda9..1abe66f

Rolling v8/third_party/depot_tools: d3f6994..78dec04

Rolling v8/tools/luci-go: git_revision:25958d48e89e980e2a97daeddc977fb5e2e1fb8c..git_revision:7d11fd9e66407c49cb6c8546a2ae45ea993a240c

Rolling v8/tools/luci-go: git_revision:25958d48e89e980e2a97daeddc977fb5e2e1fb8c..git_revision:7d11fd9e66407c49cb6c8546a2ae45ea993a240c

Rolling v8/tools/luci-go: git_revision:25958d48e89e980e2a97daeddc977fb5e2e1fb8c..git_revision:7d11fd9e66407c49cb6c8546a2ae45ea993a240c

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

Change-Id: I014010e41a1fe31582ab5aa3abbb28b1f1be32f9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1698803
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@{#62658}
2019-07-12 03:33:33 +00:00
Ben Smith
cc71e231f7 [wasm][threads] Fix alignment of i64.atomic.wait
The alignment should be 3 (i.e. 8 bytes), but was specified as 2 (i.e. 4
bytes).

Bug: v8:9425
Change-Id: I0beb09df25fe0281ed604909e894afd804f5411e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1693836
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Ben Smith <binji@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62657}
2019-07-11 18:18:36 +00:00
Andreas Haas
4f8058e325 [wasm] Support table.init for multiple tables
Even though this is not spec'ed yet, it's good to have an implementation
so that we can use clusterfuzz on it.

R=binji@chromium.org

Bug: v8:7581
Change-Id: I323625322e5240dc6ac224dce8a1f1f7f6070758
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1695478
Reviewed-by: Ben Smith <binji@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62656}
2019-07-11 17:38:16 +00:00
Jakob Kummerow
f43944a222 [cleanup] Unify exports handling in WasmModuleBuilder
Change-Id: Id474294a808f5c77321cd12ff5333eb6000b04fa
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1692933
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62655}
2019-07-11 15:50:30 +00:00
Tobias Tebbi
03f3c8acc2 [gc] avoid new-space double-aligned allocations until fixed
This is a partial revert of
https://chromium-review.googlesource.com/c/v8/v8/+/1675960

Bug: v8:9472
Change-Id: I57ffc8d90a57336197cbf6ee27ebf9d1c914ec73
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1697745
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Auto-Submit: Tobias Tebbi <tebbi@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62654}
2019-07-11 15:44:30 +00:00
Mythri A
b086cb7b9a Check that function was prepared before optimizing using manually
With lazy feedback allocation and bytecode flushing we need to call
%PrepareFunctionForOptimize before we call %OptimizeFunctionOnNextCall/
%OptimizeOsr. This cl:
1. Adds an additional state in pending optimized table to check if the
optimization was triggered manually.
2. Changes the compilation pipeline to delete the entry from pending
optimized table only if the optimization was triggered through
%OptimizeFunctionOnNextCall / %OptimizeOsr.
3. Adds a check to enforce %PrepareFunctionForOptimize was called.
4. Adds a new run-time flag to only check in the d8 test runner. We
don't want this check enabled in other cases like clusterfuzz that doesn't
ensure %PrepareFunctionForOptimize is called.

Bug: v8:8394, v8:8801, v8:9183
Change-Id: I9ae2b2da812e313c746b6df0b2da864c2ed5de51
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1664810
Commit-Queue: Mythri Alle <mythria@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62653}
2019-07-11 14:57:49 +00:00
Maciej Goszczycki
01db8ede94 [roheap] Add BasicMemoryChunk
BasicMemoryChunk sits above the MemoryChunk in the chunk hierarchy and
is responsible for storing the bare minimum data to identify a chunk of
memory, without worrying about GC etc.

This change also completes the MemoryChunk offset asserts, which were
previously missing for few key properties.

Bug: v8:7464
Change-Id: Id4c7716c4ed5722ceca3cbc66d668aed016c74b0
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1688843
Commit-Queue: Maciej Goszczycki <goszczycki@google.com>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62652}
2019-07-11 14:52:59 +00:00
Jakob Kummerow
b86a506d2d [wasm-c-api] Add test for Table operations
Change-Id: Id1c46ca22002c358155823e3caae18f0ed9c47f5
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1691033
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62651}
2019-07-11 14:35:29 +00:00
Peter Marshall
44da77fcd4 [cpu-profiler] Disable DCHECK for arm simulator
The simulator builds have bugs which cause invalid frame markers in
some cases.

Change-Id: I837732c6f5efe24821415a0ae0626578bbcc3a7e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1697253
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Commit-Queue: Peter Marshall <petermarshall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62650}
2019-07-11 14:11:29 +00:00
Mythri A
b048429ec3 [runtime] Remove try_fast path from GetOwnPropertyNames builtin
GetOwnPropertyNameTryFast uses ENUMERABLE_STRINGS filter to trigger fast
path in KeyAccumulator::GetKeys conditionally when all properties on the
receiver are enumerable. It is not easy to verify if all properties are
enumerable and the current check is incorrect in some cases.
For ex: when we have non-enumerable properties when we have elements on
the receiver. This cl removes this try_fast path from the builtin. This
could impact performance. The long term fix for this would be to fix
KeyAccumulator::GetKeys to use fast path for more cases.


Bug: chromium:977870
Change-Id: Iecde730739c2c452ffa0d893d0d1b3612a45d1b2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1679499
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Mythri Alle <mythria@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62649}
2019-07-11 14:06:09 +00:00
Andreas Haas
1df62c8a57 [wasm] Support table.fill in the interpreter
R=mstarzinger@chromium.org

Bug: v8:7581
Change-Id: I9db3d2e4b2e2a685f81b516da8e6737db01c1238
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1695470
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62648}
2019-07-11 14:00:09 +00:00
Maciej Goszczycki
07797c3073 [heap] Remove stray const from HeapObject arguments
These are ancient artefacts from when HeapObject was a pointer.

Bug: v8:9396
Change-Id: I1782837aa5bd4b8393cd084321b90baa614a7373
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1691911
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Maciej Goszczycki <goszczycki@google.com>
Cr-Commit-Position: refs/heads/master@{#62647}
2019-07-11 13:58:39 +00:00
Michael Achenbach
80ba1aa982 [foozzie] Prepare passing the session random-seed to the fuzz config
In order to migrate the extra flags into the fuzzer and keep bisection stable,
we need to use the same RNG state for each call to generating fuzz flags.

Throughout one fuzzing session the same random-seed is used
(https://crbug.com/983128) and we'll pass it to the fuzz config in a follow up.

TBR=tmrts@chromium.org
NOTRY=true

Bug: chromium:813833
Change-Id: I3203c86028a5d283238e6ef739f82eccee1302b1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1697254
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62646}
2019-07-11 13:52:49 +00:00
Santiago Aboy Solanes
58a6447814 [ptr-compr][turbofan] Specialize Word32 -> CompressedSigned conversion
Reverse specialization of https://chromium-review.googlesource.com/c/v8/v8/+/1684075.
Again, it skips over Tagged to save some instructions.

Cq-Include-Trybots: luci.v8.try:v8_linux64_pointer_compression_rel_ng
Cq-Include-Trybots: luci.v8.try:v8_linux64_arm64_pointer_compression_rel_ng
Bug: v8:7703
Change-Id: I7fc50e0d8eebfef7a1ba02ce3d687ff808f30680
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1693007
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62645}
2019-07-11 13:37:19 +00:00
Ben L. Titzer
14bfcf7ca3 [mjsunit/wasm] Reuse WebAssembly.Memory objects in stress test
In the atomics stress, the search for sequential sequences creates
lots of new WebAssembly.Memory objects. This memory pressure is not
central to this test, so reuse the same memory to make them less
flaky.

R=mstarzinger@chromium.org

Change-Id: I8d135e7b82d572cb1df38f37a4e2f6393f6b2e05
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1697247
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Ben Titzer <titzer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62644}
2019-07-11 13:23:19 +00:00
Andreas Haas
98bc64d3c4 [cleanup][wasm] Remove unnecessary include
This removes an include that was added unnecessarily in
https://crrev.com/c/1690960.

R=clemensh@chromium.org

Bug: v8:9396
Change-Id: I5cf7ae49b3a40b6665605af1db6b43b27aeb3a32
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1692927
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62643}
2019-07-11 13:14:59 +00:00
Michael Starzinger
9ec426c609 [cleanup] Fix NOLINT(runtime/references) for MIPS64 simulator.
R=clemensh@chromium.org
BUG=v8:9429,v8:9396

Change-Id: I3b098ea8b5bbbd93ac3bf7acfeb8ee20a867759a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1693004
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62642}
2019-07-11 12:45:56 +00:00
Michael Starzinger
2c46f0b55b [wasm] Support importing constructed {WebAssmebly.Function}.
This adds support for properly importing {WebAssembly.Function} objects
that were constructed in JavaScript and just wrap a JavaScript callable.

R=ahaas@chromium.org
TEST=mjsunit/wasm/type-reflection
BUG=v8:7742

Change-Id: I00e01db0d85b83d405eb28517d00fba62c253985
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1690949
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62641}
2019-07-11 12:31:11 +00:00