Commit Graph

55084 Commits

Author SHA1 Message Date
Daniel Clifford
cf81ce239c [torque]: Allow const-qualified struct and class fields
Const-qualified fields are allowed in both classes and structs.
In both cases, const fields can only be set via initialization
during construction.

Drive-by: unitialized -> uninitialized

Bug: v8:7793
Change-Id: Idec08df30f7897c756b7dd6f2b10bb6012fefb6a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1547853
Commit-Queue: Daniel Clifford <danno@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60592}
2019-04-03 10:55:33 +00:00
Frederik Gossen
f0cfb7cc81 [wasm-hints] Unified Naming for Compilation Hints
The tiers are now consistently referred to as baselin and top tier.

Bug: v8:9003
Change-Id: I74ad1867aca63bee9eb83b7f0f9fbaf2b1523dcb
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1547667
Commit-Queue: Frederik Gossen <frgossen@google.com>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60591}
2019-04-03 10:51:13 +00:00
Andrew Comminos
8bedd29166 [cpu-profiler] Add SourceType field to CpuProfileNode
Adds the notion of a "source type" to CpuProfileNode instances, hinting
at the underlying source of the function or state that resulted in the
generation of the node.

Bug: v8:9001
Change-Id: Ie14c54d41b99eb02f54b423fa5d939e9d7f63785
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1510576
Commit-Queue: Peter Marshall <petermarshall@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
Reviewed-by: Alexei Filippov <alph@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60590}
2019-04-03 10:35:03 +00:00
Sigurd Schneider
6116c6b2a8 [heap] Use MemCopy in CopyElements
This CL uses MemCopy in CopyElements, because we think that the input
FixedArrays can never overlap. This CL also adds a DCHECK to ensure
this. If our assumption is wrong, it will be interesting to learn why.

Change-Id: Ib8258b934f43b82b1281481c592762e43b35938f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1549154
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60589}
2019-04-03 10:04:03 +00:00
Clemens Hammacher
433de3ffad [wasm][gc] Make import wrapper cache keep WasmCode alive
The cache also needs to keep the code alive. The code objects are
import wrappers and not wasm functions (which we will focus on first),
but eventually we would also like to collect unused import wrappers.
This CL explicitly increments the ref count when {WasmCode} is added
to the cache, and derements all ref counts in the destructor.

R=titzer@chromium.org

Bug: v8:8217
Change-Id: I1bfb276b25b359d83900147e75ec47788e1fa8de
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1535825
Reviewed-by: Ben Titzer <titzer@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60588}
2019-04-03 09:55:53 +00:00
Santiago Aboy Solanes
70b2216240 [Turbofan][ptr-compr] Add representation changes for and to Compressed* values
Includes both changing from compressed pointers and to compressed pointers.

Also added tests to the representation changer test

B

Cq-Include-Trybots: luci.v8.try:v8_linux64_pointer_compression_rel_ng,v8_linux64_arm64_pointer_compression_rel_ng
Bug: v8:8977
Change-Id: I8a13f6b7ec2208442aa354949173cc9061bce168
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1533866
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60587}
2019-04-03 09:45:53 +00:00
Michael Starzinger
fbce172cf1 [wasm] Introduce {BranchOnExceptionImmediate} helper.
This introduces a helper class for the immediates to a "br_on_exn"
instruction. It is basically a wrapper around a pair of existing
immediates to simplify PC offset calculations. This is similar to what
is being done for e.g. {MemoryCopyImmediate} already.

R=clemensh@chromium.org
BUG=v8:8091

Change-Id: I85a552baa6bfa78304abc6cf9509aef365d47057
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1547865
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60586}
2019-04-03 09:42:23 +00:00
Clemens Hammacher
d78b7a0eae [regexp][cleanup] Using 'using' instead of 'typedef'
Even though both are allowed in the style guide, it recommends to use
'using', as its syntax is more consistent with the rest of C++.
This CL turns all typedefs in src/regexp to 'using' declarations.

R=jgruber@chromium.org

