Commit Graph

61090 Commits

Author SHA1 Message Date
Clemens Backes
13cdf3a7fc Reland "[wasm] Further reduce the size of WasmCode"
This is a reland of 79398ab09d

Original change's description:
> [wasm] Further reduce the size of WasmCode
>
> Also, save dynamic allocations (plus their memory overhead).
> This is realized by storing the relocation information, source position
> table, and protected instruction information together in one "metadata"
> byte array.
> For each of the three components, we just store their size, such that
> the accessors can return the respecitive {Vector} views as before.
>
> This makes each WasmCode object 24 bytes smaller on 64-bit
> architectures. It also saves a few more bytes per code object because
> less padding is needed for the individual allocations, and each dynamic
> allocation comes with some constant memory overhead.
>
> Since the protected instructions will just be stored in a byte array
> now, some APIs are refactored to just return that byte array directly
> (instead of an array of {ProtectedInstructionData}). This also
> simplifies serialization and deserialization, and will allow for
> switching to a more compact representation in the future.
>
> Drive-by: Add some more checks to {Vector::cast} to protect against
>   undefined behaviour.
>
> R=ahaas@chromium.org
>
> Bug: v8:10254
> Change-Id: I81ca847023841110e3e52cc402fcb0349325d7af
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2078545
> Reviewed-by: Andreas Haas <ahaas@chromium.org>
> Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
> Commit-Queue: Clemens Backes <clemensb@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#66596}

Tbr: ahaas@chromium.org
Bug: v8:10254
Change-Id: Idcdcb4f13c3eb7a3f7fb5ef8a1229103ca0ae975
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2089934
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66598}
2020-03-05 16:21:18 +00:00
Clemens Backes
28afd1c9af Revert "[wasm] Further reduce the size of WasmCode"
This reverts commit 79398ab09d.

Reason for revert: Makes UBSan unhappy: https://ci.chromium.org/p/v8/builders/ci/V8%20Linux64%20UBSan/10186

Original change's description:
> [wasm] Further reduce the size of WasmCode
> 
> Also, save dynamic allocations (plus their memory overhead).
> This is realized by storing the relocation information, source position
> table, and protected instruction information together in one "metadata"
> byte array.
> For each of the three components, we just store their size, such that
> the accessors can return the respecitive {Vector} views as before.
> 
> This makes each WasmCode object 24 bytes smaller on 64-bit
> architectures. It also saves a few more bytes per code object because
> less padding is needed for the individual allocations, and each dynamic
> allocation comes with some constant memory overhead.
> 
> Since the protected instructions will just be stored in a byte array
> now, some APIs are refactored to just return that byte array directly
> (instead of an array of {ProtectedInstructionData}). This also
> simplifies serialization and deserialization, and will allow for
> switching to a more compact representation in the future.
> 
> Drive-by: Add some more checks to {Vector::cast} to protect against
>   undefined behaviour.
> 
> R=​ahaas@chromium.org
> 
> Bug: v8:10254
> Change-Id: I81ca847023841110e3e52cc402fcb0349325d7af
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2078545
> Reviewed-by: Andreas Haas <ahaas@chromium.org>
> Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
> Commit-Queue: Clemens Backes <clemensb@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#66596}

TBR=jkummerow@chromium.org,ahaas@chromium.org,clemensb@chromium.org,tebbi@chromium.org

Change-Id: Id80aa82cfce8942879031032b322ee66855b5600
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:10254
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2089933
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66597}
2020-03-05 15:26:58 +00:00
Clemens Backes
79398ab09d [wasm] Further reduce the size of WasmCode
Also, save dynamic allocations (plus their memory overhead).
This is realized by storing the relocation information, source position
table, and protected instruction information together in one "metadata"
byte array.
For each of the three components, we just store their size, such that
the accessors can return the respecitive {Vector} views as before.

This makes each WasmCode object 24 bytes smaller on 64-bit
architectures. It also saves a few more bytes per code object because
less padding is needed for the individual allocations, and each dynamic
allocation comes with some constant memory overhead.

Since the protected instructions will just be stored in a byte array
now, some APIs are refactored to just return that byte array directly
(instead of an array of {ProtectedInstructionData}). This also
simplifies serialization and deserialization, and will allow for
switching to a more compact representation in the future.

