Commit Graph

51249 Commits

Author SHA1 Message Date
Frank Tang
e6261d708a [Intl] Changes to new behavior when style is narrow
This is to implement a new change in the proposal
'14.  If style is "narrow" and type is not "unit", throw a RangeError exception.'
in #sec-Intl.ListFormat
See also
https://github.com/tc39/proposal-intl-list-format/issues/16
https://github.com/tc39/proposal-intl-list-format/pull/27
and
https://github.com/tc39/test262/pull/1860

Bug: v8:8302
Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
Change-Id: I0a3dc99eeb18082f359c24c472889d8b6e905225
Reviewed-on: https://chromium-review.googlesource.com/c/1277660
Commit-Queue: Frank Tang <ftang@chromium.org>
Reviewed-by: Frank Tang <ftang@chromium.org>
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Reviewed-by: Daniel Ehrenberg <littledan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56707}
2018-10-16 21:40:32 +00:00
Caitlin Potter
4d07af1a34 [counters] add use count for the "override mistake"
Adds 2 counts to see how often this occurs on the web, both the throwing
version (strict mode), and the no-op sloppy mode case, to help determine
if the proposal at https://github.com/tc39/ecma262/pull/1307 is web
compatible.

This is the V8 side of required changes.
The Chromium-side CL: https://crrev.com/c/1280618

BUG=v8:8175
R=littledan@chromium.org, cbruni@chromium.org, jkummerow@chromium.org, yangguo@chromium.org

Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
Change-Id: Id12336c2e566093bb554b6d4624c9301fbc4a0f7
Reviewed-on: https://chromium-review.googlesource.com/c/1255549
Commit-Queue: Caitlin Potter <caitp@igalia.com>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56706}
2018-10-16 21:34:23 +00:00
Jakob Kummerow
a2f1824839 [ubsan] Replace internal::Object references in v8.h
with internal::Address. This is in preparation for the upcoming
changes to internal::Object. The public API is unchanged, and
there should be no change in behavior either.

Most of the casts newly introduced here will disappear again once
the migration is complete.

Bug: v8:3770
Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
Change-Id: I2990b06a2511ccc5de3f98fd95a805f30ed589ab
Reviewed-on: https://chromium-review.googlesource.com/c/1036612
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56705}
2018-10-16 19:02:21 +00:00
Frank Tang
db6db6ed8f [Intl] Add more tests for Intl.Segmenter
Bug: v8:6891
Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
Change-Id: I0b82b194cb7089aeaa322ed4e45008db6890e7a1
Reviewed-on: https://chromium-review.googlesource.com/c/1266995
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56704}
2018-10-16 15:17:09 +00:00
Clemens Hammacher
db59389950 [wasm][test] Fix uses of EXPECT_FAILURE_LEN
Ensure that {min} is smaller than {max}, and auto-compute {max} as
{arraysize(data)}.
We had two tests which did not actually test anything.

This is the second CL in a series to improve our module decoder tests
and make them more readable.

R=titzer@chromium.org

Bug: v8:8238
Change-Id: Ie467fa54609bc5fd860608085a2d58ed8341f5e7
Reviewed-on: https://chromium-review.googlesource.com/c/1282956
Reviewed-by: Ben Titzer <titzer@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56703}
2018-10-16 14:24:59 +00:00
Clemens Hammacher
9b8e034b5f [wasm][test] Use EXPECT_FAILURE consistently
First CL in a series to improve our module decoder tests and make them
more readable.

R=titzer@chromium.org

Bug: v8:8238
Change-Id: Ie6ac83fbe2f873bfda8597ab3dd9ec4c0fb548ad
Reviewed-on: https://chromium-review.googlesource.com/c/1283054
Reviewed-by: Ben Titzer <titzer@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56702}
2018-10-16 14:19:09 +00:00
Sergiy Byelozyorov
94850f5cc2 [tools] Print stdout header even when the output is empty
This will allow us to determine whether tests are not printing anything or
whether our infrastructure is failing to retrieve the stdout.

