Commit Graph

63859 Commits

Author SHA1 Message Date
Dominik Inführ
6fff575847 [heap] Let --stress-concurrent-allocation allocate large objects
Let StressConcurrentAllocatorTask allocate small, medium and large
objects to test different code paths.

Bug: v8:10315
Change-Id: Ifff7e91bc95f0d926a58321b481183e9acf8bd32
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2335182
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69217}
2020-08-04 09:22:22 +00:00
Dominik Inführ
9fff9a73bb Reland "[heap] Refactor allocation observer in AllocationCounter"
This is a reland of b354e344fd

This CL adds 3 fixes:

* Unprotect code object before creating filler
* Allows AllocationObserver::Step to add more AllocationObservers
* Update limit in NewSpace::UpdateLinearAllocationArea

Original change's description:
> [heap] Refactor allocation observer in AllocationCounter
>
> Moves accounting of allocation observers into the AllocationCounter
> class. This CL removes top_on_previous_step_ for counters that are
> increased regularly in the slow path of the allocation functions.
>
> AdvanceAllocationObservers() informs the AllocationCounter about
> allocated bytes, InvokeAllocationObservers() needs to be invoked when
> an allocation step is reached. NextBytes() returns the number of bytes
> until the next AllocationObserver::Step needs to run.
>
> Bug: v8:10315
> Change-Id: I8b6eb8719ab032d44ee0614d2a0f2645bfce9df6
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2320650
> Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
> Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#69170}

Bug: v8:10315
Change-Id: I89ab4d5069a234a293471f613dab16b47d8fff89
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2332805
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69216}
2020-08-04 09:20:02 +00:00
Clemens Backes
dfd3c628d6 [wasm] Clean up callback triggering
A minor refactoring to the logic for triggering callbacks:
1. If compilation failed, do only trigger the kFailedCompilation event.
2. Use the TriggerCallbacks method also for triggering the
  kFailedCompilation event.

R=thibaudm@chromium.org

Bug: chromium:1101340
Change-Id: I3446d708d28068448e6eca3e637c9af673f5311d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2332171
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69215}
2020-08-04 09:10:22 +00:00
evih
bb5d535202 [wasm] Use generic wrapper only for not imported functions
Bug: v8:10701
Change-Id: I6e6d0c67889f29647ea225163cf051d3432da338
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2335058
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Commit-Queue: Eva Herencsárová <evih@google.com>
Cr-Commit-Position: refs/heads/master@{#69214}
2020-08-04 08:45:32 +00:00
Jakob Gruber
3e3abae11e Minor cleanups in Code::Kind
In preparation for adding new NCI (and TP) code kinds.

- Free the unused bit in Code::flags.
- Be more precise about the flag field sizes (int32 instead of int).
- Add and refactor related static asserts.

Bug: v8:8888
Change-Id: Ice0d4df9de528de77dfb5c04279cfdc4b030efc9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2328788
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69213}
2020-08-04 07:32:41 +00:00
Benedikt Meurer
4b9f2535c8 [debug] Turn on --wasm-expose-debug-eval by default.
The DevTools front-end uses so-called Wasm evaluator modules to get to
the values of variables in scope when the wasmDWARFDebugging experiment
is turned on. We rely on the `Debugger.executeWasmEvaluator()` method in
the Chrome DevTools Protocol (CDP) to accomplish this, which in turn is
controlled by this global flag.

Since we intend to gather more feedback from selected internal /
external teams on the DWARF debugging experience, we need to ship this
flag by default to make it easier to test the new experiment without
having to fiddle with additional flags to pass to Chrome on the command
line (and asking folks whether they really started Chrome correctly).

Bug: chromium:1041362
Change-Id: I1e170383fa7a34c41eec8c4867c38b7d8e871e8b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2335072
Auto-Submit: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Michael Hablich <hablich@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69212}
2020-08-04 07:02:11 +00:00
v8-ci-autoroll-builder
027fe5e1f1 Update V8 DEPS.
Rolling v8/build: edf75c7..b2c431c

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/f80ffe3..ce6a663

Rolling v8/third_party/depot_tools: 98b332f..6c7b829

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

