Commit Graph

57462 Commits

Author SHA1 Message Date
Sathya Gunasekaran
dabbe5ee24 [WeakRefs] Make FinalizationGroup#register throw if token isn't an object
Bug: v8:8179
Change-Id: I6a4d7e899076fadf848c187f9f4d86a676455215
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1714865
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Commit-Queue: Sathya Gunasekaran <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62870}
2019-07-23 12:38:55 +00:00
Sathya Gunasekaran
f0c5edcdeb [WeakRefs] Install native context slot index on constructors
This will be used when the [[NewTarget]] is from another realm and
it's prototype is not an object.

Bug: v8:8179
Change-Id: Ic69db3cd95753c77ef6f1e677e71e1e20da0a6c9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1714864
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Sathya Gunasekaran <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62869}
2019-07-23 12:29:46 +00:00
Sathya Gunasekaran
2d4e4fdc1c [WeakRefs] Allow WeakRef and FinalizationGroups to be subclassable
Bug: v8:9433, v8:8179
Change-Id: I10a643cac348a5a76b137427e5e0565db81e3dbb
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1714649
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Sathya Gunasekaran <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62868}
2019-07-23 12:27:15 +00:00
Ben L. Titzer
845b47a1d2 Revert "Reland "Reland "[arraybuffer] Rearchitect backing store ownership"""
This reverts commit 306cf40344.

Reason for revert: performance regressions / too near branch point

TBR=mslekova@chromium.org
BUG=v8:9380

Change-Id: If77630b73eafbf1190c823199fe2a34361da303f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1714867
Reviewed-by: Ben Titzer <titzer@chromium.org>
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Commit-Queue: Ben Titzer <titzer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62867}
2019-07-23 12:25:16 +00:00
Ben L. Titzer
9f1a7d3aa0 [arraybuffer] Use relaxed load/store for bitfield
A benign datarace can occur between the array buffer tracker and
using an arraybuffer as an asm.js memory. The former reads the
{is_shared} bit, which should never change, and the latter writes
the {is_asmjs_memory} bit, but no other bits. Since these bits are
packed into a single word, TSAN reports a race.

R=ulan@chromium.org
BUG=v8:9531

Change-Id: Icceff211368e13794b6678b5fd7748fb5b3235bf
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1714647
Commit-Queue: Ben Titzer <titzer@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62866}
2019-07-23 10:12:26 +00:00
Sathya Gunasekaran
b6477a7ff9 [WeakRefs] Fix FinalizationGroup.prototype.{register, cleanupSome}.length
Bug: v8:8179
Change-Id: I4db5412b5ed60aa100198628bfa09903c89a5c0d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1710675
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Sathya Gunasekaran <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62865}
2019-07-23 09:21:34 +00:00
Mythri A
2c95484ae7 Reland [cleanup][test] split es6/classes.js into different tests
Reland after splitting large classes further.

es6/classes.js is large and causes timeouts and OOM on some of the
configurations.

Bug: v8:9246
Change-Id: I51952447eb6a6b46d78410d5d3798292f5a8d87d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1706061
Commit-Queue: Mythri Alle <mythria@chromium.org>
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62864}
2019-07-23 09:13:26 +00:00
Ulan Degenbaev
1c2141aea5 [runtime] Read and write layout descriptor words with atomics
This fixes benign data races reported by TSAN when a shared layout
descriptor is updated at the end.

Change-Id: I76662cb5fc2b8ab1728e3d1bf42a55a107442eed
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1709422
Reviewed-by: Ben Titzer <titzer@chromium.org>
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62863}
2019-07-23 09:10:44 +00:00
Maya Lekova
b9d3651e3c [turbofan] Fix wrong expectation when serializing API calls
Bug: v8:7790, chromium:985660
Change-Id: I4e931a4a23421982f05e16c8ffa2ccc68fb34b63
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1709423
Commit-Queue: Maya Lekova <mslekova@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Reviewed-by: Michael Stanton <mvstanton@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62862}
2019-07-23 08:54:54 +00:00
Pierre Langlois
f641d987a4 [ptr-compr][arm64] Use correct immediate range for kArchStoreWithBarrier.
With compressed pointers, `kArchStoreWithBarrier` is a 32-bit store instead of
64-bit, and this means the index has a differerent immediate range.

