Commit Graph

60568 Commits

Author SHA1 Message Date
v8-ci-autoroll-builder
7a40c65f59 Update V8 DEPS.
Rolling v8/build: 7e7da8b..67cd3fb

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

Change-Id: I831ce7a7b68402df3a58806cf3548d54621c5afc
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2031826
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@{#66076}
2020-02-02 03:51:57 +00:00
v8-ci-autoroll-builder
35a421a354 Update V8 DEPS.
Rolling v8/build: 96fd652..7e7da8b

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/a66ca23..0b01653

Rolling v8/third_party/depot_tools: ae510e8..906bfde

Rolling v8/tools/clang: 23191fa..80ad0bd

Rolling v8/tools/luci-go: git_revision:37a855b64d59b7f079c9a0e5368f2757099d14d3..git_revision:8c17d4a7b01d6257e927c629cc623ebc6a6b3711

Rolling v8/tools/luci-go: git_revision:37a855b64d59b7f079c9a0e5368f2757099d14d3..git_revision:8c17d4a7b01d6257e927c629cc623ebc6a6b3711

Rolling v8/tools/luci-go: git_revision:37a855b64d59b7f079c9a0e5368f2757099d14d3..git_revision:8c17d4a7b01d6257e927c629cc623ebc6a6b3711

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

Change-Id: Ib1ff1120322bf8fa515b41f548693f79fa9c32ae
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2031825
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@{#66075}
2020-02-01 03:46:15 +00:00
Ng Zhi An
19be491388 [wasm-simd] Optimize codegen when shift is constant
Define a macro in code-generator-x64 to help identify cases when the
shift value is an immediate/constant. In those cases we can directly
emit the shifts without any masking, since the instruction selector
would have modulo-ed the shift value. We also don't need any temporaries
in this case.

This is only x64 codegen, optimizations for other archs will come in
future patches (and will probably look very similar to this).

The current test case passes the shifts as an immediate, so we add a new
path that loads the shift value from memory, thereby exercising the
slower path of non-immediate shift value.

Bug: v8:10115
Change-Id: Iaf13d81595714882a8f5418734e031b8bc654af3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2026067
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66074}
2020-01-31 21:39:25 +00:00
Frank Tang
880b28e4e1 [Intl] Change order of "currency" and "unit" validation.
Fix changes caused by pull/75
Fix skeleton to unit code which missed the case of ...-per-percent.

https://github.com/tc39/proposal-unified-intl-numberformat/pull/75

Bug: v8:10112
Change-Id: I06f4668894c95234f36944cf3dcf2b8dbafb8b8c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2032713
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66073}
2020-01-31 20:31:05 +00:00
Ng Zhi An
d9d43b62c2 Reland "[wasm-simd] Fix scalar lowering of kParameter"
This relands commit e8832647b6.

The flaky test failures seems to be related to tiering, Liftoff
generating different call descriptors from TurboFan when Simd128
is unsupported (since TurboFan will lower the graph, but Liftoff
can continue running simd-call.js just fine).

We temporarily disable tiering for this test, until we get a proper fix,
like https://crrev.com/c/2029427/, but that fix requires this change
since more tests will fail without the lowering fixed.

Bug: v8:10169
Bug: v8:10154

Original change's description:
> [wasm-simd] Fix scalar lowering of kParameter
>
> Lowers the call descriptor of a wasm function if it contains simd.
>
> Also fixes a couple of issues with the lowering of kParameter:
> - the old_index == new_index check is incorrect, it would only work if
> the s128 parameter is the first parameter
> - the old_index was also not adjusted to account for Parameter[0] being
> the wasm instance object
> - new_index needs to be adjusted to account for the instance object too
>
> These fixes make it more similar to the lowering of kParameter in
> int64-lowering.c.
>
> Also add a new mjsunit test to exercise this logic.
>
> Bug: v8:10154
> Change-Id: Ia767a464c26a6a78fd931eab9e6897890a0904e8
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2020521
> Commit-Queue: Zhi An Ng <zhin@chromium.org>
> Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
> Reviewed-by: Andreas Haas <ahaas@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#66032}

Change-Id: I1e27825025aefc5a42aeeb87d0447d6594388fa4
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2029147
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66072}
2020-01-31 18:35:35 +00:00
Peter Marshall
e8ba5699c6 [tools] Add a VMState for Atomics.wait
We will use this state in devtools via the inspector to indicate
whether a thread is currently stuck polling in atomics.wait.

