Commit Graph

55187 Commits

Author SHA1 Message Date
Michael Starzinger
802a2d0385 [wasm] Support reference type globals in interpreter.
This adds support for handling reference types when loading/storing
globals. Support for imported mutable globals is still missing and will
be done in a follow-up change.

R=clemensh@chromium.org
TEST=mjsunit/wasm/exceptions-global-interpreter
BUG=v8:8091,v8:7581

Change-Id: I0d14919b1ce7f49c4a0541e3d6a99ee203cfb311
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1558086
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60695}
2019-04-09 09:50:48 +00:00
Jakob Gruber
787bd978da [snapshot] Simplify counter handling in mksnapshot
In mksnapshot, we only need to ensure we generate counter code in
(embedded) builtins, if needed. The counter function does not need to do
anything useful as long as it returns unique pointers for each counter,
and we don't need to dump counters.

Tbr: petermarshall@chromium.org
Change-Id: I94a53ef5193b89365948d0395e1908e6d3c6e396
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1549159
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60694}
2019-04-09 09:45:18 +00:00
Mike Stanton
84853ad1a1 [turbofan] Temporarily disable OSR for performance data
Just set the flag --use-osr to false by default.
If it's set to true on the command line, then it'll be on.

I'd like to get some performance metrics on various tests spread
throughout our performance bot infrastructure.

Change-Id: I1ebc33264505af080901e531dca625452880f81b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1558089
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Commit-Queue: Michael Stanton <mvstanton@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60693}
2019-04-09 09:22:28 +00:00
Benedikt Meurer
e5d8e588be [heap] Fix GC stats with lazy source positions.
In RecordVirtualBytecodeArrayDetails() check whether the BytecodeArray
has a source position table before accessing it, otherwise it will just
crash with --enable-lazy-source-positions.

Bug: v8:8510
Change-Id: I1250e89faf836a8d5976ca98c14b6b7314bacb98
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1559730
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Auto-Submit: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60692}
2019-04-09 06:43:18 +00:00
Milad Farazmand
b51404a8a1 PPC/S390: [typedarray] Make JSTypedArray::length authoritative.
Removing NumberToSize on PPC and S390.

Port ad44c258d7

Change-Id: Ic5d3132f1bb396f07a26399d2e3f6aca4689aa3f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1554227
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60691}
2019-04-09 06:20:28 +00:00
v8-ci-autoroll-builder
3e1f2fc9d2 Update V8 DEPS.
Rolling v8/build: 7db6cfc..2c7bf07

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/979fc35..6145021

Rolling v8/third_party/depot_tools: 0b62ed7..1fb0463

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

Change-Id: I769bbaa03b4d71b2aad521e64c48bafa12ef27fd
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1559195
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@{#60690}
2019-04-09 03:35:18 +00:00
Francis McCabe
37b4c060b2 Revert "Torquefy a few more types"
This reverts commit a1fdd521f6.

Reason for revert: <INSERT REASONING HERE>

Original change's description:
> Torquefy a few more types
> 
> WeakFixedArray, WeakArrayList, JSFinalizationGroup, JSFinalizationGroupCleanupIterator, WeakCell, JSWeakRef, BytecodeArray, SourcePositionWithFrameCache
> 
> Bug: v8:8952
> 
> Change-Id: I9708b08e11603977aeab7bce94b8233a41700ccb
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1504433
> Commit-Queue: Irina Yatsenko <irinayat@microsoft.com>
> Reviewed-by: Jakob Gruber <jgruber@chromium.org>
> Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#60688}

TBR=rmcilroy@chromium.org,jgruber@chromium.org,irinayat@microsoft.com

Change-Id: I55b3571763ea054e47d8bef855769e8ca9a1545d
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:8952
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1559210
Reviewed-by: Francis McCabe <fgm@chromium.org>
Commit-Queue: Francis McCabe <fgm@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60689}
2019-04-08 22:29:10 +00:00
Irina Yatsenko
a1fdd521f6 Torquefy a few more types
WeakFixedArray, WeakArrayList, JSFinalizationGroup, JSFinalizationGroupCleanupIterator, WeakCell, JSWeakRef, BytecodeArray, SourcePositionWithFrameCache