Bug: v8:7703
Change-Id: If61c8544b0da87ba2779ba2c1a6963b52e3e5d9a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1710674
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62861}
2019-07-23 07:57:14 +00:00
Michael Starzinger
953f373265 [wasm] Access "undefined" and "null" from the root set.
This removes two shortcuts ("UndefinedValue" and "NullValue") from the
instance object and instead loads those values via the root set which is
also referenced from the instance. It makes instance objects smaller.

Note that this also contains an optimization to make sure "undefined" is
only loaded once and then re-used within a single wrapper.

R=clemensh@chromium.org

Change-Id: I421f202230e91790fa9c8263770b4e4bbd3c47bd
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1710670
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62860}
2019-07-23 07:38:44 +00:00
Yang Qin
c3e7eb19e8 [s390]tm family test: change a label name
Change-Id: I43f342c3552e195fe5d96b07c93be7bfef5a708a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1713006
Reviewed-by: Junliang Yan <jyan@ca.ibm.com>
Commit-Queue: Junliang Yan <jyan@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#62859}
2019-07-22 20:05:10 +00:00
Debrian Figueroa
15103f0933 Add json output arg to mg gen and analyze.
Allows writing of output error to json output path specified.

Bug: chromium:985959
Change-Id: I4bbc94dbc8b0c21f1ce75e722c69fab18eeb1f01
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1710205
Commit-Queue: Debrian Figueroa <debrian@google.com>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62858}
2019-07-22 19:33:20 +00:00
Deepti Gandluri
a942ed2762 Add DCHECKS for SSE instructions
Change-Id: I27f960268ae3aaf61ae8d7903e1b3b057e5d5ac8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1710158
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Deepti Gandluri <gdeepti@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62857}
2019-07-22 18:55:10 +00:00
Frank Tang
76f789c334 [Intl] Fix crash bug of formatToParts and -0
1. Fix formatToParts show "plusSign" for -0 by using signbit instead of < 0
2. Fix crash bug of formatToParts while notation is either "engineering" or
   "scientific".

Bug: v8:9513
Change-Id: I36b0b995c157dc642b9c201694d0ac0bb0396988
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1710148
Commit-Queue: Frank Tang <ftang@chromium.org>
Reviewed-by: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62856}
2019-07-22 17:28:20 +00:00
Adam Klein
40624b5b41 [runtime] Always throw when asked to make an array's length configurable
Previously, if the new length was less than the current length, we ignored
the "configurable" value and set the length as requested. We already threw
if the new length was greater than or equal to the current length.

New behavior matches the spec and other implementations.

Bug: v8:9460
Change-Id: Idb92fd121bdaa707f6abd2d2082628bbf3541b83
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1709336
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62855}
2019-07-22 17:16:10 +00:00
Ng Zhi An
c172ab13b6 [wasm simd] Refactor F64x2 Neg and Abs to reuse existing SSE codegen
Bug: v8:8460
Change-Id: I1d05e8a832d1b70f07c6782669c7b07764c7341d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1708454
Reviewed-by: Bill Budge <bbudge@chromium.org>
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62854}
2019-07-22 17:14:00 +00:00
Milad Farazmand
99169dbfc3 PPC: [wasm][tests] Add proposal tests to the wasm spec tests
Port cd34523b9b

Original Commit Message:

    With this CL we add proposal tests to the wasm-spec-tests. For this I
    extended the update-wasm-spec-tests.sh script. Additionally to
    generating the spec tests it does the following:

    For each proposal it identifies those tests that are different to the
    spec tests, and then copies those tests also to the wasm-spec-tests
    directory.

    Additionally I adjusted the test runner of the wasm spec test to
    run the proposal tests with the correct flags.

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

Change-Id: Ia976d8017cacb61b46fe076c39ade6bc6137b7e9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1708989
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Milad Farazmand <miladfar@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#62853}
2019-07-22 16:54:20 +00:00
Yang Qin
dffa5284b6 s390: add if statement to check if SIMD instructions are available
Added if statements to check if VECTOR_FACILITY are supported in order to avoid “illegal instruction” errors during SIMD tests on old s390 machines.

