Commit Graph

60923 Commits

Author SHA1 Message Date
Andreas Haas
7a31813024 Reland "[wasm] The name of a custom section can cause a validation error"
This is a reland of 03d5a7ba9b

Nothing changed here compared to the original test. The tests on the
blink side were invalid, I fixed them in https://crrev.com/c/2066907.

Original change's description:
> [wasm] The name of a custom section can cause a validation error
>
> The WebAssembly spec defines that the name of a custom section can cause
> a validation error. The streaming decoder, however, used a separate
> Decoder object to decode the name, and thereby avoided a validation
> error. With this CL the streaming decoder uses the main decoder to
> decode the name of the custom section.
>
> In addition this CL removes the test mjsunit/regress/wasm/regress-789952.
> This test defined an invalid WebAssembly module and expected it to
> compile. As it is a regression test, it makes no sense to fix the test.
> The module is invalid because it defines the length of the custom section
> to be '0', so there are no bytes in the custom section for its name.
>
> R=clemensb@chromium.org
> CC=thibaudm@chromium.org
>
> Bug: v8:10126
> Change-Id: I8cfc77c9a5916570d5362d5922e0179a29774da8
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2041446
> Commit-Queue: Andreas Haas <ahaas@chromium.org>
> Reviewed-by: Clemens Backes <clemensb@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#66348}

Bug: v8:10126
Change-Id: I48aaed8eb9899da1703030fb6809fe46a6e66191
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2069325
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66431}
2020-02-25 15:38:27 +00:00
Omer Katz
a2a50d7fec Revert "[heap] Align v8 and oilpan worklists"
This reverts commit 6cfba48b65.

Reason for revert: Removing dynamic parameter caused regressions for scavenger.

Original change's description:
> [heap] Align v8 and oilpan worklists
>
> This CL makes the following changes:
> 1) Size of allocated buffer is set by a template parameter
>    (with a default value instead of hardcoded size)
> 2) Remove dynamic parameter for initializing number of
>    tasks (see comment in scavenger.cc)
>
> This CL aligns the v8 and oilpan heaps so that they provide
> the same interface and functionality.
>
> Change-Id: I77d63793f0a54ea29198ddd6bd298eae2c15cf42
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2030920
> Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
> Commit-Queue: Omer Katz <omerkatz@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#66158}

TBR=ulan@chromium.org,mlippautz@chromium.org,omerkatz@chromium.org

# Not skipping CQ checks because original CL landed > 1 day ago.

Change-Id: Iab127d59882ded33d0df3897326031bfc2d2aaf2
Bug: chromium:1052750
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2071862
Commit-Queue: Omer Katz <omerkatz@chromium.org>
Reviewed-by: Omer Katz <omerkatz@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66430}
2020-02-25 15:34:12 +00:00
Andreas Haas
c8e10a1693 [wasm][liftoff] Implement Atomic(Compare)Exchange on x64
R=clemensb@chromium.org

Bug: v8:10108
Change-Id: Ic9ef9ba35218450d3f9e7838890c82b785c34da4
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2037433
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66429}
2020-02-25 14:24:46 +00:00
Andreas Haas
6e452a1c9c [cleanup][wasm] Use early return in validation of FunctionIndexImmediate
R=clemensb@chromium.org

Bug: v8:10155
Change-Id: Ia89724ed5f8af4199bbce41ed12a0dace578c43f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2069326
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66428}
2020-02-25 14:21:16 +00:00
Camillo Bruni
fc2f00d3d9 [counters] CPU time for RCS
The newly introduced --rcs-cpu-time flag enables CPU time for all
runtime call stats timers. By default we still keep on using good
old wall time.

This CL also adds the long-awaited --rcs short flag.

Change-Id: I3173e3a0f846ec3bf0d319624a37741c56914be5
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2060304
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66427}
2020-02-25 13:37:57 +00:00
Mythri A
443721bd7f Set bytecode budget to interrupt_budget when allocating feedback vector
We use the same interrupt to both allocate feedback vectors and
for updating the profiler ticks. If there is a feedback vector already
available, we just increment the profiler ticks that we use to mark
for optimizing function. Calling JSFunction::EnsureFeedbackVector
allocates a feedback vector, but doesn't reset the budget, so we
optimize much earlier than expected. This is currently only a problem
with %PrepareFunctionForOptimize that doesn't reset the budget. Other
code paths do also reset the interrupt budget.