Bug: v8:8834
Change-Id: I2765c3465fec7e8c42c3a84b924522f220ab5676
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1545904
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60585}
2019-04-03 09:18:03 +00:00
Clemens Hammacher
38ddf33cab [vector] Rename {is_empty} to {empty}
All standard containers provide a method named {empty} to check whether
the container is empty. On {base::Vector}, that method is named
{is_empty}, while {empty} is an unused factory method for creating an
empty {Vector}.
This CL renames {is_empty} to {empty} and removes the unused factory
method.

R=leszeks@chromium.org

Bug: v8:8834
Change-Id: I686bd07527801fbe783c412bc241221d8ec3660a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1547862
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60584}
2019-04-03 09:16:23 +00:00
Michael Lippautz
cb68c2e35f [heap] Filter out fillers in worklist during atomic pause marking
They are already filtered by the incremental marker.

Change-Id: If43a16d54a2b0eb7d6a36482d3439fc7191c31a6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1549160
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60583}
2019-04-03 08:25:33 +00:00
Igor Sheludko
42beed975e Reland "[ptr-compr][x64] Temporarily enable pointer compression on x64"
This is a reland of 4f051fd5da

Relanding after fixing Chromium issues.

Original change's description:
> [ptr-compr][x64] Temporarily enable pointer compression on x64
>
> ... and make sure that the x64 ptr-compr bots proceed testing V8 without
> pointer compression in order to keep testing the full pointer mode.
>
> Bug: v8:7703
> Cq-Include-Trybots: luci.v8.try:v8_linux64_ubsan_rel_ng,v8_linux64_tsan_rel
> Change-Id: Iee725deda813425a6f0722948b54976154f50909
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1497139
> Reviewed-by: Michael Hablich <hablich@chromium.org>
> Reviewed-by: Michael Achenbach <machenbach@chromium.org>
> Commit-Queue: Michael Achenbach <machenbach@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#60230}

Bug: v8:7703
Change-Id: Ic2d1c2ae41ec645f34963f5f561c33199c72ef4b
Cq-Include-Trybots: luci.v8.try:v8_linux64_ubsan_rel_ng,v8_linux64_tsan_rel
Cq-Include-Trybots: luci.chromium.try:fuchsia_x64,linux-rel
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1535819
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60582}
2019-04-03 07:27:03 +00:00
Paolo Severini
969cb0c7a5 Reland "V8 x64 backend doesn't emit ABI compliant stack frames"
This is a reland of 3cda21de77

