Commit Graph

47878 Commits

Author SHA1 Message Date
Marja Hölttä
da2be4d030 [in-place weak refs] Fix HeapSnapshotGenerator.
WeakFixedArrays can also contain strong pointers.

(Separating this fix from
https://chromium-review.googlesource.com/c/v8/v8/+/1075053 ; after that CL tests
will fail without this fix.)

BUG=v8:7308

Change-Id: I0d47ab179625bcbf6149cf02ad696f8af250ae8d
Reviewed-on: https://chromium-review.googlesource.com/1075270
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53386}
2018-05-28 14:09:47 +00:00
Georg Neis
21eb2029d0 Fix bug in object literals with redeclarations.
Bug: v8:7791
Change-Id: I0df79f39c6f60b3cfbdc0161f7c085c635659d81
Reviewed-on: https://chromium-review.googlesource.com/1075054
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53385}
2018-05-28 13:00:07 +00:00
Yang Guo
d08dca5434 Do not install extensions when creating snapshot.
Bug: v8:7760

Change-Id: Id7bfa18f3ac0b7d62e99d0d530ea0cb9427e198e
Reviewed-on: https://chromium-review.googlesource.com/1074693
Commit-Queue: Yang Guo <yangguo@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53384}
2018-05-28 10:53:07 +00:00
Michael Starzinger
090f9b7719 [wasm] Extend checking of {WasmCode} relocation info.
This extends the validity checking of relocation information from only
non-anonymous {WasmCode} objects to all (even anonymous) such objects,
including code being copied in from the garbage-collected heap.

R=jgruber@chromium.org

Change-Id: Icbc842ad819f4471cc11d3d19bbde1d192731569
Reviewed-on: https://chromium-review.googlesource.com/1073284
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53383}
2018-05-28 10:33:37 +00:00
Yang Guo
aa6ce3ee61 [log][api] introduce public CodeEventListener API
Introduce a new public API called CodeEventListener to allow embedders
to better support external profilers and other diagnostic tools without
relying on unsupported methods like --perf-basic-prof.

Bug: v8:7694
Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
Change-Id: I063cc965394d59401358757634c9ea84c11517e9
Co-authored-by: Daniel Beckert <daniel@sthima.com.br>
Reviewed-on: https://chromium-review.googlesource.com/1028770
Commit-Queue: Yang Guo <yangguo@chromium.org>
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53382}
2018-05-28 09:27:24 +00:00
Michael Starzinger
7633479c1c [wasm] Remove obsolete {RelocInfo::WASM_GLOBAL_HANDLE}.
R=titzer@chromium.org

Change-Id: I238835a63403e3688f271fc04f4a80c4b3c767c0
Reviewed-on: https://chromium-review.googlesource.com/1074656
Reviewed-by: Ben Titzer <titzer@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53381}
2018-05-28 09:07:44 +00:00
Jaroslav Sevcik
cb44d296a4 [turbofan] Remove unused Type::Of.
Bug: v8:7790
Change-Id: I9ca667109b17c5787aca8499dc379238cd43e5cb
Reviewed-on: https://chromium-review.googlesource.com/1073418
Commit-Queue: Jaroslav Sevcik <jarin@chromium.org>
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53380}
2018-05-28 08:11:38 +00:00
v8-autoroll
f3a3c1ce4d Update V8 DEPS.
Rolling v8/build: 244ad31..39cffda

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

Change-Id: I92a7ae51de2eec216a072bfa80413dd5db556948
Reviewed-on: https://chromium-review.googlesource.com/1074560
Commit-Queue: v8 autoroll <v8-autoroll@chromium.org>
Reviewed-by: v8 autoroll <v8-autoroll@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53379}
2018-05-28 03:28:27 +00:00
v8-autoroll
c1af23e1e5 Update V8 DEPS.
Rolling v8/build: 31a054c..244ad31

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