Bug: chromium:10243
Change-Id: I611a9202e5e71077bf897def5959bcfe11b8fdf4
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2064980
Commit-Queue: Mythri Alle <mythria@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66426}
2020-02-25 13:24:06 +00:00
Mike Stanton
8a492221d2 [TurboFan] Fix error in FastApiCall simplified lowering
CL Reland "[turbofan] Fast API calls from TurboFan
https://chromium-review.googlesource.com/c/v8/v8/+/2066971
had an off-by-one error in simplified lowering for fast
api calls.

Bug: chromium:1052746

Change-Id: I31bed7d1bb9564c6991521e84fd1a8edad6d0e32
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2071259
Commit-Queue: Michael Stanton <mvstanton@chromium.org>
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66425}
2020-02-25 12:48:26 +00:00
Clemens Backes
347700c7ca Reland "[inspector] Check that wasm wrappers appear in profiles"
This is a reland of 78defee492

Original change's description:
> [inspector] Check that wasm wrappers appear in profiles
>
> This extends the existing wasm profiling test to also check that
> wasm-to-js and js-to-wasm wrappers appear in the profiles as expected.
> It thus serves as a regression test for the status quo.
>
> R=bmeurer@chromium.org
>
> Bug: chromium:1054386
> Change-Id: I5d4d8e6a252c6eb266b910621fca43a6ff0837bd
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2066970
> Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
> Commit-Queue: Clemens Backes <clemensb@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#66401}

TBR=bmeurer@chromium.org

Bug: chromium:1054386, v8:10266
Change-Id: Iae04c0564ee8f0330d61ce954d895a41497c5a85
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2071260
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66424}
2020-02-25 12:40:36 +00:00
Ng Zhi An
0d0d38fec0 Reland "[liftoff] Check fp_pair when looking up register for reuse"
This is a reland of 548fda4afb

regress-1054466 is modified to not use 64x2 operations, since that was
causing problems on noavx/nosse builds, which requires scalar lowering,
and scalar lowering for 64x2 ops is not implemented.

Original change's description:
> [liftoff] Check fp_pair when looking up register for reuse
>
> Given two registers that are both not gp_pair, one could be an fp_pair,
> and the other not, and we will incorrect call == on them. The current
> check needs to be expanded to check that both registers are fp_pair.
>
> Bug: chromium:1054466
> Change-Id: Ib986c002a8a5cadb9668458597a797cecfd971b1
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2070006
> Commit-Queue: Zhi An Ng <zhin@chromium.org>
> Reviewed-by: Clemens Backes <clemensb@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#66402}

Bug: chromium:1054466
Change-Id: If88f1ff2fb17aaa3727758cda5b368be1c6d9bd6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2071396
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66423}
2020-02-25 12:18:46 +00:00
Georgia Kouveli
cc12e94784 [arm][arm64] Remove dead code
Change-Id: I22a6d25fb1d7b8e0db13df4a0be46d2f4104d20c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2064394
Reviewed-by: Georg Neis <neis@chromium.org>
Commit-Queue: Georgia Kouveli <georgia.kouveli@arm.com>
Cr-Commit-Position: refs/heads/master@{#66422}
2020-02-25 11:12:57 +00:00
Dan Elphick
c57c661de9 [cleanup] TNodify RoundIntPtrToFloat64
Makes RoundIntPtrToFloat64 return TNode<Float64T> instead of Node*.

Bug: v8:10155
Change-Id: I1edd5456b2b86b264b66eeab5e46ceb2a1f0170f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2064978
Commit-Queue: Dan Elphick <delphick@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66421}
2020-02-25 10:42:13 +00:00
Andreas Haas
300c139b86 [wasm][i64-lowering] Refactor special CallDescriptor lowering
This CL generalizes the lowering of special CallDescriptors in the
int64-lowering. The reason is a planned extension of the special
handling due to a refactoring of the AtomicWait implementation.

