Commit Graph

65936 Commits

Author SHA1 Message Date
Milad Fa
9820f02d5c PPC: [wasm-simd] Implement S128Const and S128AllOnes
Change-Id: I8f8b0b525541cec1a814b7df6ffe0baf00514929
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2554526
Reviewed-by: Junliang Yan <junyan@redhat.com>
Commit-Queue: Milad Fa <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/master@{#71344}
2020-11-23 18:17:32 +00:00
bcoe
c48ae2d96c stack-trace-api: implement getEnclosingLine/Column
Introduces getEnclosingColumn and getEnclosingLine on CallSite
so that the position can be used to lookup the original symbol
for function when source maps are used.

BUG=v8:11157

Change-Id: I06c4c374d172d206579abb170c7b7a2bd3bb159f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2547218
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Benjamin Coe <bencoe@google.com>
Cr-Commit-Position: refs/heads/master@{#71343}
2020-11-23 15:44:41 +00:00
Camillo Bruni
a48fcd6d3b [api] Add module streaming support
- Add support for module streaming compilation
- Enable module streaming testing d8
- Update API tests to include basic module streaming

Bug: chromium:1061857
Change-Id: I3ac95f7d672c382406182fb6900b1095f15c63b3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2536457
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#71342}
2020-11-23 15:18:21 +00:00
Victor Gomes
1df2f22fb6 [nci] Fix arguments order in call of ConstructWithSpread_WithFeedback
ConstructWithSpread_WithFeedback uses the same argument order as JS linkage, therefore arguments should be inserted in reversed order.
See https://source.chromium.org/chromium/chromium/src/+/master:v8/src/codegen/interface-descriptors.h;drc=c7cb9beca18d98ba83c3b75860b912219d425d0e;l=507

Change-Id: I4d3ded048a08ba9a2a4d30da4c41044d9669becc
Bug: chromium:1145990
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2549952
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#71341}
2020-11-23 15:13:01 +00:00
Santiago Aboy Solanes
4e34d7af84 [compiler] Add (Local)?Isolate parameter to String::Get
If we have a regular isolate (or none at all), we can skip acquiring
the lock check and DCHECK that we are calling from the main thread.
If we have a LocalIsolate, we acquire the string lock if needed.

Bug: v8:7790
Change-Id: Ie3562e8172a3e3eca8d194e8652cb881f765cdb8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2551102
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#71340}
2020-11-23 15:07:42 +00:00
Manos Koukoutos
051a29cceb [wasm-gc] Implement JS roundtrip for anyref
We use the same temporary mechanism as with eqref, in anticipation of
standardization of the wasm-gc JS API.

Bug: v8:7748
Change-Id: I224a043e5450ce489fc7f3b2f07f277a0444b8e0
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2546695
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#71339}
2020-11-23 14:18:31 +00:00
Dominik Inführ
c875ab35b2 [heap] Remove unused method in ArrayBufferSweeper
Change-Id: I51f2152d8a26fb0b266a41f7d284ced7908eb475
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2554603
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Auto-Submit: Dominik Inführ <dinfuehr@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#71338}
2020-11-23 14:02:03 +00:00
Clemens Backes
b61e85a3c0 [wasm] Revisit maximum jump table distance
This changes a '<' to a '<=' and adds a comment to explain why it is
safe to use a jump table where the maximum distance is exactly
{kMaxCodeSpaceSize}.

R=jkummerow@chromium.org

Bug: chromium:1151364
Change-Id: Id4971a2e9095fa99df48367ab09af4adbfadffaf
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2552906
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#71337}
2020-11-23 13:40:41 +00:00
Liu Yu
6ded810bb2 [mips][builtins] Avoid reloading undefined value in InterpreterEntryTrampoline
Port: 40c0f84a38

Bug: v8:9771
Change-Id: Icbe4e3450bb6ef7242804ca9d7f46cb6f1aed40c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2539538
Auto-Submit: Liu yu <liuyu@loongson.cn>
Reviewed-by: Zhao Jiazhong <zhaojiazhong-hf@loongson.cn>
Commit-Queue: Zhao Jiazhong <zhaojiazhong-hf@loongson.cn>
Cr-Commit-Position: refs/heads/master@{#71336}
2020-11-23 11:22:50 +00:00
Jakob Kummerow
db5ede7ff8 Fix rare stack overflow in instanceof
For a very particular special case (long "chains" of bound
functions with an undefined @@hasInstance handler), evaluating
the `instanceof` operator could lead to a very deep recursion.
This patch adds a stack check to make sure we throw rather than
crash on stack overflow.

Bug: v8:11115
Change-Id: I6bf941b9e75e9fe3a52112ade27388ac4fbbda2f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2545624
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#71335}
2020-11-23 10:48:49 +00:00
Georg Neis
5b5916ca35 [compiler] Add some DCHECKs to compilation dependencies
Bug: v8:7790
Change-Id: Idee149b3d59064941473d5e17e2c56a253a5f49d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2546691
Auto-Submit: Georg Neis <neis@chromium.org>
Reviewed-by: Santiago Aboy Solanes <solanes@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#71334}
2020-11-23 10:00:05 +00:00
Michael Achenbach
0a9bcd013a [js-fuzzer] Disallow flag that causes false positives.
Don't pass the correctness-fuzzing suppressions to normal fuzzing as
they turn stack overflows and invalid string length checks into
crashes.

This became first now a problem after the flag was passed in an mjsunit
test case.

No-Try: true
Bug: chromium:1151600,chromium:1151599
Change-Id: I5d29900a4b155762cae447fc102055eab1916309
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2551112
Auto-Submit: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#71333}
2020-11-23 09:45:09 +00:00
Zhao Jiazhong
7e24c4957e [mips] Request to be an owner of MIPS files
I'm working for Loongson Technology, and I have contributed 120+
patches to maintain v8 on mips platform. I request to be an owner
of MIPS files, so that we can maintain mips ports more conveniently.

Change-Id: Ib01dadfb879fefe7c095398930573e8df0f7c8dd
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2525542
Commit-Queue: Zhao Jiazhong <zhaojiazhong-hf@loongson.cn>
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#71332}
2020-11-23 09:43:49 +00:00
Liu Yu
c1bc0edc79 [mips][wasm][memory64] Prepare Liftoff for ptrsize offsets
Port: commit 1da429fb8a

Bug: v8:10949

Change-Id: I77d28b26a78fe098b529d6ac333c0dac49850b4f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2553160
Reviewed-by: Zhao Jiazhong <zhaojiazhong-hf@loongson.cn>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Auto-Submit: Liu yu <liuyu@loongson.cn>
Cr-Commit-Position: refs/heads/master@{#71331}
2020-11-23 09:31:19 +00:00
Marja Hölttä
141ede2ec1 [ast-value-factory] Fix length mismatch in string comparison
When comparing two-byte strings, the correct number of characters to
compare is length(), not byte_length().

The bug was introduced in
https://chromium-review.googlesource.com/c/v8/v8/+/2533038

There's no regression test, since going beyond the AstRawString
boundary generally doesn't crash.

Bug: chromium:1151602
Change-Id: I32c297c2751835dd7574ff928d2d5b8346b4381a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2551110
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/master@{#71330}
2020-11-23 09:20:39 +00:00
Camillo Bruni
e49ea59739 [d8][owners] Add cbruni as src/d8 owner
Change-Id: Ib34bb9aeeab0e092cdfa49da11382cdb5a8a20e3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2545709
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#71329}
2020-11-23 09:09:49 +00:00
v8-ci-autoroll-builder
9881ef006e Update V8 DEPS.
Rolling v8/build: afc55ca..49ce9a3

TBR=machenbach@chromium.org,tmrts@chromium.org,v8-waterfall-sheriff@grotations.appspotmail.com

Change-Id: I70102bf08d91bdc1503e1dd8160dbee9b252bf7a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2553924
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@{#71328}
2020-11-23 03:40:58 +00:00
v8-ci-autoroll-builder
203a72833c Update V8 DEPS.
Rolling v8/build: 030a312..afc55ca

Rolling v8/third_party/aemu-linux-x64: gt2DKWmtJU6vqOju1UcBB-_Nthud81s3cnZkERzzSEUC..nv6wFuL5e4oM14o83fKYTaYGvYpeIY0g-cCj2yzejZwC

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/11b4013..91c1a7c

TBR=machenbach@chromium.org,tmrts@chromium.org,v8-waterfall-sheriff@grotations.appspotmail.com

Change-Id: Ife95420b8e3b3c42a473f37bf3518c0323736200
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2553666
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@{#71327}
2020-11-22 03:50:08 +00:00
v8-ci-autoroll-builder
8871b7e16b Update V8 DEPS.
Rolling v8/build: ee1c001..030a312

Rolling v8/third_party/aemu-linux-x64: 4f-YWuHlGrqS9jy308GUs0eo8DxU3h6PwgpHfNYq290C..gt2DKWmtJU6vqOju1UcBB-_Nthud81s3cnZkERzzSEUC

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/2ed6fc0..11b4013

Rolling v8/third_party/depot_tools: 2f8e0fa..9c0dc30

Rolling v8/third_party/zlib: e84c9a3..9893e50

Rolling v8/tools/luci-go: git_revision:1a022d3a4c50be4207ee93451255d71896416596..git_revision:6cbe3f56e9f00b8f65eae21f01838a8b58191a47

Rolling v8/tools/luci-go: git_revision:1a022d3a4c50be4207ee93451255d71896416596..git_revision:6cbe3f56e9f00b8f65eae21f01838a8b58191a47

Rolling v8/tools/luci-go: git_revision:1a022d3a4c50be4207ee93451255d71896416596..git_revision:6cbe3f56e9f00b8f65eae21f01838a8b58191a47

TBR=machenbach@chromium.org,tmrts@chromium.org,v8-waterfall-sheriff@grotations.appspotmail.com

Change-Id: Ia6309934987cdc0f0da95a83875041761673ec3d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2553156
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@{#71326}
2020-11-21 03:48:36 +00:00
Milad Fa
e9d1e6b16b cppgc: Fix compilation error on gcc
Without the cast, gcc might throw the following error
during compilation:

error: enumeral mismatch in conditional expression:
'cppgc::internal::StatsCollector::ScopeId' vs
'cppgc::internal::StatsCollector::ConcurrentScopeId'

Change-Id: I95e230310a0cbdc775d63657b8c407a8392a57e3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2551104
Reviewed-by: Omer Katz <omerkatz@chromium.org>
Commit-Queue: Milad Fa <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/master@{#71325}
2020-11-21 03:47:31 +00:00
Junliang Yan
f121194c51 s390x: cleanup rounding constants
Drive-by: Add alias for lzer on Assembler
Change-Id: Id0d705ef864899241f77d92c2cf8a144f753ef15
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2552928
Reviewed-by: Milad Fa <mfarazma@redhat.com>
Commit-Queue: Junliang Yan <junyan@redhat.com>
Cr-Commit-Position: refs/heads/master@{#71324}
2020-11-20 23:26:21 +00:00
Junliang Yan
95efd8c11d s390x: Add LER and LEZR simulator implementation
Change-Id: I771d3db6510146b043c9dd0a3bae8a9a67b21176
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2552927
Reviewed-by: Milad Fa <mfarazma@redhat.com>
Commit-Queue: Junliang Yan <junyan@redhat.com>
Cr-Commit-Position: refs/heads/master@{#71323}
2020-11-20 22:44:10 +00:00
Thibaud Michaud
920bc23f88 [wasm] Deserialization: publish in the background
Following up on:

[wasm] Deserialization: copy and relocate in the background
https://chromium-review.googlesource.com/c/v8/v8/+/2543932

Also move publishing in a background task. Now all three steps of
deserialization run in separate task as a pipeline.

R=ahaas@chromium.org
CC=clemensb@chromium.org

Bug: v8:11164
Change-Id: Ic4ad09ea5e96bda84cc66d0bdc6473aadea5596b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2551101
Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#71322}
2020-11-20 18:56:34 +00:00
Junliang Yan
2dc199b963 s390x: cleanup more rounding related simulation
Change-Id: I63c10010a9605f1ab40b9ce00039aa6a6a46bbbf
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2552545
Reviewed-by: Milad Fa <mfarazma@redhat.com>
Commit-Queue: Junliang Yan <junyan@redhat.com>
Cr-Commit-Position: refs/heads/master@{#71321}
2020-11-20 18:51:34 +00:00
Andreas Haas
83095e9a33 [wasm][liftoff] Change size of references on stack to kSystemPointerSize
With pointer compression, the size of a reference depends on whether it
is stored on the stack or on the heap. The size provided by
ValueType::element_size_bytes() is the size of a reference on the heap.
LiftoffAssembler::SlotSizeForType(...) however should return the size
on the stack. This CL fixes this inconsistency.

This issue would have been found by an existing test, but this test is
disabled at the moment because of missing safepoint maps for stack
checks.

R=thibaudm@chromium.org

Bug: v8:7581
Change-Id: Ia45944b265fa4ce0d560ff00a24b023d6c1ae10a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2552515
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#71320}
2020-11-20 18:32:44 +00:00
Leszek Swirski
f47e59e045 [asserts] Make assert scopes LocalHeap friendly
Because of LocalHeap safepoints, our existing assert scopes don't
necessarily maintain the same guarantees as desired. In particular,
DisallowHeapAllocation no longer guarantees that objects don't move.

This patch transitions DisallowHeapAllocation to
DisallowGarbageCollection, to ensure that code using this scope is
also protected against safepoints.

Change-Id: I0411425884f6849982611205fb17bb072881c722
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2540547
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#71319}
2020-11-20 17:39:14 +00:00
Alex Turner
d3fd6d2508 Speed up StackTraceFrame::GetFileName()
This retrieves script name directly from StackFrameBase, bypassing
building of StackFrameInfo if one hasn't already been initialized,
thus avoiding computation of expensive properties that are not required.
This matches current behavior of GetScriptNameOrSourceURL() and is a
workaround until a dedicated API is available.

This is necessary to switch AdTagging over from using
GetScriptNameOrSourceURL() to GetScriptName(), to ensure that scripts
with source urls are tagged appropriately. (See crrev.com/c/2551259.)

Bug: chromium:1127391
Change-Id: I6eb145b88c26deb1a088f038b0f8b377bc8fe3ab
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2550504
Reviewed-by: Simon Zünd <szuend@chromium.org>
Commit-Queue: Alex Turner <alexmt@chromium.org>
Cr-Commit-Position: refs/heads/master@{#71318}
2020-11-20 16:04:38 +00:00
Milad Fa
794c230573 PPC/s390: Reland "[wasm][memory64] Prepare Liftoff for ptrsize offsets"
Port 1da429fb8a

Original Commit Message:

    This is a reland of 800307f6a5, with a
    minimal fix for arm64 (uint64_t -> uintptr_t).

    Original change's description:
    > [wasm][memory64] Prepare Liftoff for ptrsize offsets
    >
    > This CL prepares the LiftoffAssembler interface for uintptr_t offsets.
    > Many places can still only handle 32-bit values, but after this CL we can
    > start storing the offsets as uintptr_t in the memory access immediates.
    > Some TODOs are placed to extend code generation for 64-bit additions, if
    > memory64 is enabled.
    > All of this will be addressed in follow-up CLs.
    >
    > R=manoskouk@chromium.org
    >
    > Bug: v8:10949
    > Change-Id: Id3b9b8aa555ab41f082ba012f4f8d80586c35b89
    > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2529452
    > Commit-Queue: Clemens Backes <clemensb@chromium.org>
    > Reviewed-by: Manos Koukoutos <manoskouk@chromium.org>
    > Cr-Commit-Position: refs/heads/master@{#71236}

R=clemensb@chromium.org, joransiu@ca.ibm.com, junyan@redhat.com, midawson@redhat.com
BUG=
LOG=N

Change-Id: I87a421ab1fe6e4d0f2098c24ff34a3888631722e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2552166
Reviewed-by: Junliang Yan <junyan@redhat.com>
Commit-Queue: Milad Fa <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/master@{#71317}
2020-11-20 16:03:34 +00:00
Michael Lippautz
9d90e60105 cppgc: Provide default implementation of Platform::GetTracingController
Bug: chromium:1056170
Change-Id: I53e0e45045282c1fd217af34ff31b7e6411624b1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2552508
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Auto-Submit: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#71316}
2020-11-20 15:22:54 +00:00
Vasili Skurydzin
32d2c0df3e Add a SLOW mark a cctest test case to avoid timeout in PASE environment
Change-Id: I6b5676477cc06ef6a842d80ef2ba6e00265f73dc
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2547206
Reviewed-by: Milad Fa <mfarazma@redhat.com>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Vasili Skurydzin <vasili.skurydzin@ibm.com>
Cr-Commit-Position: refs/heads/master@{#71315}
2020-11-20 15:12:24 +00:00
Andreas Haas
960c672c5f [wasm] Cleanup calls to CalculateGlobalOffsets
CalculateGlobalOffsets has to be called once after all globals got
defined but before global offsets get accessed, e.g. during code
generation. It is not clear though when exactly CalculateGlobalOffsets
should be called. The globals section may not exist, so at the end of
the globals section is not enough (globals can also be defined in the
import section). At the beginning of the code section is also not good
enough, because the code section may not exist. At the end of the module
may be too late.

With this CL, CalculateGlobalOffsets is called after the global section,
before the code section, and at the end of the module. Additionally the CL
checks if CalculateGlobalOffsets has already been called, so that it is
not executed a second time.

R=manoskouk@chromium.org

Bug: v8:11185
Change-Id: I922b9f60a4a17a09d2527fd9ab35cda71226030c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2551100
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Manos Koukoutos <manoskouk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#71314}
2020-11-20 15:00:05 +00:00
Mythri A
dbe1b9d882 [cleanup] TNodify StoreJSTypedArrayElementFromTagged
Bug: v8:6949, v8:11074
Change-Id: I05326fd514ea33ccaa783f5964a338d84b370e84
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2550781
Reviewed-by: Santiago Aboy Solanes <solanes@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Mythri Alle <mythria@chromium.org>
Cr-Commit-Position: refs/heads/master@{#71313}
2020-11-20 14:02:34 +00:00
Manos Koukoutos
52fa3d37ba [wasm][refactor] Improvements to AnalyzeLoopAssignment
Changes:
- Move enhancement of locals_count by 1 inside AnalyzeLoopAssignment.
- Update documentation of AnalyzeLoopAssignment.
- Factor out invocation to OpcodeLength();
- Use uint32_t for locals count consistently in related testing
  functions.

Change-Id: I5bb5a324c4f4ed1aafc37849f3762d7a9630da51
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2549966
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#71312}
2020-11-20 13:49:24 +00:00
Frank Emrich
4d7fcea2db [dict-proto] Add support for ordered property dicts, pt.5
This CL adds partial support for objects whose slow mode dictionaries
are OrderedNameDictionaries. This is the case for all slow mode objects
if V8_DICT_MODE_PROTOTYPES is enabled.

Specifically, this CL contains bailouts to the runtime in places where
the subsequent CSA or Torque code may have to access property
dictionaries.
These bailouts only happen if V8_DICT_MODE_PROTOTYPES is set, in which
case the property dictionaries are of type OrderedNameDictionary, which
cannot be handled by most CSA/Torque code.

The idea is that these bailouts are temporary and will all be removed
once we've implemented the actuall dictionary accesses in CSA/Torque.

Bug: v8:7569, v8:11167
Change-Id: I8308b2f8ba2d4dbf7918da42f995ae270c825fff
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2545711
Commit-Queue: Frank Emrich <emrich@google.com>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/master@{#71311}
2020-11-20 13:21:04 +00:00
Dominik Inführ
9024b413ed [execution][heap] Reset main_thread_local_isolate_ after heap tear down
Reset main_thread_local_isolate_ only after Heap::TearDown was executed.
main_thread_local_isolate_ is still needed in there for e.g.
HandleBase::IsDereferenceAllowed in MemoryMeasurement.

Bug: chromium:1150867, v8:10315
Change-Id: Ia1ebfd561b7a3ab2d346f0c17b239f75ad77471f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2549969
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#71310}
2020-11-20 12:43:04 +00:00
Michael Achenbach
7f607cfdae Reland "[foozzie] Suppress access to CurrentTimeValue"
This is a reland of e26863df27

The test now works with the no-i18n case.

Original change's description:
> [foozzie] Suppress access to CurrentTimeValue
>
> This stubs out CurrentTimeValue for differential fuzzing as otherwise
> the non-deterministic value leaks from Intl.DateTimeFormat format and
> formatToParts.
>
> This also affects other date creations, like Date.now(), which is
> already stubbed out on the JS side. We keep that code for
> backwards-compatibility to keep bisection stable.
>
> Bug: chromium:1149050
> Change-Id: Ifd82844c9fb8ce7262b55da6cf9f88f544268942
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2546685
> Reviewed-by: Camillo Bruni <cbruni@chromium.org>
> Reviewed-by: Clemens Backes <clemensb@chromium.org>
> Commit-Queue: Michael Achenbach <machenbach@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#71294}

Cq-Include-Trybots: luci.v8.try.triggered:v8_linux_noi18n_rel_ng_triggered
Bug: chromium:1149050
Change-Id: I4a750b580495532ca0ffb125522f8f5958e4cad6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2552401
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Auto-Submit: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#71309}
2020-11-20 11:27:04 +00:00
Clemens Backes
31005b5c7c [wasm][profiler] Fix late enabling of the profiler
We had a test which first enabled the profiler, and then compiled wasm
code. In this case, all code objects were registered correctly and the
profile looked as expected.
This CL extends the test for also test another order: First compile the
wasm code, then enable the profiler. In that case, we were reporting a
wrong debug name of the exported wasm function. The name of that
function is spec'ed to be the string representation of the function
index. But for debugging, we want to see a more meaningful name,
identical to the name we show when reporting the code during
compilation.

This fix requires handlifying the {SharedFunctionInfo::DebugName}
method, because for exported wasm functions, it needs to allocate a new
name on the JS heap.
In order to avoid this allocation where possible, a second variant is
added which returns a unique_ptr directly. This can be used in all
places where the name is just being printed, which turned out to be the
majority of cases ({DebugName().ToCString()}).

R=petermarshall@chromium.org

Bug: chromium:1141787
Change-Id: I0343c2f06f0b852007535ff07459b712801ead01
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2543931
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#71308}
2020-11-20 11:09:19 +00:00
Clemens Backes
1da429fb8a Reland "[wasm][memory64] Prepare Liftoff for ptrsize offsets"
This is a reland of 800307f6a5, with a
minimal fix for arm64 (uint64_t -> uintptr_t).

Original change's description:
> [wasm][memory64] Prepare Liftoff for ptrsize offsets
>
> This CL prepares the LiftoffAssembler interface for uintptr_t offsets.
> Many places can still only handle 32-bit values, but after this CL we can
> start storing the offsets as uintptr_t in the memory access immediates.
> Some TODOs are placed to extend code generation for 64-bit additions, if
> memory64 is enabled.
> All of this will be addressed in follow-up CLs.
>
> R=manoskouk@chromium.org
>
> Bug: v8:10949
> Change-Id: Id3b9b8aa555ab41f082ba012f4f8d80586c35b89
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2529452
> Commit-Queue: Clemens Backes <clemensb@chromium.org>
> Reviewed-by: Manos Koukoutos <manoskouk@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#71236}

Bug: v8:10949
Tbr: manoskouk@chromium.org
Change-Id: I33a9676afbf84d2032b181de2afd745841575900
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2550663
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#71307}
2020-11-20 11:08:15 +00:00
Mythri A
b42136ea54 [turboprop] Remove CompactElementsKind and its uses
We added this to add elements kind to handlers so Turboprop could
use the elements kind information for inlining array builtins when using
dynamic map checks. This information isn't useful without other map
based optimizations like constant folding to inline array builtins.
So we don't need this information.

Bug: v8:10582
Change-Id: I846c037ca2d87158dd017e2e23c7d1a0dfc685b4
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2549950
Commit-Queue: Mythri Alle <mythria@chromium.org>
Reviewed-by: Sathya Gunasekaran  <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#71306}
2020-11-20 09:54:28 +00:00
Omer Katz
2c66a0ef9f Reland "cppgc: Use tracing scopes"
This reverts commit 64bf4c53f6.

Reason for revert: fix in patchset 2

Original change's description:
> Revert "cppgc: Use tracing scopes"
>
> This reverts commit 548fe20837.
>
> Reason for revert: Issues on Mac64: https://ci.chromium.org/p/v8/builders/ci/V8%20Mac64%20-%20debug/31710
>
> Original change's description:
> > cppgc: Use tracing scopes
> >
> > The scopes themselves mostly have the same coverage as current scopes in
> > blink. A few exception due to encapsulation exist and are highlighted as
> > comments on the CL.
> >
> > Bug: chromium:1056170
> > Change-Id: I48af2cfdfd53a8caa1ab5d805d377f6f13a825bc
> > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2540552
> > Commit-Queue: Omer Katz <omerkatz@chromium.org>
> > Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
> > Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
> > Cr-Commit-Position: refs/heads/master@{#71285}
>
> TBR=ulan@chromium.org,mlippautz@chromium.org,omerkatz@chromium.org
>
> Change-Id: I20dce9309dcaeff6ea61bdc51df3a2f62c2a103f
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: chromium:1056170
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2550782
> Reviewed-by: Clemens Backes <clemensb@chromium.org>
> Commit-Queue: Clemens Backes <clemensb@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#71289}

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

# Not skipping CQ checks because this is a reland.

Bug: chromium:1056170
Change-Id: I9c57cdb3b0d310366cdf3e6fbcd1254fdc363163
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2550666
Auto-Submit: Omer Katz <omerkatz@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#71305}
2020-11-20 09:53:23 +00:00
Frank Emrich
3055139ad3 [dict-proto] Add support for ordered property dicts, pt.4
This CL adds partial support for objects whose slow mode dictionaries
are OrderedNameDictionaries. This is the case for all slow mode objects
if V8_DICT_MODE_PROTOTYPES is enabled.

Specifically, this CL contains minor changes to CSA code, short of
actually performing ordered dictionary lookups using CSA
implementations of these lookups.

Bug: v8:7569
Change-Id: I0dab0f21000ca3b9b170ace58787ec639d587e64
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2540590
Commit-Queue: Frank Emrich <emrich@google.com>
Reviewed-by: Marja Hölttä <marja@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#71304}
2020-11-20 09:23:43 +00:00
v8-ci-autoroll-builder
43d888f40a Update V8 DEPS.
Rolling v8/build: 26db078..ee1c001

Rolling v8/third_party/aemu-linux-x64: C3a5C0JPR3a0eNVs8zflK6G9ym7N3f47xoQOm1lQe-gC..4f-YWuHlGrqS9jy308GUs0eo8DxU3h6PwgpHfNYq290C

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/6e44bd8..2ed6fc0

Rolling v8/third_party/depot_tools: 5589652..2f8e0fa

Rolling v8/tools/clang: 2d30d87..41850cb

TBR=machenbach@chromium.org,tmrts@chromium.org,v8-waterfall-sheriff@grotations.appspotmail.com

Change-Id: I340428694480dbe67f5e8cbd512bb6314a4def0c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2551920
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@{#71303}
2020-11-20 03:54:18 +00:00
Zhi An Ng
e90623b691 [wasm-simd] Add OOB tests for v128.load and v128.store
We had some tests, but weren't checking for OOB. Add some tests.

Change-Id: I63d4d199fe8b7be51a8e0a5a2d9b3a328e5d7ab5
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2546127
Reviewed-by: Bill Budge <bbudge@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#71302}
2020-11-20 01:31:48 +00:00
Junliang Yan
41811812f0 s390x: implement clfdbr more rounding mode
Change-Id: I6d7dc411c701797ba678d11e135cc214c913690b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2551714
Reviewed-by: Milad Fa <mfarazma@redhat.com>
Commit-Queue: Junliang Yan <junyan@redhat.com>
Cr-Commit-Position: refs/heads/master@{#71301}
2020-11-20 00:35:38 +00:00
Frank Tang
fbfbc5c28b [intl] Validate locale by LocaleBuilder
LocaleBuilder validates better, it also fixes most cases in
transformed-ext-invalid except one.

Bug: v8:10447
Change-Id: I6fed6692ca3264198e42ccc3d9ca4bfb54fb0517
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2549688
Commit-Queue: Frank Tang <ftang@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#71300}
2020-11-20 00:34:29 +00:00
Vasili Skurydzin
e53c7972e2 Skip no-i18n tests for aix due to lack of tzdata in PASE environment
Change-Id: I233972d124c3582ed8eba7f1c1a31fa9d61fda8c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2544902
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Milad Fa <mfarazma@redhat.com>
Commit-Queue: Vasili Skurydzin <vasili.skurydzin@ibm.com>
Cr-Commit-Position: refs/heads/master@{#71299}
2020-11-19 21:20:38 +00:00
Ben Smith
0d58297f03 Revert "[foozzie] Suppress access to CurrentTimeValue"
This reverts commit e26863df27.

Reason for revert: Fails on noi18n bot, see https://ci.chromium.org/ui/p/v8/builders/ci/V8%20Linux%20-%20noi18n%20-%20debug/34852/overview

Original change's description:
> [foozzie] Suppress access to CurrentTimeValue
>
> This stubs out CurrentTimeValue for differential fuzzing as otherwise
> the non-deterministic value leaks from Intl.DateTimeFormat format and
> formatToParts.
>
> This also affects other date creations, like Date.now(), which is
> already stubbed out on the JS side. We keep that code for
> backwards-compatibility to keep bisection stable.
>
> Bug: chromium:1149050
> Change-Id: Ifd82844c9fb8ce7262b55da6cf9f88f544268942
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2546685
> Reviewed-by: Camillo Bruni <cbruni@chromium.org>
> Reviewed-by: Clemens Backes <clemensb@chromium.org>
> Commit-Queue: Michael Achenbach <machenbach@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#71294}

TBR=machenbach@chromium.org,cbruni@chromium.org,clemensb@chromium.org

Change-Id: I958ca723de826ab427d27f5121f96618cf50c832
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:1149050
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2551314
Reviewed-by: Ben Smith <binji@chromium.org>
Commit-Queue: Ben Smith <binji@chromium.org>
Cr-Commit-Position: refs/heads/master@{#71298}
2020-11-19 20:23:09 +00:00
Seth Brenith
ab52d52527 Avoid overflow when profiling builtins
The basic block instrumentation currently uses 32-bit integers, which
could overflow during a long profiling session. I considered upgrading
them to 64-bit integers, but generating the correct instrumentation code
for various architectures would be rather non-trivial. Instead, this
change uses 64-bit floating-point values, which are simple and also have
the nice behavior that they saturate rather than overflowing.

Bug: v8:10470
Change-Id: I60f7456cb750091809803c03a85dd348dc614b58
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2545573
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Seth Brenith <seth.brenith@microsoft.com>
Cr-Commit-Position: refs/heads/master@{#71297}
2020-11-19 19:43:37 +00:00
Z Nguyen-Huu
2441aaa348 [runtime] Process symbol last in SetDataProperties for Object.assign
Bug: v8:11177
Change-Id: Ib4bbdca5fe9811731c15edae5f58243113dd119f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2548080
Commit-Queue: Z Nguyen-Huu <duongn@microsoft.com>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#71296}
2020-11-19 19:34:17 +00:00
Vasili Skurydzin
0eaac02dee Correction to GuessOS operation in PASE environment
Change-Id: I0ca51abf2468f773986645fec3cb98559bca5bbe
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2545143
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Milad Fa <mfarazma@redhat.com>
Commit-Queue: Vasili Skurydzin <vasili.skurydzin@ibm.com>
Cr-Commit-Position: refs/heads/master@{#71295}
2020-11-19 19:30:01 +00:00