Change-Id: Ie4cb30a5c5524787703855e55265d099e8a656ff
Reviewed-on: https://chromium-review.googlesource.com/1074534
Reviewed-by: v8 autoroll <v8-autoroll@chromium.org>
Commit-Queue: v8 autoroll <v8-autoroll@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53378}
2018-05-27 03:27:07 +00:00
Junliang Yan
b6b079d872 PPC/s390: [builtins] Move ArrayConstructorStub to builtin
Port 111c5735ef

Original Commit Message:

    Calls from embedded builtins to stubs are expensive due to the
    indirection through the builtins constants table. This moves
    the ArrayConstructorStub to a builtin.

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

Change-Id: Icc6af15d80eb5c95a191832eb9636ebe97e61e07
Reviewed-on: https://chromium-review.googlesource.com/1074548
Reviewed-by: Joran Siu <joransiu@ca.ibm.com>
Commit-Queue: Junliang Yan <jyan@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#53377}
2018-05-26 18:16:56 +00:00
v8-autoroll
c45f74e29f Update V8 DEPS.
Rolling v8/build: f86e77c..31a054c

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/0e97383..0043a4a

Rolling v8/third_party/depot_tools: 4d2e8bf..f16fdf3

Rolling v8/tools/swarming_client: 34f5f28..3543e21

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

Change-Id: Icc3a21fc3cd6f39cbcbab2f6e7f4b6ef63476962
Reviewed-on: https://chromium-review.googlesource.com/1074069
Reviewed-by: v8 autoroll <v8-autoroll@chromium.org>
Commit-Queue: v8 autoroll <v8-autoroll@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53376}
2018-05-26 03:31:12 +00:00
Aseem Garg
f22991ab40 [wasm] Add simd compare ops to wasm interpreter
R=gdeepti@chromium.org,bbudge@chromium.org,clemensh@chromium.org,titzer@chromium.org
BUG=v8:6020

Change-Id: I9d307a70d44504dc0e84e3e09d48bcc9b9542462
Reviewed-on: https://chromium-review.googlesource.com/1071095
Commit-Queue: Aseem Garg <aseemgarg@chromium.org>
Reviewed-by: Ben Titzer <titzer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53375}
2018-05-25 22:29:34 +00:00
Aseem Garg
f8445719c3 [wasm] Delete Simd unsigned int types for interpreter
R=gdeepti@chromium.org,bbudge@chromium.org,clemensh@chromium.org,titzer@chromium.org
BUG=v8:6020

Change-Id: I05bb2124751f64565ad4e22f267fe42a3e0f1845
Reviewed-on: https://chromium-review.googlesource.com/1070935
Commit-Queue: Aseem Garg <aseemgarg@chromium.org>
Reviewed-by: Ben Titzer <titzer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53374}
2018-05-25 22:19:24 +00:00
Bill Budge
a52ee2f5f5 [wasm] Fix compile for Arm64 on OSX
R=ahaas@chromium.org

Also-by: ahaas@chromium.org
Change-Id: Ieb7e20dedcbd3def7e6c4f42e6392306ac3ed1f7
Reviewed-on: https://chromium-review.googlesource.com/1073505
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Bill Budge <bbudge@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53373}
2018-05-25 20:52:14 +00:00
Junliang Yan
a1269d684c PPC/s390: [builtins] Move ArrayNArgumentsConstructorStub to builtin
Port 0094defac4

Original Commit Message:

    Calls from embedded builtins to stubs are expensive due to the
    indirection through the builtins constants table. This moves
    the ArrayNArgumentsConstructorStub to a builtin.

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

Change-Id: Ibf5e33cd14ef5baece9ddb660ab54b07233e8a20
Reviewed-on: https://chromium-review.googlesource.com/1073056
Reviewed-by: Joran Siu <joransiu@ca.ibm.com>
Commit-Queue: Junliang Yan <jyan@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#53372}
2018-05-25 18:47:24 +00:00
Eric Holk
54f9f0a249 [arm] Fix build from Mac
R= ahaas@chromium.org