Drive-by: Add some more checks to {Vector::cast} to protect against
  undefined behaviour.

R=ahaas@chromium.org

Bug: v8:10254
Change-Id: I81ca847023841110e3e52cc402fcb0349325d7af
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2078545
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66596}
2020-03-05 15:01:48 +00:00
Victor Gomes
cbbdb4dfbc [builtins] Reverse arguments in builtins assembler x64
- Create a PushArray to simplify code.
 - Adapt all the sites in builtins-x64.

Bug: v8:10201
Change-Id: I828f4d2e43373a4fe6380346c5628a345720fe38
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2083028
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66595}
2020-03-05 14:36:48 +00:00
Zhao Jiazhong
6f2c7b1354 [mips][wasm-simd][liftoff] Implement splat for i64x2, f64x2, i8x16
Port 9245e3b498
https://crrev.com/c/2049247

Change-Id: Ic2df706a4d5f7df8a2cdb4f53c4679cf96f0b8b8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2086535
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Zhi An Ng <zhin@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66594}
2020-03-05 13:57:14 +00:00
Victor Gomes
f0bfa9ea1a [CSA] Adapt arguments to be accessed in the reversed order
Bug: v8:10201
Change-Id: I2271602b2da6fd06038ddfab16090d7faac592ca
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2074218
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66593}
2020-03-05 13:31:44 +00:00
Tobias Tebbi
c0c3b20782 [turbofan] use ZoneUnorderedMap for NodeCache
This fixes a non-determinism issue caused by the cache being full.
Depending on the non-deterministic value of the handles in HeapConstant
nodes, different cache entries would be overwritten in this case.

The old implementation of NodeCache had a fixed limit, overwriting
entries when the cache is full. This behavior didn't really make sense,
but the hand-written hash map implementation couldn't handle arbitrary
numbers of hash collisions, so removing the limit wasn't an option either.
Thus this CL just replaces the custom hash map with a normal
std::unordered_map, that is, a ZoneUnorderedMap.

Bug: chromium:1046815
Change-Id: I95269f2b1068eb9dfe3ee2ab5cca1cb460bc8fa3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2087405
Reviewed-by: Georg Neis <neis@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66592}
2020-03-05 13:00:34 +00:00
Dan Elphick
500d73b93e [compiler] Optimize AddInputsToFrameStateDescriptor
Optimizes InstructionSelector::AddInputsToFrameStateDescriptor by
taking advantage of SparseInputMask data structure to more quickly
handle empty inputs and insert all the OptimizedOut entries in one go.
The number of empty inputs is now determined using CountTrailingZeros
rather than iterating over them one at a time.

Gives a 9% improvement to SelectInstructions runtime call stat for
Octane in turboprop.

Bug: v8:10051
Change-Id: Ib13d6f9644b4c89ba0546a19fe0ed623d69fec99
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2037443
Commit-Queue: Dan Elphick <delphick@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66591}
2020-03-05 11:45:15 +00:00
Georg Neis
2d927fc30a [turbofan] Simplify InstructionSelector::VisitDeoptimize
Change-Id: I6094bc17e8a482f166bdb53e5d2dabe9a1299c9f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2087409
Commit-Queue: Dan Elphick <delphick@chromium.org>
Auto-Submit: Georg Neis <neis@chromium.org>
Reviewed-by: Dan Elphick <delphick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66590}
2020-03-05 10:52:24 +00:00
Vitaly Buka
85f72be318 Disable variable initialization in function-body-decoder-impl.h users
It's probably possible to limit this to a few variables.
However, at the moment I am able to create a patch with tens of
V8_STACK_UNINITIALIZED. It seems tiny changes in functions sizes causes
significant changes in optimizer behavior.

For now I'd like just to restore the perf.

Bug: chromium:1055312, chromium:977230