Original change's description:
> V8 x64 backend doesn't emit ABI compliant stack frames
> 
> On 64 bit Windows, the OS stack walking does not work because the V8 x64
> backend doesn't emit unwinding info and also because it doesn't emit ABI
> compliant stack frames. See
> https://docs.google.com/document/d/1-wf50jFlii0c_Pr52lm2ZU-49m220nhYMrHDi3vXnh0/edit
> for more details.
> 
> This problem can be fixed by observing that V8 frames usually all have the same
> prolog and epilog:
> 
> push rbp,
> mov rbp, rsp
> ...
> pop rbp
> ret N
> 
> and that it is possible to define XDATA (UNWIND_CODEs) that specify how Windows
> should walk through V8 frames. Furthermore, since V8 Code objects are all
> allocated in the same code-range for an Isolate, it is possible to register a
> single PDATA/XDATA entry to cover stack walking for all the code generated
> inside that code-range.
> 
> This PR contains changes required to enable stack walking on Win64:
> 
> EmbeddedFileWriter now adds assembler directives to the builtins
> snapshot source file (embedded.cc) to emit additional entries in the .pdata and
> in the .xdata section of the V8 executable. This takes care of stack walking
> for embedded builtins. (The case of non-embedded builtins is not supported).
> The x64 Assembler has been modified to collect the information required to emit
> this unwind info for builtins.
> 
> Stack walking for jitted code is handled is Isolate.cpp, by registering
> dynamically PDATA/XDATA for the whole code-range address space every time a new
> Isolate is initialized, and by unregistering them when the Isolate is
> destroyed.
> 
> Stack walking for WASM jitted code is handled is the same way in
> wasm::NativeModule (wasm/wasm-code-manager.cpp).
> 
> It is important to note that Crashpad and Breakpad are already registering
> PDATA/XDATA to manage and report unhandled exceptions (but not for embedded
> builtins). Since it is not possible to register multiple PDATA entries for the
> same address range, a new function is added to the V8 API:
> SetUnhandledExceptionCallback() can be used by an embedder to register its own
> unhandled exception handler for exceptions that arise in v8-generated code.
> V8 embedders should be modified accordingly (code for this is in a separate PR
> in the Chromium repository:
> https://chromium-review.googlesource.com/c/chromium/src/+/1474703).
> 
> All these changes are experimental, behind:
> 
> the 'v8_win64_unwinding_info' build flag, and
> the '--win64-unwinding-info' runtime flag.
> 
> Bug: v8:3598
> Change-Id: Iea455ab6d0e2bf1c556aa1cf870841d44ab6e4b1
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1469329
> Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
> Reviewed-by: Jakob Gruber <jgruber@chromium.org>
> Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
> Commit-Queue: Paolo Severini <paolosev@microsoft.com>
> Cr-Commit-Position: refs/heads/master@{#60330}

Bug: v8:3598
Change-Id: If988baf7d3e4af165b919d6e54c1ad985f8e25e3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1534618
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Paolo Severini <paolosev@microsoft.com>
Cr-Commit-Position: refs/heads/master@{#60581}
2019-04-03 02:00:43 +00:00
Sathya Gunasekaran
dcd2032bb7 [ESNext] Ship numeric separators
Bug: v8:7317
Change-Id: I54c0505bcdd4354a896a317ce756bc7121f61d48
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1548580
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Sathya Gunasekaran <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60580}
2019-04-02 22:45:02 +00:00
Michael Lippautz
0226bccaa2 [heap] Add UMA for overall marking time and marking throughput
Adds the following UMA counters:
- V8.GCMarkingSum: Overall time spent in marking per GC cycle
- V8.GCMainThreadMarkingThroughput: Overall marking throughput
  considering marking time spent on the main thread and
  allocated bytes after GC. Only reported if more than 1MB of
  live objects have been marked in the cycle.

Bug: chromium:945806
Change-Id: I24a37bf59f02da9aba984bed9de62fdb39be8882
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1547657
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60579}
2019-04-02 21:13:12 +00:00
Mythri A
8f1c17067e [heap] Fix check in concurrent marking when flushing bytecode
There was a negation missing in the check.

Bug: chromium:948559
Change-Id: I54cfdd8b83771d80aebe506e4c2793cef301e48b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1549164
Auto-Submit: Mythri Alle <mythria@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Commit-Queue: Mythri Alle <mythria@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60578}
2019-04-02 21:04:02 +00:00
Tobias Tebbi
5f58a82bcf Revert "Reland^2 "[build] disable C++ optimization for mksnapshot code.""
This reverts commit 6beea97e09.

Reason for revert: https://crbug.com/942497