Also-By: ahaas@chromium.org
Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng;luci.v8.try:v8_linux_noi18n_rel_ng
Change-Id: I8e34bb93df0cb7174e6c2fc2c36fe8697f4f88c4
Reviewed-on: https://chromium-review.googlesource.com/1073608
Reviewed-by: Eric Holk <eholk@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Eric Holk <eholk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53371}
2018-05-25 18:03:33 +00:00
Sreten Kovacevic
e48d9788a4 [mips] Port [wasm] Remove dead handling of RUNTIME_ENTRY relocations.
Port of commit 8ac37bc392.
RelocInfo::INTERNAL_REFERENCE_ENCODED is used only on mips, mips64
and ppc.

Original commit message:
`The RelocInfo::RUNTIME_ENTRY relocation mode is only used for deopt
points in JavaScript code and should never appear in WebAssembly code.`

Change-Id: Ic595103740dc3c349836114f9cbc815865c5b54c
Reviewed-on: https://chromium-review.googlesource.com/1073420
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Sreten Kovacevic <sreten.kovacevic@mips.com>
Cr-Commit-Position: refs/heads/master@{#53370}
2018-05-25 17:35:53 +00:00
Junliang Yan
711ff72530 PPC/s390: [builtins] Move CallApiGetter and CallApiCallback stubs to builtins
Port 70cede3916

Original Commit Message:

    Calls from embedded builtins to stubs are expensive due to the
    indirection through the builtins constants table. This moves
    CallApiGetter and the 0/1 argument case of CallApiCallback to
    builtins.

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

Change-Id: I15677f91ad1f5cac05d4760f4cdd1561982a0621
Reviewed-on: https://chromium-review.googlesource.com/1073055
Reviewed-by: Joran Siu <joransiu@ca.ibm.com>
Commit-Queue: Junliang Yan <jyan@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#53369}
2018-05-25 17:21:03 +00:00
Ben L. Titzer
ae6e9cc7f4 [wasm] Inline helpers of WasmModule::origin
R=mstarzinger@chromium.org

Change-Id: I0976bfa57b9ec48fae2b912e78bacfee4f8eeafb
Reviewed-on: https://chromium-review.googlesource.com/1072654
Commit-Queue: Ben Titzer <titzer@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53368}
2018-05-25 16:47:52 +00:00
Michael Starzinger
d3c02d30e4 [wasm] Keep all WebAssembly optimizations Isolate independent.
R=titzer@chromium.org

Change-Id: Ia2217d4f3ff9c8f1929ac622c96d6c4b75e6c091
Reviewed-on: https://chromium-review.googlesource.com/1072655
Reviewed-by: Ben Titzer <titzer@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53367}
2018-05-25 16:44:32 +00:00
Junliang Yan
8b5510c30a PPC/s390: [builtins] Inline the off-heap trampoline at callsites
Port 5674812cfb

Original Commit Message:

    At runtime, calls to embedded builtins do not need to take the
    indirection through the off-heap trampoline. We can simply inline the
    trampoline instead.

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

Change-Id: I4b18f3a957a41af28da34b503015271573949888
Reviewed-on: https://chromium-review.googlesource.com/1073193
Reviewed-by: Joran Siu <joransiu@ca.ibm.com>
Commit-Queue: Junliang Yan <jyan@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#53366}
2018-05-25 16:10:12 +00:00
Ben L. Titzer
249e494925 [wasm] Remove flag --skip-compiling-wasm-funcs
This was originally a flag for debugging the compilation of a module
by skipping compilation of the first N functions in a module. This
flag is not properly respected anymore, and is an unnecessary complication.

R=herhut@chromium.org