Change-Id: I48efc3c872a4039b253011b70baf40763e181a20
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2087452
Commit-Queue: Vitaly Buka <vitalybuka@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66589}
2020-03-05 01:53:43 +00:00
Ng Zhi An
1ef9731b1c [wasm-simd][x64] Add AVX codegen for some conversion ops
Bug: v8:9561
Change-Id: I5fbf69aaacccfe588f95edf1208176e3a7de62bb
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2071397
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66588}
2020-03-04 21:21:21 +00:00
Ng Zhi An
307490b012 [wasm-simd][x64] Add AVX codegen for i32x4 conversions and hadd
Bug: v8:9561
Change-Id: I4a2c6217dea540b81256dcc833412da573f54795
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2069403
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66587}
2020-03-04 19:33:11 +00:00
Timothy Gu
92a2f0c703 Reland "Use context of then function for PromiseResolveThenableJob"
This is a reland of 9325397812

Original change's description:
> Use context of then function for PromiseResolveThenableJob
> 
> When a microtask is executed, we need to use an appropriate,
> non-detached Context for its execution. Currently with
> PromiseResolveThenableJobs [1], the Context used is always drawn from
> the realm of the Promise constructor being used. This may cause
> non-intuitive behavior, such as in the following case:
> 
>   const DeadPromise = iframe.contentWindow.Promise;
>   const p = DeadPromise.resolve({
>     then() {
>       return { success: true };
>     }
>   });
>   p.then(result => { console.log(result); });
> 
>   // Some time later, but synchronously...
>   iframe.src = "http://example.com"; // navigate away.
>   // DeadPromise's Context is detached state now.
>   // p never gets resolved, and its reaction handler never gets called.
> 
> To fix this behavior, when PromiseResolveThenableJob is being queued up,
> the `then` method of the thenable should be used to determine the
> context of the resultant microtask. Doing so aligns with Firefox, and
> also with the latest HTML spec [2][3].
> 
> This change is analogous to CL 1465902, which uses the realm of the
> reaction handlers to determine the Context PromiseReactionJobs run in.
> 
> [1]: https://tc39.es/ecma262/#sec-promiseresolvethenablejob
> [2]: https://html.spec.whatwg.org/C/#enqueuejob(queuename,-job,-arguments)
> [3]: https://github.com/whatwg/html/pull/5212
> 
> Bug: v8:10200
> Change-Id: I2312788eeea0f9e870c13cf3cb5730a87d15609e
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2071624
> Commit-Queue: Timothy Gu <timothygu@chromium.org>
> Reviewed-by: Toon Verwaest <verwaest@chromium.org>
> Reviewed-by: Shu-yu Guo <syg@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#66507}

Bug: v8:10200
Change-Id: I5af003a06c60b0c8cd19de47f847a947d40d046c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2082109
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Timothy Gu <timothygu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66586}
2020-03-04 16:51:50 +00:00
Igor Sheludko
08c76f21ed [ptr-compr][csa] Use TaggedIndex nodes in IC builtins
This CL simplifies IC code since we no longer need to keep
feedback slot indices in both Smi and IntPtr form and as
a result it should improve overall performance of --no-opt
mode on Octane by ~1%.

Bug: v8:10047
Change-Id: Ib717697cdb805c9f93286e9c62ee8a63361d3560
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1965586
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66585}
2020-03-04 15:45:32 +00:00
Milad Farazmand
578c3a3ba0 [wasm] Use kSystemPointerSize to check for alignment
Change-Id: I84d53282278d12c2e47b8e9a07b69ecf89dba237
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2087692
Commit-Queue: Milad Farazmand <miladfar@ca.ibm.com>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66584}
2020-03-04 15:10:10 +00:00
Sami Kyostila
e4b5dfed0d Roll Perfetto forward, adapting to proto_library changes
This patch rolls v8 to the latest Perfetto revision. Since Perfetto has
changed the way the GN protobuf integration works, we need to make some
corresponding changes in V8.

Bug: chromium:639003
Change-Id: I263c591560503c9779bbab3ec266cfb2708fc51f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2085175
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Auto-Submit: Sami Kyöstilä <skyostil@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66583}
2020-03-04 14:51:41 +00:00
Camillo Bruni
22afaacd47 [keys] Handle RangeError in GetKeysWithPrototypeInfoCache
Drive-by-fix: Add V8_WARN_UNUSED_RESULT to MaybeHandle::ToHandle