TBR=machenbach@google.com

No-Try: true
Bug: chromium:891314
Change-Id: I0786e77b4db9f247e02a25924acd6d6773c0db9f
Reviewed-on: https://chromium-review.googlesource.com/c/1282962
Commit-Queue: Sergiy Byelozyorov <sergiyb@chromium.org>
Reviewed-by: Sergiy Byelozyorov <sergiyb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56701}
2018-10-16 14:06:16 +00:00
Jakob Gruber
d25088e9ba Reland "[ia32,root] Add indirect calls and jumps through virtual register"
This is a reland of 650703557a

Original change's description:
> [ia32,root] Add indirect calls and jumps through virtual register
>
> This adds a temporary mechanism for isolate-independent calls and
> jumps.  The problem was that - as ia32 doesn't have a scratch register
> - Call and Jump cannot call through a register. This CL adds a
> so-called virtual register (= a pointer-sized field) on IsolateData.
>
> The virtual register can be removed once pc-relative calls are
> implemented and all builtins have been embedded.
>
> Bug: v8:6666
> Change-Id: I1f9d8a25643fad0b3919dd813dbe219d20fcc6bc
> Reviewed-on: https://chromium-review.googlesource.com/c/1282991
> Commit-Queue: Jakob Gruber <jgruber@chromium.org>
> Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
> Reviewed-by: Igor Sheludko <ishell@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#56693}

TBR=sigurds@chromium.org

Bug: v8:6666
Change-Id: If463e68036673c7873d0d5e1a8a01ef31263cbfa
Reviewed-on: https://chromium-review.googlesource.com/c/1283052
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56700}
2018-10-16 14:05:12 +00:00
peterwmwong
952c097679 [builtins] Port Array.p.join to Torque.
This also includes ports of Array.p.toString and Array.p.toLocaleString.
Many parts of the old JS implementation are preserved, because
TypedArray.p.join still relies on it.  These will be removed once
TypedArray.p.join is ported to Torque.

To simplify implementation, special handling of extremely sparse arrays
has been removed.

Performance improvements vary by array size, elements, and sparse-ness.
Some quick numbers and graphs are here:
https://docs.google.com/spreadsheets/d/125VLmRMudk8XaomLCsZQ1ewc94WCqht-8GQwU3s9BW8/edit#gid=2087673710

Cq-Include-Trybots: luci.chromium.try:linux_chromium_headless_rel;luci.v8.try:v8_linux_noi18n_rel_ng;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: Ia4069a068403ce36676c37401d349aefc976b045
Reviewed-on: https://chromium-review.googlesource.com/c/1196693
Commit-Queue: Peter Wong <peter.wm.wong@gmail.com>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56699}
2018-10-16 13:56:31 +00:00
Sigurd Schneider
f64edae08f [assembler] Add scratch register to cvtui2sd SSE instruction
Change-Id: I861babb77f224626f6cdb88a7be08db75f5cf327
Bug: v8:6666
Reviewed-on: https://chromium-review.googlesource.com/c/1283089
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56698}
2018-10-16 13:53:30 +00:00
Marja Hölttä
8060b60fae [js weak refs] Add WeakCell.prototype.holdings
BUG=v8:8179

Change-Id: I528e64fafff2dc00808c48107799d39603f0ca48
Reviewed-on: https://chromium-review.googlesource.com/c/1275823
Commit-Queue: Marja Hölttä <marja@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56697}
2018-10-16 13:41:40 +00:00
Michael Achenbach
9ca02dfc5e [test] Migrate builder-specific variant configurations
NOTRY=true

Bug: chromium:830557
Change-Id: Ic67ab462f7be1787613ad42219f81760a96a3731
Reviewed-on: https://chromium-review.googlesource.com/c/1282955
Reviewed-by: Sergiy Byelozyorov <sergiyb@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56696}
2018-10-16 13:30:23 +00:00
Sigurd Schneider
3299127220 [ia32,root] Make API entry code isolate independent
Change-Id: I7691c12acc1b2d0be3e35cf699bb16df4ca84b6e
Bug: v8:6666
Reviewed-on: https://chromium-review.googlesource.com/c/1280435
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56695}
2018-10-16 13:28:13 +00:00
Jakob Gruber
08403cc763 Revert "[ia32,root] Add indirect calls and jumps through virtual register"
This reverts commit 650703557a.

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