Change-Id: If9bf80245f6982a8383ca3865c599d58319feba9
Reviewed-on: https://chromium-review.googlesource.com/1061468
Reviewed-by: Stephan Herhut <herhut@chromium.org>
Commit-Queue: Ben Titzer <titzer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53365}
2018-05-25 16:05:23 +00:00
jgruber
c52b7af57d [stubs] General stub cleanup (includes & platform-independent code)
Bug: v8:6666
Change-Id: Ibb5b8b2012041e908ac7f109abf0a724b12c0e72
Reviewed-on: https://chromium-review.googlesource.com/1073447
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53364}
2018-05-25 15:33:44 +00:00
jgruber
a55d8632f7 [stubs] Remove TransitionElementsKindStub
Its contents are now inlined into the one remaining call site.

Bug: v8:6666
Change-Id: Icfcf89013506fec880ffd84eaa88b91e818e28c0
Reviewed-on: https://chromium-review.googlesource.com/1073311
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53363}
2018-05-25 15:31:57 +00:00
Dan Elphick
1b9ca71d1b [compiler] Avoid HeapObject::GetHeap in BitSetType::Lub
Modifies several Type:: methods to take an Isolate to pass through to
BitSetType::Lub as well as their call sites.

Bug: v8:7786
Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
Change-Id: I9ac769c4c658995421fd28b9b1d77d6f84627116
Reviewed-on: https://chromium-review.googlesource.com/1071515
Commit-Queue: Dan Elphick <delphick@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53362}
2018-05-25 15:30:53 +00:00
Dan Elphick
ff9263f80c [objects] Make Object::BooleanValue take an Isolate
Removes use of HeapObject::GetIsolate() from Object::BooleanValue in
preparation for removing the method.

Requires adding Isolate parameter to CommonOperatorReducer constructor.

Bug: v8:7786
Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng;luci.v8.try:v8_linux_noi18n_rel_ng
Change-Id: If735e71df3288bf1eb11576605c2d95a19472181
Reviewed-on: https://chromium-review.googlesource.com/1071653
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Dan Elphick <delphick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53361}
2018-05-25 14:37:22 +00:00
jgruber
7d161e4d38 [builtins] Move InternalArrayConstructorStub to builtin
Calls from embedded builtins to stubs are expensive due to the
indirection through the builtins constants table. This moves
the InternalArrayConstructorStub to a builtin.

Bug: v8:6666
Change-Id: I8cd801bd9218ca9ef0853ed99c7a69090af5c9f9
Reviewed-on: https://chromium-review.googlesource.com/1072608
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53360}
2018-05-25 11:38:48 +00:00
v8-autoroll
f83d858750 Update V8 DEPS.
Rolling v8/build: 1e1a86d..f86e77c

Rolling v8/buildtools: 94288c2..893eb86

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/1986f5a..0e97383

Rolling v8/third_party/depot_tools: ebdd0db..4d2e8bf

Rolling v8/tools/swarming_client: 833f5eb..34f5f28

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

Change-Id: I2f80f295c0d5a2c527eb1d609051378151110333
Reviewed-on: https://chromium-review.googlesource.com/1073188
Commit-Queue: v8 autoroll <v8-autoroll@chromium.org>
Reviewed-by: v8 autoroll <v8-autoroll@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53359}
2018-05-25 11:24:13 +00:00
Marja Hölttä
289442bc06 [wasm] Fix WasmInstanceObjectPrint.
If the optional fields are not set, trying to cast to the Object subtype fails.

Change-Id: I386c6b23cbd3d282a72093dfc78966d0046578c3
Reviewed-on: https://chromium-review.googlesource.com/1073307
Reviewed-by: Ben Titzer <titzer@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53358}
2018-05-25 11:23:08 +00:00
jgruber
111c5735ef [builtins] Move ArrayConstructorStub to builtin
Calls from embedded builtins to stubs are expensive due to the
indirection through the builtins constants table. This moves
the ArrayConstructorStub to a builtin.

