Commit Graph

60474 Commits

Author SHA1 Message Date
Toon Verwaest
e3f5491083 [debugger] Move ScriptContext creation side effect check to Invoke
Otherwise the side effect is already applied before we throw the exception,
already breaking the environment.

Bug: chromium:1043151
Change-Id: I6d6b4706481bd8eaead6de3503aabc4bad9fb6de
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2016597
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
Auto-Submit: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#65982}
2020-01-24 17:34:31 +00:00
Andreas Haas
3fa30b25fd [wasm] Update spec tests
R=thibaudm@chromium.org
CC=ecmziegler@chromium.org

Change-Id: I3f34dc69e5ec7e4a5872c740788812367ae56a5f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2019166
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#65981}
2020-01-24 16:48:11 +00:00
Peter Marshall
d422dc741c [cpu-profiler] Allow wasm to js frames in SafeStackFrameIterator::frame
SafeStackFrameIterator::Advance() will stop at wasm_to_js frames, so we
should fully expect that they show up when calling frame() after
Advance().

This fixes some breakages for profiling wasm and asm.js.

Bug: chromium:1010534, v8:10150
Change-Id: Ifc78cd9eba33e777b33fc1cbea19ee376b25299c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2019485
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Peter Marshall <petermarshall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#65980}
2020-01-24 16:42:11 +00:00
Milad Farazmand
513fb3671e PPC/s390: Update printed features under PrintFeatures
Change-Id: Ic97cf0488c601e524f4965ee84147f9a70857512
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2019583
Reviewed-by: Milad Farazmand <miladfar@ca.ibm.com>
Reviewed-by: Joran Siu <joransiu@ca.ibm.com>
Commit-Queue: Milad Farazmand <miladfar@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#65979}
2020-01-24 16:11:31 +00:00
Al Muthanna Athamina
1830560967 Remove the #undef check from the Presubmit for .cc files
This CL attempts to remove the #undef check
from the Presubmit for .cc files because we
are removing Jumbo support.