Original change's description:
> [ia32,root] Add indirect calls and jumps through virtual register
> 
> This adds a temporary mechanism for isolate-independent calls and
> jumps.  The problem was that - as ia32 doesn't have a scratch register
> - Call and Jump cannot call through a register. This CL adds a
> so-called virtual register (= a pointer-sized field) on IsolateData.
> 
> The virtual register can be removed once pc-relative calls are
> implemented and all builtins have been embedded.
> 
> Bug: v8:6666
> Change-Id: I1f9d8a25643fad0b3919dd813dbe219d20fcc6bc
> Reviewed-on: https://chromium-review.googlesource.com/c/1282991
> Commit-Queue: Jakob Gruber <jgruber@chromium.org>
> Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
> Reviewed-by: Igor Sheludko <ishell@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#56693}

TBR=sigurds@chromium.org,jgruber@chromium.org,ishell@chromium.org

Change-Id: I782651140eee3e75d57ad57d614a981e420fdfeb
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:6666
Reviewed-on: https://chromium-review.googlesource.com/c/1283051
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56694}
2018-10-16 12:49:03 +00:00
Jakob Gruber
650703557a [ia32,root] Add indirect calls and jumps through virtual register
This adds a temporary mechanism for isolate-independent calls and
jumps.  The problem was that - as ia32 doesn't have a scratch register
- Call and Jump cannot call through a register. This CL adds a
so-called virtual register (= a pointer-sized field) on IsolateData.

The virtual register can be removed once pc-relative calls are
implemented and all builtins have been embedded.

Bug: v8:6666
Change-Id: I1f9d8a25643fad0b3919dd813dbe219d20fcc6bc
Reviewed-on: https://chromium-review.googlesource.com/c/1282991
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56693}
2018-10-16 12:19:21 +00:00
Sigurd Schneider
7d87193148 [counters] Remove counter for 'arguments adaptor'
Change-Id: If476aa8a759bbf6360ef1fc68dbc3e624f8731e5
Bug: v8:6666
Reviewed-on: https://chromium-review.googlesource.com/c/1282971
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56692}
2018-10-16 12:04:50 +00:00
Georg Neis
a8cb521a58 [turbofan] Allow converting word64 to float32 if value is safe integer.
Bug: v8:895691
Change-Id: Ic92cb250555d097b01f894b4b7b9ae5b2eea6668
Reviewed-on: https://chromium-review.googlesource.com/c/1282990
Commit-Queue: Georg Neis <neis@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56691}
2018-10-16 11:31:39 +00:00
Sigurd Schneider
f56195fc2b [ia32] Extend availability of root array in JSEntryStub
Change-Id: Ibc8a086c5761c732b454fbb6cc1e06abb9f5e90f
Bug: v8:7777
Reviewed-on: https://chromium-review.googlesource.com/c/1283032
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56690}
2018-10-16 11:20:41 +00:00
Mathias Bynens
e4cfb007ba Ship well-formed JSON.stringify 🎉
This is a reland of 0d91db0b32.

Proposal repository:
https://github.com/tc39/proposal-well-formed-stringify

Intent to ship:
https://groups.google.com/d/msg/v8-users/IRu3bAC_pLM/pFwz2ti1AgAJ

TBR=gsathya@chromium.org