Bug: v8:6666
Change-Id: Iff4bff99cd911a7f5f138819801c7812b75ea969
Reviewed-on: https://chromium-review.googlesource.com/1071519
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53357}
2018-05-25 11:04:18 +00:00
jgruber
0094defac4 [builtins] Move ArrayNArgumentsConstructorStub to builtin
Calls from embedded builtins to stubs are expensive due to the
indirection through the builtins constants table. This moves
the ArrayNArgumentsConstructorStub to a builtin.

Bug: v8:6666
Change-Id: Ied303334874251415a9057abf612d76dd8330aa6
Reviewed-on: https://chromium-review.googlesource.com/1071450
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53356}
2018-05-25 10:56:28 +00:00
jgruber
70cede3916 [builtins] Move CallApiGetter and CallApiCallback stubs to builtins
Calls from embedded builtins to stubs are expensive due to the
indirection through the builtins constants table. This moves
CallApiGetter and the 0/1 argument case of CallApiCallback to
builtins.

Bug: v8:6666
Change-Id: I49c4917253f790a3b947f42c50d6308a1ab99d91
Reviewed-on: https://chromium-review.googlesource.com/1070980
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53355}
2018-05-25 10:54:27 +00:00
jgruber
5674812cfb [builtins] Inline the off-heap trampoline at callsites
At runtime, calls to embedded builtins do not need to take the
indirection through the off-heap trampoline. We can simply inline the
trampoline instead.

Bug: v8:6666
Change-Id: Idb7d504fdfee173a0b134fbc74bd5dc6d09629cb
Reviewed-on: https://chromium-review.googlesource.com/1068742
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53354}
2018-05-25 10:21:47 +00:00
Tobias Tebbi
b1a60e91e0 [cleanup] move implementations to src/torque/types.cc
Bug: v8:7754
Change-Id: I4664a86ca0daccdd977f6a1b89c0f33294f084a1
Reviewed-on: https://chromium-review.googlesource.com/1073149
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53353}
2018-05-25 09:08:46 +00:00
Michael Starzinger
fabb514087 [wasm] Avoid embedding {null} values in WasmCode.
This loads references to {null} values from the instance object instead
of embedding them into the generated code. It is one step towards making
the {WasmCode} objects independent of the Isolate.

Note that this also fixes an issue with the serializer/deserializer that
failed to properly serialize {null} values and accidentally collapsed
them to {undefined} values instead.

R=ahaas@chromium.org
TEST=mjsunit/regress/wasm/regress-7785
BUG=v8:7424,v8:7785

Change-Id: Ie436c2d96890e7c8c89ffe2bd4189a759254775b
Reviewed-on: https://chromium-review.googlesource.com/1070981
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53352}
2018-05-25 08:33:06 +00:00
Stephan Herhut
ee82333bc8 [wasm] Emit IA disassembly for --trace-turbo
This adds basic support to emit IA disassembly to the json files
digested by turbolizer.

Change-Id: I8964c2f44565e8242e09c9be879c7db2654b65b6
Reviewed-on: https://chromium-review.googlesource.com/1071669
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Stephan Herhut <herhut@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53351}
2018-05-25 08:27:26 +00:00
Marja Hölttä
99bf906887 [in-place weak refs] Replace the WeakCell(transition_map) in DataHandlers.
BUG=v8:7308

Change-Id: Ia74e5696133ec183ff550da011452b0c12a06e40
Reviewed-on: https://chromium-review.googlesource.com/1068883
Commit-Queue: Marja Hölttä <marja@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53350}
2018-05-25 07:54:46 +00:00
jgruber
e5630ea97b [builtins,x64] pc-relative builtin-to-builtin calls
This addresses one of the major remaining slowdowns with embedded
builtins on x64.

When generating code for a call to a builtin callee from a builtin
caller, we'd look up the Code target object from the builtins constant
list, calculate the location of the first instruction, and jump to it.
Note that for embedded builtin callees, the Code object is itself only
a trampoline to the off-heap code and thus an additional indirection.
An example of the call sequence in pseudo-asm:

// Load from the constants list.
mov reg, [kRootPointer, kBuiltinsConstantListOffset]
mov reg, [reg, offset_of_the_code_constant]
// Calculate first instruction and call it.
add reg, Code::kHeaderOffset
call reg
// The trampoline forwards to the off-heap area.
mov kOffHeapTrampolineRegister, <off-heap instruction_start>
jmp kOffHeapTrampolineRegister

This CL changes calls to embedded builtin targets to use pc-relative
addressing. This reduces the above instruction sequence to:

call <pc-relative offset to target instruction_start>

Embedded-to-embedded calls jump directly to the embedded instruction
stream, bypassing the trampoline. Heap-to-embedded calls (and all
calls to heap-builtins) use pc-relative addressing targeting the
on-heap Code object.

Other relevant platforms (arm,arm64,mips,mips64) do not use pc-relative
calls. For these, we'll need a different solution, e.g. a table of
embedded builtin addresses reachable from the root pointer, similar to
the external reference table.

Bug: v8:6666
Change-Id: Ic0317d454e2da37d74eaecebcdfcbc0d5f5041ad
Reviewed-on: https://chromium-review.googlesource.com/1068732
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53349}
2018-05-25 07:00:06 +00:00
Junliang Yan
2f2bf24660 PPC/s390: [generators] Store parameters in the generator object.
Port ea7499f5da

Original Commit Message:

    Currently, we context allocate all parameters for generators.

    With this CL, we keep arguments on stack (unless they escape to inner
    closure) and copy them between the stack and the generator's register
    file on suspend/resume. This will save context allocation in most cases.

    - Suspend copies arguments and registers to the generator.
    - Resume copies only the registers from the generator, the arguments
      are copied by the ResumeGenerator trampoline.

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

Change-Id: I4a22024ce4e29a4e0217697a3b53b1c7bba0ddf1
Reviewed-on: https://chromium-review.googlesource.com/1072309
Reviewed-by: Joran Siu <joransiu@ca.ibm.com>
Commit-Queue: Junliang Yan <jyan@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#53348}
2018-05-25 02:17:25 +00:00
Andreas Haas
8a95da2415 [wasm] Reimplement WebAssembly.instantiate without desugaring
At the moment, WebAssembly.instantiate(bytes) is implemented by
desugaring it to WebAssembly.compile(bytes).then(WebAssembly.instantiate).
The problem is that the {then} in this snippet is observable. With this
CL I introduce a CompilationResultResolver which allows to do the
desugaring internally and thereby make the {then} unobservable.
Unfortunately the result of WebAssembly.instantiate(bytes) is different
than the result of WebAssembly.instantiate(module). Therefore I also
introduced an InstantiationResultResolver for symmetry with
WebAssembly.compile.

R=mstarzinger@chromium.org
Bug: chromium:837417

Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
Change-Id: I2d98e03d65f2ada19041d5a9e2df5da91b24ccca
Reviewed-on: https://chromium-review.googlesource.com/1059783
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53347}
2018-05-24 22:15:52 +00:00
Aseem Garg
bedcef5cd0 [wasm] Add simd unops to wasm interpreter
R=gdeepti@chromium.org,bbudge@chromium.org,clemensh@chromium.org,titzer@chromium.org
BUG=v8:6020

Change-Id: Ibc4e45df65ad8fc649e42b2166545cbc5fcb4296
Reviewed-on: https://chromium-review.googlesource.com/1070933
Reviewed-by: Ben Titzer <titzer@chromium.org>
Commit-Queue: Aseem Garg <aseemgarg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53346}
2018-05-24 19:01:32 +00:00
Hannes Payer
fb436a5e15 Adding an API to enable and disable the memory savings mode.
Bug: chromium:846360
Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
Change-Id: I5376d4f6f9c8df768d60c63e0a767bf41b51b8b3
Reviewed-on: https://chromium-review.googlesource.com/1071531
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Hannes Payer <hpayer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53345}
2018-05-24 18:25:32 +00:00
Michael Achenbach
cffe6247ad [test] Skip more hanging death tests on mac asan
TBR=sigurds@chromium.org
NOTRY=true

