Commit Graph

51640 Commits

Author SHA1 Message Date
v8-ci-autoroll-builder
81ee4aa934 Update V8 DEPS.
Rolling v8/build: c55a0b9..49671d3

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/985e130..36a23a7

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

Change-Id: I2aeb099485078312a09866964253ba87fa714447
Reviewed-on: https://chromium-review.googlesource.com/c/1306904
Commit-Queue: Sergiy Byelozyorov <sergiyb@chromium.org>
Reviewed-by: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/master@{#57148}
2018-10-30 18:29:08 +00:00
Sergiy Byelozyorov
cd3f9f8d8b [tools] Remove tools/presubmit.py and move unittests/PRESUBMIT.py into its place
R=machenbach@chromium.org

No-Try: true
Bug: chromium:899028
Change-Id: I1de1f393989a63d165209e78f19284053c73ba08
Reviewed-on: https://chromium-review.googlesource.com/c/1307423
Commit-Queue: Sergiy Byelozyorov <sergiyb@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57147}
2018-10-30 17:12:35 +00:00
Toon Verwaest
3a9668abab [parser] Remove invalid DCHECK, we can hit a stack overflow
Even though we know we're simply parsing a string as statement, we can still
hit a stack overflow on the way there.

Bug: v8:8392
Change-Id: I2471cf8273789aa33239f5c137cc2f54454acb32
Reviewed-on: https://chromium-review.googlesource.com/c/1307429
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57146}
2018-10-30 17:07:27 +00:00
Georg Neis
a1d7dc4059 Array.prototype.indexOf: Don't exclude length 2**32-1 from fast path.
I see no reason why it was excluded.

Bug: v8:8386
Change-Id: I291b12444b890db1636b00dec1837e1634b23b35
Reviewed-on: https://chromium-review.googlesource.com/c/1307428
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57145}
2018-10-30 17:06:23 +00:00
Clemens Hammacher
192bee6bac Revert "inspector: move injected script source to native"
This reverts commit 34686abe40.

Reason for revert: Compile errors on several bots, e.g. https://ci.chromium.org/p/v8/builders/luci.v8.ci/V8%20Linux%20-%20debug%20builder/33299

Original change's description:
> inspector: move injected script source to native
> 
> - introduced ValueMirror interface, this interface contains methods to generate
>   different protocol entities,
> - introduced DebugPropertyIterator, this iterator iterates through object properties
>   in the following order: exotic indices, enumerable strings, all other properties,
> - removed all injected script infra, e.g. closure compiler,
> 
> R=​dgozman@chromium.org
> TBR=yangguo@chromium.org
> 
> Bug: chromium:595206
> Cq-Include-Trybots: luci.chromium.try:linux_chromium_headless_rel;luci.chromium.try:linux_chromium_rel_ng;master.tryserver.blink:linux_trusty_blink_rel
> Change-Id: I077c1879622aa0d9900d719b80d2ef5ba4221a22
> Reviewed-on: https://chromium-review.googlesource.com/c/1295550
> Commit-Queue: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
> Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#57142}

TBR=dgozman@chromium.org,yangguo@chromium.org,kozyatinskiy@chromium.org

Change-Id: I6e4ccaf1d6b151fbc0ffe4f26daa584433321c77
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:595206
Cq-Include-Trybots: luci.chromium.try:linux_chromium_headless_rel;luci.chromium.try:linux_chromium_rel_ng;master.tryserver.blink:linux_trusty_blink_rel
Reviewed-on: https://chromium-review.googlesource.com/c/1307432
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57144}
2018-10-30 17:04:54 +00:00
Michael Lippautz
3a85e0c602 [heap] Remove custom Scavenger trace events
Those trace events are too fine grained and heavily impact metrics
computation.

No-try: true
Change-Id: Ica07bfdf8e695689795abb1d6b215c329413ba3b
Reviewed-on: https://chromium-review.googlesource.com/c/1307431
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57143}
2018-10-30 16:48:23 +00:00
Alexey Kozyatinskiy
34686abe40 inspector: move injected script source to native
- introduced ValueMirror interface, this interface contains methods to generate
  different protocol entities,
