Commit Graph

649 Commits

Author SHA1 Message Date
Yang Guo
b32ee7b0f2 [d8] pass --no-arguments to omit top-level arguments
TBR=petermarshall@chromium.org

Bug: v8:8385
Change-Id: Iba13004e0fd03a82cb65ed497d4bd2b4d006b424
Reviewed-on: https://chromium-review.googlesource.com/c/1307417
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57155}
2018-10-31 07:42:22 +00:00
Frank Tang
38e046df6e Roll Test262
Bug: v8:7834
Change-Id: I2016b8d5e561546ec2f9b81d24c75bff0b950367
Reviewed-on: https://chromium-review.googlesource.com/c/1306896
Commit-Queue: Frank Tang <ftang@chromium.org>
Reviewed-by: Mathias Bynens <mathias@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57151}
2018-10-30 23:42:52 +00:00
Yang Guo
27ceb7499a [d8] only add arguments object if arguments are provided
This is to fix test262 tests which expect that there is no arguments
object.

Bug: v8:7186
Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
Change-Id: I56205c29609666dc832297e4d36a4d487eae36cc
Reviewed-on: https://chromium-review.googlesource.com/c/1291469
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
Reviewed-by: Mathias Bynens <mathias@chromium.org>
Commit-Queue: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56890}
2018-10-23 11:46:53 +00:00
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
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
Georg Neis
812e768cbe [modules] Implement new syntax: export * as foo from "..."
This is behind a new flag --harmony-namespace-exports.

Bug: v8:8101
Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
Change-Id: I9c252b6de2b08223fcf3296340b78d721471bdb4
Reviewed-on: https://chromium-review.googlesource.com/c/1258004
Commit-Queue: Georg Neis <neis@chromium.org>
Reviewed-by: Adam Klein <adamk@chromium.org>
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56550}
2018-10-11 07:08:33 +00:00
Frank Tang
e12d6ab1eb [Intl] Fix intl/date-format/constructor-order
Also move some code from separated function into
JSDateTimeFormat::Initialize as suggested in review of previous CL.

Bug: v8:8066
Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
Change-Id: I6be61482759aa54890e8f9d86483436a1abcde87
Reviewed-on: https://chromium-review.googlesource.com/c/1252882
Commit-Queue: Frank Tang <ftang@chromium.org>
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56459}
2018-10-08 23:28:00 +00:00
Frank Tang
766ab3a5a3 [Intl] fix Intl.Locale subclassing bug
Bug: v8:8259
Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
Change-Id: I52e1f23453cb9c0010645b7b71b09d0643765d28
Reviewed-on: https://chromium-review.googlesource.com/c/1269042
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56457}
2018-10-08 20:20:08 +00:00
Mathias Bynens
c74db9f6cd Roll Test262
Bug: v8:7834
Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
Change-Id: Ie588d032136b164a2e1bcfacf3c22b1a3428f20e
Reviewed-on: https://chromium-review.googlesource.com/c/1262676
Commit-Queue: Mathias Bynens <mathias@chromium.org>
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56437}
2018-10-08 10:33:49 +00:00
Frank Tang
fdfdce1d1e [Intl] Use flags in Locale
Use bits flag for caseFirst, hourCycle and numeric in Locale.
Also set up macro for V8_INTL_SUPPORT only in heap-symbols.h

Bug: v8:7684, v8:8256
Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
Change-Id: I3f6956b6dd5782e88676667381a7d8a7b2476bfc
Reviewed-on: https://chromium-review.googlesource.com/c/1262476
Commit-Queue: Frank Tang <ftang@chromium.org>
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56423}
2018-10-06 08:11:44 +00:00
Frank Tang
598ad02887 [Intl] clean up Locale code
Bug: v8:7684
Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
Change-Id: I9c727e2d8b9efad09fdf712655ea367560cd971f
Reviewed-on: https://chromium-review.googlesource.com/c/1263655
Commit-Queue: Frank Tang <ftang@chromium.org>
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56421}
2018-10-06 01:49:31 +00:00
Jungshik Shin
2abb31a9d6 Use ICU to validate and canonicalize lang tag
- Get rid of an unnecessary call to uloc_canonicalize in js-locale.
- Do not use regex, but rely on ICU for the structrural validity check
with Chrome's ICU or ICU 63 or newer. Otherwise, continue to use regex.