R=jkummerow@chromium.org

Bug: v8:10108
Change-Id: I48d0087e2ad00ba9b44c5198ffdbbae8eb575a85
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2069333
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66420}
2020-02-25 10:23:46 +00:00
Richard Townsend
8af03419a6 [arm64][msvc] Implement missing functions in mksnapshot
Because this code is compile-time gated, it's bit-rotted as new
functions have come along. This patch brings things back to
parity with x86/x64.

Bug: v8:10012
Change-Id: Iba4cd1155a1ae46742ecddbed96f36938a10db48
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2066973
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Richard Townsend <richard.townsend@arm.com>
Cr-Commit-Position: refs/heads/master@{#66419}
2020-02-25 10:04:06 +00:00
Camillo Bruni
b89f85141b [d8] Claim TLA TODOs
Bug: v8:9344
Change-Id: Iee66fc27b9f1c45ac3ac09dd82d88926414cc8f0
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2061558
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Mathias Bynens <mathias@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66418}
2020-02-25 09:40:16 +00:00
v8-ci-autoroll-builder
fbc8e00b14 Update V8 DEPS.
Rolling v8/build: 49d87d5..11be0fc

Rolling v8/buildtools: feb2d0c..ef2f1b3

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/672b17e..8fd825d

Rolling v8/third_party/depot_tools: 1773f37..9aa1a96

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

Change-Id: I22baa6ba92b307d8c282364eb694704dcff06509
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2070999
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@{#66417}
2020-02-25 03:56:46 +00:00
Shu-yu Guo
5e797bf82a [weakrefs] Rename FinalizationGroup to FinalizationRegistry in C++
Renaming the JS-visible identifiers and strings is left for a future CL.

FinalizationGroup was renamed at Feb 2020 TC39, to better signal that if
a FinalizationRegistry dies, the finalization actions registered with it
may no longer be performed.

Bug: v8:8179
Change-Id: I0d676a71a4a67d2b7175994a67458a6158065844
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2055381
Reviewed-by: Adam Klein <adamk@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Shu-yu Guo <syg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66416}
2020-02-24 23:02:12 +00:00
Igor Sheludko
aa9849470e [ptr-compr] Fix 32-bit smis on non-ptr-compr builds
Bug: v8:10047, v8:10257
Change-Id: Ifcc65235726420fe753e26707d84061400d5d2b1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2050384
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66415}
2020-02-24 21:42:43 +00:00
Richard Townsend
e00fdf2dfe [arm64][msvc] fix cctest build for ARM64 MSVC
Changes the lambda capture for this test so that referenced variables
are captured automatically. This means MSVC and Clang can compile the
same test without compiler-specific #ifdef's.

Bug: v8:10012
Change-Id: Ife4ee050e227478842c0f8def92adb0857082ccf
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2066984
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Richard Townsend <richard.townsend@arm.com>
Cr-Commit-Position: refs/heads/master@{#66414}
2020-02-24 21:25:32 +00:00
Shu-yu Guo
5594158c90 Add a synthetic return for async generator functions
Currently implicit returns do not correctly resolve the async generator
objects. This is observable via AsyncGenerator#throw as the implicit
return won't override the rejection.

Bug: v8:10238
Change-Id: I012fc3507d1e4106e7f35b21275be180a6e274c3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2065343
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Shu-yu Guo <syg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66413}
2020-02-24 19:33:46 +00:00
Gus Caplan
1161fe868d [api] add v8::Object::IsUndetectable
This will enable people to check if an object is
document.all without having to use tricks like
`typeof v === 'undefined' && v !== undefined`.