Bug: v8:8952

Change-Id: I9708b08e11603977aeab7bce94b8233a41700ccb
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1504433
Commit-Queue: Irina Yatsenko <irinayat@microsoft.com>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60688}
2019-04-08 21:12:37 +00:00
Tom Anderson
30b86eed74 Fix Win/cross/x64 builds
See the changes in BUILD.gn for an explanation of why a new flag is necessary.
It's likely that current usages of V8_TARGET_OS_* and V8_TARGET_ARCH_* also need
to change, but this is good enough for now to ensure both Win/cross/x86 and
Win/cross/x64 build.

BUG=chromium:945659
R=machenbach,thakis
TBR=jgruber

Change-Id: Ie2765db91a1c0d8c72ccf42c9d7fece792d9b252
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1542500
Commit-Queue: Thomas Anderson <thomasanderson@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Nico Weber <thakis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60687}
2019-04-08 20:11:37 +00:00
Benedikt Meurer
8504b79fef [runtime] Make test-field-type-tracking do the right thing.
This changes the existing cctest/test-field-type-tracking tests to
use actual Code objects and proper code dependencies to test that the
runtime actually does the right thing (aka deoptimizes the Code objects
correctly). Before it was using the CompilationDependencies, which as
of now no longer check whether the runtime actually deoptimized or not.

This is a prerequisite for changing the way we handle field representation
changes, specifically going from Smi or HeapObject to Tagged.

Bug: v8:8749, v8:8865
Change-Id: I260294217550cee2b42f7ba7e9c92bf0d1db0b8c
Doc: http://bit.ly/v8-in-place-field-representation-changes
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1557149
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Auto-Submit: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60686}
2019-04-08 20:08:57 +00:00
Sigurd Schneider
6d0c8a2bd4 Add more V8_EXPORT_PRIVATE
Change-Id: I5fda56fb53fb5a7daa45b08ad18848e849ef7128
Bug: v8:9020
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1557145
Reviewed-by: Georg Neis <neis@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60685}
2019-04-08 16:29:37 +00:00
Michael Starzinger
0bed5887bf [wasm] Support reference types on interpreter entry.
This adds preliminary support for references types as argument or return
values to functions that are redirected to the interpreter. The current
interpreter entry stub remains unchanged, using one buffer area that is
hidden from the GC. The corresponding {Runtime_WasmRunInterpreter} now
correctly boxes/un-boxes reference types into handles. This switch to a
handlified representation happens before any method that potentially
triggers a GC is called.

R=clemensh@chromium.org
TEST=mjsunit/wasm/exceptions-anyref-interpreter
BUG=v8:8091,v8:7581

Change-Id: I41c766ed5ac877042d5964e72f3fd7df390c4e98
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1557147
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60684}
2019-04-08 15:48:07 +00:00
Benedikt Meurer
f8e3b1d612 [heap] Various improvements to GC stats.
This CL contains a bunch of different improvements to the existing
object stats, namely:

 - Introduce DEPRECATED_DESCRIPTOR_ARRAY_TYPE virtual instance type to
   also estimate the memory overhead of DescriptorArrays for deprecated
   Maps.
 - Do proper over-allocation computating for inobject fields in JSObjects.
 - Introduce OBJECT_PROPERTY_ARRAY_TYPE virtual instance type and properly
   compute over-allocation for PropertyArrays
 - Compute over-allocation for JSObject/JSArray elements properly.
 - Correctly report JSFunction and JSCollection like the other
   JSObjects, specifically report over-allocation properly for the
   instances itself and for the elements/properties backing stores.
 - Implement correct over-allocation computation for hash tables in
   ObjectStatsCollectorImpl::RecordHashTableVirtualObjectStats().