Change-Id: If97b9c9eb4d56364f94f9e0453ba67b462643505
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2335955
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@{#69211}
2020-08-04 03:31:11 +00:00
Dirk Pranke
f94e772441 Fix a Python3 compatibility issue in asm_to_inline_asm.py.
I tripped over this str/bytes issue as part of bringing up the
Chromium build under Python3.

Bug: chromium:1112471
Change-Id: I723c7d9df8bcac24c160c549a03dcbd34c1d92f6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2334222
Commit-Queue: Dirk Pranke <dpranke@google.com>
Reviewed-by: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69210}
2020-08-03 22:21:55 +00:00
Michael Achenbach
9d5a1fff27 [test] Skip slow tests
No-Try: true
Change-Id: If5ed824ad3ea1a2815a0a48ed2668281733ac533
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2332603
Reviewed-by: Zhi An Ng <zhin@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Auto-Submit: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69209}
2020-08-03 19:57:54 +00:00
Ng Zhi An
d5c58d9d29 [wasm-simd][liftoff] Fix i64x2.shr_s overwriting scratch
x64's implementation of i64x2.shr_s was overwriting the scratch
register. kScratchRegister is used to hold the extracted lane of the
SIMD register, but in certain cases [0], is also used to back up the
value of rcx. When this happens, the supposed backed-up rcx was
overwritten (definitely) by each extract lane, so we end up restoring
an incorrect value of rcx, leading to an eventual crash in certain
benchmarks, when this extracted lane was used as a memory operand (see
linked bugs).

[0] when register holding the shift value is not rcx, which sarq_cl
relies on

Bug: v8:10752
Bug: chromium:1111522
Change-Id: Iaf3264e16f94e78bad4290783757f0b722d40411
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2334354
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69208}
2020-08-03 19:47:14 +00:00
Jakob Kummerow
799421d55b [wasm-gc] Temporary exposure of Wasm objects to JS
This is a stop-gap solution (while we wait for a proper spec)
that lets managed WasmGC objects perform round-trips through
JavaScript. On the JavaScript side, they appear as empty/opaque.

Bug: v8:7748
Change-Id: I0dd368bc14d622f3ef41871484228267359e9b5b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2316306
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69207}
2020-08-03 19:21:24 +00:00
Shu-yu Guo
c19e57ee82 Disallow \8 and \9 in strict mode and template literals
This reached consensus in the July 2020 TC39:
https://github.com/tc39/ecma262/pull/2054

Bug: v8:10769
Change-Id: Iecea1d9d9c9be5c2fbfb820aed2285719c4e6382
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2333350
Commit-Queue: Shu-yu Guo <syg@chromium.org>
Reviewed-by: Marja Hölttä <marja@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69206}
2020-08-03 18:05:14 +00:00
v8-ci-autoroll-builder
ccb6a3cf66 Update V8 DEPS.
Rolling v8/build: 7c2575f..edf75c7

Rolling v8/buildtools: 42e9461..6139217

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

Change-Id: I80cf25941086ec9e94f0f5806c8c550ea0210280
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2334660
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@{#69205}
2020-08-03 17:12:52 +00:00
Clemens Backes
c049a3bcc5 [wasm] Check that all initial reservations succeed
After allocating a new code space, we do some initial allocations in the
new space (e.g. for the jump table). These allocations are not allowed
to fail.
If this in indeed what's happening in the linked bug, this CHECK will
give fuzzers a chance to find us a reproducer.

Drive-by: Introduce {WasmCodeAllocator::kUnrestrictedRegion} to remove
magic constants.

R=ahaas@chromium.org

Bug: v8:1111266
Change-Id: Ia76721653226bd4aa346b89ffab0c80f67892794
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2333250
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69204}
2020-08-03 16:11:33 +00:00
Marja Hölttä
a2ff59bfac [Atomics.waitAsync] Simplify timeout task cancelling
If we cancel the task in the thread where it's supposed to run,
task cancelling will always succeed.

This simplifies the logic.

Bug: v8:10239
Change-Id: I3fb5c93a49c52d958aa947d693700161bc18eee5
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2332807
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69203}
2020-08-03 15:37:13 +00:00
Marja Hölttä
0a8ca7ebee [OWNERS] futex-emulation owners += marja
The majority of the content is the Atomics.waitAsync implementation
which I wrote.

"git blame" shows I've touched 123 / 274 lines in futex-emulation.h and
551 / 875 lines in futex-emulation.cc.

(Status before https://chromium-review.googlesource.com/c/v8/v8/+/2319989 which was moving
code around.)