Change-Id: I74670e4d3886fcd90f0f3cef9c3644a24ee08fda
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2067681
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66412}
2020-02-24 19:17:56 +00:00
Frank Tang
8158c2160b Fix format of -NAN in toLocaleString()
Bug: chromium:1030160
Change-Id: I4e1b762b10c77ec671712355c61cdbb0b5f033da
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2068725
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66411}
2020-02-24 17:11:26 +00:00
Frank Tang
31b34fe953 Change FATAL to IcuError exception
Bug: v8:10224
Change-Id: Ief05b93d71f6da53b0bcfd68719fa79fc2b59e51
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2068903
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66410}
2020-02-24 17:07:06 +00:00
Philip Pfaffe
f07db34d85 Revert "[wasm-debug] Let wasm scripts report correct column information."
This reverts commit 827107a7dc.

Reason for revert: https://bugs.chromium.org/p/chromium/issues/detail?id=1054664

Original change's description:
> [wasm-debug] Let wasm scripts report correct column information.
>
> In the debugger, wasm scripts currently do not contain meaningful column
> informations. Fix that by keeping track of the offset and size of the
> wasm code section inthe module and reporting that to the debugger.
>
> Bug: chromium:1042636
> Change-Id: Ie2b5d3a50952a467d256f815c16e459cb0ae600e
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2011083
> Commit-Queue: Philip Pfaffe <pfaffe@chromium.org>
> Reviewed-by: Simon Zünd <szuend@chromium.org>
> Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#65913}


Bug: chromium:1042636
Change-Id: Ic59d71111c3274688828bdbf6894f7f3274dc50a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2066983
Commit-Queue: Philip Pfaffe <pfaffe@chromium.org>
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66409}
2020-02-24 14:24:26 +00:00
Emanuel Ziegler
1a2a812382 [wasm] Save FP & PC when calling C functions (x64 only)
This change is needed for profiling of Wasm code that calls C-function
to ignore the C-stack above the Wasm stack that otherwise couldn't be
parsed otherwise.

R=clemensb@chromium.org
R=petermarshall@chromium.org
R=jgruber@chromium.org

Bug: chromium:1045860
Change-Id: Ia0788189ca666e77f1564576903c1dc4fd745b8d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2066964
Commit-Queue: Emanuel Ziegler <ecmziegler@chromium.org>
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66408}
2020-02-24 14:04:46 +00:00
Clemens Backes
75931f18ee [wasm] Extend debug side table for registers
This extends the debug side table to also store register locations in
addition to constants and stack values.
Previously, every value that was not constant was assumed to be spilled
to the stack. This made sense, because without breakpoints we would only
emit debug side table entries at call sites, where all registers are
spilled.
With breakpoints, this changes. At break locations, values might be live
in registers.

The logic to decide whether a value will live in the register or on the
stack is extended, because we sometimes generate the debug side table
entry at a point where the registers are not spilled yet. The debug side
table entry creation needs to account for that, and assume that these
registers will still be spilled.

R=thibaudm@chromium.org

Bug: v8:10147, v8:10222
Change-Id: I3b020dfaa29fc007047663706ee286180a996bfd
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2066960
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66407}
2020-02-24 13:29:06 +00:00
Clemens Backes
11d4a38948 Revert "[inspector] Check that wasm wrappers appear in profiles"
This reverts commit 78defee492.

Reason for revert: Timeout on TSan: https://ci.chromium.org/p/v8/builders/ci/V8%20Linux64%20TSAN/30410

Original change's description:
> [inspector] Check that wasm wrappers appear in profiles
> 
> This extends the existing wasm profiling test to also check that
> wasm-to-js and js-to-wasm wrappers appear in the profiles as expected.
> It thus serves as a regression test for the status quo.
> 
> R=​bmeurer@chromium.org
> 
> Bug: chromium:1054386
> Change-Id: I5d4d8e6a252c6eb266b910621fca43a6ff0837bd
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2066970
> Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
> Commit-Queue: Clemens Backes <clemensb@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#66401}

TBR=clemensb@chromium.org,bmeurer@chromium.org

Change-Id: Iac4299d5a4dc74041fbceac98cd2c2b96b9425df
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:1054386
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2069328
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66406}
2020-02-24 13:19:51 +00:00
Clemens Backes
37425fe968 Revert "[liftoff] Check fp_pair when looking up register for reuse"
This reverts commit 548fda4afb.

Reason for revert: Segfault on nosse bot: https://ci.chromium.org/p/v8/builders/ci/V8%20Linux/35905?