Bug: v8:7266
Change-Id: I9cadd703266dc90911a8e7420c3b00dcee82b06d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1557139
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Auto-Submit: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60683}
2019-04-08 15:37:07 +00:00
Seth Brenith
453e86df6a add d8 --help text explaining how to use options
Flag syntax is explained in a comment in flags.h, but we can make d8
easier to learn for new people if we also expose that explanation in the
--help text.

Change-Id: I7fd9ad0e545c2d9110119c0283bb14d665bcf19e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1555061
Reviewed-by: Georg Neis <neis@chromium.org>
Commit-Queue: Seth Brenith <seth.brenith@microsoft.com>
Cr-Commit-Position: refs/heads/master@{#60682}
2019-04-08 15:19:57 +00:00
Benedikt Meurer
5758209026 [turbofan] Fix incorrect lowering of CheckNonEmptyString.
For CheckNonEmptyString we not only need to rule out that the input is
not the empty string, but also make sure that the input is actually a
string, hence we need to do a proper instance type check in the general
case.

Bug: chromium:949996, chromium:947949, v8:8834, v8:8931, v8:8939, v8:8951
Change-Id: Icc260d735d19337bba4bb71570a6c6385e47c310
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1557146
Auto-Submit: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Jaroslav Sevcik <jarin@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60681}
2019-04-08 14:15:16 +00:00
Maya Lekova
5133bbf68e [turbofan] Brokerize JSInliningHeuristic
The JSInliningHeuristic is now completely heap-access free. JSInliner
still includes Allow* guards and will be brokerized as a follow-up CL.

R=neis@chromium.org

Bug: v8:7790
Change-Id: I6df5d8515bb8bd8d512e8442e4f4dba9ebe9dd2e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1528437
Reviewed-by: Georg Neis <neis@chromium.org>
Commit-Queue: Maya Lekova <mslekova@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60680}
2019-04-08 13:47:36 +00:00
Sigurd Schneider
93aeb58274 [torque] Add V8_EXPORT_PRIVATE to test assembler
Change-Id: Ib3affef6a02a017ade2468dff58c58320e1cde42
Bug: v8:9020
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1557144
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60679}
2019-04-08 12:24:06 +00:00
Dan Elphick
f7f24659c3 [api] Advance many methods to V8_DEPRECATED
Marks following previously annotated V8_DEPRECATE_SOON methods as
V8_DEPRECATED:
  Value::ToBoolean
  Value::ToNumber
  Value::ToString
  Value::ToObject
  Value::ToInteger
  Value::ToInt32
  String::NewFromTwoByte
  String::NewExternal
  Date::DateTimeConfigurationChangeNotification

Bug: v8:7279, v8:7281
Change-Id: I54778ac42bd43afd2fa4f08ffc9f55e71fa43775
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1552788
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Dan Elphick <delphick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60678}
2019-04-08 10:42:51 +00:00
Sigurd Schneider
f086b072e7 [tools] Use ThreadPoolExecutor with reasonable job count default
Change-Id: I90be28728842a1ab5a4d4d674298e71f70043e80
Notry: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1549163
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60677}
2019-04-08 10:41:46 +00:00
Sigurd Schneider
40fe78e67a [tools] Parse ninja deps to obtain header information
Change-Id: I51e32bc344c80d67a23d33039fda49bb9620a78f
Notry: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1549165
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60676}
2019-04-08 10:35:07 +00:00
Sigurd Schneider
28a5e1c97e [heap] Keep DroppableApiWrappers alive if used as WeakMap key
This ensures that ApiObjects in V8 are not dropped if they are
currently used as WeakCollection keys. As proxy to determine key
status we use the presence of the identity hash on the object.

R=ulan@chromium.org

Bug: v8:8557, chromium:949244
Change-Id: Ifa0e24be44431a0200fd6a1d9898cd366b940bd5
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1557143
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60675}
2019-04-08 10:14:07 +00:00
Georg Neis
3b2aa862fe [turbofan] Remove a redundant condition
R=bmeurer@chromium.org