Bug: v8:7782
Change-Id: I53d006650e2b4099a111d2e5bc067e4a2c7cf4a0
Reviewed-on: https://chromium-review.googlesource.com/c/1282993
Reviewed-by: Mathias Bynens <mathias@chromium.org>
Commit-Queue: Mathias Bynens <mathias@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56689}
2018-10-16 11:11:16 +00:00
Sigurd Schneider
2787874275 [mjsunit] Disable slow test on verify_csa bot
Change-Id: Ie77197db54b6d9117ba3e8823e1308e9419f766d
Bug: v8:8312
Reviewed-on: https://chromium-review.googlesource.com/c/1282227
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56688}
2018-10-16 11:10:11 +00:00
Adam Klein
7b15c2bc88 [wasm] Remove MicrotasksScope usage from wasm-js.cc
All of the places where MicrotasksScope is placed on the
stack are callbacks from JavaScript, so microtasks would
never run microtasks inside one of these methods.

Change-Id: I6dc36971189d6479138b58b90e3b9acae0c3ef73
Reviewed-on: https://chromium-review.googlesource.com/c/1277721
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56687}
2018-10-16 11:05:41 +00:00
Sathya Gunasekaran
bc324dbd9b [class] Fix class field name initialization
Previously when class names were computed and set as part of
StoreDataPropertyInLiteral calls, it was observable to static fields
as these static fields are initialized right after the classes were
constructed but before the class names were installed.
This caused the name property to be undefined for this case.

Instead, this patch always forces the creation of a name property on
the class constructor when static class fields are used. This patch
does kill the class boilerplate optimization, but currently all static
class fields are installed using a runtime call to CreateDataProperty
so this isn't any worse when using static class fields.

In the future, this can be optimized away by storing the name on the
boilerplate.

There is spec discussion here:
https://github.com/tc39/proposal-class-fields/issues/85

There isn't a resolution yet, there's still discussion about whether
to have the name be undefined always for static class field
initializers. But, I don't think that's useful as it would always kill
our boilerplate optimization (like this patch does ..., but without the
future optimization potential).

Bug: v8:5367
Change-Id: I14afdf7ece3f2d9fa3c659d2c0bc3806e0b17abb
Reviewed-on: https://chromium-review.googlesource.com/c/1281002
Reviewed-by: Mythri Alle <mythria@chromium.org>
Reviewed-by: Daniel Ehrenberg <littledan@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Sathya Gunasekaran <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56686}
2018-10-16 11:02:21 +00:00
Sergiy Byelozyorov
499d7c5a85 [tools] Explicitly mark presubmit builder as non-reusable
This does not change the behavior, just makes it more explicit rather than
relying on the "presubmit" string being present in the builder name, which is
about to be deprecated.

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

No-Try: true
No-Tree-Checks: true
Bug: chromium:893955
Change-Id: I99724b42510a93012dd40e338b1ff8f4047c1276
Reviewed-on: https://chromium-review.googlesource.com/c/1280582
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Sergiy Byelozyorov <sergiyb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56685}
2018-10-16 10:52:30 +00:00
Sigurd Schneider
0112748741 [ia32,root] Make JSEntryStub (almost) isolate independent
Bug: v8:6666, v8:7777
Change-Id: I842e61731a6df22f9bcdaa92cb6841af5c8ef796
Reviewed-on: https://chromium-review.googlesource.com/c/1280228
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56684}
2018-10-16 10:48:07 +00:00
Michael Achenbach
c57508c477 Revert "[test] Temporary debug output for hanging tests"
This reverts commit c45bc57d21.

Reason for revert: Seen output once, that is enough.

Original change's description:
> [test] Temporary debug output for hanging tests
> 
> TBR=sigurds@chromium.org,sergiyb@chromium.org
> 
> Bug: v8:8292
> Change-Id: Ic03e2884ef645231807762f6b0210e69c5f9ac74
> Reviewed-on: https://chromium-review.googlesource.com/c/1282604
> Commit-Queue: Michael Achenbach <machenbach@chromium.org>
> Reviewed-by: Michael Achenbach <machenbach@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#56674}

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