Original change's description:
> Reland^2 "[build] disable C++ optimization for mksnapshot code."
>
> This is a reland of a6b95a6acf
>
> In addition to UBSan, also ASAN needs optimizations.
> So this CL doesn't disable optimizations for all sanitizer builds.
>
> Original change's description:
> > Reland "[build] disable C++ optimization for mksnapshot code."
> >
> > This is a reland of cee2f772c7
> >
> > Original change's description:
> > > [build] disable C++ optimization for mksnapshot code.
> > >
> > > By disabling C++ optimizations for code that's only run in mksnapshot,
> > > that is, CSA and Torque-generated code, we can save compile time.
> > > I observed up to 2x improvements of compile time for some files,
> > > while the mksnapshot time did not increase significantly.
> > >
> > > Bug: v8:7629
> > > Change-Id: I96be2966611b2471b68023e0dd9e351d94f0013c
> > > Reviewed-on: https://chromium-review.googlesource.com/c/1460941
> > > Reviewed-by: Yang Guo <yangguo@chromium.org>
> > > Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
> > > Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
> > > Cr-Commit-Position: refs/heads/master@{#59585}
> >
> > Bug: v8:7629
> > Change-Id: I8330f93173ab3d7b400e15ea4935bbe8256b250f
> > Reviewed-on: https://chromium-review.googlesource.com/c/1473292
> > Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
> > Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
> > Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
> > Cr-Commit-Position: refs/heads/master@{#59606}
>
> Bug: v8:7629
> Change-Id: I42175c472d8e41345573df81645dfe3accc9d8c4
> Reviewed-on: https://chromium-review.googlesource.com/c/1475396
> Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
> Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#59632}

TBR=yangguo@chromium.org,sigurds@chromium.org,tebbi@chromium.org

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: v8:7629 chromium:942497
Change-Id: Ie51d7b53440230b41fb763541908cb1162d8850d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1549158
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60577}
2019-04-02 18:56:42 +00:00
Sigurd Schneider
4430613313 Revert "[wasm] Use work-stealing queues for background compilation"
This reverts commit d746be9ceb.

Reason for revert: Speculative revert because this CL *might* cause timeouts on several bots:
https://ci.chromium.org/p/v8/builders/ci/V8%20Linux%20-%20predictable/23351

Original change's description:
> [wasm] Use work-stealing queues for background compilation
> 
> This reduces contention on the mutex protecting the {CompilationState}
> by splitting the compilation unit queues into several queues (one per
> background task). Each task executes its own queue first, and steals
> from other queues once it runs out of work.
> The implementation of the set of work-stealing queues is encapsulated
> in the new {CompilationUnitQueues} class in module-compiler.cc.
> 
> R=​titzer@chromium.org
> 
> Bug: v8:8916
> Change-Id: I5a40314917e7d4a35d7ff9e8ec124ec212beacab
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1543350
> Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
> Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#60572}

TBR=mstarzinger@chromium.org,titzer@chromium.org,clemensh@chromium.org

Change-Id: I92d8862ec0ff0002160a62ed9df9b044fc95c93d
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:8916
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1549166
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60576}
2019-04-02 18:48:26 +00:00
peterwmwong
8d866b4262 Reland "[debug] Mark toLocaleString and TA#join builtins as side-effect free."
This is a reland of 660d828790

Original change's description:
> [debug] Mark toLocaleString and TA#join builtins as side-effect free.
>
> Bug: chromium:940373
> Change-Id: If5f90ff5f873f0687c6a6a4063e0d09d6bbbd556
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1533157
> Reviewed-by: Yang Guo <yangguo@chromium.org>
> Commit-Queue: Peter Wong <peter.wm.wong@gmail.com>
> Cr-Commit-Position: refs/heads/master@{#60440}

Bug: chromium:940373
Change-Id: I03fe4c06cad9848db211739170462d52ce3f7acf
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1538791
Reviewed-by: Simon Zünd <szuend@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Peter Wong <peter.wm.wong@gmail.com>
Cr-Commit-Position: refs/heads/master@{#60575}
2019-04-02 18:47:12 +00:00
Igor Sheludko
d341a1a7c5 [ptr-compr][Fuchsia] Adapt V8 heap reservation for Fuchsia
... which doesn't respect address hints when reserving an address space
region and therefore makes it impossible to fulfill V8 heap alignment
requirements.

As a workaround we just overreserve address space to ensure that we
will be able to find a properly aligned 4GB subregion.

Bug: v8:7703
Change-Id: Ibf54e5e13131c2640a448944e3a3bae937c8b938
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1547861
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60574}
2019-04-02 14:45:42 +00:00
Sigurd Schneider
0d8bea8fcf [cctest] Add V8_EXPORT_PRIVATE for cctest (regexp part)
Bug: v8:9020
Change-Id: I405d27541f76d1347ae91e5ab426ede72edb1f32
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1541045
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60573}
2019-04-02 14:41:02 +00:00
Clemens Hammacher
d746be9ceb [wasm] Use work-stealing queues for background compilation
This reduces contention on the mutex protecting the {CompilationState}
by splitting the compilation unit queues into several queues (one per
background task). Each task executes its own queue first, and steals
from other queues once it runs out of work.
The implementation of the set of work-stealing queues is encapsulated
in the new {CompilationUnitQueues} class in module-compiler.cc.