Change-Id: Ibfe4a0f12eedd2b4d6a5614e99f2076c026aea24
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1557141
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60674}
2019-04-08 10:02:36 +00:00
Pierre Langlois
2ead93fe27 [write-barrier] Generalise write-barrier native counter.
We would only increment write barrier counters from the the MacroAssembler's
RecordWrite method which is only used in limited cases.  Instead, we should
increment it inside the RecordWrite stub, this way we catch all uses, including
WASM.

Also, we had a static counter aimed at telling us how many barriers exist in
generated code, as opposed to how many are executed. This counter was not
functional since the compiler isn't aware of counters at the moment. Let's just
remove it to avoid confusion.

Change-Id: I6b173ab858c8984ef03ede225afdc999ba82b5c9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1524483
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Commit-Queue: Pierre Langlois <pierre.langlois@arm.com>
Cr-Commit-Position: refs/heads/master@{#60673}
2019-04-08 09:54:06 +00:00
Peter Marshall
8a23a3a290 [cpu-profiler] Clean up some includes
Remove unused includes and add includes that were indirect.

Remove UnboundQueue which was not used anywhere.

Change-Id: If47faac45fc9c16a27453ecabed927ea00df3045
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1557136
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@{#60672}
2019-04-08 09:48:16 +00:00
Michael Achenbach
c6574e4a93 [test] Skip test too slow for gc fuzzing
The test is so slow that it might have caused the test driver to hang after the
normal hard timeout.

TBR=sergiyb@chromium.org
NOTRY=true

Bug: v8:9098
Change-Id: I28ad1551f66fab989494d7a3b015d661c5ab6efb
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1557142
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60671}
2019-04-08 09:39:26 +00:00
v8-ci-autoroll-builder
3e14c17791 Update V8 DEPS.
Rolling v8/build: 9baa370..7db6cfc

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

Change-Id: I11f6f1b06a50204af8a01c22324a187536697e6f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1557341
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@{#60670}
2019-04-08 03:40:44 +00:00
Michael Achenbach
9571654d2d [test] Debug print on test runner timeout
TBR=tmrts@chromium.org
NOTRY=true

Bug: v8:9098
Change-Id: I69d9cd21ad70357a77b45e97393949f1cfbab529
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1557137
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60669}
2019-04-07 14:53:48 +00:00
v8-ci-autoroll-builder
ce341cbe0c Update V8 DEPS.
Rolling v8/build: 25794eb..9baa370

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/78cdfa0..979fc35

Rolling v8/third_party/depot_tools: 9198ef8..0b62ed7

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

Change-Id: Iadb495d5260033a5afef74dcbe4704f526ade325
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1556580
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@{#60668}
2019-04-07 03:37:09 +00:00
v8-ci-autoroll-builder
6dc88c191f Update V8 DEPS.
Rolling v8/build: 96d2ee3..25794eb

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/63e0762..78cdfa0

Rolling v8/third_party/depot_tools: b8268ca..9198ef8

Rolling v8/tools/clang: 25ef1f6..f822215

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

Change-Id: Ie655b9676aec2df3d2226c73ad7e36fcca13ebaf
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1556574
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@{#60667}
2019-04-06 03:50:34 +00:00
Deepti Gandluri
8b13f35cd5 [wasm] Remove IsGrowable bit field
Change-Id: Ic00f8e0ac9ef621354b74ffa7c83a84301c46222
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1555435
Reviewed-by: Ben Smith <binji@chromium.org>
Commit-Queue: Deepti Gandluri <gdeepti@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60666}
2019-04-06 00:16:04 +00:00
Pierre Langlois
8eddfa8bcc [heap] Correctly report code LO space size with --trace-gc-verbose.
The --trace-gc-verbose flag was mistakenly reporting the generic LO space size
in place of the *code* LO space size.

Change-Id: Iddb83b540b0e0a201aa358649d91ef606721e0be
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1554693
Commit-Queue: Pierre Langlois <pierre.langlois@arm.com>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60665}
2019-04-05 22:34:44 +00:00
Ben Smith
9010424ff5 Reland "[wasm] Implement table.init for interpreter"
This is a reland of 63608968b6

The previous CL failed on Windows, but it was a general bug. The
dropped_elem_segments was not being set on the instance properly in
cctests, so`table.init` instructions would fail by reading uninitialized
data.

I took this opportunity to also add an implementation of
`elem.drop` in the interpreter, and ported the JS tests for those too.

Original change's description:
> [wasm] Implement table.init for interpreter
>
> This also fixes CheckCallViaJS when a trap occurs. In that case, the
> trap callback is called instead of an exception being thrown, so if it
> isn't handled, a bogus result will be returned instead.
>
> Bug: v8:8965
> Change-Id: I560e89f353756df23c062fb8c9484d9971c19253
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1539078
> Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
> Commit-Queue: Ben Smith <binji@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#60473}

Bug: v8:8965
Change-Id: Ia547d9530b7ca67fde5bd94539f49153b796e82d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1547142
Commit-Queue: Ben Smith <binji@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60664}
2019-04-05 20:09:33 +00:00
Sergiy Belozorov
ee98704a5b [tools] Whitespace CL
Testing V8 CQ after https://crrev.com/i/1139317 and https://crrev.com/i/1141184,
which are changing how host_class dimension is computed and set and how xenial
bots are provisioned.

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