Change-Id: Id5a2414682a9795998b86369368276e95c11394c
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:8292
Reviewed-on: https://chromium-review.googlesource.com/c/1283112
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56683}
2018-10-16 10:41:36 +00:00
Tobias Tebbi
d7b8f41f40 [torque] fix overload resolution for implicit parameters
This bug surfaced in builds with some versions of libstdc++
(use_custom_libcxx=false), because of an additional debug check in
std::min_element.

Change-Id: I799c0a282101373ecf743eed61f911886ca23dc8
Reviewed-on: https://chromium-review.googlesource.com/c/1282989
Reviewed-by: Daniel Clifford <danno@chromium.org>
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56682}
2018-10-16 10:15:16 +00:00
Dan Elphick
f602712f6f [snapshot] Create a ReadOnly snapshot
In preparation for sharing RO_SPACE between all Isolates within a
process, this first pulls RO_SPACE out of the Startup snapshot and puts
it in its own ReadOnly snapshot.

The snapshot is first populated with the read-only roots. After that the
StartupSerializer serializes as before but starting from the first
mutable root. References to objects in the ReadOnly snapshot that aren't
themselves roots are added to a new cache called ReadOnlyObjectCache
which functions like the PartialSnapshotCache but lives in the
ReadOnlySerializer rather than the StartupSerializer. These cache
entries are referenced using a new bytecode: ReadOnlyObjectCache. (To
make room for this, the ApiReference bytecode has been moved).

To reduce code duplication, the StartupSerializer has been refactored to
create a new base class RootSerializer, which ReadOnlySerializer also
subclasses. The base class is responsible primarily for keeping track of
already serialized roots and visiting the roots.

Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
Change-Id: Iff26042886130ae22eccf2e11b35f6f226f4a792
Bug: v8:8191
Reviewed-on: https://chromium-review.googlesource.com/c/1244676
Commit-Queue: Dan Elphick <delphick@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56681}
2018-10-16 10:13:20 +00:00
Hai Dang
fac6f63eb8 Use CopyElements (which uses memcpy) to copy FixedDoubleArray.
This improves the performance of ExtractFixedArray and
CloneFastJSArray for double arrays, which in turn improve the
performance of cloning double arrays with slice() or spreading.

This, however, does not improve performance of spreading holey
double arrays, because spreading needs extra work to convert
holes to undefined.

Bug: v8:7980
Change-Id: Ib8aed74abbb0b06982a3b754e134fa415cb7de2d
Reviewed-on: https://chromium-review.googlesource.com/c/1280308
Reviewed-by: Michael Stanton <mvstanton@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Commit-Queue: Hai Dang <dhai@google.com>
Cr-Commit-Position: refs/heads/master@{#56680}
2018-10-16 10:12:15 +00:00
Sigurd Schneider
a4e820df48 [tools] Add verify_csa statusfile param
Change-Id: Ibacdc7b41a96fc7c7d4ff44552fe6d86ec2ef1aa
Bug: v8:8312
Reviewed-on: https://chromium-review.googlesource.com/c/1282605
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56679}
2018-10-16 09:48:05 +00:00
Sigurd Schneider
18c135b1a4 [root] Reinitialize root register in deoptimizer
Bug: v8:6666, v8:7777
Change-Id: I0d1306bb96e12c81e876888b0ca69cae5855fbc3
Reviewed-on: https://chromium-review.googlesource.com/c/1273100
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56678}
2018-10-16 09:46:56 +00:00
Benedikt Meurer
1e586c3c70 [turbofan][x64] Match memory operand comparisons with zero.
The InstructionSelector on x64 was missing the ability to properly match
comparisons of memory operands with zero, i.e. it used to turn something
like

  Word32Equal(Load[Uint8](o, i), Int32Constant(0))

into

  movzbl reg, [o,i]
  cmp 0, reg

even requiring a temporary register. Now with this change it generates
the proper

  cmpb [o,i], 0

sequence.

R=sigurds@chromium.org