VMState already distinguishes the important states we care about which
are idle vs. running JS. We also want to know the state for
atomics.wait(), which is commonly used in WebWorkers to poll the main
page for work to do.

This CL just adds and maintains the state and adds assertions in
atomics tests. Another CL will emit inspector notifications when the
VMState changes in a way that the inspector cares about.

Re-flow comments as a drive-by cleanup.

Bug: chromium:1025490
Change-Id: I961051bfb846aa20454a56214310370ea8e47d1c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2033168
Commit-Queue: Peter Marshall <petermarshall@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66071}
2020-01-31 16:04:55 +00:00
Michael Lippautz
a6cf73e5db heap: Remove unused incremental marking should hurry flag
The flag is unused.

Bug: chromium:1044630
Change-Id: Ib499cdd559451c9f23c3c98b187755ef6748bffc
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2030743
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66070}
2020-01-31 15:34:35 +00:00
Benedikt Meurer
b87586d29b [inspector] Fix async stepping throw extension code.
When async stepping through code where only extension scripts are on the
stack, we the iterator is not gonna yield any frames, since it ignores
all extension frames.

Bug: chromium:1045863
Change-Id: Ifdb966e47bf1d090fa695d066003c7aff343f658
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2033167
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Yang Guo <yangguo@chromium.org>
Auto-Submit: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66069}
2020-01-31 15:17:06 +00:00
Michael Achenbach
2ee598aeb4 Whitelist natives for fuzzing
This adds two flags for whitelisting natives on fuzzers:
--allow-natives-for-fuzzing:
Enables a small subset of runtime functions and replaces others with
undefined.
--allow-natives-for-differential-fuzzing
Restricts the allowed runtime functions even further, excluding the
ones that break differential fuzzing.

Bug: chromium:1044942
Change-Id: I890bd4a6ff7c2e483dd74155290a7ace06f85239
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2020773
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66068}
2020-01-31 15:08:45 +00:00
Peter Marshall
d0a872dfeb [cleanup] Remove undefined extension helpers
Bug: v8:10155

Change-Id: I0ce8a71ab364f9281ab39df1f057bd93d7bef061
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2033165
Commit-Queue: Peter Marshall <petermarshall@chromium.org>
Auto-Submit: Peter Marshall <petermarshall@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66067}
2020-01-31 14:50:15 +00:00
Clemens Backes
1c09694801 Fix printing wasm scripts
Various accessors (like {has_eval_from_shared} or {is_wrapped}) are only
allowed on scripts that are not wasm. This currently makes printing wasm
scripts fail.
This CL fixes that by having separate paths for printing wasm scripts vs
non-wasm scripts.

R=jkummerow@chromium.org

Change-Id: I8771ded22999504f2fb2c55bc0a1d95c25e988c3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2033164
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66066}
2020-01-31 14:41:35 +00:00
Michael Achenbach
61e7e22ced [foozzie] Properly mock out spurious typed-array NaN patterns
No-Try: true
Bug: chromium:1047632
Change-Id: I01f02cf5ffa53d261311b8265e0005cfe5257f4a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2030739
Reviewed-by: Mythri Alle <mythria@chromium.org>
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66065}
2020-01-31 13:04:45 +00:00
Leszek Swirski
6abbfe2736 [ast] Flatten Wasm function names
Factory::NewFunction now requires names passed into it to be flat.
Make sure to flatten Wasm function names when creating new Wasm JS
functions.

Fixes: chromium:1047368
Change-Id: I7bd2d8bc83ae8fab901ab469872bce0f703fc3ec
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2030738
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66064}
2020-01-31 11:25:45 +00:00
Clemens Backes
5ad8474a1e [wasm] Remove always-on --wasm-far-jump-table flag
This shipped in v7.9, which is stable since six weeks. We do not test
the previous configuration any more and don't plan to move back, hence
remove the flag and clean up the code.

R=ahaas@chromium.org