Original change's description:
> [liftoff] Check fp_pair when looking up register for reuse
> 
> Given two registers that are both not gp_pair, one could be an fp_pair,
> and the other not, and we will incorrect call == on them. The current
> check needs to be expanded to check that both registers are fp_pair.
> 
> Bug: chromium:1054466
> Change-Id: Ib986c002a8a5cadb9668458597a797cecfd971b1
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2070006
> Commit-Queue: Zhi An Ng <zhin@chromium.org>
> Reviewed-by: Clemens Backes <clemensb@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#66402}

TBR=clemensb@chromium.org,zhin@chromium.org

Change-Id: I56f13406ef3cc3793c9d0e2273c4dc5fb0e3de38
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:1054466
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2069327
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66405}
2020-02-24 13:18:46 +00:00
Yolanda Chen
4f5ec4d852 [regalloc] Fix liverange bundle TryMerge to merge connected UseIntervals
The current bundle merge check on uses does not merge UseInterval starting from the other UserInterval's end.
This is incorrect and will miss some bundle merge opportunties.

Change-Id: I0b828f83cfe7ae401e3c0c40dc94aa3787f2e05e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2059570
Commit-Queue: Yolanda Chen <yolanda.chen@intel.com>
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66404}
2020-02-24 12:42:06 +00:00
Vadim
93230d31f5 Define basestring in Python 3
The Python builtin `basestring` has been removed from all [currently supported version of Python](https://devguide.python.org/#status-of-python-branches) so define `basestring` in Python3 so that line 60 does not raise a NameError at runtime.

Related task: https://github.com/v8/v8/pull/38

Bug: v8:10256
Change-Id: I087c561fff5a19aab1fec71e1ea0435cbfeca5d2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2069317
Reviewed-by: Tamer Tas <tmrts@chromium.org>
Commit-Queue: Tamer Tas <tmrts@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66403}
2020-02-24 12:32:06 +00:00
Ng Zhi An
548fda4afb [liftoff] Check fp_pair when looking up register for reuse
Given two registers that are both not gp_pair, one could be an fp_pair,
and the other not, and we will incorrect call == on them. The current
check needs to be expanded to check that both registers are fp_pair.

Bug: chromium:1054466
Change-Id: Ib986c002a8a5cadb9668458597a797cecfd971b1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2070006
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66402}
2020-02-24 12:24:06 +00:00
Clemens Backes
78defee492 [inspector] Check that wasm wrappers appear in profiles
This extends the existing wasm profiling test to also check that
wasm-to-js and js-to-wasm wrappers appear in the profiles as expected.
It thus serves as a regression test for the status quo.

R=bmeurer@chromium.org

Bug: chromium:1054386
Change-Id: I5d4d8e6a252c6eb266b910621fca43a6ff0837bd
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2066970
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66401}
2020-02-24 12:16:46 +00:00
Jakob Kummerow
a8b7d47733 [wasm] Bring memory limits up to spec
Make sure the "initial pages" memory limit is enforced correctly and
throws a CompileError when exceeded.
Bump the "maximum pages" memory limit to 65536.
The --wasm-max-mem-pages flag now controls the "initial pages" limit;
the "maximum pages" limit is always 65536 as spec'ed.

This CL depends on https://github.com/WebAssembly/spec/pull/1121.

Bug: v8:7881, v8:8633
Change-Id: I68d07cef56633b8b8ce3b3d047c14e1096daf547
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2035876
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66400}
2020-02-24 11:00:16 +00:00
Igor Sheludko
38b4f19b11 [ptr-compr] Add pointer compression state into flags hash
... in order to ensure that the serialized data is reusable between
ptr-compr and full-ptr V8s having the same version number.

Bug: chromium:1054248
Change-Id: Ibf793755fd7e2bab79ed707a3e63dbfb8c89c519
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2066980
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66399}
2020-02-24 09:51:06 +00:00
Joyee Cheung
e9bffd5c69 Print FatalProcessOutOfMemory messages to stderr
Fixes: https://github.com/nodejs/node/issues/31905
Change-Id: Ie802e2592364640cc55555894e586ef33a2c8b6e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2069397
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66398}
2020-02-24 09:38:46 +00:00
v8-ci-autoroll-builder
1d69704dee Update V8 DEPS.
Rolling v8/build: bc497ad..49d87d5

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