Bug: chromium:994387
Change-Id: I1bb6d22393c1b533f23dd586e5028ecc6d254c99
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2013119
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Wez <wez@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Almothana Athamneh <almuthanna@chromium.org>
Cr-Commit-Position: refs/heads/master@{#65978}
2020-01-24 15:24:51 +00:00
Milad Farazmand
3fa75eca1b PPC/s390: Reland "[liftoff][wasm-simd] Implement f32x4.splat"
Port b110d4808b

Original Commit Message:

    This relands commit 009993adb4.

    The fix is in liftoff-assembler-ia32.h, the codegen was incorrect.

    Original change's description:
    > Implement f32x4.splat and enable handling this in Liftoff.
    >
    > We add a new macro for defining test cases to run on TurboFan, Liftoff,
    > interpreter, and scalar lowering.
    >
    > Also add an assertion that the execution tier used is what we expected
    > it to be. This is useful for Liftoff, because by default it falls back
    > to TurboFan when it encounters an unimplemented opcode.
    >
    > Bug: v8:9909

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

Change-Id: I0fc54cd04379a6c65aa2bee64bf4cf9dad5b9636
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2019582
Reviewed-by: Joran Siu <joransiu@ca.ibm.com>
Commit-Queue: Milad Farazmand <miladfar@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#65977}
2020-01-24 15:18:51 +00:00
Clemens Backes
efb4b25b1c [wasm] Fix capitalization of effect and control getters
As these are simple methods, and for consistency with the GraphAssembler
interface, the getters should not be capitalized.

R=ecmziegler@chromium.org

Bug: v8:10123
Change-Id: I51871115b061bca4483dc23e982303508d9d8f55
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2017471
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#65976}
2020-01-24 15:15:50 +00:00
Clemens Backes
2a9c225c72 [wasm] Use GraphAssembler for effect and control handling
This changes the WasmGraphBuilder to use the GraphAssembler for storing
the current effect and control, instead of having separate fields.
This will allow us to use GraphAssembler methods anywhere in the
WasmGraphBuilder without first transferring the WasmGraphBuilder's
effect and control to the GraphAssembler and storing it back afterwards.

Some methods (StackCheck, BuildCallToRuntimeWithContext) have been
changed to work on the current effect and control instead of receiving
them as parameters. This is necessary to also use the GraphAssembler
there, and it makes the code a bit easier.

R=ecmziegler@chromium.org

Bug: v8:10123
Change-Id: Ia9f6359cfe44a67a875c3eb0fe51f87db8bd17db
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2017470
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#65975}
2020-01-24 15:01:40 +00:00
Michael Achenbach
8dfdc86c50 [testrunner] Fix sigterm handler
Bug: v8:8292
Change-Id: Icbfb8cb0c4ba9cdb5a6c1cbec5e4c6e61c9d0d4b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2019163
Reviewed-by: Liviu Rau <liviurau@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#65974}
2020-01-24 14:53:30 +00:00
Clemens Backes
d49a1842ca [wasm] Don't put TailCall nodes in the effect chain
TailCalls have no output effect, similarly to e.g. return nodes. Thus,
don't put them in the effect chain.
The current graph verifier does not complain about this, but once we
switch to the GraphAssembler, we will hit a SLOW_DCHECK there because
we are trying to use a node as effect which has no effect output.

R=jkummerow@chromium.org

Bug: v8:10070
Change-Id: I23d9516eb9bd42a5aca46b09ca74830eafce635c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2017474
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#65973}
2020-01-24 14:39:30 +00:00
Clemens Backes
003f622abe [wasm] Implement toString of exported functions
We currently print asm.js functions converted to wasm as
"function foo() { [native code] }", even though without asm to wasm
translation we get the proper source code. This is an observable
difference that should not be, and also foozzie finds this frequently in
different variations.

This CL makes us remember the start position (position of the "function"
token) and end position (right behind the closing "}") of each function
we transform to wasm. These offsets, together with the Script that
contained the function, allows us to reconstruct the source code of the
function for the {toString()} method.

R=jkummerow@chromium.org

Bug: chromium:667678
Change-Id: If22471cad4cefdfc67f6d1b8fda85aa0eeb411bd
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2016582
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#65972}
2020-01-24 12:53:31 +00:00
Liviu Rau
91c0ef31e5 [fuchsia] Prepare builder bot rename
Bug: chromium:1033865
Change-Id: Id20517aa4a8a0bbc6e9cf593ce29504f16297e5d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2017473
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Liviu Rau <liviurau@chromium.org>
Cr-Commit-Position: refs/heads/master@{#65971}
2020-01-24 12:41:21 +00:00
Clemens Backes
59c2d0cdce [wasm] Fix variable naming and comments in from-js conversion
The code did originally only handle the int32 case, but was then
extended to all wasm types in https://crrev.com/c/1965577. The comments
and variable names still mention the int32 type only though.
This CL fixes that.

R=ecmziegler@chromium.org

Bug: v8:10070
Change-Id: I3b1fa4047ee7ee9f283dce3758f6b8a39c964b22
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2017723
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#65970}
2020-01-24 12:06:31 +00:00
Clemens Backes
9c3099eefe Print the brief script for SFI
This code is commented out since a long time (at least since 2008), but
I found it to be useful information.
Instead of printing the full script information, just print the {Brief}
version. In a debugger, users can still print the full information based
on the printed pointer value if needed.

R=jkummerow@chromium.org

Change-Id: I79b19f0bbc8797746b916c1f5860f727c0f0ac39
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2015240
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#65969}
2020-01-24 11:19:51 +00:00
Clemens Backes
250911ba5f [wasm] Fix confusingly named variables
... and fix comments which I accidentally changed back to an old version
in https://crrev.com/c/2011086/.

R=jkummerow@chromium.org

Bug: chromium:667678
Change-Id: I2a801d9775bd2362290c5d1caaf5b9e24a9bd54d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2015241
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#65968}
2020-01-24 11:03:11 +00:00
Emanuel Ziegler
2dcdd51268 [wasm] Add missing type enum in switch statement and remove default
R=jkummerow@chromium.org

Bug: chromium:1043036
Change-Id: Idf44e21254a5d7131c4ec6e4c22fa4d4b25f617b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2016590
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Emanuel Ziegler <ecmziegler@chromium.org>
Cr-Commit-Position: refs/heads/master@{#65967}
2020-01-24 10:36:01 +00:00
Shu-yu Guo
1920e6c92f [platform] Require the foreground taskrunner to support non-nestable tasks for weak refs
Bug: v8:8179
Change-Id: I2e7024412216decc06e814e88eecd5b4eb5ae8cb
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2013696
Reviewed-by: Ben Smith <binji@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Shu-yu Guo <syg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#65966}
2020-01-24 05:04:10 +00:00
Shu-yu Guo
1dc3ac9693 [platform] Support nestable and non-nestable tasks in DefaultForegroundTaskRunner
Bug: v8:8179
Change-Id: I3a41243b971d499d50e35c4782bff5b8b012f434
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2013695
Commit-Queue: Shu-yu Guo <syg@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#65965}
2020-01-24 01:07:50 +00:00
Johannes Henkel
dc3893e5d0 [DevTools] Revamp StringBuffer implementations.
This cleans up string-util.h a little. Instead of distinguishing
BinaryStringBuffer from StringBufferImpl (which has a legacy
::adopt() interface), provide two functions for making StringBuffer
from either an 8 bit (std::vector<uint8_t>) or a 16 bit (String16)
source, and keep the classes in the .cc file only. Since it's easy
enough, this adds a class also for the empty string buffer as there's
no need to keep an empty vector / String16 this way.

No public API changes here.

Change-Id: Idb25fe24ea94f27f8001d552cede089e04eacd32
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2016015
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Commit-Queue: Johannes Henkel <johannes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#65964}
2020-01-24 00:57:40 +00:00
Ng Zhi An
b110d4808b Reland "[liftoff][wasm-simd] Implement f32x4.splat"
This relands commit 009993adb4.

The fix is in liftoff-assembler-ia32.h, the codegen was incorrect.

Original change's description:
> Implement f32x4.splat and enable handling this in Liftoff.
>
> We add a new macro for defining test cases to run on TurboFan, Liftoff,
> interpreter, and scalar lowering.
>
> Also add an assertion that the execution tier used is what we expected
> it to be. This is useful for Liftoff, because by default it falls back
> to TurboFan when it encounters an unimplemented opcode.
>
> Bug: v8:9909

Bug: v8:9909
Change-Id: I7daacbe8b195d9212367190c515b0babbc457a88
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2018043
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#65963}
2020-01-24 00:22:40 +00:00
Seth Brenith
867a2040ba [torque] Check pointer size when generating debug helper code
This fixes an issue found by the upcoming change that verifies a match
between 32-bit Torque output from a 32-bit build and 32-bit output from
a 64-bit build: https://crrev.com/c/v8/v8/+/1998078 . 32-bit output
never needs to deal with pointer compression.

Bug: v8:10124

Change-Id: I0e04728dafc4118a8816a3afa98651dddea7a574
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2001460
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Seth Brenith <seth.brenith@microsoft.com>
Cr-Commit-Position: refs/heads/master@{#65962}
2020-01-23 21:34:30 +00:00
Seth Brenith
534482b35b [tools] Show contents of cached external strings from crash dumps
This change adds support for the postmortem inspection library to show
the content of cached external strings if that content is available. It
also fixes a minor annoyance where strings with unavailable data would
show up as "...". Now, if fetching the very first character fails, we
omit the literal value from the output.

Bug: v8:9376
Change-Id: Id694a774c231ab3467fb59b1c149284729acfb20
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1987922
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Seth Brenith <seth.brenith@microsoft.com>
Cr-Commit-Position: refs/heads/master@{#65961}
2020-01-23 21:33:20 +00:00
Clemens Backes
f3a5c36a07 Revert "[wasm-simd][liftoff] Add S128 case for stack movements"
This reverts commit 5cfe053e45.

Reason for revert: "liftoff-simd-params" also fails on no-sse :/

Original change's description:
> [wasm-simd][liftoff] Add S128 case for stack movements
> 
> The two cases we are fixing here are Construct and
> LoadCallerFrameSlot, which are closely related.
> 
> Construct is called during PrepareCall, where we build up
> LiftoffStackSlots when we need to move an arg from caller's stack frame
> into callee's stack frame. LoadCallerFrameSlot is the parallel to
> this, called in ProcessParameter during decoding of the callee's
> function body.
> 
> In most cases, Construct needs a new case to handle kWasmS128, and calls
> the relevant assembler to push a s128 onto the stack.
> 
> ARM64 requires 16-byte alignment of sp, so we need to Claim the right
> number of kXRegSize slots first, which requires
> us traversing the list of slots to figure out how many s128 values there
> are. This is a straightforward way to fix this, if efficiency is a
> problem, we can change LiftOffStackSlots::Add to sum up the slot sizes.
> 
> On IA32, pushing s128 values will require 4 calls to push. Instead, we
> use a sub and two movdqu, which will generate less code in most cases.
> 
> On x64, there is no 128-bit push, so we call push twice.
> 
> Bug: v8:9909
> Change-Id: I3af35b8462ea9c3b9b2d90800c37d11b5e95be59
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2015945
> Commit-Queue: Zhi An Ng <zhin@chromium.org>
> Reviewed-by: Clemens Backes <clemensb@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#65956}

TBR=clemensb@chromium.org,zhin@chromium.org,joey.gouly@arm.com

Change-Id: Ib3c5a088e2d85baf1d8b143272844fb5ebb33c57
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:9909
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2017724
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#65960}
2020-01-23 20:09:19 +00:00
Zhao Jiazhong
b6cc74e067 [mips][wasm-simd] Implement v128.andnot
Port aa12b60  https://crrev.com/c/1980835

Change-Id: Idb82375e3bab94aed2b613d3f32e436fccb4fe53
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2008982
Reviewed-by: Zhi An Ng <zhin@chromium.org>
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Auto-Submit: Zhao Jiazhong <zhaojiazhong-hf@loongson.cn>
Cr-Commit-Position: refs/heads/master@{#65959}
2020-01-23 19:40:10 +00:00
Clemens Backes
6ef434caf4 Revert "[liftoff][wasm-simd] Implement f32x4.splat"
This reverts commit 009993adb4.

Reason for revert: New test fails, see https://ci.chromium.org/p/v8/builders/ci/V8%20Linux/35534 and https://ci.chromium.org/p/v8/builders/ci/V8%20Win32%20-%20debug/23778

Original change's description:
> [liftoff][wasm-simd] Implement f32x4.splat
> 
> Implement f32x4.splat and enable handling this in Liftoff.
> 
> We add a new macro for defining test cases to run on TurboFan, Liftoff,
> interpreter, and scalar lowering.
> 
> Also add an assertion that the execution tier used is what we expected
> it to be. This is useful for Liftoff, because by default it falls back
> to TurboFan when it encounters an unimplemented opcode.
> 
> Bug: v8:9909
> Change-Id: I594955fce778173191fc44c38c4f956a05e77839
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2014753
> Commit-Queue: Zhi An Ng <zhin@chromium.org>
> Reviewed-by: Clemens Backes <clemensb@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#65954}

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

Change-Id: Ie6970a8c29baab149150dd734a95f89be5fd89ff
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:9909
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2017722
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#65958}
2020-01-23 19:11:20 +00:00
Ben Smith
91adb03843 [wasm] Fix decoding of bulk memory instructions
The following instructions are affected: memory.init, data.drop,
table.init, table.drop. A segment index should be decoded as an unsigned
number, but these instructions were decoding as signed. This works
properly up to 63, but fails at 64 (which is decoded as -64 =
4294967232).

Bug: v8:10151
Change-Id: I742b74cf0bcadf2ff2f606beb65b7bae3e816530
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2015960
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Ben Smith <binji@chromium.org>
Cr-Commit-Position: refs/heads/master@{#65957}
2020-01-23 18:57:49 +00:00
Ng Zhi An
5cfe053e45 [wasm-simd][liftoff] Add S128 case for stack movements
The two cases we are fixing here are Construct and
LoadCallerFrameSlot, which are closely related.

Construct is called during PrepareCall, where we build up
LiftoffStackSlots when we need to move an arg from caller's stack frame
into callee's stack frame. LoadCallerFrameSlot is the parallel to
this, called in ProcessParameter during decoding of the callee's
function body.

In most cases, Construct needs a new case to handle kWasmS128, and calls
the relevant assembler to push a s128 onto the stack.

ARM64 requires 16-byte alignment of sp, so we need to Claim the right
number of kXRegSize slots first, which requires
us traversing the list of slots to figure out how many s128 values there
are. This is a straightforward way to fix this, if efficiency is a
problem, we can change LiftOffStackSlots::Add to sum up the slot sizes.

On IA32, pushing s128 values will require 4 calls to push. Instead, we
use a sub and two movdqu, which will generate less code in most cases.

On x64, there is no 128-bit push, so we call push twice.

Bug: v8:9909
Change-Id: I3af35b8462ea9c3b9b2d90800c37d11b5e95be59
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2015945
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#65956}
2020-01-23 18:56:31 +00:00
Clemens Backes
a8d059d9ad [api] Deprecate old name for wasm module type check
The new name "IsWasmModuleObject" was introduced in
https://crrev.com/c/2013109 and chrome switched to the new name in
https://crrev.com/c/2016622. Thus, the old name can be deprecated for
the 8.1 branch.

R=adamk@chromium.org

Bug: v8:10021
Change-Id: Ic09d4f8c9ae65ee855e3968f1c0814df0c97bb25
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2016584
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#65955}
2020-01-23 18:53:59 +00:00
Ng Zhi An
009993adb4 [liftoff][wasm-simd] Implement f32x4.splat
Implement f32x4.splat and enable handling this in Liftoff.

We add a new macro for defining test cases to run on TurboFan, Liftoff,
interpreter, and scalar lowering.

Also add an assertion that the execution tier used is what we expected
it to be. This is useful for Liftoff, because by default it falls back
to TurboFan when it encounters an unimplemented opcode.

Bug: v8:9909
Change-Id: I594955fce778173191fc44c38c4f956a05e77839
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2014753
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#65954}
2020-01-23 18:32:30 +00:00
Milad Farazmand
0a97c3f3b6 PPC/s390: [wasm] First plumbing for debugging in Liftoff
Port 7b79a02d2b

Original Commit Message:

    This CL adds a --debug-in-liftoff flag, which takes another path in
    {WasmScript::SetBreakPointForFunction}, and sets the breakpoint via
    {wasm::DebugInfo} (Liftoff-related) instead of {WasmDebugInfo} (C++
    interpreter related).
    Actual breakpoint support is not there yet, so the new test which sets
    this flag does not currently break anywhere. This will change with a
    future CL.

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

Change-Id: I632e4c945c88f58d8caba8688356f66406bc04aa
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2016915
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Milad Farazmand <miladfar@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#65953}
2020-01-23 18:04:49 +00:00
Santiago Aboy Solanes
e72aa7bfb4 [x64] Remove unnecessary CanCover from instruction selector
Change-Id: Ieabacfd183370ee09bcb6126e16fbf3135d48134
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2011836
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#65952}
2020-01-23 16:50:59 +00:00
Milad Farazmand
c4906f6edb s390: [wasm-simd] Implement simd shift and bitwise operations
Change-Id: Id9f40ac278c5a25739b11d3af06de1f7052d1c67
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2015943
Reviewed-by: Junliang Yan <jyan@ca.ibm.com>
Commit-Queue: Milad Farazmand <miladfar@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#65951}
2020-01-23 15:16:49 +00:00
Dan Elphick
d9cb964e57 [codegen] Optimize ExternalReference accesses on ARM
Load and store external references using the root register rather than
generating a constant and dereferencing it. This typically uses 1
instruction rather than up to 4.

Also adds external reference store optimisation for arm64.

Bug: v8:7844
Change-Id: I5f73728e7a72e366a31bfb694581e2e7d8250947
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2007270
Commit-Queue: Dan Elphick <delphick@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#65950}
2020-01-23 15:14:08 +00:00
Jakob Gruber
108cd50b84 [gasm] Fix superfluous LoopExitValue node
Loop exits are marked automatically by the loop scope mechanism in
combination with MergeState. Creating a LoopExitValue node explicitly
created an invalid graph.

Drive-by: Remove LoopExit{,Effect,Value} convenience methods.

Bug: chromium:1044878,v8:9972
Change-Id: I6fb52a8463e5352b5a5b243f800a9eda47df9d5a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2016593
Auto-Submit: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#65949}
2020-01-23 15:00:38 +00:00
Steve Blackburn
aab3f045a0 Generalize allocation types in TPH API.
The TPH needs to support the idea of 'code' objects, and the ability to query whether an object is of this type.

Bug: v8:9533
Change-Id: Ic36b235bd9640aa675a3ef0d8c3f6c98dd8cd862
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2013116
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Steve Blackburn <steveblackburn@google.com>
Cr-Commit-Position: refs/heads/master@{#65948}
2020-01-23 14:53:08 +00:00
Michael Achenbach
ceca93b8e9 [test] Fix correctness-fuzzer suppression.
Bug: chromium:1044942
Change-Id: I7442d26c37b8f14886bfee0eb82c8c94a9aeeb85
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2016594
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#65947}
2020-01-23 14:35:51 +00:00
Sami Kyostila
ca21777667 [tracing] Remove id mangling
Remove trace id mangling since it's been deprecated (and is also being
removed) in Chromium [1] and the actual id mangling operation was never
implemented in V8's version.

This patch doesn't introduce the upstream replacement
(TRACE_ID_{LOCAL,GLOBAL}), since nothing in V8 needs it and it'll be
shortly brought in with the transition to the Perfetto client library[2].

Bug: chromium:639003

[1] crbug.com/639003
[2] https://docs.google.com/document/d/1f7tt4cb-JcA5bQFR1oXk60ncJPpkL02_Hi_Bc6MfTQk/

Change-Id: Ifabda63b9c56918fafcc24dfc589b8e513a3f29b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2016592
Commit-Queue: Sami Kyöstilä <skyostil@chromium.org>
Commit-Queue: Peter Marshall <petermarshall@chromium.org>
Auto-Submit: Sami Kyöstilä <skyostil@chromium.org>
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#65946}
2020-01-23 12:50:48 +00:00
Mythri A
7d14032865 [interpreter] Fix feedback collection for TestEqual* bytecodes
For CompareOperations, we only care about Null or Undefined feedback
for oddballs. Other oddballs like Booleans should be treated as "Any"
feedback. There was a bug in the way we handled feedback when lhs is
undefined or null and rhs is anything other than JSReceiver. This cl
fixes it by removing an unnecessary check. This fixes a deopt loop in
TurboProp on maps benchmark.

Bug: v8:9684
Change-Id: I6a09c4b5637bacdcd7f7f96e1afe603b6653c7c6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2016591
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Commit-Queue: Mythri Alle <mythria@chromium.org>
Cr-Commit-Position: refs/heads/master@{#65945}
2020-01-23 12:14:48 +00:00
Santiago Aboy Solanes
d99600584e [CSA][cleanup] Finish TNodifying promises-gen
Did some drive-by cleanups, like removing the Sloppy-ness

Change-Id: Ia11ddc6752168ad10cad578bb8d839ab9b7473c8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2015021
Reviewed-by: Mythri Alle <mythria@chromium.org>
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#65944}
2020-01-23 12:05:49 +00:00
Clemens Backes
af854e8365 [gdbinit] Slightly increase dcheck stack walk limit
I hit a case where the 'V8_Dcheck' was only the sixth stack frame. Thus
increase the limit from 5 to 7.

R=ahaas@chromium.org

No-Try: true
Change-Id: I1ea37f07ff08ab5acffdfcc89d01ff102750a1e0
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2016589
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#65943}
2020-01-23 11:27:28 +00:00
Clemens Backes
6639d47734 [wasm] De-flake deserializer test
The NativeModule that was serialized in another isolate might be
temporarily kept alive by background threads. By keeping a weak pointer
to the module, we can wait for it to really die.
This happens very rarely, and the module will die pretty quickly, so
busy-waiting is fine in this case.

R=thibaudm@chromium.org

Bug: v8:10148
Change-Id: I8c4645acfccd04a820ef3f694cad3eb15e75acb6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2016585
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#65942}
2020-01-23 11:03:18 +00:00
Andreas Haas
e15f5ba11e [turbofan] Don't assume that Word32AtomicPairBinops has a projection-0
The instruction selector assumed for Word32AtomicPairBinop nodes that if
there exists a Projection(1) user, then there also exists a
Projection(0) user. This, however, is not the case, because TurboFan
eliminates unreachable nodes. The missing projection node lead to a
failed DCHECK in the register allocator.

With this CL we allocate the right registers for the existing
projections, and allocate the other needed registers as temp registers.

R=gdeepti@chromium.org

Bug: v8:10140
Change-Id: I22331cae58f933e89dac6993fe3b21ff6502838a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2011829
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#65941}
2020-01-23 09:27:38 +00:00
Johannes Henkel
9c934d3487 [DevTools] Roll inspector_protocol (V8)
Upstream Reviews:
"Remove writeJSON / toJSONString from generated protocol types."
https://chromium-review.googlesource.com/c/deps/inspector_protocol/+/2013082

Also, remove builderAppendQuotedString from string-util.h in v8 since it's
unused now and it relies on the jinja template code I'm deleting.

"Upon encountering a byte that's unexpectedly not ..."
https://chromium-review.googlesource.com/c/deps/inspector_protocol/+/2013764

New Rev: a84e91f6696a0b76e1a73286c9c2765154de9889

Change-Id: I26805c47950d880b5be2cfb9bdcb41a3f51218b6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2013561
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Commit-Queue: Johannes Henkel <johannes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#65940}
2020-01-23 02:16:58 +00:00
Ng Zhi An
53cf5df499 [wasm-simd] Implement v128.andnot scalar lowering
Bug: v8:10082
Change-Id: I5ade4269e70e09d0f98b51faf819163e736ae76b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1990507
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Cr-Commit-Position: refs/heads/master@{#65939}
2020-01-23 01:26:18 +00:00
Zhao Jiazhong
b92aca8e3b [mips][wasm-simd] Implement load splat and load extend
Port 72b68de https://crrev.com/c/1928150

Change-Id: Ic5d195046839bc83148d759225bc5330ce66a53b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2004139
Reviewed-by: Zhi An Ng <zhin@chromium.org>
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Commit-Queue: Deepti Gandluri <gdeepti@chromium.org>
Auto-Submit: Zhao Jiazhong <zhaojiazhong-hf@loongson.cn>
Cr-Commit-Position: refs/heads/master@{#65938}
2020-01-23 01:08:58 +00:00
Zhou, Zhiguo
8b5480b269 [wasm-simd] Implement the rest load_extend and load_splat on IA32
This CL implements load_extend with 2 lanes and all load_splat
operations on IA32. The necessary assemblers together with their
corresponding disassemblers and tests are also added in this CL.
The newly added opcodes include: S8x16LoadSplat, S16x8LoadSplat,
S32x4LoadSplat, S64x2LoadSplat, I64x2Load32x2S, I64x2Load32x2U.

Bug: v8:9886
Change-Id: I0a5dae0a683985c14c433ba9d85acbd1cee6705f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1982989
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Reviewed-by: Zhi An Ng <zhin@chromium.org>
Commit-Queue: Zhiguo Zhou <zhiguo.zhou@intel.com>
Cr-Commit-Position: refs/heads/master@{#65937}
2020-01-23 00:44:58 +00:00
Zhao Jiazhong
164a031365 [mips][wasm-simd] Implement i64x2.mul
Port 9ff2de4 https://crrev.com/c/1994382

Change-Id: I045fd862f6ae026fd0e5637a685589bee149ab74
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2008981
Auto-Submit: Zhao Jiazhong <zhaojiazhong-hf@loongson.cn>
Reviewed-by: Zhi An Ng <zhin@chromium.org>
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Commit-Queue: Deepti Gandluri <gdeepti@chromium.org>
Cr-Commit-Position: refs/heads/master@{#65936}
2020-01-23 00:29:58 +00:00
Adam Klein
d92bc12243 [api] Remove "experimental" warnings from SharedArrayBuffer in v8.h
The feature has been on-by-default in Chrome for nearly a year now,
and is an established part of the ECMAScript standard.

Change-Id: Icf9d424e5fe9139c12fc26b41603b4e39f79ea54
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2015942
Reviewed-by: Ben Smith <binji@chromium.org>
Commit-Queue: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#65935}
2020-01-22 23:35:08 +00:00
Ulan Degenbaev
b1a482f714 [heap] Infer native context for each JSObject for memory measurement
Bug: chromium:973627

Change-Id: Ie9b07075604451636967b69b30f276fb45bc5372
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2011824
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#65934}
2020-01-22 22:34:08 +00:00
Deepti Gandluri
3390e57553 Remove "--wasm-disable-structured-cloning" flag
Bug: v8:10021
Change-Id: I23a693064c44cd620a874787bcc00cb42bc5874f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1999158
Commit-Queue: Deepti Gandluri <gdeepti@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Ben Smith <binji@chromium.org>
Cr-Commit-Position: refs/heads/master@{#65933}
2020-01-22 22:24:19 +00:00