Bug: v8:10155
Change-Id: I6b981f4be686473a911f041952cb684749d9fe7e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2030732
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66063}
2020-01-31 09:39:04 +00:00
Clemens Backes
d8bb229df0 [Liftoff] Clean up implementation of AtomicStore
As discussed offline, the current implementation implement each
situation separately. I think we can simplify the code a lot by sharing
code between the different paths.
This CL does that by
1) implementing the kI64Store case separately, because it does not have
   all the register contraints that the others have, and
2) moving all logic to ensure that the {src} register is usable before
   the switch, such that it's shared by all the compare-exchange cases.

As a side produce, this also fixes issue 1045225, because for i64 stores
which actually only use the lower half of {src}, only that half will be
pinned.

R=ahaas@chromium.org

Bug: chromium:1045225, v8:10108
Change-Id: I0be025b9706d563835ae6337d45b88e0233eacad
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2029414
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66062}
2020-01-31 08:54:44 +00:00
Milad Farazmand
902fe5f066 s390: [simulator] Avoid negating if reg value overflows
Negating 1 << 31 as a signed integer overflows and
causes undefined behaviour hence SetS390OverflowCode
may never get set.

Change-Id: I4a479f0d3c71eaaa58ae0925d744e7779ecd833b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2031861
Reviewed-by: Joran Siu <joransiu@ca.ibm.com>
Commit-Queue: Milad Farazmand <miladfar@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#66061}
2020-01-31 04:35:24 +00:00
v8-ci-autoroll-builder
75f66c5075 Update V8 DEPS.
Rolling v8/build: 25075ce..96fd652

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/707a874..a66ca23

Rolling v8/third_party/depot_tools: 1a0daf7..ae510e8

Rolling v8/tools/clang: 953ea7a..23191fa

Rolling v8/tools/swarming_client: 885b3fe..0ac2847

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

Change-Id: I693b48fe867cb591b581c749445892d2f873aec1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2031906
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@{#66060}
2020-01-31 03:47:44 +00:00
Milad Farazmand
bf8dae5b39 s390: [wasm-simd] Implement simd conversion operations
Change-Id: I6f7d3a5f123edea8674c0f9217b03760f3af016f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2028451
Reviewed-by: Junliang Yan <jyan@ca.ibm.com>
Commit-Queue: Milad Farazmand <miladfar@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#66059}
2020-01-30 21:24:02 +00:00
Zhi An Ng
d656905239 Revert "[wasm-simd][liftoff] Check CpuFeatures for SIMD support"
This reverts commit 7c32fa05df.

Reason for revert: https://ci.chromium.org/p/v8/builders/ci/V8%20Linux/35618
Need to update expected test output.

Original change's description:
> [wasm-simd][liftoff] Check CpuFeatures for SIMD support
> 
> If Wasm simd128 is not supported on this particular hardware, we bail
> out to TurboFan.
> 
> Bug: v8:9909
> Change-Id: Ie46e154426783ba099b7c0facc906670cda1bdd0
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2029427
> Reviewed-by: Clemens Backes <clemensb@chromium.org>
> Commit-Queue: Zhi An Ng <zhin@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#66055}

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

Change-Id: I7def513a619c609ff820ff1b9aefa92e1741e4a2
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:9909
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2031888
Reviewed-by: Zhi An Ng <zhin@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66058}
2020-01-30 19:23:42 +00:00
Milad Farazmand
19bc0ea2af PPC/s390: [arm32] Fix breakpoints in simulator/debugger
Port e920b2e351

Original Commit Message:

    - Debugger stepping assumes that the pc points to the instruction
      that should get executed next, so we need to increment it when
      we hit a stop or a bkpt instruction or else we'll end up in an
      infinite loop.
    - The "break" and the "stop unstop" command write into code space, so
      they need to temporarily make code space writable or else they
      just crash. (Note that this doesn't work for embedded builtins.)

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

Change-Id: I1a9507f621c83dd94f2de230f7c75bc1fee95dd0
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2031204
Reviewed-by: Georg Neis <neis@chromium.org>
Commit-Queue: Milad Farazmand <miladfar@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#66057}
2020-01-30 18:49:42 +00:00
Ng Zhi An
0ca45a2095 [wasm-simd][liftoff] Always execute tests on Liftoff
On backends that do not have s128 support in Liftoff, tests will bail
out to TurboFan, so tests will continue running and passing.

Bug: v8:9909
Change-Id: I3b596a73b6cb2e8645a99c65a935026f9e1a8d55
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2029332
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66056}
2020-01-30 18:34:22 +00:00
Ng Zhi An
7c32fa05df [wasm-simd][liftoff] Check CpuFeatures for SIMD support
If Wasm simd128 is not supported on this particular hardware, we bail
out to TurboFan.