- introduced DebugPropertyIterator, this iterator iterates through object properties
  in the following order: exotic indices, enumerable strings, all other properties,
- removed all injected script infra, e.g. closure compiler,

R=dgozman@chromium.org
TBR=yangguo@chromium.org

Bug: chromium:595206
Cq-Include-Trybots: luci.chromium.try:linux_chromium_headless_rel;luci.chromium.try:linux_chromium_rel_ng;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: I077c1879622aa0d9900d719b80d2ef5ba4221a22
Reviewed-on: https://chromium-review.googlesource.com/c/1295550
Commit-Queue: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57142}
2018-10-30 16:43:55 +00:00
Sathya Gunasekaran
c65dbd5153 [class] Rewrite destructuring assignment in class field initializers
Bug: v8:5751, chromium:899537
Change-Id: I4c072727dffc9381a81eb8711c4114220345914d
Reviewed-on: https://chromium-review.googlesource.com/c/1304538
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Sathya Gunasekaran <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57141}
2018-10-30 16:34:04 +00:00
Frank Tang
78c053a5c1 [Intl] Hide Intl["SegmentIterator"]
Fix the code incorrctly exposed Intl["SegmentIterator"] that caused
Unreachable code in builtins-internal.cc

Bug: chromium:900013
Change-Id: I50d457a9f065d597b3bbb77a7a45011335c959da
Reviewed-on: https://chromium-review.googlesource.com/c/1306906
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57140}
2018-10-30 16:32:54 +00:00
Toon Verwaest
f72c118d88 [ast] Drop Statement::IsEmpty
Change-Id: I45e004a64c03f31253cbbca2976894c63b0d515e
Reviewed-on: https://chromium-review.googlesource.com/c/1307427
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57139}
2018-10-30 16:24:42 +00:00
Ivica Bogosavljevic
93169821d4 MIPS: Implement AtomicPairCompareExchange through runtime
MIPS32r2 doesn't have load-linked/store-conditional instructions
that work with 64-bit values and these are now implemented through
runtime.

TEST=mjsunit/wasm/compare-exchange64-stress

Change-Id: I70d8a454dcbbdac6f30e30ec3ac0eb4d429ef62e
Reviewed-on: https://chromium-review.googlesource.com/c/1296211
Commit-Queue: Ivica Bogosavljevic <ibogosavljevic@wavecomp.com>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57138}
2018-10-30 15:55:43 +00:00
Peter Marshall
bd39d92272 [typedarrays] Fix invalid optimization in From for detached arrays
We didn't check if the input typed array was neutered before going to
the fast path, so we hit a CHECK in this case.

Fix this by just checking if the buffer was neutered and then going to
the 'check iterator' case if it is. This will cause a TypeError via
IterableToList, which was the same as the behavior before the
optmization was landed.

Bug: chromium:899519
Change-Id: I09e6389ea2ab1e3bef01e616721b48a9b66c1b2a
Reviewed-on: https://chromium-review.googlesource.com/c/1307422
Commit-Queue: Peter Marshall <petermarshall@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57137}
2018-10-30 15:53:04 +00:00
Toon Verwaest
e5e468586a [parser] Cache EmptyStatement and always kNoSourcePosition
Change-Id: I27e2e0529281008b8350e1dd219c0d38bdcb66f5
Reviewed-on: https://chromium-review.googlesource.com/c/1307424
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57136}
2018-10-30 15:22:51 +00:00
Clemens Hammacher
fd56473742 [wasm] Abort compilation from background tasks
This removes another liability of the finisher: to abort compilation
and publish errors once an error state has been set by a background
compile unit.
This CL makes background threads set the error state directly and
schedule a foreground task to actually publish the error (e.g. via the
promise).

R=mstarzinger@chromium.org