Change-Id: I524a369fac23f095d2c88a7dd744d4909702c849
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2068980
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@{#66397}
2020-02-23 03:53:03 +00:00
v8-ci-autoroll-builder
503692b7c4 Update V8 DEPS.
Rolling v8/build: 295ae0d..bc497ad

Rolling v8/buildtools: 713b351..feb2d0c

Rolling v8/buildtools/linux64: git_revision:97cc440d84f050f99ff0161f9414bfa2ffa38f65..git_revision:4166e9fbc1fa5ceab69b69710a0f8b430c50127b

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/4a3fef3..672b17e

Rolling v8/third_party/depot_tools: 7aa6824..1773f37

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

Change-Id: Ib8215dff29ba7d5b8c279d9da66611e19c8d9cff
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2068565
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@{#66396}
2020-02-22 04:02:05 +00:00
Frank Tang
96dda2fac2 [Intl] Clean up Intl code.
Move functions into anonymous namespce.
Remove dead code.
Move GetCaseFirst into JSCollator
Move HourCycle, ToHourCycle and GetHourCycle into JSDateTimeFormat

Change-Id: Ie6089e7f33677dd40169c56198b52d87ba490b20
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2067689
Commit-Queue: Frank Tang <ftang@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66395}
2020-02-21 22:31:42 +00:00
Frank Tang
6f112a0807 Replace FATAL with exception throw in Intl objects
Bug: v8:10224
Change-Id: I852d3b1e3468086b36e357aceeb0167951205bcc
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2067695
Commit-Queue: Frank Tang <ftang@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66394}
2020-02-21 22:15:02 +00:00
Lei Zhang
6b08f2e6bd Fix a GCC warning in Thread::set_name().
GCC emits a stringop-truncation warning because set_name() uses the
entire buffer for strncpy(). This looks potentially unsafe, though
set_name() does the right thing and add a NUL terminator immediately
after strncpy() finishes.

To make GCC happy, reduce the number of characters copied by 1.

Change-Id: I151ba3ac67e82f5ffc092a49a94e4e1769479c71
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2067514
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66393}
2020-02-21 19:09:12 +00:00
Frank Tang
3d075d2975 Save memory by removing type from JSV8BreakIterator
Type is usually not used by Intl.v8BreakIterator unless
resolvedOptions() is called. Therefore we can save memory by
removing it from the object and using a slow test from the
iterator to find out the type when needed.

Bug: v8:10252
Change-Id: I7a8dfdc8310eab0d1c90278fbadfbae48e49668e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2067694
Commit-Queue: Frank Tang <ftang@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66392}
2020-02-21 17:37:10 +00:00
Mike Stanton
4f28e6d9a1 Reland "[turbofan] Fast API calls from TurboFan"
Relanding the Fast C API code with fix for UBSan undefined behavior
issue.

Design doc:
http://doc/1SAHn7d8M7CoazTd1laVF8gduFC_ikZWiYuytrR9c4Oc/

This CL implements basic API with integer and pointer types marshaling.

What is not supported yet:
- sequences
- annotations
- floating point arguments
- 64-bit arguments
- exception handling
- InstanceOf checks for the pointer types
- functions with non-void return type

Bug: chromium:1052746

TBR=yangguo@chromium.org,mvstanton@chromium.org,neis@chromium.org,leszeks@chromium.org,verwaest@chromium.org,mslekova@chromium.org

Change-Id: Ifca9de3156cf18c9dac0d14c19f8d6a7004cad83
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2066971
Reviewed-by: Michael Stanton <mvstanton@chromium.org>
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Commit-Queue: Michael Stanton <mvstanton@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66391}
2020-02-21 15:51:40 +00:00
Wouter Vermeiren
8199a7ac23 [ppc64][ppc] Split up ARCH_PPC and ARCH_PPC64
After support for ARCH_PPC was dropped, it became a subset of
ARCH_PPC64. If you compile for ppc64, then you set the ARCH_PPC64
define which also sets the ARCH_PPC define.
To be able to again support ppc (32 bit) those defines should be
split up again.