No-Tree-Checks: true
Change-Id: Id7fcda589764b7048f19df97b3bea6e2ad7c97be
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1554694
Commit-Queue: Sergiy Belozorov <sergiyb@chromium.org>
Reviewed-by: Sergiy Belozorov <sergiyb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60663}
2019-04-05 19:47:53 +00:00
Frank Tang
f3957c97a7 [Int] Allow 'narrow' for all types in ListFormat
Bug: v8:9040
Change-Id: Ie1c5ab982aef844c704dba5bb9a0e945ce220545
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1549435
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60662}
2019-04-05 18:05:00 +00:00
Vadim Gorbachev
16b6266649 Python2 compatibility: fix flake8 report F632 F821
use '!=' instead of 'is not' with str
FileNotFoundError isn't exist in python2.7, use IOError instead.


Bug: chromium:948812
Change-Id: I241ff8a9321d612f2371a2a2e2deae948fa180e5
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1549168
Commit-Queue: Sergiy Belozorov <sergiyb@chromium.org>
Reviewed-by: Sergiy Belozorov <sergiyb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60661}
2019-04-05 16:24:19 +00:00
Vadim Gorbachev
7cf4add6ca Python3 compatibility: use open() instead of file()
For details see: https://python-future.org/compatible_idioms.html#file


Bug: chromium:948824
Change-Id: Ib06568963073621bd8edf2c8edb89bf8253d3bcb
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1549169
Reviewed-by: Sergiy Belozorov <sergiyb@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Sergiy Belozorov <sergiyb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60660}
2019-04-05 16:22:20 +00:00
Simon Zünd
d88f4d33c2 [cleanup] Remove unused field 'id' from StackFrameInfo class
As part of one of the stack trace refactorings, this field moved from
StackFrameInfo to the StackTraceFrame class, but was not properly
removed.

R=petermarshall@chromium.org

Bug: v8:8742
Change-Id: I18b9bd7650eed0f5bdb0823da9fdefb6afa3491e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1550800
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60659}
2019-04-05 15:27:06 +00:00
Michael Starzinger
77d05811ad [wasm] Fix interpreter stack height for throwing opcode.
This makes sure that the implicit operand stack slot used for passing an
exception from the throw-site to the catch-site is counted against the
maximum stack height.

R=clemensh@chromium.org
TEST=mjsunit/wasm/exceptions-rethrow-interpreter
BUG=v8:8091