R=titzer@chromium.org

Bug: v8:8916
Change-Id: I5a40314917e7d4a35d7ff9e8ec124ec212beacab
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1543350
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60572}
2019-04-02 14:27:52 +00:00
Peter Marshall
a18dd6e111 [tracing] Fix build for use_perfetto config
Autoroller updated protobuf which has some different files now.

Change-Id: If3b2f6452d30e754504e8798de5adb8706371cb5
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1547866
Auto-Submit: Peter Marshall <petermarshall@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60571}
2019-04-02 14:05:42 +00:00
Michael Achenbach
dfcab68c1a Revert "Update V8 DEPS."
This reverts commit 37cdcbcf9c.

Reason for revert: https://crbug.com/948590

Original change's description:
> Update V8 DEPS.
> 
> Rolling v8/build: a72af28..af636cf
> 
> Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/5b63b1f..83131f4
> 
> Rolling v8/third_party/perfetto: 21a33af..cb85131
> 
> Rolling v8/tools/clang: 82dbc02..fdca78e
> 
> TBR=machenbach@chromium.org,hablich@chromium.org,sergiyb@chromium.org
> 
> Change-Id: I28eeadb22b369aab6bc89219bdaa31a3af35a65d
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1548591
> Reviewed-by: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
> Commit-Queue: Michael Achenbach <machenbach@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#60563}

TBR=machenbach@chromium.org,hablich@chromium.org,sergiyb@chromium.org,v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com

Bug: chromium:948590
Change-Id: Ie04943a871ba1bf93094764e452173ea59acb220
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1549157
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60570}
2019-04-02 14:00:34 +00:00
Michael Achenbach
efba3476f5 Skip test unsuitable for gc fuzzing
TBR=sigurds@chromium.org
NOTRY=true

Change-Id: I5c6988aa5670deaed59647e2dd4b40ee9c368a20
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1549155
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60569}
2019-04-02 13:31:25 +00:00
Sigurd Schneider
50d74d6010 [heap] Do not {RecordEphemeronKeyWrite} if key is in old-space
This happened because {EphemeronKeyWriteBarrierFromCode} will also be
called if both table and key are in old-space, and key is an evacuation
candidate.

Bug: chromium:948307, v8:8557
Change-Id: Ic1284209584b74cb343163e4beec632a3f1544b8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1547858
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60568}
2019-04-02 13:24:33 +00:00
Georg Neis
045fdaf475 [turbofan] Serialize for "prototype" access on functions
Bug: v8:7790
Change-Id: I44c722357434a32ae9400a0e44dbc522dafe873a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1547849
Auto-Submit: Georg Neis <neis@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60567}
2019-04-02 12:52:11 +00:00
Clemens Hammacher
d4266e3035 [wasm][gc] Add code ref scopes for code GC
This CL adds all the necessary {WasmCodeRefScope}s in the code base, or
at least a good approximation. A follow-up CL will enable a check that
a {WasmCodeRefScope} exists whenever a pointer to a {WasmCode} object
is returned from the {NativeModule}. This should flush out any missing
scopes.

R=titzer@chromium.org

Bug: v8:8217
Change-Id: I54c7eb39aeb1acde38273c399396e6b1390a4cb2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1533860
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Ben Titzer <titzer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60566}
2019-04-02 11:37:41 +00:00
Leszek Swirski
837e8f5e1a [parser] Fail early for two-byte intrinsic calls
Don't just DCHECK that intrinsic calls are one-byte, but explicitly
check and return (a failure) when they are not.

Bug: chromium:948248
Change-Id: If2c16f337e9c97e5a585d21a51a985f4abbe1c29
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1547857
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60565}
2019-04-02 10:43:12 +00:00
Frederik Gossen
9ac3ec565d Reland "[wasm-hints] Enabled Lazy Compilation by Hint"
This is a reland of 09fa63a935