Bug: chromium:1057653
Change-Id: I2834806ca498a2fa43a64f5391606cdbfb4af4fa
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2084814
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66582}
2020-03-04 13:38:10 +00:00
Ulan Degenbaev
3a86dca147 [heap] Restore always allocate scope in SimulateNewspaceFull
This reverts part of f3babaf that removed the scope in the test function

Bug: v8:10298
Change-Id: I3c515307b9ea4d03e0d7427422d46302e78d8b38
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2087395
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66581}
2020-03-04 13:19:10 +00:00
Leszek Swirski
0954f205dc [offthread] Add off-thread class boilerplate allocation
Add off-thread support for class boilerplate allocation, removing a
previously "unreachable" overload. Notably, this requires support for
off-thread allocation of Dictionaries and DescriptorArrays. Due to
template fun, the off-thread allocation of Dictionaries in particular
requires some amount of boilerplate (no pun intended).

Bug: chromium:1011762
Change-Id: I37139d924858e31e45d369742329826784a8f614
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2080370
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66580}
2020-03-04 12:26:33 +00:00
Andreas Haas
90a3a6609f Reland "[wasm][liftoff] Implement Atomic(Compare)Exchange on x64"
There was an issue in the register allocation in the original CL. The
register of the new_value did not get pinned, so it was used for the
expected value as well.

Bug: v8:10108
Change-Id: I2589fc31f8fbfda39c94ea5801f63ed370a3b7ce
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2084815
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66579}
2020-03-04 09:14:30 +00:00
Michael Achenbach
3c27d48e57 Whitespace change to test infra
TBR=santa

Change-Id: Ie0479e25f90176bfef0df0d628353de8a61c8f47
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2086094
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66578}
2020-03-04 08:10:41 +00:00
v8-ci-autoroll-builder
f4e3a5a173 Update V8 DEPS.
Rolling v8/build: c6ac51f..fa4450f

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/03a5e99..f6edc90

Rolling v8/third_party/depot_tools: 4576851..fe6f752

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

Change-Id: If5981229cb900326e4e78980aab94cc0fd24a909
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2086831
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@{#66577}
2020-03-04 03:53:39 +00:00
Milad Farazmand
a08ccbe836 s390: [wasm-simd] Add to simd S8x16 and I64x2 operations
Change-Id: Ia0b4da412e9bb37e2991ffc51738ff248e5c691f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2085354
Reviewed-by: Junliang Yan <jyan@ca.ibm.com>
Commit-Queue: Milad Farazmand <miladfar@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#66576}
2020-03-03 20:51:03 +00:00
Joyee Cheung
0753cbeaae [class] maintain private brand information on SFI
When an empty class is nested inside a class with private instance
methods, like this:

  class Outer {
    constructor() {}
    #method() {}
    factory() {
      class Inner {
        constructor() {  }
      }
      return Inner;
    }
    run(obj) {
      obj.#method();
    }
  }

The bytecode generator previously generate private brand
initialization for the constructor of Inner by mistake,
because during scope chain serialization/deserialization,
the outer scopes of Inner and factory() are not allocated
or serialized (as they are empty). In the eyes of the bytecode
generator, it then appeared as if Outer is the direct outer
scope of Inner's constructor.

In order to work around this information loss, in this patch
we rely on SharedFunctionInfo instead of the Context/ScopeInfo
chain to maintain the information about private brand initialization.
This is done by shrinking expected_nof_properties to 8 bits and
freeing 8 bits for a second bitfield on the SFI.

Design doc: https://docs.google.com/document/d/14maU596YbHcWR7XR-_iXM_ANhAAmiuRlJZysM61lqaE/edit#
Bug: v8:9839, v8:8330, v8:10098

Change-Id: I4370a0459bfc0da388052ad5a91aac59582d811d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2056889
Commit-Queue: Joyee Cheung <joyee@igalia.com>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66575}
2020-03-03 20:25:54 +00:00
Leszek Swirski
e0c03dc34c [offthread] Deisolatify dictionaries
Remove Isolate parameters from some dictionary methods, and change
others to use ReadOnlyRoots instead, to prepare for Isolate
templatization in a future patch.

One small side-effect is that the global dictionary's property cell's
dependent code deoptimization has to dynamically get the Isolate when
it needs to actually mark code for deoptimization, for method signature
consistency. Given that this is the slow path anyway, it shouldn't
matter.