Bug: v8:7921
Change-Id: I7a6a7ca4f235c2ad374b6ffc434eb6ac7d5f54ae
Cq-Include-Trybots: luci.v8.try:v8_linux64_tsan_rel
Cq-Include-Trybots: luci.v8.try:v8_linux64_tsan_isolates_rel_ng
Reviewed-on: https://chromium-review.googlesource.com/c/1307425
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57135}
2018-10-30 15:16:00 +00:00
Sergiy Byelozyorov
af120db4af [tools] Correctly identify and report test crashes and infra failures
We define a TestFailedError exception and raise it when we can reliably detect
that a test has crashed. All other exceptions are treated as infra failures and
are captured by the try-catch clause in MainWrapper function.

This also fixes all tests in run_perf_test.py, run_tests_test.py and makes sure
that both are run on any changes in tools directory.

R=machenbach@chromium.org

Bug: chromium:899028
Change-Id: I283bc87b31c814be476bebe9fdda414975494183
Reviewed-on: https://chromium-review.googlesource.com/c/1303293
Commit-Queue: Sergiy Byelozyorov <sergiyb@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57134}
2018-10-30 15:05:40 +00:00
Toon Verwaest
6d9c30cd94 [parser] Remove RETURN_IF* part 13
Bug: v8:8363, v8:7926
Change-Id: Id892a084d3c1097d8faf3cca379300f791dd942b
Reviewed-on: https://chromium-review.googlesource.com/c/1307426
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57133}
2018-10-30 14:59:08 +00:00
Alexey Kozyatinskiy
5502a8510b inspector: liveedit: update all constant pools in new_script
Change-Id: I3605ecf593c32743f5401b5e8a2d57e877ebcc7c
Reviewed-on: https://chromium-review.googlesource.com/c/1306898
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57132}
2018-10-30 14:47:57 +00:00
Igor Sheludko
2e2604b967 [ptr-compr] Introduce IsolateAllocator
to control how the memory for Isolate object is allocated.
This is the support for pointer-compression friendly heap layout.

Bug: v8:8182
Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
Change-Id: Ida36b81ee22bd865005c394748b62d4c0897d746
Reviewed-on: https://chromium-review.googlesource.com/c/1251548
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57131}
2018-10-30 14:38:07 +00:00
Michael Lippautz
f46456a35c [heap] Add timeout to Scavenger barrier
Speculatively mitigation for renderer hangs in Scavenger
while waiting in a barrier.

Bug: 
Change-Id: I48520e0ffd99123dbe352d2012c911186c187e4b
Reviewed-on: https://chromium-review.googlesource.com/c/1296463
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57130}
2018-10-30 14:28:49 +00:00
Toon Verwaest
9f75c14878 [parser] Simplify StatementList parsing by splitting out directive parsing
Change-Id: I233a3f6d8b19b945cfc3572d72237ec5619d8cbc
Reviewed-on: https://chromium-review.googlesource.com/c/1307414
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57129}
2018-10-30 14:21:37 +00:00
Ivica Bogosavljevic
503cf13b76 MIPS64: Port [turbofan] Add support for huge DataViews.
Port 15c31fe461

Change-Id: Ia611585f862196d97e701b5e15560044e42b1a12
Reviewed-on: https://chromium-review.googlesource.com/c/1306439
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Commit-Queue: Ivica Bogosavljevic <ibogosavljevic@wavecomp.com>
Cr-Commit-Position: refs/heads/master@{#57128}
2018-10-30 14:02:49 +00:00
Clemens Hammacher
fac176d813 [wasm] Fix memory limit checks
For memory limit checks, we should use the minimum of the
--wasm-max-mem-pages flag and kV8MaxWasmMemoryPages. The former is a
limit set by the user, the latter is the maximum we can handle
internally.

R=titzer@chromium.org

Bug: chromium:898677
Change-Id: I3c549f4e90dd016b5d07475d9353f30134f76dcc
Reviewed-on: https://chromium-review.googlesource.com/c/1305274
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Ben Titzer <titzer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57127}
2018-10-30 13:44:48 +00:00
Clemens Hammacher
1ff8045530 Reland "[wasm] Store compile errors in CompilationState"
This is a reland of bf3d7b9ae3