Change-Id: I1ab841db02e6c47de54d4a15b973e5366f88e117
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1704937
Reviewed-by: Junliang Yan <jyan@ca.ibm.com>
Commit-Queue: Junliang Yan <jyan@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#62852}
2019-07-22 14:37:56 +00:00
Yang Qin
479e526735 s390: cleanup TM family instructions
Change-Id: I3541750049c4a17a294f819f278d69943565a2a0
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1707933
Reviewed-by: Junliang Yan <jyan@ca.ibm.com>
Commit-Queue: Junliang Yan <jyan@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#62851}
2019-07-22 14:31:16 +00:00
Milad Farazmand
980f09028a PPC/s390: [wasm] Implement "atomic.fence" operator.
Port 4ca8b4dd67

Original Commit Message:

    This adds decoding and compilation of the "atomic.fence" operator, which
    is intended to preserve the synchronization guarantees of higher-level
    languages.

    Unlike other atomic operators, it does not target a particular linear
    memory. It may occur in modules which declare no memory, or a non-shared
    memory, without causing a validation error.

    See proposal: https://github.com/WebAssembly/threads/pull/141
    See discussion: https://github.com/WebAssembly/threads/issues/140

R=mstarzinger@chromium.org, joransiu@ca.ibm.com, jyan@ca.ibm.com, michael_dawson@ca.ibm.com
BUG=v8:9452
LOG=N

Change-Id: Ib8ad24e65154d7555a47e537f81110be47f4d4de
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1710620
Commit-Queue: Milad Farazmand <miladfar@ca.ibm.com>
Reviewed-by: Junliang Yan <jyan@ca.ibm.com>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62850}
2019-07-22 14:03:06 +00:00
Clemens Hammacher
0796d1da7d [wasm] Clean up jump table offset computation
Instead of computing the jump table slot, and subtracting the start of
the jump table, we can just compute the offset directly. This method is
then used to compute jump table slots.

R=titzer@chromium.org

Change-Id: I634e5ee71a0d2e9d0d2db0ea373f833df91fba8e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1709419
Reviewed-by: Ben Titzer <titzer@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62849}
2019-07-22 13:57:26 +00:00
Ben L. Titzer
fc8e9b82a4 [mjsunit] Disable shared-memory-worker-gc-stress on TSAN
TBR=clemensh@chromium.org

No-Try: true
Change-Id: I993955063432cceedc6ef6fc1a999c8f2256279f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1710668
Reviewed-by: Ben Titzer <titzer@chromium.org>
Commit-Queue: Ben Titzer <titzer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62848}
2019-07-22 11:07:16 +00:00
Ben L. Titzer
306cf40344 Reland "Reland "[arraybuffer] Rearchitect backing store ownership""
This is a reland of bc33f5aeba

Original change's description:
> Reland "[arraybuffer] Rearchitect backing store ownership"
> 
> This is a reland of 31cd5d83d3
> 
> Original change's description:
> > [arraybuffer] Rearchitect backing store ownership
> > 
> > This CL completely rearchitects the ownership of array buffer backing stores,
> > consolidating ownership into a {BackingStore} C++ object that is tracked
> > throughout V8 using unique_ptr and shared_ptr where appropriate.
> > 
> > Overall, lifetime management is simpler and more explicit. The numerous
> > ways that array buffers were initialized have been streamlined to one
> > Attach() method on JSArrayBuffer. The array buffer tracker in the
> > GC implementation now manages std::shared_ptr<BackingStore> pointers,
> > and the construction and destruction of the BackingStore object itself
> > handles the underlying page or embedder-allocated memory.
> > 
> > The embedder API remains unchanged for now. We use the
> > v8::ArrayBuffer::Contents struct to hide an additional shared_ptr to
> > keep the backing store alive properly, even in the case of aliases
> > from live heap objects. Thus the embedder has a lower chance of making
> > a mistake. Long-term, we should move the embedder to a model where they
> > manage backing stores using shared_ptr to an opaque backing store object.
> > 
> > R=mlippautz@chromium.org
> > BUG=v8:9380,v8:9221
> > 
> > Change-Id: I48fae5ac85dcf6172a83f252439e77e7c1a16ccd
> > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1584323
> > Commit-Queue: Ben Titzer <titzer@chromium.org>
> > Reviewed-by: Ben Titzer <titzer@chromium.org>
> > Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
> > Reviewed-by: Yang Guo <yangguo@chromium.org>
> > Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
> > Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
> > Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
> > Cr-Commit-Position: refs/heads/master@{#62572}
> 
> Bug: v8:9380, v8:9221
> Change-Id: If3f72967a8ebeb067c0edcfc16ed631e36829dbc
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1691906
> Commit-Queue: Ben Titzer <titzer@chromium.org>
> Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
> Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
> Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
> Reviewed-by: Yang Guo <yangguo@chromium.org>
> Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#62809}

Bug: v8:9380, v8:9221
Change-Id: I9a2525753ae2424108d074fa81df5f25d945c824
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1709409
Commit-Queue: Ben Titzer <titzer@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62847}
2019-07-22 10:33:26 +00:00
Mike Stanton
667728786b [TurboFan] Exercise more care around calls to Context::previous()
In serialization for concurrent TurboFan, we need to fully consume
context chains to the root. This interferes with existing protections,
firing the assert IsBootstrappingOrValidParentContext if the chain
is queried to root. Instead, use unchecked_previous().