Bug: chromium:1011762
Change-Id: I707de9a74ca3b30423a1e5830a10729d6a404786
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2080369
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66574}
2020-03-03 20:08:54 +00:00
Z Nguyen-Huu
2f52803ea6 [wasm] Tier up in parallel
Add tier up to existing recompilation logic.
This is a part of Tier up to Turbofan on Debugger.disable

Bug: v8:10290
Change-Id: I44731df520201ac254f2d1bfbfb5c49d8bb50117
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2080658
Commit-Queue: Z Nguyen-Huu <duongn@microsoft.com>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66573}
2020-03-03 19:02:34 +00:00
Z Nguyen-Huu
0ecbda1408 Introduce regenerate-expected-files for run-test
Example can be inspector tests.

Bug: v8:10264
Change-Id: I996bb68d0f36920568a04f93cd8c1256a4f41a96
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2070912
Commit-Queue: Z Nguyen-Huu <duongn@microsoft.com>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66572}
2020-03-03 18:58:24 +00:00
Leszek Swirski
0ba4c8d436 [offthread] Walk script SFIs to ensure source positions.
Rather than walking SharedFunctionInfos recursively via bytecode
constant pools to ensure they have source positions, walk the script's
shared function info list.

Bug: chromium:1011762
Change-Id: I19ab0f3355dc8169f7a0170b4198075bd3823c04
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2084816
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66571}
2020-03-03 17:07:34 +00:00
Victor Gomes
1ed4698331 [runtime] Adapt FunctionCallInfo when arguments are reversed in the stack
Bug: v8:10201
Change-Id: I5cae5d5c30f42427995c2380d906ade0f117fcd9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2083011
Auto-Submit: Victor Gomes <victorgomes@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66570}
2020-03-03 16:55:04 +00:00
Leszek Swirski
5aaccdcf8c [cleanup] Make Hashtable Shapes return Map Handles
Make Hashtable Shapes return Map Handles (from the read-only roots)
instead of the root index of the Map, so that they can be used off
the main thread.

Bug: chromium:1011762
Change-Id: I4c0a8518dc1c6d490b5c04da05b5319081a6fae5
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2083298
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66569}
2020-03-03 16:31:34 +00:00
Jakob Kummerow
27538aa361 [wasm] Fix memory limit check with custom flags
Move the recently introduced extra check for 32-bit platforms so
that it covers all code paths that would be hit by custom/future
memory limit settings.

Bug: chromium:1057094
Change-Id: I5e2217a24578ee82c7bfa753b7d5dcd3d00e1b7c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2083300
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66568}
2020-03-03 16:17:24 +00:00
Ambroise Vincent
5f50b8a3d4 [turbofan] delete redundant sorting
Vectors are being sorted multiple times in EmitBinarySearchSwitch().

Change-Id: I8c1053b8a5371904475a3f8c909041835e441d9e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2077683
Reviewed-by: Martyn Capewell <martyn.capewell@arm.com>
Reviewed-by: Michael Stanton <mvstanton@chromium.org>
Commit-Queue: Martyn Capewell <martyn.capewell@arm.com>
Cr-Commit-Position: refs/heads/master@{#66567}
2020-03-03 16:16:04 +00:00
Leszek Swirski
455cb6c007 [offthread] Allow off-thread bytecode finalization
Add the remaining missing templatizations to allow an initial wiring in
of the off-thread factory into streaming compilation finalization.

The off-thread finalization is behind a flag, disabled by default:
    --finalize-streaming-on-background

When the flag is enabled, background tasks will perform perform the
finalization during their background execution, and will release the
parser and compilation jobs once they are no longer needed.

The implementation is complete enough for performance testing, but not
enough for launch. Notably, there is no support for:

  * Class boilerplates (the code is marked unreachable),
  * Exceptions during finalization, i.e. parse/compile warnings/errors,
  * Allocation sampling,
  * Logging,
  * Asm.js,
  * Parallel complication tasks
  * Forced source positions (for "NeedsDetailedOptimizedCodeLineInfo()")

This patch also adds some tracing events for the various stages of the
off-thread finalization (including the main-thread merge) for further
performance improvements.

Bug: chromium:1011762
Change-Id: Ia44fa56975dd689f0d92c1543b294cdb063eb199
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2066965
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66566}
2020-03-03 14:36:44 +00:00
Milad Farazmand
c2e21592ed PPC/s390: [wasm-simd][arm] Implement integer absolute
Port 34f9bcdb82