Change-Id: I7e8f47ba4662eb273792e7508207f67588264a2f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1554683
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60658}
2019-04-05 14:04:56 +00:00
Georg Neis
d97bc8db79 [turbofan] Add a regression test
Bug: v8:9087
Change-Id: Ibc21d7e5619e4e6a0edc98cb0bd12e67ab2f6643
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1554690
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60657}
2019-04-05 13:57:56 +00:00
Michael Achenbach
ff0b9dd30e [test] Expose variant flags in json output
For standard test failures, the variant name is enough to deduce the
full command line of the test. This is used to create the flako
command line on the infra side.

Test failures from numfuzz have additional variant_flags, calculated
by the fuzzer, which don't match a variant name. Exposing those in
the test results will enable printing a proper flako command line
on infra side for numfuzz cases.

Bug: v8:8971
Change-Id: Ie47d42a0b34037da458b474f2a9ab38f1a5d238a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1554689
Reviewed-by: Sergiy Belozorov <sergiyb@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60656}
2019-04-05 13:52:09 +00:00
Michael Starzinger
165eb80115 [wasm] Extend interpreter exception support to Simd128.
R=clemensh@chromium.org
TEST=mjsunit/wasm/exceptions-simd-interpreter
BUG=v8:8091

Change-Id: Id0b5da98bbfb91c7a5a878681d7fffe81233284f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1552794
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60655}
2019-04-05 13:51:06 +00:00
Benedikt Meurer
818b50cbf2 [heap] Also mark DescriptorArrays for prototypes in object stats.
This introduces a new PROTOTYPE_DESCRIPTOR_ARRAY_TYPE, which is used to
be able to distinguish DescriptorArrays for prototypes from regular
ones. This is primarily useful for the live objects, since for dead
DescriptorArrays we will likely not be able to figure out whether they
belong to a prototype Map, unless they die together.

Bug: v8:7266
Change-Id: I4b8e0008cc8bae607778151b7c18d30f4efba88d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1554687
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60654}
2019-04-05 13:32:36 +00:00
Clemens Hammacher
c61ac3d2e6 Reland "[wasm] Use work-stealing queues for background compilation"
This is a reland of d746be9ceb

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}

Bug: v8:8916
Change-Id: Ic0cbad0ddc31be24715c5490b9ec71a39186fd3b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1549172
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60653}
2019-04-05 13:05:56 +00:00
Anna Henningsen
fd2b56f7c8 [objects] Fix TestElementsIntegrityLevel for typed arrays
Typed arrays with elements cannot be frozen, but this function
previously would have falsely reported that they are after
an `Object.freeze()` call. Since the latter bails out when
the object is already frozen, the effect was that when calling
`Object.freeze()` on a typed array more than once, the first call
would throw and subsequent ones would not.

Change-Id: I75e59f51ebb94797cdf39bac4ec4c25c547e70a3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1552781
Commit-Queue: Peter Marshall <petermarshall@chromium.org>
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60652}
2019-04-05 13:04:16 +00:00
Benedikt Meurer
e5fd910207 [heap] Add detailed object stats for maps.
This introduces new virtual instance types to further diagnose what's
going on in MapSpace, namely:

 - MAP_ABANDONED_PROTOTYPE_TYPE includes all the abandoned (fast-mode)
   prototype maps.
 - MAP_DEPRECATED_TYPE includes all the deprecated (fast-mode) maps.
 - MAP_DICTIONARY_TYPE includes all the dictionary-mode maps.
 - MAP_PROTOTYPE_DICTIONARY_TYPE includes all the prototype maps in
   dictionary-mode.
 - MAP_PROTOTYPE_TYPE includes all the prototype maps in fast-mode.
 - MAP_STABLE_TYPE includes all the (fast-mode) stable (leaf) maps.

Those maps who don't fall into any of the buckets above are categorized
as MAP_TYPE (as before).

The naming was chosen like this to make it possible to filter for the
relevant maps in the object stats via 'MAP_.*_TYPE'.