This commit only splits up the defines but does not introduce a
working ARCH_PPC variant.

Bug: v8:10102
Change-Id: I64e0749f8e5a7dc078ee7890d92e57b82706a849
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1989826
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Milad Farazmand <miladfar@ca.ibm.com>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66390}
2020-02-21 15:42:20 +00:00
Dominik Inführ
1a6df63f4b [heap] Report reduce memory GCs in --trace-gc
Let --trace-gc now also emit whether the GC is a memory reducing GC or not.

Change-Id: If0efd9e9a52d9cb861ca9692a2c93812effeabaa
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2064220
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66389}
2020-02-21 14:01:10 +00:00
Michael Lippautz
16cf6c0686 heap: Avoid allocating a code range when running in jitless mode
Jitless mode does not allocate executable memory, so we can avoid reserving
memory in such configurations.

Bug: v8:10033
Change-Id: Ie6a943084e3bade85848e3219cb4d8779ed34830
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1981505
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66388}
2020-02-21 12:41:50 +00:00
Nico Hartmann
c4e944cb26 [torque] Port ToInteger to Torque
Bug: v8:10155
Change-Id: I032b27ad7c71d240453e33bef33a447a1530ace9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2060005
Commit-Queue: Nico Hartmann <nicohartmann@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66387}
2020-02-21 12:39:50 +00:00
Nico Hartmann
86a6ce454b [turbofan] Fixes Array constructor with single string argument
Bug: chromium:1034449
Change-Id: Id121b60af0c8c8621464f15aa754056cecb04595
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2064985
Commit-Queue: Nico Hartmann <nicohartmann@chromium.org>
Reviewed-by: Sathya Gunasekaran  <gsathya@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66386}
2020-02-21 12:26:09 +00:00
Clemens Backes
2598687c21 [wasm] Add missing ClearThreadInWasmScope scopes
The atomics.wait implementations need to reset the "thread in wasm" flag
during their execution, as they might handle interrupts, at which point
we assume (and occasionally check) that the "thread in wasm" flag is not
set.
Also for security it's better to reset the flag as soon as we leave wasm
code.

R=ahaas@chromium.org

Bug: chromium:1054507
Change-Id: Iad03a54819d271968568505445890fde732e6844
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2066967
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66385}
2020-02-21 10:16:09 +00:00
Clemens Backes
fc1d233900 [wasm] Extend debug side table test
This extends the debug side table test to check that the two methods
{ExecuteLiftoffCompilation} and {GenerateLiftoffDebugSideTable} return
the same debug side table.
This is important, because for code without breakpoints, we generate the
debug side table lazily via the {GenerateLiftoffDebugSideTable} method,
and it needs to match the code generated previously via
{ExecuteLiftoffCompilation}.

R=thibaudm@chromium.org

Bug: v8:10147
Change-Id: I267f599beb3fe39a1ccf22840a9d0a7f9bc5143e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2066957
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66384}
2020-02-21 08:21:39 +00:00
v8-ci-autoroll-builder
5518ce82e9 Update V8 DEPS.
Rolling v8/build: 448b7bc..295ae0d

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/a657f87..4a3fef3

Rolling v8/third_party/depot_tools: 56c9bd5..7aa6824

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

Change-Id: Ide0328aad4c9f1e0926e81d115584051b24fbb2e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2067878
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@{#66383}
2020-02-21 04:07:28 +00:00
Ng Zhi An
b31ef394b6 [x64] Extract packed absolute value instructions
The AVX versions of pabsb, pabsw, and pabsd have an incorrect function
signature, they should only have two operands. So, extract them into
another macro list. And separately generate the right signatures and
implementations. Also update the disasm and tests.

Bug: v8:10233
Change-Id: I95ee0bf12bb285d10324ecedcec28e941f64d2dc
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2063199
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66382}
2020-02-21 03:48:28 +00:00