Original Commit Message:

    Implements i8x16.abs, i16x8.abs, and i32x4.abs.

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

Change-Id: Ib32356532965a2187a8e8d9ec2cff44585020f0f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2084641
Reviewed-by: Junliang Yan <jyan@ca.ibm.com>
Commit-Queue: Milad Farazmand <miladfar@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#66565}
2020-03-03 14:24:03 +00:00
Milad Farazmand
d48b10b4e9 PPC/s390: [wasm-simd][liftoff] Implement splat for i64x2, f64x2, i8x16 on x64 and ia32
Port 9245e3b498

R=zhiguo.zhou@intel.com, joransiu@ca.ibm.com, jyan@ca.ibm.com, michael_dawson@ca.ibm.com
BUG=
LOG=N

Change-Id: I9a6358dfd2bfd69e421c85fe3bbf343e7aee3b8c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2081575
Reviewed-by: Junliang Yan <jyan@ca.ibm.com>
Commit-Queue: Milad Farazmand <miladfar@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#66564}
2020-03-03 14:22:55 +00:00
Leszek Swirski
f5da460b6c [offthread] Make AccessorInfo roots available to OffThreadFactory
Although AccessorInfos are technically mutable, in practice they are not
mutated after initialization, and they are guaranteed to be immortal and
immovable. So, we can safely make them accessible from the off-thread
factory, as long as the user promises to not try to mutate them. This is
necessary for off-thread class boilerplate creation.

Bug: v8:10218
Bug: chromium:1011762
Change-Id: Id3108a2324a000ea0616b472dd77aed65b1f908e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2080351
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Dan Elphick <delphick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66563}
2020-03-03 13:33:53 +00:00
Dominik Inführ
65238018ca [heap] Report total size of global handles
Report the total size of global handles in GetHeapStatistics as well.
This size includes used and free global handles.

Change-Id: I08c0647d993a810a37ae9f332732de9551b5ea8d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2083020
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66562}
2020-03-03 13:22:15 +00:00
Camillo Bruni
a1cb332686 [infra] Update .git-blame-ignore-revs
Change-Id: Iecfa43f02287d8a540663ed65ad26cdf31e0a19a
No-Try: true
No-Presubmit: true
No-Tree-Checks: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2082567
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66561}
2020-03-03 12:59:13 +00:00
Victor Gomes
cd647530e4 [interpreter] Adapt interpreter to handle V8_REVERSE_JSARGS
Bug: v8:10201
Change-Id: Ia7e964df89ac134c01a3fd94ce4b15f1afd0cbff
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2083295
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66560}
2020-03-03 11:58:13 +00:00
Camillo Bruni
cb67be1a38 [mjsunit] Move all regress-*.js tests to mjsunit/regress/
Change-Id: I213587414aaa4d159dc0c6fd9b5986d7bfcaa3ea
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2082562
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66559}
2020-03-03 11:35:13 +00:00
Camillo Bruni
09d14728ca [intl] Fix Intl.NumberFormat constructor
Call the @@hasInstance trap only when required by the spec.

Bug: chromium:1052647
Change-Id: I7a0a3133c7b6280c6a3215e379bf02e9c22ffe55
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2082560
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Sathya Gunasekaran  <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66558}
2020-03-03 11:33:53 +00:00
Ulan Degenbaev
f3babafbdd [heap] Restrict usages of AlwaysAllocateScope
The scope disables garbage collection and should be only used in
heap, deserializer, isolate bootstrap, and testing.

Change-Id: Ide95926ef32fd9362cd9134e883e1bd626cc3b11
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2083292
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66557}
2020-03-03 11:24:33 +00:00
Michael Achenbach
fdf6f185b6 Whitespace change to test infra
TBR=santa