Bug: v8:9909
Change-Id: Ie46e154426783ba099b7c0facc906670cda1bdd0
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2029427
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66055}
2020-01-30 18:29:42 +00:00
Eric Leese
fb96381b95 Revert "[wasm] Tierdown wasm module upon "Debugger.enable""
This reverts commit 410ca4c50e.

Reason for revert: This was causing Chrome to hang when debugging large wasm binaries.

Clean revert except for modification to test/debugger/debugger.status

Bug: chromium:1047210, v8:9654

Original change's description:
> [wasm] Tierdown wasm module upon "Debugger.enable"
>
> Put a logic in Wasm Engine to tier down all existing modules per isolate
> when debugger is enabled. This CL does not handle new module added after
> debugger is enabled yet.
>
> Bug: v8:9654
> Change-Id: I87060f5c416506543fcaf231bff9999d06ba4c0d
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2013692
> Commit-Queue: Z Nguyen-Huu <duongn@microsoft.com>
> Reviewed-by: Simon Zünd <szuend@chromium.org>
> Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
> Reviewed-by: Clemens Backes <clemensb@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#66017}

TBR=clemensb@chromium.org,bmeurer@chromium.org,duongn@microsoft.com,szuend@chromium.org

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

Bug: v8:9654
Change-Id: Id49e8c69f8212e95e698d7e7267056fb2eb7e60a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2030737
Auto-Submit: Eric Leese <leese@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66054}
2020-01-30 17:29:52 +00:00
Michael Achenbach
51dadbb313 [foozzie] Abort on all range errors in correctness fuzzing
This uses the most common bottleneck for intercepting range-error
creation in correctness fuzzing. Previous abort conditions didn't
cover all cases, e.g. they didn't cover the generic NewError called
by wasm-results.

This also moves code for error-message suppression to the same
location for readability.

In a follow up we'll remove the other redundant abort conditions that
are scattered through the code.

Bug: chromium:1044942, chromium:1047197
Change-Id: I1b898247a304fd35112facd4048de3a02d512c96
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2030728
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66053}
2020-01-30 15:29:22 +00:00
Milad Farazmand
acdd2cb283 PPC/s390: [wasm-simd][liftoff] Implement i32x4.splat
Port c10153b4e9

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

Change-Id: I6668e7d7b260b62838d609e27e240bb670977250
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2030744
Reviewed-by: Joran Siu <joransiu@ca.ibm.com>
Commit-Queue: Milad Farazmand <miladfar@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#66052}
2020-01-30 15:18:32 +00:00
Michael Hablich
8be98077e0 Update version to 8.2
TBR=machenbach@chromium.org

Change-Id: I2a60152b04301c835fa21c03cd879b3530c436bf
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2030726
Reviewed-by: Michael Hablich <hablich@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Hablich <hablich@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Auto-Submit: Michael Hablich <hablich@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66051}
2020-01-30 15:01:12 +00:00
Thibaud Michaud
06a4e08048 Revert "Reland "[wasm] Cache streaming compilation result""
This reverts commit 9781aa076f.

Reason for revert: tsan bot failure: https://ci.chromium.org/p/v8/builders/ci/V8%20Linux64%20TSAN/30110