No-Try: True
Change-Id: Ib31dc0bb778aed90d5c4c56ccb0e556655ce6946
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2332813
Commit-Queue: Marja Hölttä <marja@chromium.org>
Reviewed-by: Mythri Alle <mythria@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69202}
2020-08-03 15:30:53 +00:00
Liviu Rau
56bf834a2b Use relative paths in V8 DEPS
Bug: chromium:1112260
Change-Id: I8c225594b48c4c2c69b6fde21ba65f8693e078c8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2335065
Commit-Queue: Liviu Rau <liviurau@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69201}
2020-08-03 15:27:03 +00:00
Georg Neis
e59e41512d [ic] Stay on the fast path for JSArray::kMaxArrayIndex
... since it's still a valid index.

Change-Id: I498ff27898cefa5df752ac0ad73408ce76ac06c6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2327911
Auto-Submit: Georg Neis <neis@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69200}
2020-08-03 15:22:23 +00:00
Tobias Tebbi
02b0fc0beb [turbofan] make constant fold comments more readable
Change-Id: I5e31bbce2bfbf0effa2c660a67ec88bcd49d06a8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2335054
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69199}
2020-08-03 14:41:23 +00:00
Ross McIlroy
809e2f613b [TurboProp] Support non-simple fp aliasing in fast reg alloc.
Adds support for non-simple fp aliasing (e.g., Arm) for the fast
register allocator.

BUG=v8:9684

Change-Id: I6717ef1c6cb4e585fa4b6ea8cea7087e68f441e9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2300483
Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69198}
2020-08-03 13:45:24 +00:00
Jakob Gruber
64504e7343 [parser] Ensure the isolate is not null in UpdateStatistics
A stricter V8-side check to flush out the linked bug.

Bug: v8:10460
Change-Id: I20a0026e35719632e90f0a00bc49eb27d81b273b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2335061
Auto-Submit: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69197}
2020-08-03 13:40:12 +00:00
Tobias Tebbi
efa3793290 [turbofan] enable constant folding for 64bit comparisons
Change-Id: Id545ca00106fb54ee08078177ad7f24842752afe
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2332799
Reviewed-by: Georg Neis <neis@chromium.org>
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69196}
2020-08-03 12:17:02 +00:00
Dominik Inführ
a731b86ec9 [heap] Enable concurrent allocation of old space large objects
Allow the allocation of large old space objects through
LocalHeap::AllocateRaw. OldLargeObjectSpace::AllocateRawBackground will
allocate a large object on the background thread.

Bug: v8:10315
Change-Id: I9212f0c6770855dbe33490516aae7056987e192d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2332804
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69195}
2020-08-03 11:38:42 +00:00
Omer Katz
75d4b18a77 heap: Fix TracedReference::IsEmptyThreadSafe again
reinterpret_cast to std::atomic was missing const.

Bug: chromium:1108537
Change-Id: Ib737418bddbef6774deafa9714b0efcf2e3fd07c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2332797
Auto-Submit: Omer Katz <omerkatz@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Omer Katz <omerkatz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69194}
2020-08-03 09:37:02 +00:00
Dominik Inführ
3cb519617d [heap] Introduce LocalHeap::AllocateRaw method
LocalHeap::AllocateRaw will be similar to Heap::AllocateRaw and
handle all allocations. LocalHeap::AllocateRawOrFail will perform a GC
and afterwards retry the allocation in a loop.

Bug: v8:10315
Change-Id: I68468962cf9102697aa547b2aa05c7ec6bafd19e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2332801
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69193}
2020-08-03 09:12:42 +00:00
Dominik Inführ
d8528e1d7e [heap] Incorporate code_lo_space_ in OldGenerationSizeOfObjects()
Bug: v8:10315
Change-Id: Ic0ccaa608c9b11258e6923919d3e72d23cedc5c2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2333249
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69192}
2020-08-03 09:10:53 +00:00
Santiago Aboy Solanes
cc3a6b3a21 [compiler] Add comment regarding unparking
Bug: v8:7790
Change-Id: Ie296b0bcc6c3b26be5ad54f4558a75250a2f2157
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2332232
Auto-Submit: Santiago Aboy Solanes <solanes@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69191}
2020-08-03 07:17:02 +00:00
v8-ci-autoroll-builder
85a13f3920 Update V8 DEPS.
Rolling v8/build: 17f3b1c..7c2575f

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/2cd291a..f80ffe3