Original change's description:
> [wasm] Store compile errors in CompilationState
> 
> We are currently storing compilation errors in the individual
> compilation units and pass it to the ErrorThrower during finishing.
> This CL changes that to store errors on the CompilationState directly.
> From there, it is propagated to the ErrorThrower in the compilation
> state callback.
> This removes more work from the finisher task and slims down the
> WasmCompilationUnits.
> 
> R=mstarzinger@chromium.org
> 
> Bug: v8:8343, v8:7921
> Change-Id: Id332add43d4219d2a30fee653ed4e53a9b2698d9
> Reviewed-on: https://chromium-review.googlesource.com/c/1303720
> Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
> Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#57091}

Bug: v8:8343, v8:7921
Change-Id: Iaa5c89d224cb2bcfca2d12eba305413a9ad95618
Reviewed-on: https://chromium-review.googlesource.com/c/1304547
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57126}
2018-10-30 13:35:00 +00:00
Hai Dang
c5c6b8bc03 Fix typing of binary operators on BigInt.
BinaryNumberOpTyper was not monotonic: if one input changes
from Number to Numeric, while the other input stays BigInt,
the result would change from Number to BigInt.

We have some fuzzing tests for monotonicity but unfortunately
they never generated the inputs required for triggering this bug.
We'll look into improving our tests.

Bug: v8:8380
Change-Id: I7320d9ae4b89ad8798bf9e97cc272edba2162a77
Reviewed-on: https://chromium-review.googlesource.com/c/1307418
Commit-Queue: Hai Dang <dhai@google.com>
Reviewed-by: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57125}
2018-10-30 13:33:55 +00:00
Jakob Gruber
9eca2d3c37 [array] Keep large array allocations on the fast path
Until this CL, CSA array allocation methods only handled arrays that
could fit into new space. This behavior was preserved in a bunch
of related builtins (e.g. Array.p.map), which completely bailed out to
the slow path if larger allocations were required.

This CL adds large object space handling to array allocation functions,
which means that callers can use the more permissive kMaxFastArrayLength
boundary instead of kInitialMaxFastElementsArray.

Bug: chromium:890599
Change-Id: Idabb0ef232c2896cd453e2ae10b479bf24cbb1c1
Reviewed-on: https://chromium-review.googlesource.com/c/1301483
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57124}
2018-10-30 13:30:56 +00:00
Michael Starzinger
cc91a10249 [cleanup] Remove dead Enter/LeaveBuiltinFrame methods.
R=jgruber@chromium.org

Change-Id: Ic9ef3cd231c2180563c3520ab58895f2ccce5408
Reviewed-on: https://chromium-review.googlesource.com/c/1307421
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57123}
2018-10-30 13:16:40 +00:00
Toon Verwaest
b98ca114e8 [parser] Remove RETURN_IF* part 12
Bug: v8:8363, v8:7926
Change-Id: I60df70bcd1bc12b0cffe760532d92fa3e1fe7da2
Reviewed-on: https://chromium-review.googlesource.com/c/1307420
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57122}
2018-10-30 13:04:41 +00:00
Stephan Herhut
108b20d127 [cleanup] Use iterators for queue management in register allocator
The register allocator uses std::find to search for an element to be
removed from the active/inactive queues repeatedly. As we already know
the exact position of the element to remove, it is better to use an
iterator right away.

Change-Id: I2cd318a5960113d18b3749b2010f8028fe66158d
Reviewed-on: https://chromium-review.googlesource.com/c/1304542
Commit-Queue: Stephan Herhut <herhut@chromium.org>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57121}
2018-10-30 12:28:26 +00:00
Michael Achenbach
c8445bfd8c [test] Bump shards on slow bot
NOTRY=true
TBR=sergiyb@chromium.org