Original change's description:
> Reland "[wasm] Cache streaming compilation result"
> 
> This is a reland of 015f379aa1
> 
> Original change's description:
> > [wasm] Cache streaming compilation result
> > 
> > Before compiling the code section, check whether the
> > bytes received so far match a cached module. If they do, delay
> > compilation until we receive the full bytes, since we are likely to find
> > a cache entry for them.
> > 
> > R=clemensb@chromium.org
> > 
> > Bug: v8:6847
> > Change-Id: Ie5170d1274da3da6d52ff1b408abc7cb441bbe3c
> > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2002823
> > Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
> > Reviewed-by: Clemens Backes <clemensb@chromium.org>
> > Cr-Commit-Position: refs/heads/master@{#66000}
> 
> Bug: v8:6847
> Change-Id: I0b5acffa01aeb7dade3dc966392814383d900015
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2022951
> Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
> Reviewed-by: Clemens Backes <clemensb@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#66047}

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

Change-Id: I76e3561835815ac3d5bca74e76079e82f9f3d581
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:6847
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2030727
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66050}
2020-01-30 14:27:36 +00:00
Andreas Haas
8ff14f5b36 [wasm] Type check brtable if it's not unreachable
There was a bug in the function body decoder where
type checking of brtable only happened if the brtable
instruction is reachable. However, type checking is
required in all cases where brtable "not unreachable".
The difference between reachable and "not unreachable"
is a state called spec-reachable where a clever
compiler can already infer that the code will be
unreachable (e.g. a memory access is out of bounds
just by the offset and therefore unconditionally
traps), but the spec can not. If an instruction is
only spec-reachable, it still has to be type checked.

R=clemensb@chromium.org
FIX=chromium:1046472

Change-Id: I7e9f1108597871615c0d443a0e94de35a0207b5e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2027990
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66049}
2020-01-30 13:46:15 +00:00
Milad Farazmand
8e6e3afc1d PPC/s390: [wasm] skip liftoff debugger tests
Change-Id: I22598152bd8763ae50b16adb84fa9c74a7bd26b3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2028835
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Milad Farazmand <miladfar@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#66048}
2020-01-30 13:45:10 +00:00
Thibaud Michaud
9781aa076f Reland "[wasm] Cache streaming compilation result"
This is a reland of 015f379aa1

Original change's description:
> [wasm] Cache streaming compilation result
> 
> Before compiling the code section, check whether the
> bytes received so far match a cached module. If they do, delay
> compilation until we receive the full bytes, since we are likely to find
> a cache entry for them.
> 
> R=clemensb@chromium.org
> 
> Bug: v8:6847
> Change-Id: Ie5170d1274da3da6d52ff1b408abc7cb441bbe3c
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2002823
> Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
> Reviewed-by: Clemens Backes <clemensb@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#66000}

Bug: v8:6847
Change-Id: I0b5acffa01aeb7dade3dc966392814383d900015
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2022951
Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66047}
2020-01-30 13:30:40 +00:00
Dominik Inführ
ace7d8d796 [snapshot] Ensure deterministic output with JSArrayBuffer extension
The JSArrayBuffer extension stores a pointer to native memory. Set it to
null before serialization and then restore the old value.

Bug: v8:10064
Change-Id: I11b6d5a02cad7da119308b280269a72e24ee2a80
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2029410
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66046}
2020-01-30 12:59:21 +00:00
Ulan Degenbaev
767fff40e2 [heap] Avoid updating the shared worklist twice in per-context mode
MarkingWorklistHolder has two references to the shared marking worklist:
1) as a standalone worklist for general marking,
2) as a context worklist for per-context mode marking.

Because of that the shared worklist gets updated twice and breaks
the invariants of UpdateMarkingWorklistAfterScavenge.

Bug: chromium:1046791, chromium:973627
Change-Id: I61a8423f8b4d355adb5e8004bf200c67453c1e27
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2029411
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66045}
2020-01-30 12:31:50 +00:00
Ulan Degenbaev
b5c917ee80 [api] New function for reallocating ArrayBuffer backing store
This patch adds a new BackingStore::Reallocate function that internally
uses a new ArrayBuffer::Allocator::Reallocate provided by the embedder.

The default implementation of the function simply copies the backing
store. The embedder can override the function and provide a more
efficient implementation e.g. using realloc.

Bug: v8:9908, v8:9380

Change-Id: I2179c80ba199c045b6900c620a813916150e7098
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2007274
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66044}
2020-01-30 12:05:17 +00:00
Igor Sheludko
6c5f6ea320 [unittests] Randomize RegionAllocatorTests
... by using random seed provided via --gtest_random_seed= flag.

Bug: chromium:1043117
Change-Id: I6114e9c71f3196a386a8457a6ec6f9e1fc80f6ea
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2027991
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66043}
2020-01-30 11:54:06 +00:00
Leszek Swirski
ddca360617 [ast] Allocate cons strings on-demand
Remove AstConsString "internalization", and instead make the conversion
to heap String be on-demand with an Allocate method. We never actually
need the heapified cons string more than once, so there's no need to do
the internalization walk or do the next/string union dance in the
AstConsString class.