Bug: v8:7790
Change-Id: Id69885570fb88486c2f292023509bb02413a8ac5
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1710666
Reviewed-by: Georg Neis <neis@chromium.org>
Commit-Queue: Michael Stanton <mvstanton@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62846}
2019-07-22 09:32:26 +00:00
Darius Mercadier
72fed644fa [heap] Refactor/fix freelist implementations
A few methods (Free, TryFindInNode, SearchForNodeInList) were
identical in each FreeList implementation, yet redefined each
time. They are now defined in the class FreeList, and inherited by
subclasses (which can override them if needed).

Additionnaly, GuaranteedAllocatable in FreeListFast and FreeListMany
were wrong in their respective last case; they are now fixed.

Consequently to fixing FreeListMany::GuaranteedAllocatable,
FreeListMany was slightly reworked:
  - The last freelist is now fully searched during allocation (rather
    than just looking at its first element like for the other
    freelists).

Bug: v8:9329
Change-Id: Ic86ade3b1acaa2ca91cce17bd6822ec12aa594d9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1706478
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Darius Mercadier <dmercadier@google.com>
Cr-Commit-Position: refs/heads/master@{#62845}
2019-07-22 09:21:36 +00:00
Michael Achenbach
7da816ee86 [test] Add bytecode-expectation test
This adds a simple test calling:
generate-bytecode-expectations --check-baseline

It's added on one CQ and one CI builder. The infra side specifying the
command line landed here:
https://crrev.com/c/1709454

For the command to succeed on swarming we instruct the isolate server
to archive the executable alongside with all the *.golden files needed
for the --check-baseline command.

Bug: v8:9520
Change-Id: I358ca7a7142c0fdaa7f6960515e524729a481394
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1709424
Reviewed-by: Dan Elphick <delphick@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62844}
2019-07-22 08:48:36 +00:00
Yu Yin
948ba17216 [mips][wasm] Implement "atomic.fence" operator
port 4ca8b4d https://crrev.com/c/1701856

Original Commit Message:
    This adds decoding and compilation of the "atomic.fence" operator, which
    is intended to preserve the synchronization guarantees of higher-level
    languages.

    Unlike other atomic operators, it does not target a particular linear
    memory. It may occur in modules which declare no memory, or a non-shared
    memory, without causing a validation error.

    See proposal: https://github.com/WebAssembly/threads/pull/141
    See discussion: https://github.com/WebAssembly/threads/issues/140