This became possible thanks to a couple of bug fixes in ICU ToT that
were cherry-picked for Chromium's ICU.

Not yet done is to change js-locale to use CanonicalizeLocale().
That will make a few more tests pass.

Bug: v8:8135
Test: test262/intl402/Intl/getCanonicalLocales/*
Test: test262/intl402/Locale/*
Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
Change-Id: I45c10b298fb041e0b39a4d96309c68a7966f91c2
Reviewed-on: https://chromium-review.googlesource.com/c/1215223
Commit-Queue: Jungshik Shin <jshin@chromium.org>
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56399}
2018-10-05 08:26:39 +00:00
Frank Tang
4274d2f190 [Intl] add Intl.Segmenter - part 1
Add the JSSegmenter and hook up constructor,
supportedLocales and resolvedOptions only
Desgin Doc- https://goo.gl/fgc2Cp

TBR: bmeurer@chromium.org
Bug: v8:6891
Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
Change-Id: Ief25fb31d724c55c43c0fdf3080294fa83486e4f
Reviewed-on: https://chromium-review.googlesource.com/c/1247362
Commit-Queue: Frank Tang <ftang@chromium.org>
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56393}
2018-10-05 02:42:30 +00:00
Frank Tang
b07081f2e2 [Intl] Split the failed tests into different bugs
Bug: v8:7684
Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
Change-Id: I0f83c37dd1f5bd85dc3f444b6583fda404812b92
Reviewed-on: https://chromium-review.googlesource.com/c/1260402
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56361}
2018-10-04 00:55:52 +00:00
Mathias Bynens
ae956fd94d Roll Test262
Bug: v8:7834
Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
Change-Id: I146f32f9f71beb58efefa12ffcf7beca67d6c850
Reviewed-on: https://chromium-review.googlesource.com/c/1259865
Commit-Queue: Mathias Bynens <mathias@chromium.org>
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56359}
2018-10-03 22:57:47 +00:00
Mathias Bynens
fa911fc68e Remove always-true --harmony-function-tostring runtime flag
It was shipped in Chrome 66.

Bug: v8:4958, v8:8255, v8:8238
Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
Change-Id: I52fb826f4f245bc6484d8f406ecf99bc17d268ee
Reviewed-on: https://chromium-review.googlesource.com/c/1254123
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Reviewed-by: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
Commit-Queue: Mathias Bynens <mathias@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56350}
2018-10-03 15:04:16 +00:00
Mathias Bynens
f7d357b20a Remove always-true --harmony-bigint runtime flag
It was shipped in Chrome 67.

Bug: v8:6791, v8:8238
Cq-Include-Trybots: luci.chromium.try:linux_chromium_headless_rel;luci.chromium.try:linux_chromium_rel_ng;luci.v8.try:v8_linux_noi18n_rel_ng;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: I94d8f0aa18570452403a35dea270b18f155c970a
Reviewed-on: https://chromium-review.googlesource.com/1253604
Reviewed-by: Georg Neis <neis@chromium.org>
Commit-Queue: Mathias Bynens <mathias@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56310}
2018-10-01 11:31:13 +00:00
Frank Tang
9b5ba9699a [Intl] Split the Locales bugs for easier triage
Bug: v8:7684
Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
Change-Id: Ifbdce635d190bd379414d3410aed1208412a9530
Reviewed-on: https://chromium-review.googlesource.com/1251587
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56298}
2018-09-29 00:58:43 +00:00
Jakob Kummerow
c2088790ae [atomics] Implement 64-bit Atomics operations
Atomics.{load,store,add,sub,and,or,xor,exchange,compareExchange}
are updated to support BigInt and BigInt64Array/BigUint64Array inputs.

Atomics.{wait,wake,isLockFree} are left unchanged for now.

Bug: v8:8100
Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
Change-Id: I8862d7e18c58ae08784535e9c010ba94f067a0ee
Reviewed-on: https://chromium-review.googlesource.com/1237294
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56228}
2018-09-26 01:13:30 +00:00
Sergiy Byelozyorov
c4cfafc354 Update V8 DEPS.
Rolling v8/third_party/icu: 7ca3ffa..c52a2a2

This includes fixes from https://crrev.com/c/1240414.

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

Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
Change-Id: I2afd319dbb244356a9bb057eb80c5fb0310b8686
Reviewed-on: https://chromium-review.googlesource.com/1240106
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Commit-Queue: Sergiy Byelozyorov <sergiyb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56181}
2018-09-24 18:34:31 +00:00
Sam Clegg
505cccb9e9 [d8] Update new Worker API to match the Web API
Previously we only supported strings and not filenames.  This
changes the default to filename and adds a new `type: string` which can
be passed `options` to allow for strings to be passed in test code.

See: https://developer.mozilla.org/en-US/docs/Web/API/Worker/Worker

Bug: v8:8020
Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
Change-Id: Ie8818885c5c5c071b6614852322cb45aeb01a647
Reviewed-on: https://chromium-review.googlesource.com/1185980
Commit-Queue: Sam Clegg <sbc@chromium.org>
Reviewed-by: Ben Smith <binji@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56056}
2018-09-20 00:10:28 +00:00
PhistucK
53de7345bd [Intl] Rename dayperiod to dayPeriod
Previously, DateTimeFormat.prototype.formatToParts returned an object
with the property key 'dayperiod' which is incorrect as per the spec.
This patch updates the property key to say 'dayPeriod', making this spec
compliant.

R=cira@chromium.org

Bug: chromium:865351
Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
Change-Id: I37f50797387bc69d5e29d7c2911bc5cc0fad37ac
Reviewed-on: https://chromium-review.googlesource.com/1145304
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Commit-Queue: PhistucK <phistuck@gmail.com>
Cr-Commit-Position: refs/heads/master@{#55922}
2018-09-14 17:04:03 +00:00
Frank Tang
6e5e3b2c9e [Intl] fix formatToPart generate unit in plural if pass in plural as unit.
Bug: v8:8150
Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
Change-Id: If2157d486ac164fcfd0efdc5469357fbad72e0de
Reviewed-on: https://chromium-review.googlesource.com/1215271
Commit-Queue: Frank Tang <ftang@chromium.org>
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55782}
2018-09-11 10:02:04 +00:00
Frank Tang
eec50fa3cf [Intl] Remove quarter hack after cherrypick icu fix.
Manually roll ICU to 7ca3ffa to pick up an upstream fix for quarter handling.

Remove the hack that prevent unexpected behavior in ICU
and remove the skip of failing tests.

Bug: v8:8151,v8:7869
Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
Change-Id: Ic9a56679bf1eb9dc18c739161838d518fd664d6f
Reviewed-on: https://chromium-review.googlesource.com/1214522
Reviewed-by: Jungshik Shin <jshin@chromium.org>
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55774}
2018-09-11 09:11:18 +00:00
Frank Tang
5609e27ec6 [Intl] fix Intl.Locale toStringTag bugs
Bug: v8:7684
Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
Change-Id: I48490187d4cb967b3567ff12306aad094698d0ee
Reviewed-on: https://chromium-review.googlesource.com/1218062
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55773}
2018-09-11 09:09:08 +00:00
Simon Zünd
cfe7115690 [array] Move Array.p.unshift fall-back to Torque
This CL implements a generic baseline version of Array.p.unshift
in Torque, enabling us to remove the JS fall-back.

The elements-accessor fast-path is still used, but the check whether
to use it is also moved to Torque.

Support for sparse JSArrays is removed.

Drive-by change: Small refactoring in builtins-array that will
get extended to other array builtins in a follow-up CL.

R=cbruni@chromium.org, jgruber@chromium.org

Bug: v8:7624
Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
Change-Id: I7b23ce15e7b922eb333f61a408050dedec77c95a
Reviewed-on: https://chromium-review.googlesource.com/1189902
Commit-Queue: Simon Zünd <szuend@google.com>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55670}
2018-09-06 07:09:05 +00:00
Sathya Gunasekaran
f96c577ff5 test262 roll
Bug: v8:7834
Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
Change-Id: Ie66f443b86d3cf7bd64cc338d84231045ca5e3c6
Reviewed-on: https://chromium-review.googlesource.com/1208517
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Sathya Gunasekaran <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55667}
2018-09-05 23:13:20 +00:00
Mike Stanton
fd334b3216 [builtins] Enable Torque Array.prototype.splice
Before, splice was implemented with a C++ fast path and a
comprehensive JavaScript version.

This impl. is entirely in Torque with a fastpath for SMI,
DOUBLE and OBJECT arrays, and a comprehensive slow path.
The same level of "sparse" array support as given by the
array.js implementation is included.

This reland addresses several issues:

* Removed "sparse" array support from splice.
* Addressed ClusterFuzz issue 876443:
  The test and code that uses the fix is in this CL.
  The fix in isolation can be seen here:
  https://chromium-review.googlesource.com/c/v8/v8/+/1199403
* Removed dead code in elements.cc

BUG=chromium:876443, v8:8131, v8:1956, v8:7221

Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
Change-Id: I2d4a66c24ba1edabeca34e27e6ff8ee6136ed5f1
Reviewed-on: https://chromium-review.googlesource.com/1201783
Commit-Queue: Michael Stanton <mvstanton@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55610}
2018-09-04 13:18:23 +00:00
Sathya Gunasekaran
c8486d22de [ESNext] Enable test262 tests for globalThis
Bug: v8:5537
Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
Change-Id: I778ec7f1b09665bf15b208f5dfa6517c46e9e5d0
Reviewed-on: https://chromium-review.googlesource.com/1195536
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Sathya Gunasekaran <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55506}
2018-08-29 19:43:00 +00:00
Michael Achenbach
6206a3e362 [test] Share resource-fetching logic with all d8 test cases
This shares logic for finding additional resources in JS source code.
Previously the logic was implemented for mjsunit, now it will be used
across all d8-based test cases.

This'll enable adding those test suites for Android testing.

Bug: chromium:866862
Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
Change-Id: I7c89ba141483aaf692a03c0e168edb61bbb7b010
Reviewed-on: https://chromium-review.googlesource.com/1193873
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55503}
2018-08-29 17:51:43 +00:00
Sathya Gunasekaran
ed42a71d5c test262 roll
Bug: v8:7834
Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
Change-Id: Ieab3529ce40a2c01c18f7fade10ec8b437173aa9
Reviewed-on: https://chromium-review.googlesource.com/1194424
Commit-Queue: Sathya Gunasekaran <gsathya@chromium.org>
Reviewed-by: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55472}
2018-08-28 21:18:23 +00:00
Sathya Gunasekaran
59c03fef01 [Intl] Correctly pass usage option to Collator
The spec specifies that search and standard can not be valid values
for the collation extension keyword. Instead users are expected to use
the options bag to set the correct usage options.

But, ICU expects the usage option to be set through the collation
extension value.

In this patch, we set the usage option using the collation extension
value in ICU. For resolvedOptions, we filter out this extension value
using ICU to be spec compatible.

Previously, we stored the usage option on the JSCollator instance. But
this patch changes the logic to just look it up from the icu::Collator
when required. This saves one word of memory.

This fails a test262 that was incorrectly fixed. A follow on patch
will fix the test262 test.

Bug: v8:5751
Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
Change-Id: I8c66c6286287e686f4cd152fa1301f9d51c38654
Reviewed-on: https://chromium-review.googlesource.com/1180488
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Sathya Gunasekaran <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55437}
2018-08-27 23:31:24 +00:00
Brian Stell
6b3fde4270 Replace the JS version of supportedLocalesOf with the C++ version.
Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
Change-Id: I5f6adec8857398f82598295e86d2559c96363647

Bug: v8:7955, v8:7869, v8:5751
Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
Change-Id: I5f6adec8857398f82598295e86d2559c96363647
Reviewed-on: https://chromium-review.googlesource.com/1184046
Commit-Queue: Brian Stell <bstell@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55434}
2018-08-27 17:44:49 +00:00
Simon Zünd
837fec91a4 [array] Replace JS Array.p.reverse with a Torque implementation
This CL adds a baseline implementation for Array.p.reverse in Torque,
as well as fastpaths for PACKED elements kinds.

Support for sparse JSArrays was removed.

R=jgruber@chromium.org, petermarshall@chromium.org

Bug: v8:7624
Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
Change-Id: I12900fbbb44746f1c5d36b78be826e14b88b4f69
Reviewed-on: https://chromium-review.googlesource.com/1185600
Commit-Queue: Simon Zünd <szuend@google.com>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55369}
2018-08-24 05:57:20 +00:00
Tobias Tebbi
e99a109281 Revert "[builtins] Reland Array.prototype.splice() Torque implementation."
This reverts commit cdaaa31151.

Reason for revert: chromium:876445 chromium:876453 chromium:876443

Original change's description:
> [builtins] Reland Array.prototype.splice() Torque implementation.
> 
> Before, splice was implemented with a C++ fast path and a
> comprehensive JavaScript version.
> 
> This impl. is entirely in Torque with a fastpath for SMI,
> DOUBLE and OBJECT arrays, and a comprehensive slow path.
> The same level of "sparse" array support as given by the
> array.js implementation is included.
> 
> Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
> Change-Id: Ia7334a30b401988309e9909cfa0069da0bb6fb9f
> Reviewed-on: https://chromium-review.googlesource.com/1169466
> Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
> Reviewed-by: Jakob Gruber <jgruber@chromium.org>
> Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#55263}

TBR=mvstanton@chromium.org,jgruber@chromium.org,tebbi@chromium.org

Change-Id: I5b750a98e671b7284474ffcabc6b4d37a9d1219e
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
Reviewed-on: https://chromium-review.googlesource.com/1184741
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55289}
2018-08-22 08:57:38 +00:00
Tobias Tebbi
cdaaa31151 [builtins] Reland Array.prototype.splice() Torque implementation.
Before, splice was implemented with a C++ fast path and a
comprehensive JavaScript version.

This impl. is entirely in Torque with a fastpath for SMI,
DOUBLE and OBJECT arrays, and a comprehensive slow path.
The same level of "sparse" array support as given by the
array.js implementation is included.

Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
Change-Id: Ia7334a30b401988309e9909cfa0069da0bb6fb9f
Reviewed-on: https://chromium-review.googlesource.com/1169466
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55263}
2018-08-21 11:40:19 +00:00
Michael Hablich
38b1d20d8a Revert "[builtins] Enable Torque Array.prototype.splice"
This reverts commit ff4fa92e88.

Reason for revert: blocks roll: https://chromium-review.googlesource.com/c/chromium/src/+/1167969 ... see https://chromium-swarm.appspot.com/task?id=3f344f7ada4e0110&refresh=10&show_raw=1 for stacktrace.

Original change's description:
> [builtins] Enable Torque Array.prototype.splice
> 
> Before, splice was implemented with a C++ fast path and a
> comprehensive JavaScript version.
> 
> This impl. is entirely in Torque with a fastpath for SMI,
> DOUBLE and OBJECT arrays, and a comprehensive slow path.
> The same level of "sparse" array support as given by the
> array.js implementation is included.
> 
> Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
> Change-Id: Ibfa3407ed75b9ad15ac54cce446b3952e38f90a9
> Reviewed-on: https://chromium-review.googlesource.com/1039190
> Reviewed-by: Yang Guo <yangguo@chromium.org>
> Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
> Commit-Queue: Michael Stanton <mvstanton@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#54974}

TBR=danno@chromium.org,yangguo@chromium.org,mvstanton@chromium.org,tebbi@chromium.org,szuend@google.com

Change-Id: I900f667b30a0cf673ead9621618a9988cf85ffdf
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
Reviewed-on: https://chromium-review.googlesource.com/1168902
Commit-Queue: Michael Hablich <hablich@chromium.org>
Reviewed-by: Michael Hablich <hablich@chromium.org>
Reviewed-by: Michael Stanton <mvstanton@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54998}
2018-08-09 07:29:14 +00:00
Mike Stanton
ff4fa92e88 [builtins] Enable Torque Array.prototype.splice
Before, splice was implemented with a C++ fast path and a
comprehensive JavaScript version.

This impl. is entirely in Torque with a fastpath for SMI,
DOUBLE and OBJECT arrays, and a comprehensive slow path.
The same level of "sparse" array support as given by the
array.js implementation is included.

Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
Change-Id: Ibfa3407ed75b9ad15ac54cce446b3952e38f90a9
Reviewed-on: https://chromium-review.googlesource.com/1039190
Reviewed-by: Yang Guo <yangguo@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Michael Stanton <mvstanton@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54974}
2018-08-08 12:32:35 +00:00
Sathya Gunasekaran
363fe1eb66 [Intl] Optimize Intl.Collator
This patch ports most of the Intl.Collator from JS to C++.

The Intl.Collator object no longer stores all the resolved
values. Instead these are looked up on demand as part of
Intl.Collator.prototype.resolvedOptions(), saving several words. In
the future, we can cache the result of the resolvedOptions as well.

In this patch, we use ICU to do parsing of the unicode extension in
the bcp47 language tag instead of using a custom extension parser.

This patch also fixes several spec compliance bugs as well.

Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
Change-Id: Iaaa7be4a628404da1bd83d882e04a2c6de70ebd9
Bug: v8:5751, v8:7480
Reviewed-on: https://chromium-review.googlesource.com/1165084
Commit-Queue: Sathya Gunasekaran <gsathya@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54965}
2018-08-08 10:21:19 +00:00
Hai Dang
5138e02ac1 Fix Array lastIndexOf to call [[HasProperty]] before [[Get]]
Also add more test cases of Array lastIndexOf with proxy, inspired by test262.

In the path for sparse arrays, no changes are needed because element accesses
are not observable there (thanks to UseSparseVariant).

Bug: v8:7813
Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
Change-Id: Ifd47149f654e92f56d0a1ed6b3debc93718702be
Reviewed-on: https://chromium-review.googlesource.com/1160307
Commit-Queue: Hai Dang <dhai@google.com>
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54887}
2018-08-03 08:45:55 +00:00
Jungshik Shin
f24b575d6c Fix canonicalization of grandfathered tags
ICU maps a few grandfathered tags to made-up values even when there
is no preferred value entry in the IANA language tag registry. [1]

1. Check for grandfathered tags without preferred value upfront
   and return them as they're.
2. Lowercase the input before structural validity check to simplify
   check for grandfathered tag without preferred value as well
   as regexps used in the structural validity check.

intl/general/grandfathered_tags_without_preferred_value is added and
intl/general/language_tags_with_preferred_values is changed to check
for case-insensitive matching of grandfathered tags.

[1] https://www.iana.org/assignments/language-subtag-registry/language-subtag-registry

Bug: v8:7669
Test: test262/intl402/Intl/getCanonicalLocales/preferred-grandfathered
Test: intl/general/grandfathered_tags_without_preferred_value
Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
Change-Id: Ie0520de8712928300fd71fe152909789483ec256
Reviewed-on: https://chromium-review.googlesource.com/1156529
Commit-Queue: Jungshik Shin <jshin@chromium.org>
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54829}
2018-07-31 23:49:45 +00:00
Frank Tang
9ba2a0a281 [Intl] Update the toStringTag for Intl.{List,RelativeTime}Format
Bug: v8:7993,v8:7994
Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
Change-Id: I058a2b8181b933dce9f71dab2b03304a424ae0ea
Reviewed-on: https://chromium-review.googlesource.com/1154237
Commit-Queue: Frank Tang <ftang@chromium.org>
Reviewed-by: Daniel Ehrenberg <littledan@chromium.org>
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54795}
2018-07-30 21:55:35 +00:00
Frank Tang
ac8b5b919e [Intl] Implement Intl.ListFormat constructor
Spec: http://tc39.github.io/proposal-intl-list-format/

Design Doc:  go/add-intl.listformat-to-v8

Test: intl/list-format/*

R=gsathya@chromium.org, mvstanton@chromium.org

Bug: v8:7871
Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
Change-Id: I0dfb91b7806007e4f02f3b0438c30528c8143081
Reviewed-on: https://chromium-review.googlesource.com/1124343
Commit-Queue: Frank Tang <ftang@chromium.org>
Reviewed-by: Daniel Ehrenberg <littledan@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54668}
2018-07-24 21:50:13 +00:00
Frank Tang
b819afeb4f [Intl] Implement Intl.RelativeTimeFormat.prototype.{format, formatToParts}
Spec: http://tc39.github.io/proposal-intl-relative-time/

Design Doc: go/add-intl.relativetimeformat-to-v8

Test: test262/intl402/RelativeTimeFormat/*, intl/relative-time-format/*

R=cira@chromium.org, gsathya@chromium.org

Bug: v8:7869
Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
Change-Id: Ied95d601cf707db5d555f9d963b9b1f206e37331
Reviewed-on: https://chromium-review.googlesource.com/1124728
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54520}
2018-07-18 12:49:22 +00:00
Frank Tang
26c7aa8c86 [Intl] prototype Intl.Locale.prototype.maximize/minimize
Bug: v8:7684
Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
Change-Id: I8ee5aa4a2f481bbe4e47ab3889a9a6084b6b2943
Reviewed-on: https://chromium-review.googlesource.com/1137927
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54519}
2018-07-18 12:48:12 +00:00
Frank Tang
b7e108d601 [Intl] Use correct fallback values for options in Locale constructor
Fixes intl402/Locale/constructor-options-{casefirst,hourcycle,numeric}-invalid

Bug: v8:7684
Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
Change-Id: I43317f4bb1bb8422940faab1e5afa4162ed9ea11
Reviewed-on: https://chromium-review.googlesource.com/1137476
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54504}
2018-07-17 20:22:06 +00:00
Frank Tang
a31bd4cb02 [Intl] Change PluralRules.prototype.resolvedOptions to return newly created array for pluralCategories
Test: test262/intl402/PluralRules/prototype/resolvedOptions/pluralCategories

Bug: v8:7830
Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
Change-Id: Ie527f51fab67e63cf5bf56a1da883a3e16ce48ac
Reviewed-on: https://chromium-review.googlesource.com/1132339
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54477}
2018-07-17 00:40:36 +00:00
Frank Tang
02fe0c2477 [Intl] Plumb through locale and options from Array#toLocaleString
Use the given locale and options when performing toLocaleString on each
individual element in a given array.

Bug: v8:7832
Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
Change-Id: I718a33c42e85819065599ee6bad59fb25afa7e15
Reviewed-on: https://chromium-review.googlesource.com/1132464
Commit-Queue: Frank Tang <ftang@chromium.org>
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54474}
2018-07-16 18:37:25 +00:00
Jungshik Shin
035581301d Fix GetOption per Ecma 402 #sec-getoption
getGetoption() in intl.js misimplemented Ecma 402 #sec-getoption by
calling options[property] twice, once to check if it's defined
and the second time to retrieve the value when it's defined.

Bug: v8:7869
Test: test262/intl402/RelativeTimeFormat/con*/cons*/option*order
Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
Change-Id: I6d585767232c9f4c0252e65e2891c813db3da641
Reviewed-on: https://chromium-review.googlesource.com/1128444
Commit-Queue: Jungshik Shin <jshin@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54405}
2018-07-12 12:41:58 +00:00
Jungshik Shin
d9f4c84fa4 Roll ICU to ICU 62.1
See
  https://chromium-review.googlesource.com/c/chromium/deps/icu/+/1128503
for ICU changes.

Fix tests for ICU 61/Unicode 11/CLDR 33.1

* Update mjsunit/harmony/regexp-property-script-extensions.js per
  ScriptExtensions.txt in Unicode 11
* Update mjsunit/intl-numberformat-formattoparts.js for CLDR 33.1
* Mark an invalid Mozilla test (Georgian uppercasing)
* Fix currency format test (U+00A0 instead of U+0020)
* Enable Script_Extensions tests (test262)
* Add support for Extended_Pictographic in regex

Ref. https://github.com/tc39/ecma262/issues/1219.

Bug: chromium:850334, v8:7825
Test: intl/*, test262/intl402/*
Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
Change-Id: I146080cdc1164db4a71f484918723cf302666df8
Reviewed-on: https://chromium-review.googlesource.com/1111857
Reviewed-by: Mathias Bynens <mathias@chromium.org>
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54376}
2018-07-11 10:24:26 +00:00