Bug: v8:8238
Change-Id: I52a71bbf95c85e11cb275f0f4a5726a6873cde95
Reviewed-on: https://chromium-review.googlesource.com/c/1281342
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56677}
2018-10-16 09:29:25 +00:00
Tobias Tebbi
b76c27bfe9 [torque] fix bug in Stack::DeleteRange
This bug does not affect the Torque run on tip-of-tree, but surfaced
in https://crrev.com/c/1196693.
The logic in Stack::DeleteRange was completely wrong and does not work
if the number of moved elements is bigger than the number of deleted
elements.

Change-Id: I5433b3b06e2e54646104493e9bc5e77b9763a521
Reviewed-on: https://chromium-review.googlesource.com/c/1282103
Reviewed-by: Michael Stanton <mvstanton@chromium.org>
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56676}
2018-10-16 09:24:45 +00:00
Sigurd Schneider
66afdda69d [ia32,root] Make stack comparisons ready for root support
Change-Id: I673c4bddca876dd506be4979bbf2208e6f0af329
Bug: v8:6666
Also-By: jgruber@chromium.org
Reviewed-on: https://chromium-review.googlesource.com/c/1280326
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56675}
2018-10-16 09:23:16 +00:00
Michael Achenbach
c45bc57d21 [test] Temporary debug output for hanging tests
TBR=sigurds@chromium.org,sergiyb@chromium.org

Bug: v8:8292
Change-Id: Ic03e2884ef645231807762f6b0210e69c5f9ac74
Reviewed-on: https://chromium-review.googlesource.com/c/1282604
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56674}
2018-10-16 09:00:33 +00:00
Jakob Gruber
1df203a2c7 [ia32,root] Extend support for root-relative accesses
This adds root-relative access in a couple of spots (e.g.: LoadRoot,
CompareRoot, PushRoot, Push, Move, etc.). Some methods now dispatch
based on whether the given Immediate is an embedded object.

ShouldGenerateIsolateIndependentCode() was added as a porting crutch:
it forces isolate-independent code for builtins even though the
builtin is not in the Builtins::IsIsolateIndependent() whitelist. This
allows us to easily figure out which builtins can be white-listed with
--print-embedded-builtin-candidates.

Newly isolate-independent builtins are now whitelisted.

Drive-by: Remove dead CompareRoot and JumpIfRoot helpers.

Bug: v8:6666
Change-Id: I6b5f6f71b90ac22e7e15482af0617b0ca1c319da
Reviewed-on: https://chromium-review.googlesource.com/c/1280665
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56673}
2018-10-16 08:59:30 +00:00
Dan Elphick
08b8e0ff5a Clarify roots iteration
Change Heap::IterateStrongRoots to never iterate the read-only roots. In
doing so remove VISIT_ALL_BUT_READ_ONLY and
VISIT_ONLY_STRONG_FOR_SERIALIZATION. All such uses should now use
VISIT_ALL and VISIT_ONLY_STRONG. Where ReadOnlyRoots iteration is
required, this adds ReadOnlyRoots(isolate)->Iterate() at the call site.

Add new begin, end, strong_mutable_roots_begin and
strong_mutable_roots_end methods to RootsTable and try and make the
existing uses a little more consistent.

Bug: v8:8191
Change-Id: Ie9d0f9e5186db418428e2fafd38432b0bd879daa
Reviewed-on: https://chromium-review.googlesource.com/c/1278500
Commit-Queue: Dan Elphick <delphick@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56672}
2018-10-16 08:42:30 +00:00
Florian Sattler
6b0bdcdb33 [gc] Remove empty no track gc members for release builds.
Change-Id: Ic8fe43e65fddec16b3c5c029acebda5ba1805e08
Reviewed-on: https://chromium-review.googlesource.com/c/1275812
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Florian Sattler <sattlerf@google.com>
Cr-Commit-Position: refs/heads/master@{#56671}
2018-10-16 08:41:24 +00:00
Georg Neis
16f1d16c5c [turbofan] Brokerize DependOnStablePrototypeChains.
As well as a few other things in JSNativeContextSpecialization.

Bug: v8:7790
Change-Id: Ic13abec45797bb4c6cc66a140180122529c7288d
Reviewed-on: https://chromium-review.googlesource.com/c/1280327
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56670}
2018-10-16 08:23:47 +00:00
Jakob Gruber
34ec9ec7ca [regexp] Fix invalid access into empty string
If `out` is empty accessing `out.back()` is invalid.