Rolling v8/tools/clang: b63a569..1078c41

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

Change-Id: I17dbc645ac8c8463a4468589277ab4203a5e9279
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2331870
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@{#69190}
2020-08-03 03:58:12 +00:00
v8-ci-autoroll-builder
655a3d2234 Update V8 DEPS.
Rolling v8/build: 7f53cfc..17f3b1c

Rolling v8/tools/clang: fd3758a..b63a569

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

Change-Id: I7b38ec37acb0cd78f06f714b814072ebf68b63e3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2331868
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@{#69189}
2020-08-02 03:48:14 +00:00
Ulan Degenbaev
260ec99599 [ukm] Rename v8::Context::Token to v8::metrics::Recorder::ContextId
Chrome is currently adding a 128-bit V8ContextToken to keep track of
V8 contexts across multiple isolates and processes. Having per-isolate
token exposed by V8 leads to confusion of these two tokens.

This moves v8::Context::Token to v8::metrics::Recorder and changes
the corresponding functions:
- v8::Context::GetToken => v8::metrics::Recorder::GetContextId
- v8::Context::GetByToken => v8::metrics::Recorder::GetContext

This CL is purely mechanical and does not change the behaviour.

Bug: chromium:1101749
Tbr: clemensb@chromium.org
Change-Id: I31bbfa02ebab1c0d91b00f0d08c1b236392d14d2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2330023
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Emanuel Ziegler <ecmziegler@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69188}
2020-08-01 14:16:11 +00:00
Dominik Inführ
ef603a9e0e Revert "[heap] Refactor allocation observer in AllocationCounter"
This reverts commit b354e344fd.

Reason for revert: Clusterfuzz found issues with this CL.

Original change's description:
> [heap] Refactor allocation observer in AllocationCounter
> 
> Moves accounting of allocation observers into the AllocationCounter
> class. This CL removes top_on_previous_step_ for counters that are
> increased regularly in the slow path of the allocation functions.
> 
> AdvanceAllocationObservers() informs the AllocationCounter about
> allocated bytes, InvokeAllocationObservers() needs to be invoked when
> an allocation step is reached. NextBytes() returns the number of bytes
> until the next AllocationObserver::Step needs to run.
> 
> Bug: v8:10315
> Change-Id: I8b6eb8719ab032d44ee0614d2a0f2645bfce9df6
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2320650
> Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
> Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#69170}

TBR=ulan@chromium.org,dinfuehr@chromium.org

Change-Id: Icd713207bfb2085421fd82009be24a0211ae86da
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:10315
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2332667
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69187}
2020-08-01 07:33:44 +00:00
v8-ci-autoroll-builder
f220997e26 Update V8 DEPS.
Rolling v8/build: 65e3fac..7f53cfc

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

Change-Id: I934b4eebcf58727531022998657954b718899b99
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2333182
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@{#69186}
2020-08-01 03:34:41 +00:00
Frank Tang
439c868ffa [Intl] Define @@toStringTag for Intl namespace
Implement https://github.com/tc39/ecma402/pull/487
Also improve test/intl/toStringTag.js

see also: https://github.com/tc39/test262/pull/2712

Bug: v8:10744
Change-Id: I678876aa21f169a8dfcec8e3ce974978a8847fe0
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2315455
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69185}
2020-08-01 02:21:20 +00:00
v8-ci-autoroll-builder
5277adef17 Update V8 DEPS.
Rolling v8/build: f0fc706..65e3fac

Rolling v8/buildtools: 9e12121..42e9461

Rolling v8/third_party/aemu-linux-x64: nz3cLclK4lWm6gzvGCOHPQAKJUO8EsMBr7EIUXwS9SEC..TfK3Whl6AfZifLOotcOS_jvckKztERlPvmVyZo16fN0C

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/d292e89..2cd291a

Rolling v8/third_party/depot_tools: a58287b..98b332f

Rolling v8/third_party/zlib: 103247f..a21a4e8

Rolling v8/tools/clang: 2eaa59d..fd3758a

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