Change-Id: Ia60d58a6bf58e8236591d515d30184418cee47c5
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1710337
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Yu Yin <xwafish@gmail.com>
Cr-Commit-Position: refs/heads/master@{#62843}
2019-07-22 08:16:06 +00:00
v8-ci-autoroll-builder
dbf7ea906d Update V8 DEPS.
Rolling v8/build: be534da..1e5d7d6

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

Change-Id: I92597bcfcc7e9ff402fd3bfcb3dd64816374eafc
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1709075
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@{#62842}
2019-07-22 03:33:15 +00:00
v8-ci-autoroll-builder
a620ea3a94 Update wasm-spec.
Rolling v8/test/wasm-js/data: 0137a33..1a411f7

[spec] Fix header level (#1047) (Andreas Rossberg)
https://chromium.googlesource.com/external/github.com/WebAssembly/spec/+/1a411f7

TBR=ahaas@chromium.org,clemensh@chromium.org

Change-Id: I86898b7e902aed9af7727b390c2a9ca0419afc28
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1711313
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@{#62841}
2019-07-21 04:34:54 +00:00
v8-ci-autoroll-builder
614e6f2593 Update V8 DEPS.
Rolling v8/build: bcbed09..be534da

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/5075be9..53913ce

Rolling v8/third_party/depot_tools: 0a0fbf1..ee7b9dd

Rolling v8/tools/clang: 3e2c753..f485a21

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

Change-Id: Id42610f92bd1730b16f9c9f3156e504ae672a031
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1709177
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@{#62840}
2019-07-21 03:40:54 +00:00
v8-ci-autoroll-builder
0557172340 Update wasm-spec.
Rolling v8/test/wasm-js/data: 666dc4c..0137a33

[interpreter] Fix typo in comment (#1045) (NDTSTN)
https://chromium.googlesource.com/external/github.com/WebAssembly/spec/+/0137a33

TBR=ahaas@chromium.org,clemensh@chromium.org

Change-Id: Ic5392b5f1efcd93f4f856787204f30c81b88beaa
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1708698
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@{#62839}
2019-07-20 04:37:43 +00:00
v8-ci-autoroll-builder
19a29d46a9 Update V8 DEPS.
Rolling v8/build: c986429..bcbed09

Rolling v8/buildtools: 7b7a5c0..67b293c

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/42a883d..5075be9

Rolling v8/third_party/depot_tools: f4e0cc6..0a0fbf1

Rolling v8/tools/clang: 558ca3e..3e2c753

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

Change-Id: Ia20af6ec0c7b23b4361c33dd4c5a820be023ee10
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1709307
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@{#62838}
2019-07-20 03:47:43 +00:00
Ng Zhi An
74471ca2c3 Fix disasm for pminub and pand
The bytes was accidentally mixed up when disasm for pand got added in
https://crrev.com/c/907489.

Change-Id: If5595f00356c20c5c9d9e9a0fb43f7ea853b2941
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1710329
Auto-Submit: Zhi An Ng <zhin@chromium.org>
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62837}
2019-07-20 00:48:13 +00:00
Frank Tang
3777f4199a Remove unnecessary COUNT from enum
Bug: v8:9523
Change-Id: Ib9d6772d2025b0452ddcd777cc777276f9038e97
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1710960
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62836}
2019-07-19 22:16:33 +00:00
Sam Clegg
27b68b8ec4 Add .flake8 to allow for python style checking.
All the whitespace checks need to be disabled because we use 2-space
indentation.

One day this could become part of a presubmit but for now its useful
simply to be able to run the flake8 tools directly on a file in the v8
repo.

Change-Id: I9d7ede102aaa17a7c6e7bf29887565ea2deeb887
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1697055
Reviewed-by: Adam Klein <adamk@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Sam Clegg <sbc@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62835}
2019-07-19 21:44:03 +00:00
Frank Tang
f0d3772110 [Intl] Change the behavior of percent format under "unit"
1. Sync with
https://github.com/tc39/proposal-unified-intl-numberformat/pull/57
so the formatting of {style: "unit" unit: "percent"} and
the formatting of {style: "percent:"} are treated different that
simplified the algorithm.
2. Store style into bit flags because we need it quickly during format.
3. Add more unit tests and regression test.

Bug: v8:9498
Change-Id: I75ed22fef1feb73ebf624bda70ebe45b80e7bc8b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1704948
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62834}
2019-07-19 21:33:13 +00:00
Dan Elphick
cbbe0e22ce [test] Fix return of int from bool function
Fix CheckBaselineExpectations returning 2 when it can't read its input
file. Since this was originally just in main, convert it to std::exit.

Change-Id: I70ae6fbc6e5e12b748d2ab1cc83b1deb67a8f861
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1710659
Auto-Submit: Dan Elphick <delphick@chromium.org>
Commit-Queue: Mythri Alle <mythria@chromium.org>
Reviewed-by: Mythri Alle <mythria@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62833}
2019-07-19 17:07:11 +00:00
Dan Elphick
30e2158917 [tests] Disable stress mode in source collection tests
In InterpreterCollectSourcePositions tests always unset
FLAG_stress_lazy_source_positions as the tests cannot work with it due
to assuming that source positions won't be collected immediately after a
normal compile.

Bug: v8:8510
Change-Id: I194ed06c59336f5af3b7b2113a12c1a21dd6bcac
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1709425
Commit-Queue: Dan Elphick <delphick@chromium.org>
Commit-Queue: Mythri Alle <mythria@chromium.org>
Auto-Submit: Dan Elphick <delphick@chromium.org>
Reviewed-by: Mythri Alle <mythria@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62832}
2019-07-19 15:16:16 +00:00
Ulan Degenbaev
30a1c6e790 Remove unused V8.DetachedContextAgeInGC histogram
Bug: chromium:677883
Change-Id: Id28310da0eb8762f30927397c9eaa942ac74852a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1709417
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62831}
2019-07-19 15:07:55 +00:00
Yang Guo
b33af60dd9 [api] Get ScriptOrModule from CompileFunctionInContext
Adds a new out param which allows accessing the ScriptOrModule
of a function, which allows an embedder such as Node.js to use
the function's i::Script lifetime.

Refs: https://github.com/nodejs/node-v8/issues/111
Change-Id: I34346d94d76e8f9b8377c97d948673f4b95eb9d5
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1699698
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62830}
2019-07-19 13:45:25 +00:00
Toon Verwaest
9c766330e0 Reland "[runtime] Fix protector invalidation"
This is a reland of e55e0aa5bd