Original change's description:
> [wasm-hints] Enabled Lazy Compilation by Hint
>
> Hints for lazy compilation are now taken into consideration. If the
> custom hints section suggests lazy compilatin we do so unless the module
> consists of a single function.
>
> Bug: v8:9003
> Change-Id: Ibdc400453cee20d4d5c814733887b38fb675b220
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1535827
> Commit-Queue: Frederik Gossen <frgossen@google.com>
> Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
> Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#60557}

Bug: v8:9003
No-Try: true
Change-Id: I8d6f4518aa548c815fba4e6e62d2206129336cc6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1547851
Commit-Queue: Frederik Gossen <frgossen@google.com>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60564}
2019-04-02 10:31:22 +00:00
v8-ci-autoroll-builder
37cdcbcf9c Update V8 DEPS.
Rolling v8/build: a72af28..af636cf

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/5b63b1f..83131f4

Rolling v8/third_party/perfetto: 21a33af..cb85131

Rolling v8/tools/clang: 82dbc02..fdca78e

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

Change-Id: I28eeadb22b369aab6bc89219bdaa31a3af35a65d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1548591
Reviewed-by: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60563}
2019-04-02 07:43:12 +00:00
Clemens Hammacher
a761cf3833 [wasm] Retry committing memory after GC
In {TryAllocateBackingStore} we already have two gc-and-retry loops.
This CL adds a third one, and pulls out the gc-and-retry loop to a
helper method.

R=ulan@chromium.org

Bug: v8:8898, chromium:909723
Change-Id: I830aa86b899223825d2e6abfcbacad0ccbf3485b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1547666
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60562}
2019-04-02 07:38:52 +00:00
Daniel Clifford
9fe209bd4a Reactivate Torque cctest tests
Change-Id: I873a8a53f93d0b43d18f6dbc620a2fa3f4b30d32
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1547850
Reviewed-by: Simon Zünd <szuend@chromium.org>
Commit-Queue: Daniel Clifford <danno@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60561}
2019-04-01 19:38:51 +00:00
Milad Farazmand
487b440369 Reland "PPC/S390: [heap] Clean-up keys of oldspace weakmaps during scavenge"
This is a reland of dd07cbcfdf

Original change's description:
> PPC/S390: [heap] Clean-up keys of oldspace weakmaps during scavenge
> 
> Port 6604f1826d
> 
> Original Commit Message:
> 
>      This CL adds handling for cleaning up weakmap (EphemeronHashTable)
>      keys during scavenge, even if the weakmap resides in oldspace.
> 
> Change-Id: Idf8b6115e57b1229864afefe6ffee85acb5e7547
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1538320
> Reviewed-by: Milad Farazmand <miladfar@ca.ibm.com>
> Reviewed-by: Junliang Yan <jyan@ca.ibm.com>
> Commit-Queue: Milad Farazmand <miladfar@ca.ibm.com>
> Commit-Queue: Junliang Yan <jyan@ca.ibm.com>
> Cr-Commit-Position: refs/heads/master@{#60446}

Change-Id: I8136d873cfc399c84a4daf4de9a1043f016561cb
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1546561
Auto-Submit: Milad Farazmand <miladfar@ca.ibm.com>
Reviewed-by: Junliang Yan <jyan@ca.ibm.com>
Commit-Queue: Junliang Yan <jyan@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#60560}
2019-04-01 16:16:45 +00:00
Mythri A
85a0cfc7b4 [lite] Change feedback allocation budget to 1024
Lower the interrupt budget so we allocate feedback vectors earlier.
The earlier budget of 2048 causes ~3% regressions in speedometer. From earlier
experiments, there was no noticeable memory savings between 2048 and 1024.


Bug: v8:8394
Change-Id: I6327e22c4df60c262420975f2e204cdbacefb485
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1547662
Reviewed-by: Dan Elphick <delphick@chromium.org>
Commit-Queue: Mythri Alle <mythria@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60559}
2019-04-01 15:49:40 +00:00
Frederik Gossen
be470c5546 Revert "[wasm-hints] Enabled Lazy Compilation by Hint"
This reverts commit 09fa63a935.