Bug: chromium:820416
Change-Id: Ibd6fec04a9ea610c83c9347b4971f5ffea1fa80d
Reviewed-on: https://chromium-review.googlesource.com/1071521
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53344}
2018-05-24 16:02:51 +00:00
Sreten Kovacevic
4e6bcd2962 [simd] Implement conversion simd lowering
Implement lowering for simd operations I32x4ConvertI16x8 and
I16x8ConvertI8x16. Also, remove skip tests from status files that
were overriden when tests were renamed.

TEST=cctest/test-run-wasm-simd/RunWasm_I16x8ConvertI8x16_turbofan

Change-Id: If428f5039a32995c8ee64294c936419173a87aa7
Reviewed-on: https://chromium-review.googlesource.com/1069007
Reviewed-by: Aseem Garg <aseemgarg@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53343}
2018-05-24 15:32:52 +00:00
Andreas Haas
3df1682020 [compiler] Make aseemgarg owner of simd-scalar-lowering.*
Aseem is the main auther of simd-scalar-lowering and should therefore be
able to lgtm changes to that file.

No-Try: true
No-Tree-Checks: true

R=titzer@chromium.org
CC=aseemgarg@chromium.org

Change-Id: If62d895fb18e8fd59735fec63faa38ca7a6598c5
Reviewed-on: https://chromium-review.googlesource.com/1070984
Reviewed-by: Ben Titzer <titzer@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53342}
2018-05-24 15:24:11 +00:00
Tobias Tebbi
610c964af0 [torque] add support for release-build checks
Change-Id: Ie8bdbcdea8006d3105c419113f9adb2c1d6f162c
Reviewed-on: https://chromium-review.googlesource.com/1070203
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53341}
2018-05-24 14:47:41 +00:00
Michael Starzinger
8ac37bc392 [wasm] Remove dead handling of RUNTIME_ENTRY relocations.
The RelocInfo::RUNTIME_ENTRY relocation mode is only used for deopt
points in JavaScript code and should never appear in WebAssembly code.

R=titzer@chromium.org

Change-Id: Ied1d61e2b1eb886565d13448442dd6a6ed35d3f0
Reviewed-on: https://chromium-review.googlesource.com/1070197
Reviewed-by: Ben Titzer <titzer@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53340}
2018-05-24 14:32:01 +00:00
Théotime Grohens
815f9461f7 [torque] Move remaining DataView getters to Torque
This CL completely removes the C++ builtin implementation of the
DataView.prototype.buffer, DataView.prototype.byteLength, and
DataView.prototype.byteOffset getters, and moves them to
a Torque implementation (that still relies on a bit of CSA).

Change-Id: Id46678ae709c3787b7b93d0f78bd2a6e16e00f7b
Reviewed-on: https://chromium-review.googlesource.com/1070369
Commit-Queue: Théotime Grohens <theotime@google.com>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53339}
2018-05-24 14:30:41 +00:00
Sigurd Schneider
5da538d9e9 [turbolizer] Fix bug in graph visualizer
Bug: chromium:846000
Change-Id: If74749f11c7e1e112090a18f79ebed1819535d24
Reviewed-on: https://chromium-review.googlesource.com/1071671
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53338}
2018-05-24 14:21:53 +00:00
Sigurd Schneider
37f46e2802 [mjsunit] Speed up a slow test.
Bug: v8:7783
Change-Id: If351c07735b583816389b77d4077b3494571626f
Reviewed-on: https://chromium-review.googlesource.com/1071441
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53337}
2018-05-24 13:11:30 +00:00