Change-Id: I3751c64f86855d260e4fccd2f86e8958b7a8d9b3
Reviewed-on: https://chromium-review.googlesource.com/c/1307413
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57120}
2018-10-30 11:11:27 +00:00
Michael Starzinger
087847d970 [wasm] Properly terminate throwing control edges.
This merges all control edges that are known to unconditionally throw
directly into the graph end node. This applies to the "Throw" as well as
the "Rethrow" operation, and reduces their code size.

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

Change-Id: Idd4918ab084bcc697d5798d512ccc695ca943b00
Reviewed-on: https://chromium-review.googlesource.com/c/1305273
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57119}
2018-10-30 11:02:07 +00:00
Benedikt Meurer
59c324a02d [cleanup] Minor cleanups to JSCallReducer::ReduceArrayPrototypeSlice().
Bug: v8:1956, v8:8238
Change-Id: I5efc9ab7171cd35a4fcf2074f76dc9c90d521cc7
Reviewed-on: https://chromium-review.googlesource.com/c/1306440
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57118}
2018-10-30 10:38:50 +00:00
Andreas Haas
a600594d5a [wasm] Implement trap handler on Windows
This is the V8 side of the implementation. You can take a look at a
prototype of the Chrome side changes in https://crrev.com/c/1273043.
Chrome could also use V8's default implementation of the trap handler,
see https://crrev.com/c/1290952.

Bug: v8:6743
Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
Change-Id: I9bb3e717db17a4f30bbb8acfd80a1f6510d463ff
Reviewed-on: https://chromium-review.googlesource.com/c/1283111
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57117}
2018-10-30 10:25:37 +00:00
Toon Verwaest
e0c6671f37 [parser] Restore RETURN_IF_PARSE_ERROR in for/await
Bug: chromium:900085, v8:8363, v8:7926
Change-Id: I033bd4d95cdd85eee635279357c3c5d3fbe912c8
Reviewed-on: https://chromium-review.googlesource.com/c/1306438
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57116}
2018-10-30 10:11:00 +00:00
Marja Hölttä
b839ed4f24 [js weak refs] Disable incremental marking for harmony/weakrefs tests
These tests rely on dropping references to objects either explicitly ("o =
null;") or implicitly ("o goes out of scope") and then doing gc. It's essential
that we haven't already marked the WeakCell pointing to o and marked it alive
before dropping the reference.

BUG=v8:8179

Change-Id: Ie0b73f05c4baa937cf6f28325454ff9087a71a2c
Reviewed-on: https://chromium-review.googlesource.com/c/1306437
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57115}
2018-10-30 10:03:56 +00:00
Peter Marshall
b87d408f65 [heap-profiler] Fix a use-after-free when snapshots are deleted
If a caller starts the sampling heap profiler and takes a snapshot, and
then deletes the snapshot before the sampling has completed, a
use-after-free will occur on the StringsStorage pointer.

The same issue applies for StartTrackingHeapObjects which shares the
same StringsStorage object.

Bug: v8:8373
Change-Id: I5d69d60d3f9465f9dd3b3bef107c204e0fda0643
Reviewed-on: https://chromium-review.googlesource.com/c/1301477
Commit-Queue: Peter Marshall <petermarshall@chromium.org>
Reviewed-by: Alexei Filippov <alph@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57114}
2018-10-30 09:37:12 +00:00
Stephan Herhut
767b152a16 Revert "[regalloc] More aggressively reuse spill ranges for phi inputs"
Turns out TryReuseSpillForPhi does more than reusing a spill slot for a
phi (which is beneficial in general). It also decides whether a phi
should start out to be allocated in a spill slot. The latter, of course,
benefits from control flow knowledge. Hence, this change was detrimental
in cases where a common input to a phi is only spilled on few control
flow pathes.

To fix, we need to disentangle spill-slot reuse and the decision whether
a phi should start out spilled. I will look into this in a follow up
change.

This reverts commit b79cbd5615.