Reason for revert: Falkes on https://ci.chromium.org/p/v8/builders/ci/V8%20Linux%20-%20shared/29942

Original change's description:
> [wasm-hints] Enabled Lazy Compilation by Hint
> 
> Hints for lazy compilation are now taken into consideration. If the
> custom hints section suggests lazy compilatin we do so unless the module
> consists of a single function.
> 
> Bug: v8:9003
> Change-Id: Ibdc400453cee20d4d5c814733887b38fb675b220
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1535827
> Commit-Queue: Frederik Gossen <frgossen@google.com>
> Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
> Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#60557}

TBR=mstarzinger@chromium.org,clemensh@chromium.org,frgossen@google.com

Change-Id: I18dd424fe8cf05f220f7498bb1ebe4b9fce7d240
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:9003
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1547668
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60558}
2019-04-01 15:02:12 +00:00
Frederik Gossen
09fa63a935 [wasm-hints] Enabled Lazy Compilation by Hint
Hints for lazy compilation are now taken into consideration. If the
custom hints section suggests lazy compilatin we do so unless the module
consists of a single function.

Bug: v8:9003
Change-Id: Ibdc400453cee20d4d5c814733887b38fb675b220
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1535827
Commit-Queue: Frederik Gossen <frgossen@google.com>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60557}
2019-04-01 14:32:21 +00:00
Michael Achenbach
c63350a986 [test] Skip test unsuitable for gc fuzzing
TBR=sigurds@chromium.org
NOTRY=true

Change-Id: I1b7026b4cbd02932e315ce3e00d987e59f4e64f3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1547663
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60556}
2019-04-01 14:18:17 +00:00
Sigurd Schneider
60f6217720 [heap] Fix benign race in CopyElements
Bug: v8:9032
Change-Id: Ibd607d164bbc31aa41887db51c4ade575a37b227
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1547658
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60555}
2019-04-01 14:05:36 +00:00
Sigurd Schneider
d4550f4ac1 Reland "[heap] Clean-up keys of oldspace weakmaps during scavenge"
This is a reland of 6604f1826d

Original change's description:
> [heap] Clean-up keys of oldspace weakmaps during scavenge
>
> This CL adds handling for cleaning up weakmap (EphemeronHashTable)
> keys during scavenge, even if the weakmap resides in oldspace.
>
> Change-Id: If8d711c050ddbcae4dd6e8da549e0c0d08ba47b2
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1523787
> Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
> Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
> Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#60432}

CQ_INCLUDE_TRYBOTS=luci.chrome.try:Mac Builder Perf

Change-Id: Ie640f2b0340637a5391fb17ba3c9e6422eaf306a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1541476
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60554}
2019-04-01 13:59:56 +00:00
Mythri A
173d234aae [heap] Don't access flags from concurrent marking visitor
It is not safe to access flags from concurrent marking visitor. We access
FLAG_flush_bytecode and FLAG_stress_flush_bytecode when visiting
SharedFunctionInfo and JSFunction to decide if we need to collect bytecode.
This cl adds a bytecode_flushing_mode which will be initialized when creating
the visitor. This way we can avoid accessing flags.

Bug: v8:9045
Change-Id: I84bf09ec2dd1543abad54bd87f8bf953830b89e7
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1541108
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Commit-Queue: Mythri Alle <mythria@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60553}
2019-04-01 13:29:02 +00:00
Mythri A
329ac1f8dc [Compile] Hold multiple bytecode-arrays to avoid flushing when optimizing in tests
We added %PrepareForOptimization, that holds the bytecode array strongly until the
function is optimized, to test using assertOptimized. This function expects that the
function is optimized before preparing the next function for optimization. In some
tests, we may not explicitly optimize a function because it got inlined into other
functions or if it was already optimized. This cl relaxes this condition and holds
onto multiple bytecode arrays.

Bug: v8:8801, v8:8395
Change-Id: Iebccc4a798aa3f35be9ee295eb3c4917da659c22
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1541055
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Mythri Alle <mythria@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60552}
2019-04-01 13:27:57 +00:00
Jaroslav Sevcik
13730cee5d [turbofan] Do not use low-level Stores for array init.
Drive-by: make sure that Allocate node consistently take intptr
input as size (as opposed to sometimes intptr, sometimes int32).