This also allows us to specify how we want to allocate the String at the
call site. In particular, it allows us to allocate a flat SeqString rather
rather than a ConsString. This allows us to avoid allocating ConsStrings
which will just be passed to a flatten call, and especially avoid
allocating dead ConsStrings in the off-thread old space.

Bug: chromium:1011762
Bug: chromium:1043168
Change-Id: Id851f2f7529d92ad7e5388eb22823fd6d1959cd0
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2020953
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66042}
2020-01-30 11:04:26 +00:00
Peter Marshall
42ceebee86 [inspector] Flush explicitly after sending resumed event
'resumed' events are sent to the renderer from V8 and stored in a queue.
We didn't flush this queue previously, meaning these events would sit in
the queue until another message coincidentally flushed the queue.

Under some circumstances, the resumed event would not get flushed and
the UI would still be in a paused state, even when JS had resumed.

Bug: chromium:1044989
Change-Id: I5d92fcc0a40d4e3816501da98f6be8a46f227e0f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2023563
Reviewed-by: Simon Zünd <szuend@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66041}
2020-01-30 10:47:06 +00:00
Liviu Rau
b9a690f38c [testing] Collect test duration
We will be able to collect test duration and later upload them in BQ.


Change-Id: Ie5610d4e872259857bf3f26ba698fa65d23058be
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2020952
Reviewed-by: Tamer Tas <tmrts@chromium.org>
Commit-Queue: Liviu Rau <liviurau@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66040}
2020-01-30 10:17:06 +00:00
Georg Neis
e920b2e351 [arm32] Fix breakpoints in simulator/debugger
- Debugger stepping assumes that the pc points to the instruction
  that should get executed next, so we need to increment it when
  we hit a stop or a bkpt instruction or else we'll end up in an
  infinite loop.
- The "break" and the "stop unstop" command write into code space, so
  they need to temporarily make code space writable or else they
  just crash. (Note that this doesn't work for embedded builtins.)

Bug: v8:10164
Change-Id: Id77f5e97892076a9fdf8de0230632e0ce979da43
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2026732
Auto-Submit: Georg Neis <neis@chromium.org>
Reviewed-by: Dan Elphick <delphick@chromium.org>
Commit-Queue: Dan Elphick <delphick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66039}
2020-01-30 09:44:16 +00:00
Jan Krems
f9257802c1 Fix scanner-level error reporting for hashbang
When the file begins with a hashbang, the scanner is in a failed state
when SkipHashbang() is called. This is usually not an issue but when
the parser encounters an ILLEGAL token, it will reset the SyntaxError
location because of it.

Bug: v8:10110
Change-Id: I1c7344bf5ad20079cff80130c991f3bff4d7e9a8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1995312
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66038}
2020-01-30 09:28:16 +00:00
v8-ci-autoroll-builder
d651b8e75b Update V8 DEPS.
Rolling v8/build: 2f17606..25075ce

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/2e0a0cb..707a874

Rolling v8/third_party/depot_tools: ea8b58b..1a0daf7

Rolling v8/tools/clang: 535dbf1..953ea7a

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

Change-Id: Ic908ce11f46097bf4b21189879220c21a90b7578
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2028530
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@{#66037}
2020-01-30 04:02:56 +00:00
Ng Zhi An
c10153b4e9 [wasm-simd][liftoff] Implement i32x4.splat
Bug: v8:9909
Change-Id: I53d3b95e1f22e0194ac1a2ed7b556189acb8f9ad
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2023399
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66036}
2020-01-29 23:15:55 +00:00
Ng Zhi An
3dbbb37223 Fix typo in disasm for psrlq
Change-Id: I78a33d10b2c73d2fa0cb364a7a4b23de0c01d94c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2028516
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66035}
2020-01-29 21:37:20 +00:00
Deepti Gandluri
1b5a3178f8 Revert "[wasm-simd] Fix scalar lowering of kParameter"
This reverts commit e8832647b6.

Reason for revert: Causes flaky fails on the tree, reverting as this test should be deterministic pass/fail.

https://logs.chromium.org/logs/v8/buildbucket/cr-buildbucket.appspot.com/8889903130443940000/+/steps/Check_-_nosse3__flakes_/0/logs/simd-call/0