Change-Id: I218e41dfe1026a7851ed4e0a3ac7fbe924f4f9cb
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2333174
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@{#69184}
2020-07-31 22:28:10 +00:00
Ng Zhi An
6243a86a54 [wasm-simd] Move more helper functions into simd-shuffle
Also add some simple unittests for these functions.

Bug: v8:10696
Change-Id: Ic7607780b4eaf275b20d0937bf214846bf51d539
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2330806
Reviewed-by: Bill Budge <bbudge@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69183}
2020-07-31 22:17:20 +00:00
Almothana Athamneh
67bd376c4d Update V8 DEPS manually
This CL also includes changes from https://chromium.googlesource.com/chromium/src/build/+log/483d96..f0fc706

Bug: chromium:1111223
Change-Id: I8ee1297eae93050d7ef615f01b388de982c88014
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2328790
Reviewed-by: Liviu Rau <liviurau@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69182}
2020-07-31 19:21:39 +00:00
Ross McIlroy
aba5777d2a [TurboProp] Add cross-block allocation support to fast reg alloc
Adds support for tracking register allocations across basic block
boundaries to the fast register allocator. For now we still spill
on loop headers, and spill when merging register states if the
register state isn't exactly the same.

BUG=v8:9684

Change-Id: I2aaf992fe8b0a5c698b1e44526951c63aedbe86c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2300480
Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69181}
2020-07-31 17:54:09 +00:00
Ng Zhi An
3f705cc775 [wasm-simd] Move helper functions to pack shuffles to simd-shuffle
Some of these functions will be reused by Liftoff. Move them into
simd-shuffle for sharing (even though these only apply to ia32 and x64).

Bug: v8:10696
Change-Id: Ib83a2fcd443f93f86d7a4c85898205edb8c3925c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2330796
Reviewed-by: Bill Budge <bbudge@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69180}
2020-07-31 16:28:49 +00:00
Mythri A
9b9ba19e3c [turboprop] Migrate deprecated maps in dynamic map check operator
If incoming map is deprecated, generate code to migrate the map. Since
this involves generating additional code and a call to runtime, we only
do this if one of the receiver maps was a migration target when
optimizing this function. If not, we deoptimize and discard the
optimized code if we see a deprecated map. This is to avoid bailout
loops when we see deprecated maps.

This change does the following:
// We generated code to migrate deprecated maps only if one of the maps
// in feedback vector is a migration target.
if ( there are migration targets in feedback)
{
  if (checkMaps fails) {
     if (incoming map is deprecated) {
        migrate the map
        checkMaps with the new map
     } else {
       bailout
     }
  }
} else {
  if (checkMaps fails)
    bailout;
}

Bug: v8:10582, v8:9684
Change-Id: I8a04c77ed209dd2fb0300a783d844f2335a678c8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2292231
Reviewed-by: Sathya Gunasekaran  <gsathya@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Commit-Queue: Mythri Alle <mythria@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69179}
2020-07-31 16:06:10 +00:00
Avi Drissman
065dde954a Fix OS_MACOSX usages
Two of them were in comments; updated them to V8_OS_MACOSX.

Two of them were incorrectly in #if statements. Updated them to
V8_OS_MACOSX.

Bug: chromium:823915, chromium:1105907
Change-Id: Ibfc0f8936dbc8cbf3b05a674e882bbc480d0b4c4
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2331736
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69178}
2020-07-31 15:26:59 +00:00
Tobias Tebbi
50d5c2bb07 [torque] use implicit parameters for template parameter inference
This allows templates to preserve the type of implicit parameters to
select a better ovleroad, without generally extending overload
resolution to implicit parameters, which could be confusing.

Bug: v8:7793
Change-Id: Ie57090a295b0b46d03789829b975fc16e2a9c5b9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2329630
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Reviewed-by: Seth Brenith <seth.brenith@microsoft.com>
Cr-Commit-Position: refs/heads/master@{#69177}
2020-07-31 15:11:09 +00:00
Santiago Aboy Solanes
09db7cf9a5 [codegen] Create PersistentHandles instead of DeferredHandles
As a note, we are not yet passing this to the background so we only
have canonical persistent handles on the main thread.

Bug: v8:7790
Change-Id: I15b264cfacc2d5524a3d13f62574a3576bb7e1a4
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2330017
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69176}
2020-07-31 14:31:49 +00:00
Dominik Inführ
c60e772c30 [handles] Do not zap new blocks for local handles
Not needed in order to prevent use-after-frees.