TBR=yangguo@chromium.org

Bug: chromium:894934
Change-Id: I7286c5b6a9857f1cdb2bcaf383094bee65bac393
Reviewed-on: https://chromium-review.googlesource.com/c/1282565
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56669}
2018-10-16 08:17:24 +00:00
Frank Tang
f523befab5 [Intl] Remove extra set_intl_date_time_format_function()
Bug: v8:5751
Change-Id: I51c76880059ab5ce62032777d01d7e44849e874a
Reviewed-on: https://chromium-review.googlesource.com/c/1275808
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56668}
2018-10-16 07:49:28 +00:00
Sigurd Schneider
c2b1e63538 [ia32,root] Cleanup code generator
Change-Id: If4b0725000a7a6bb7da6399b107a965d8cb4c86f
Bug: v8:6666
Reviewed-on: https://chromium-review.googlesource.com/c/1271075
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56667}
2018-10-16 07:48:23 +00:00
Jakob Gruber
6aec5e7ad1 Reland "[ia32,root] Disable root indirections in irregexp code"
This is a reland of fefd923048

Original change's description:
> [ia32,root] Disable root indirections in irregexp code
> 
> Irregexp code spills and restores ebx at boundaries, and clobbers it
> inbetween. Root-relative loads are disabled in this region.
> 
> Bug: v8:6666
> Change-Id: I9c68bc8ef88d324da609996a8457ac9e30a9b6fc
> Reviewed-on: https://chromium-review.googlesource.com/c/1280762
> Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
> Commit-Queue: Jakob Gruber <jgruber@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#56639}

Bug: v8:6666
Change-Id: I92fe74e790ab9b2937a3b15db85bad45e6443083
Reviewed-on: https://chromium-review.googlesource.com/c/1280226
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56666}
2018-10-16 07:30:13 +00:00
Benedikt Meurer
4f02387570 [async] Improve wrapper promise initialization code.
The code for the initialization of the wrapper promise was using the
generic InitializeJSObjectFromMap() helper, which generates a loop to
initialization all fields of some generic object. In this particular
case we're constructing a JSPromise, so we only need to initialize the
elements and properties pointers, since all the other fields are taken
care of by the PromiseInit() call on the next line anyways.

Bug: v8:7253, v8:8238
Change-Id: If11963d1f94607ed9e48788f597c81c7344aafbe
Reviewed-on: https://chromium-review.googlesource.com/c/1281602
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56665}
2018-10-16 06:53:24 +00:00
Michael Achenbach
599ee8345f [release] Remove deprecated arguments from auto roller
TBR=sigurds@chromium.org
NOTRY=true

Bug: v8:8310
Change-Id: I83b250ffa89deb59fc10434806db25893ffed375
Reviewed-on: https://chromium-review.googlesource.com/c/1282564
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56664}
2018-10-16 06:37:34 +00:00
Mathias Bynens
f69bc879a4 Revert "Ship well-formed JSON.stringify 🎉"
This reverts commit 0d91db0b32.

Reason for revert: <INSERT REASONING HERE>

Original change's description:
> Ship well-formed JSON.stringify 🎉
> 
> Proposal repository:
> https://github.com/tc39/proposal-global
> 
> Intent to ship:
> https://groups.google.com/d/msg/v8-users/IRu3bAC_pLM/pFwz2ti1AgAJ
> 
> Bug: v8:7782
> Change-Id: Iaf790f134917796deac0e84cc931828934a6e589
> Reviewed-on: https://chromium-review.googlesource.com/c/1260122
> Commit-Queue: Mathias Bynens <mathias@chromium.org>
> Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#56650}

TBR=gsathya@chromium.org,mathias@chromium.org