Bug: v8:8984
Change-Id: Ida56b9788cd11b470cc866f1b7df71f03ef0075f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1541037
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Jaroslav Sevcik <jarin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60551}
2019-04-01 12:26:07 +00:00
Georg Neis
4c35194d91 [turbofan] Fix bug in InferHasInPrototypeChain
- We didn't take stability dependencies on the inferred maps
  in case of kUnreliableReceiverMaps.
- We didn't take stability dependencies on the prototype chains.

Bug: v8:9041
Change-Id: I85418dbed219f51e7fb46c59a0cb9cbb9b499bc1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1541107
Commit-Queue: Georg Neis <neis@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60550}
2019-04-01 12:13:48 +00:00
Georg Neis
8d6da70857 [turbofan] Fix bug in JSStoreInArrayLiteral
It was missing a control output.

Bug: chromium:946889
Change-Id: I85f203fc6e27a60f0b86e0e2999dd798a5416dfc
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1547655
Commit-Queue: Georg Neis <neis@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60549}
2019-04-01 11:58:27 +00:00
Sigurd Schneider
6ac65cfbe1 [cctest] Add V8_EXPORT_PRIVATE for cctest (heap part)
Bug: v8:9020

Change-Id: I67e052b3a15ef88c21d056ca824d32da68cbbcfd
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1541049
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60548}
2019-04-01 11:53:09 +00:00
Sigurd Schneider
5e8eb540e5 Reland "[mjsunit] Add test that calls functions on prototypes with no arguments"
This is a reland of 5fbc5015de

Original change's description:
> [mjsunit] Add test that calls functions on prototypes with no arguments
>
> Change-Id: I0ede9f309b89cfa878a325e3f68327b1682d4ced
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1538123
> Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
> Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#60541}

TBR=jarin@chromium.org

Change-Id: I409e3dab72057bcba6c729f3b181fc29e8c861ad
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1547654
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60547}
2019-04-01 11:31:06 +00:00
Clemens Hammacher
c9abc31189 [base][cleanup] Using 'using' instead of 'typedef'
Even though both are allowed in the style guide, it recommends to use
'using', as its syntax is more consistent with the rest of C++.
This CL turns all typedefs in base code to 'using' declarations.

R=mlippautz@chromium.org

Bug: v8:8834
Change-Id: Ic5c3d7fa2e50938c6f43e9ff304dc2289fed1133
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1547650
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60546}
2019-04-01 11:29:56 +00:00
Michael Lippautz
b1a91ce543 heap: Consider embedder objects when linearly processing ephemerons
Without the proper check V8 would not delegate to the embedder (Blink) for
processing wrappable objects.

Bug: chromium:946941
Change-Id: I5aa3ca85e5113ab8d28a61eca6a5e0593c62f6a1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1547649
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60545}
2019-04-01 10:51:56 +00:00
Clemens Hammacher
afba794216 Revert "[mjsunit] Add test that calls functions on prototypes with no arguments"
This reverts commit 5fbc5015de.

Reason for revert: Fails on noi18n: https://ci.chromium.org/p/v8/builders/ci/V8%20Linux%20-%20noi18n%20-%20debug/26006

Original change's description:
> [mjsunit] Add test that calls functions on prototypes with no arguments
> 
> Change-Id: I0ede9f309b89cfa878a325e3f68327b1682d4ced
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1538123
> Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
> Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#60541}

TBR=jarin@chromium.org,sigurds@chromium.org

Change-Id: I4b9c747e6d73dd3ff01af81c3d1e6143dcab6ecd
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1547652
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60544}
2019-04-01 10:50:27 +00:00
Georg Neis
f74407028c Tighten types of Map::prototype and JSFunction::instance_prototype
... from Object to HeapObject, as they are never Smis.

Change-Id: I4cbe12985091ed1b1e94dab2803a977ae3e25224
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1541104
Commit-Queue: Georg Neis <neis@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60543}
2019-04-01 10:45:33 +00:00