Original change's description:
> [wasm-simd] Fix scalar lowering of kParameter
> 
> Lowers the call descriptor of a wasm function if it contains simd.
> 
> Also fixes a couple of issues with the lowering of kParameter:
> - the old_index == new_index check is incorrect, it would only work if
> the s128 parameter is the first parameter
> - the old_index was also not adjusted to account for Parameter[0] being
> the wasm instance object
> - new_index needs to be adjusted to account for the instance object too
> 
> These fixes make it more similar to the lowering of kParameter in
> int64-lowering.c.
> 
> Also add a new mjsunit test to exercise this logic.
> 
> Bug: v8:10154
> Change-Id: Ia767a464c26a6a78fd931eab9e6897890a0904e8
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2020521
> Commit-Queue: Zhi An Ng <zhin@chromium.org>
> Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
> Reviewed-by: Andreas Haas <ahaas@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#66032}

TBR=gdeepti@chromium.org,ahaas@chromium.org,zhin@chromium.org

Change-Id: I69589e2331c857c0f197ac53b8fb8a241376c632
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:10154
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2028830
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Commit-Queue: Deepti Gandluri <gdeepti@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66034}
2020-01-29 20:38:00 +00:00
Andrew Comminos
8580537587 [cpu-profiler] Remove instruction_start field from CodeEntry
This data is duplicated across the code map, and not actually required
for some esoteric types of CodeEntry objects (e.g. inline stacks). Unify
sourcing of this data from the code map instead.

Change-Id: I75fddc03221d1d6b7dab77d16fa05ad6eb3dd2a9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2026416
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
Commit-Queue: Andrew Comminos <acomminos@fb.com>
Cr-Commit-Position: refs/heads/master@{#66033}
2020-01-29 19:31:00 +00:00
Ng Zhi An
e8832647b6 [wasm-simd] Fix scalar lowering of kParameter
Lowers the call descriptor of a wasm function if it contains simd.

Also fixes a couple of issues with the lowering of kParameter:
- the old_index == new_index check is incorrect, it would only work if
the s128 parameter is the first parameter
- the old_index was also not adjusted to account for Parameter[0] being
the wasm instance object
- new_index needs to be adjusted to account for the instance object too

These fixes make it more similar to the lowering of kParameter in
int64-lowering.c.

Also add a new mjsunit test to exercise this logic.

Bug: v8:10154
Change-Id: Ia767a464c26a6a78fd931eab9e6897890a0904e8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2020521
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66032}
2020-01-29 19:00:30 +00:00
Joshua Litt
f22c213304 [promises] Port remaining promise code to Torque.
Bug: v8:9838
Change-Id: Idc6bda122354a54dd24e39b0356f35b0f54ef089
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2012596
Commit-Queue: Joshua Litt <joshualitt@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66031}
2020-01-29 18:02:40 +00:00
Michael Achenbach
01646bc89c Suppress some console functions for fuzzing
Bug: chromium:1044942
Change-Id: I6bc5f9a83e56a67996bb23ff46e1c58c719a2dfb
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2027988
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66030}
2020-01-29 18:00:10 +00:00
Dominik Inführ
acb4f3b549 [heap] Disable concurrent_array_buffer_sweeping in single-threaded mode
Bug: chromium:1045937
Change-Id: Ic30db61ec77cb684f927bae0ed45446abcb2e426
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2027989
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66029}
2020-01-29 16:59:30 +00:00
Milad Farazmand
c7e8d66e71 PPC/s390: [wasm] skip liftoff debugger tests
Tests need to be disable until liftoff is fully implemented.

Change-Id: Ib906b7d4ef2abae1359fbfb1a61031eeb5d5e70c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2028289
Commit-Queue: Milad Farazmand <miladfar@ca.ibm.com>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66028}
2020-01-29 16:55:24 +00:00
Jakob Kummerow
efaa34b5e5 Fix one more LookupIterator
Copying one object's named properties is always fine, even if one of
the names could be a large index on a TypedArray. Mark the LookupIterator
as OWN_SKIP_INTERCEPTOR to avoid the DCHECK.

Bug: chromium:1044909
Change-Id: I6918186a4b50df7865de3572cb674fd7d6eadb78
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2023558
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Auto-Submit: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66027}
2020-01-29 16:49:50 +00:00