Change-Id: Ie214a72a01fa81f754fd411808eb0bb748f89dbb
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:7782
Reviewed-on: https://chromium-review.googlesource.com/c/1282563
Reviewed-by: Mathias Bynens <mathias@chromium.org>
Commit-Queue: Mathias Bynens <mathias@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56663}
2018-10-16 06:00:03 +00:00
Benedikt Meurer
8201da2913 [async] Reduce generated size of await builtins.
There's a AsyncBuiltinsAssembler::InitializeNativeClosure() helper which
is used by the `await` builtins to initialize the native closures, which
are registered as fulfill/reject handlers. This helper initializes a
JSFunction based on the builtin SharedFunctionInfo. Since we are dealing
with builtins here, there's no point in using the fully generic helper
CodeStubAssembler::GetSharedFunctionInfoCode(), but we can immediately
assume that the SharedFunctionInfo::function_data() field contains a Smi
builtin index (guarded by TNode CASTs).

This almost cuts the generated code size for the `await` builtins in a
half, and might also yield some performance improvements due to reduced
register and instruction cache pressure.

Bug: v8:7253, v8:8238
Change-Id: I3415c2f9e0f04a7154c4bf4c3fe8156854dbfe13
Reviewed-on: https://chromium-review.googlesource.com/c/1281604
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56662}
2018-10-16 05:40:53 +00:00
v8-ci-autoroll-builder
c36b21d63d Update V8 DEPS.
Rolling v8/build: 9578c43..e583af8

Rolling v8/buildtools: 2dff9c9..13a00f1

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/5aac72d..2be20fd

Rolling v8/third_party/depot_tools: dd78844..7d7bbc3

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

Change-Id: I262810f51342a3323fc8ce9fa9fcd972e362e2fe
Reviewed-on: https://chromium-review.googlesource.com/c/1281839
Commit-Queue: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Reviewed-by: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/master@{#56661}
2018-10-16 04:26:02 +00:00
Sathya Gunasekaran
9e984162da [Intl] Port ResolveLocale
- Add a new Intl::ResolveLocale method and uses it in all the intl objects.
- Fix CanonicalizeLocaleList to call out to HasProperty as per spec.
- Add calls to CanonicalizeLocaleList where it was previously missing.
- Change CanonicalizeLocaleListJS calls to CanonicalizeLocaleList now
  that we have migrated ResolveLocale.

Bug: v8:5751
Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
Change-Id: I4249d2045c1556f18d570b00f7c92cbc3fa52077
Reviewed-on: https://chromium-review.googlesource.com/c/1270255
Reviewed-by: Adam Klein <adamk@chromium.org>
Reviewed-by: Frank Tang <ftang@chromium.org>
Commit-Queue: Sathya Gunasekaran <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56660}
2018-10-16 02:34:54 +00:00
Bangfu Tao
92d6222f89 [gm.py] Support android_arm{,64} builds
This patch adds support for "gm.py android_arm.release.check"
and similar invocations.

Change-Id: I6e2204cb00f574d759b9e142ecabd2582153f707
Reviewed-on: https://chromium-review.googlesource.com/c/1278629
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56659}
2018-10-15 18:46:17 +00:00
Johannes Henkel
3ef5743aac Add protocol::Binary type to string-util.h.
This is in preparation of referencing this type from the code
generated by third_party/inspector_protocol/code_generator.py.
v8 will not use protocol::Binary, that is, the .pdl file for
v8 won't have binary fields. Therefore, we need not provide
an implementation for this type.

My overall WIP change is in here, and happy to explain more:
https://chromium-review.googlesource.com/c/chromium/src/+/1244719

Bug: chromium:891377
Cq-Include-Trybots: luci.chromium.try:linux_chromium_headless_rel;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: I7336be5f6a60e6ad143290eca09dea59ff4b56a8
Reviewed-on: https://chromium-review.googlesource.com/c/1277714
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Commit-Queue: Johannes Henkel <johannes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56658}
2018-10-15 18:29:44 +00:00