Change-Id: Ie318314abb2384df22deee4e3e33e2a7139e8d7f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2083482
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66556}
2020-03-03 10:51:03 +00:00
Shu-yu Guo
ec3616eb57 [atomics] Make Atomics.isLockFree return true for all sizes
Bug: v8:10293
Change-Id: If585e7860721cb2de37a0de5bf135e7a4e226190
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2081338
Auto-Submit: Shu-yu Guo <syg@chromium.org>
Reviewed-by: Ben Smith <binji@chromium.org>
Reviewed-by: Adam Klein <adamk@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66555}
2020-03-03 10:45:04 +00:00
Camillo Bruni
435cbf2dde [tools] Fix gdb redirect command
Newer gdb versions require the return type to be specified.

Change-Id: Ia9c160858036e9cbbe1ced123bbcc79d9efb78b4
No-Try: true
No-Presubmit: true
No-Tree-Checks: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2082561
Reviewed-by: Dan Elphick <delphick@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66554}
2020-03-03 10:33:33 +00:00
Clemens Backes
547e857b56 [wasm] Remove samples for obsolete histograms
The histograms were removed from chrome. This CL cleans up the V8 code
to stop reporting samples.

R=ahaas@chromium.org

Bug: chromium:1053285
Change-Id: I7c6ff36ac9bb5d86e81e5f36849903a95a8ed618
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2083478
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66553}
2020-03-03 09:44:42 +00:00
Zhou, Zhiguo
9245e3b498 [wasm-simd][liftoff] Implement splat for i64x2, f64x2, i8x16 on x64 and ia32
Bug: v8:9909
Change-Id: Id89ddb429c90f3f454a581d75b783ff56775b01e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2049247
Commit-Queue: Zhiguo Zhou <zhiguo.zhou@intel.com>
Reviewed-by: Zhi An Ng <zhin@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66552}
2020-03-03 08:44:37 +00:00
Matheus Marchini
66251fbadb [postmortem] generate more comprehensive metadata
Improve postmortem metadata generated by gen-postmortem-metadata by also
including weak and synchronous accessors, as well as CHECKED and
CHECKED2 variants of all accessors currently considered by
gen-postmortem-metadata. Also improve type collection by parsing
TORQUE_INSTANCE_CHECKERS_SINGLE_FULLY_DEFINED, as we were missing
several types with the previous heuristic (like StackTraceFrame,
PromiseReaction, and many others). This will include 96 new v8dbg
constants which can be used by debuggers like llnode.

R=hpayer@google.com, verwaest@google.com, victorgomes@google.com

Change-Id: Ia9bea21eec38b92d255c3636c6a284eb27e9ed9b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2056126
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66551}
2020-03-03 08:43:32 +00:00
Jakob Gruber
069970e106 Reland "Update unicode-regexp-ignore-case-noi18n expectations"
This is a reland of c6c9d4bf1b

Original change's description:
> Update unicode-regexp-ignore-case-noi18n expectations
> 
> There appear to be one or several bugs in noi18n mode such that
> expectations in this test are no longer met. This CL updates
> expectations to the current behavior and re-enables the test so we at
> least preserve coverage in the other cases.
> 
> The behavior in question should be investigated in the future
> (low priority).
> 
> Bug: v8:10120
> Change-Id: Ib7c9a18133a386e6e39ee54d68ce4106d9b28c84
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2081815
> Commit-Queue: Jakob Gruber <jgruber@chromium.org>
> Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#66524}

Bug: v8:10120
Change-Id: Ib2ee68e26c2aebe2eeab3ec9f7bc263fd79f3773
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2083291
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66550}
2020-03-03 07:30:07 +00:00
Zhao Jiazhong
3e5abdc13e [mips][regexp] Always pass the isolate to CaseInsensitiveCompareUC16
Port d303f4fba9 https://crrev.com/c/2081816

Original Commit Message:

  In the past we've used the isolate argument to signal whether we were
  in unicode mode (nullptr) or not (the real isolate). This is no longer
  needed, and in fact breaks no-i18n mode which always expects to have a
  real isolate.

Change-Id: I90a69a38cb4e74da46b3030843bc84d6d53571c5
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2082932
Auto-Submit: Zhao Jiazhong <zhaojiazhong-hf@loongson.cn>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66549}
2020-03-03 07:29:02 +00:00