Original change's description:
> [runtime] Fix protector invalidation
>
> Protectors trigger when special properties are modified or masked. Previously
> we would check whether the property stored on the holder would invalidate the
> protector. Stores to to the receiver rather than the holder, however, so this
> CL changes holder for receiver, and adds additional checks that were missing.
>
> Bug: v8:9466
> Change-Id: I81bc3d73f91381da0d254e9eb79365ae2d25d998
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1708468
> Commit-Queue: Leszek Swirski <leszeks@chromium.org>
> Reviewed-by: Leszek Swirski <leszeks@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#62805}

Tbr: leszeks@chromium.org
Bug: v8:9466
Change-Id: I693c73577ca9a35a271f509770cc1c87e5cc4b73
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1709420
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62829}
2019-07-19 13:32:25 +00:00
Clemens Hammacher
3e51c4122d [wasm] Add two more interesting trace events
Those helped investigating a surprisingly long delay in wasm code
caching.

R=titzer@chromium.org
CC=bbudge@chromium.org

Change-Id: Id5491b9cb8824f337c20f66d5ab26f94d1a53562
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1709418
Reviewed-by: Ben Titzer <titzer@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62828}
2019-07-19 13:01:55 +00:00
Michael Lippautz
a6a81318ba heap: Add GC trigger when overshooting global limit
Adds global allocation limit to the general overshoot safety net for triggering
GC. Adds a check to the interrupt that is triggered by the embedder to catch
cases where there's no on-heap allocation.

Bug: chromium:985641, chromium:948807
Change-Id: I3bc0c30f9344b57096db7ebbd8ad8c76808548ba
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1709414
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62827}
2019-07-19 12:28:50 +00:00
Michael Starzinger
224ca74ae4 [asm.js] Propagate language mode to exported functions.
This makes sure the language mode of the module is correctly propagated
through the WebAssembly module, so that exported functions are allocated
with the correct language mode. It extends the existing {ModuleOrigin}
enum to consist of three values now.

R=clemensh@chromium.org
TEST=mjsunit/regress/wasm/regress-985154
BUG=chromium:985154

Change-Id: Id7b566738b1e710cc5001b894022bcd0f2c01bc3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1708484
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62826}
2019-07-19 11:47:48 +00:00
Dan Elphick
d251ec411c [test] Add --check-baseline to generate-bytecode-expectations
Add a new mode to generate-bytecode-expectations to be used in a coming
test that tests that the bytecode expectations generated by
--rebaseline match the current state.