Bug: v8:7266
Change-Id: I233734e96a390ddb391bfff8a34a8fec842d1f7f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1554685
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60651}
2019-04-05 13:01:53 +00:00
Michael Starzinger
2b7fdbfc75 [wasm] Fix lifetime of reference values on interpreter stack.
This ensures the lifetime of reference values on the simulated operand
stack of the interpreter is coupled to a lifetime of the {ThreadImpl}.
We no longer directly store reference values on the stack, but maintain
a separate "reference stack" on the GC'ed heap. This will ensure the GC
traces such references properly.

The new {StackValue} safety wrapper makes sure all use-sites that access
the operand stack properly convert to/from handles when dealing with
reference values.

R=clemensh@chromium.org
TEST=mjsunit/wasm/exceptions-interpreter
BUG=v8:8091,v8:7581

Change-Id: I8c05f2d945a6def943b89be0cfca538a73df8855
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1552791
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60650}
2019-04-05 12:47:56 +00:00
tzik
3775e3a2aa Expose v8::Context::DetachGlobal to d8
This expose v8::Context::DetachGlobal() as Realm.detachGlobal() in d8,
so that we can test API behaviors on Blink's detached iframes.

Change-Id: I4de1dd1a20d5862aba709e36d1d6afa9b221df6c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1554322
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Taiju Tsuiki <tzik@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60649}
2019-04-05 12:07:05 +00:00
Benedikt Meurer
ad44c258d7 [typedarray] Make JSTypedArray::length authoritative.
This is the first step towards full huge typed array support in V8.
Before this change, the JSTypedArray::length and the elements backing
store length (FixedTypedArrayBase::length) were used more or less
interchangeably to determine the number of elements in a JSTypedArray.

With this change we disentangle these two lengths, and instead make
JSTypedArray::length authoritative. For on-heap typed arrays, the
FixedTypedArrayBase::length will remain the number of elements in the
backing store, but for the off-heap typed arrays, this length will be
set to 0 (matching the fact that the FixedTypedArrayBase instance does
not contain any elements itself).

This also unifies the JSTypedArray::set_/length() and length_value()
methods to only have JSTypedArray::set_/length() which returns/takes
size_t values. Currently this still requires the values to be in Smi
range, but later we will extend this to allow arbitrary size_t values
(in the safe integer range).

Bug: v8:4153, v8:7881
Change-Id: Iff9089130bb31fa9e08e0cf913e7ab52c3dbf107
Cq-Include-Trybots: luci.chromium.try:linux-blink-rel
Doc: http://doc/1Z-wM2qwvAuxH46e9ivtkYvKzzwYZg8ymm0x0wJaomow
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1543729
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Reviewed-by: Ben Titzer <titzer@chromium.org>
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60648}
2019-04-05 11:47:25 +00:00
Frank Tang
62be40f7cd Roll ICU to ICU 64.1 + Chromium patches in v8
See https://chromium.googlesource.com/chromium/deps/icu/+/1552155
for changes.

Correct test expectation based on icu64 changes.

CL of Rolling the same ICU hash to DEPS in chromium/src Repo is in
https://chromium-review.googlesource.com/c/chromium/src/+/1536613

Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_layout_ng

Bug: chromium:943348, v8:9052
Change-Id: I3a4579ba745f7f6a621b2059de325bea7a2472a1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1536559
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60647}
2019-04-05 11:23:00 +00:00
Frederik Gossen
fa7c0ed288 [wasm-hints] Resolve Performance Problem
Locks for compilation state callbacks and for the native module are
again taken one after the other. As a consequence, publishing compiled
Wasm code again happens in parallel. Compile times are now comparable to
before lazy hints were enabled.

Bug: chromium:949050
Change-Id: I45c52254d046de080938bd131fd3ed8116660bef
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1552787
Commit-Queue: Frederik Gossen <frgossen@google.com>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60646}
2019-04-05 11:07:00 +00:00