Change-Id: I228185bb1a4b320d3115ba7f1d921593480d8e7d
Reviewed-on: https://chromium-review.googlesource.com/c/1304549
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Stephan Herhut <herhut@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57113}
2018-10-30 09:34:57 +00:00
Ivica Bogosavljevic
b589315def MIPS64: Extend random address range in OS::GetRandomMmapAddr
MIPS64 is a 64-bit platform and each user space process can
address 2^42 bytes of memory. This fixes the current behavior
when the address range was limited to 2^30, which is the
default value taken for 32-bit platforms.

Change-Id: I310e16631a4dfaf77416e278ddf4386f3e258cc3
Reviewed-on: https://chromium-review.googlesource.com/c/1304197
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Commit-Queue: Ivica Bogosavljevic <ibogosavljevic@wavecomp.com>
Cr-Commit-Position: refs/heads/master@{#57112}
2018-10-30 09:32:37 +00:00
Sigurd Schneider
374dc59116 [instruction-selector-x64] Remove over-restrictive check
Change-Id: I6a220b6043da8f9c8c036c92e3f4da6ca7d801d4
Bug: v8:8344
Reviewed-on: https://chromium-review.googlesource.com/c/1306436
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57111}
2018-10-30 09:15:27 +00:00
Benedikt Meurer
d3f74c9853 [turbofan] Enable loop peeling for various higher-order Array builtins.
This adds appropriate LoopExit nodes for the JSCallReducer lowerings of
the following higher order Array builtins:

  - Array.prototype.every()
  - Array.prototype.find()
  - Array.prototype.findIndex()
  - Array.prototype.some()

Loop peeling allows TurboFan to make loop invariant operations in the
callback passed to the higher order builtin fully redundant, and thus
completely eliminate the loop invariant code from the subsequent loop
iterations. This can have a huge performance impact, depending on what
kind of code runs inside of the callback. For example, on the micro-
benchmarks outlined in http://crbug.com/v8/8273 we go from

  forLoop: 364 ms.
  every: 443 ms.
  some: 432 ms.
  find: 522 ms.
  findIndex: 437 ms.

to

  forLoop: 369 ms.
  every: 354 ms.
  some: 348 ms.
  find: 419 ms.
  findIndex: 360 ms.

which is 20% improvement, and essentially brings the Array builtins (the
appropriate ones Array#some() and Array#every() in this case) on par
with the hand-written `for`-loop.

Bug: v8:1956, v8:8273
Change-Id: I9d32736e5402807b4ac79cd5ad15ceacd1945681
Reviewed-on: https://chromium-review.googlesource.com/c/1305935
Reviewed-by: Daniel Clifford <danno@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57110}
2018-10-30 09:11:57 +00:00
Sigurd Schneider
738c2a9fc6 [instruction-selector-x64] Fold truncate into Word32Sar
Change-Id: Iba905f4c1f2e5aff70953bdfb0009b417a959a41
Bug: v8:8344
Reviewed-on: https://chromium-review.googlesource.com/c/1304548
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57109}
2018-10-30 08:56:20 +00:00
Benedikt Meurer
659748c3d9 [turbofan] Consistent handling of elements kinds for Array builtins.
Be more consistent for elements kinds and polymorphism in various Array
builtins, which are only iterating over elements.

Bug: v8:1956
Change-Id: I0c02a1b18d95e678e01b816aa36b259a3ba76170
Reviewed-on: https://chromium-review.googlesource.com/c/1306434
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57108}
2018-10-30 08:47:38 +00:00
Sigurd Schneider
20aa22fc56 Use 32bit shifts if Smis are 31bit on x64
Change-Id: Ic0513662eed0bd47bbc8c2ecec8fadd6b62f58f5
Bug: v8:8344
Reviewed-on: https://chromium-review.googlesource.com/c/1304550
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57107}
2018-10-30 08:19:25 +00:00
Igor Sheludko
5a71ed0af3 [cleanup] Don't use virtual inheritance in gtest fixtures
and use Mixin pattern with linear inheritance instead. This will
allow to customize the way the Isolate is created.