Change-Id: Ic03787cd853f9bf7d9b4412f96a767036c848c61
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1708477
Auto-Submit: Dan Elphick <delphick@chromium.org>
Commit-Queue: Dan Elphick <delphick@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62825}
2019-07-19 11:36:28 +00:00
Sathya Gunasekaran
aa478cac4f Revert "Reland "[regexp] Call the regexp interpreter without CEntry overhead""
This reverts commit c2ee4a7999.

Reason for revert: webgl_conformance_tests deqp/data/gles2/shaders/conversions.html crashes on Android FYI Release (Nexus 9)
See https://bugs.chromium.org/p/chromium/issues/detail?id=985624

Original change's description:
> Reland "[regexp] Call the regexp interpreter without CEntry overhead"
>
> This is a reland of d4d28b73cb
>
> Original change's description:
> > [regexp] Call the regexp interpreter without CEntry overhead
> >
> > Previously all RegExp calls went through Runtime_RegExpExec when --regexp-interpret-all was set.
> >
> > This CL avoids the runtime overhead by calling into the interpreter directly from the RegExpExec Builtin when the regular expression subject was already compiled to ByteCode (i.e. after the first call).
> >
> > Bug: v8:8954
> > Change-Id: Iae9dfcef3370b772a05b2942305335d592f6f15a
> > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1698391
> > Commit-Queue: Patrick Thier <pthier@google.com>
> > Reviewed-by: Jakob Gruber <jgruber@chromium.org>
> > Reviewed-by: Peter Marshall <petermarshall@chromium.org>
> > Cr-Commit-Position: refs/heads/master@{#62753}
>
> Bug: v8:8954
> Change-Id: I1f0b6de9c6da65bcb582ddb41a37419116a5c510
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1706053
> Reviewed-by: Jakob Gruber <jgruber@chromium.org>
> Commit-Queue: Patrick Thier <pthier@google.com>
> Cr-Commit-Position: refs/heads/master@{#62794}

TBR=jgruber@chromium.org,petermarshall@chromium.org,pthier@google.com

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

Bug: v8:8954, chromium:985624
Change-Id: I5bc2c397a09979f42f28670f80a5366f2a33d80f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1709411
Commit-Queue: Sathya Gunasekaran <gsathya@chromium.org>
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62824}
2019-07-19 10:41:59 +00:00
Dan Elphick
d9c4553a25 [test] Fix source positions in bytecode expectations
Fix a cctest/test-bytecode-generator/PrivateMethods mismatch between the
PrivateMethods source string and the snippet in the golden file due to
missing newline at the end of the string. Change C++ raw string back to
a normal string since in this case it makes it harder to see the
problem.

Change-Id: I3bea8873d37fbacac65548be8261f6b04104132f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1709413
Auto-Submit: Dan Elphick <delphick@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Commit-Queue: Dan Elphick <delphick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62823}
2019-07-19 10:08:18 +00:00
Clemens Hammacher
a348e902f9 [wasm] Fix UB in simd test
This was introduced in https://crrev.com/c/1703762.

R=titzer@chromium.org
CC=zhin@chromium.org

Change-Id: I3f13ab1ea1e87a2615883aa441581c62166f3587
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1709412
Reviewed-by: Ben Titzer <titzer@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62822}
2019-07-19 10:02:58 +00:00
Michael Starzinger
4ca8b4dd67 [wasm] Implement "atomic.fence" operator.
This adds decoding and compilation of the "atomic.fence" operator, which
is intended to preserve the synchronization guarantees of higher-level
languages.

Unlike other atomic operators, it does not target a particular linear
memory. It may occur in modules which declare no memory, or a non-shared
memory, without causing a validation error.

See proposal: https://github.com/WebAssembly/threads/pull/141
See discussion: https://github.com/WebAssembly/threads/issues/140

R=clemensh@chromium.org
TEST=cctest/test-run-wasm-atomics/RunWasmXXX_AtomicFence
BUG=v8:9452

Change-Id: Ibf7e46227f7edfe5c81c097cfc15924c59614067
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1701856
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62821}
2019-07-19 09:14:42 +00:00