Bug: v8:10315
Change-Id: I7713b2fb39681bb88e60fc7cc417b40430f0c73c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2326031
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69175}
2020-07-31 14:06:09 +00:00
Dan Elphick
c7d22c4991 [heap] Share RO_SPACE pages with pointer compression
This allows the configuration v8_enable_shared_ro_heap and
v8_enable_pointer_compression on Linux and Android, although it still
defaults to off.

When pointer compression and read-only heap sharing are enabled, sharing
is achieved by allocating ReadOnlyPages in shared memory that are
retained in the shared ReadOnlyArtifacts object. These ReadOnlyPages are
then remapped into the address space of the Isolate ultimately using
mremap.

To simplify the creation process the ReadOnlySpace memory for the first
Isolate is created as before without any sharing. It is only when the
ReadOnlySpace memory has been finalized that the shared memory is
allocated and has its contents copied into it. The original memory is
then released (with PC this means it's just released back to the
BoundedPageAllocator) and immediately re-allocated as a shared mapping.

Because we would like to make v8_enable_shared_ro_heap default to true
at some point but can't make this conditional on the value returned by
a method in the code we are yet to compile, the code required for
sharing has been mostly changed to use ifs with
ReadOnlyHeap::IsReadOnlySpaceShared() instead of #ifdefs except where
a compile error would result due to the absence of a class members
without sharing. IsReadOnlySpaceShared() will evaluate
CanAllocateSharedPages in the platform PageAllocator (with pointer
compression and sharing enabled) once and cache that value so sharing
cannot be toggled during the lifetime of the process.

Bug: v8:10454
Change-Id: I0236d752047ecce71bd64c159430517a712bc1e2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2267300
Commit-Queue: Dan Elphick <delphick@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69174}
2020-07-31 13:34:59 +00:00
Santiago Aboy Solanes
0ae4ef0536 [compiler][heap] Park the LocalHeap if possible
When we are not going to be accessing the heap anymore, we can park the
LocalHeap which signals to not wait for this thread when requesting
safepoints.

There are a couple of places where we want to explicitly allow access
to the heap, even though we have previously parked. We use
UnparkedScope for those cases.

Bug: v8:7790
Change-Id: Ic0acc51fe02af89836226670b828db4aafba4d0e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2319993
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69173}
2020-07-31 13:29:29 +00:00
Dominik Inführ
e51ab6e294 [heap] LocalHeap::IsParked doesn't need mutex
We only use IsParked from the thread that owns the LocalHeap, which is
the only thread which mutates state_. So it is safe to read state_ from
that thread without a mutex.

Bug: v8:10315
Change-Id: I3725ca4c4c4da1c661d7b4f06d295312914b4b52
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2332168
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69172}
2020-07-31 13:28:09 +00:00
Omer Katz
2d7f3d5b3b heap: Make TracedReference::operator= thread safe
Bug: chromium:1108537
Change-Id: Iafb87bb74aa15ac2005e43a62a95a83831ce4b03
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2332160
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Omer Katz <omerkatz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69171}
2020-07-31 13:01:39 +00:00
Dominik Inführ
b354e344fd [heap] Refactor allocation observer in AllocationCounter
Moves accounting of allocation observers into the AllocationCounter
class. This CL removes top_on_previous_step_ for counters that are
increased regularly in the slow path of the allocation functions.

AdvanceAllocationObservers() informs the AllocationCounter about
allocated bytes, InvokeAllocationObservers() needs to be invoked when
an allocation step is reached. NextBytes() returns the number of bytes
until the next AllocationObserver::Step needs to run.

Bug: v8:10315
Change-Id: I8b6eb8719ab032d44ee0614d2a0f2645bfce9df6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2320650
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69170}
2020-07-31 12:33:59 +00:00
Dominik Inführ
089fea6266 [handles] Add dinfuehr@ to OWNERS file
Bug: v8:10315
Change-Id: Ice1b4d2209985594506f0f40355f4a5ed8d3a7c5
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2332169
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69169}
2020-07-31 12:14:39 +00:00
Igor Sheludko
ee23306c7c [zone-compr] Add CompressedZonePtr class and compress TurboFan graphs
This CL doesn't try to compress containers of Node* yet.

Bug: v8:9923
Change-Id: Ica16b09b6f26321952b440d49a70f9a991d4275f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2324258
Commit-Queue: Igor Sheludko (OOO Aug 3-17) <ishell@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69168}
2020-07-31 12:11:49 +00:00