Bug: v8:8238
Change-Id: Ic611df123653af3a0f2271394387492e440b5ea8
Reviewed-on: https://chromium-review.googlesource.com/c/1306433
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57106}
2018-10-30 06:28:42 +00:00
Jungshik Shin
a46bc03591 Prepare for ICU roll to 63.1
In Chromium tree, ICU is rolled to 63.1. And, auto-roller will soon
try to roll ICU in v8 to 63.1.  Due to a nodejs trybot issue,
autoroll needs a manual intervention. In the meantime, this CL
will get rid of other blocking issues for ICU update.

Prepare for the ICU roll by revising test/intl as following:

* Line breaking loose mode is now supported in the
Chromium's copy of ICU. Adjust the test expectation.

* ICU's uloc_* can handle overlong locale ids. Drop tests
that are not valid any more.

Once ICU is rolled, a couple of TSAN-suppressed tests can
be unsuppressed, but that has to be done in a separate CL.

Bug: chromium:893196,v8:8272, v8:8110
Test: intl/*, test262/test402/*
Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
Change-Id: I17f11457b61376b1e8d41bbbc951fa6cd3355a54
Reviewed-on: https://chromium-review.googlesource.com/c/1289369
Commit-Queue: Jungshik Shin <jshin@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57105}
2018-10-30 05:01:18 +00:00
Frank Tang
2f3dd7acc4 [Intl] Fix order of Collator resolvedOptions()
Fix the to be-landed-soon test262 test failure in
test262/intl402/Collator/prototype/resolvedOptions/order
The spec changed from "any order" to "table " order
in https://github.com/tc39/ecma402/pull/279


Bug: v8:8378
Change-Id: I76cfb27ab4219911e6ab2de97f0f34318d5430a3
Reviewed-on: https://chromium-review.googlesource.com/c/1302801
Commit-Queue: Frank Tang <ftang@chromium.org>
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57104}
2018-10-30 00:35:46 +00:00
Marja Hölttä
43cdd62e6c [parser] Alternative fix to chromium:899495
If PreParser::ParseFormalParameterList detects a stack overflow, make
PreParseFunction actually return kPreParseStackOverflow.

BUG=chromium:899495

Change-Id: I1f347b56c594c6edd25401b8448ff38117e190a9
Reviewed-on: https://chromium-review.googlesource.com/c/1304536
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57103}
2018-10-29 22:50:36 +00:00
Hannes Payer
9348047a87 [heap] Fix unmapper logging.
Change-Id: I65b5f879bfc1efb2ed3178cdfcb3b6a03b91e12a
Reviewed-on: https://chromium-review.googlesource.com/c/1305933
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Hannes Payer <hpayer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57102}
2018-10-29 21:38:23 +00:00
Tobias Tebbi
f942791b80 [elements] fix wrong cast of empty FixedArray in Array.prototype.includes
Bug: chromium:899535
Change-Id: I468912afca9187b47ae94fbbcff79e175fa1e686
Reviewed-on: https://chromium-review.googlesource.com/c/1304296
Reviewed-by: Caitlin Potter <caitp@igalia.com>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57101}
2018-10-29 20:37:03 +00:00
Frank Tang
e06c4871b1 [Intl] Fix resolvedOptions() order of Intl.Segmenter
Change the order of the output and add spec text.
To fix the to-be-landed-soon test262 test failure in
test262/intl402/Segmenter/prototype/resolvedOptions/order
The spec change from "any order" to "table " order
in https://github.com/tc39/ecma402/pull/279


Bug: v8:8376
Change-Id: Ife19aec4386a022168514053830ebe03f983f4a9
Reviewed-on: https://chromium-review.googlesource.com/c/1301646
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57100}
2018-10-29 18:48:32 +00:00
Frank Tang
7e51828e49 [Intl] Stage Intl.Segmenter
This will give us some clusterfuzz coverage.

Bug: v8:6891
Change-Id: I167774aeb0110bde8d5ed1047b2875b14317903b
Reviewed-on: https://chromium-review.googlesource.com/c/1301643
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57099}
2018-10-29 18:38:52 +00:00