Commit Graph

716 Commits

Author SHA1 Message Date
Frank Tang
bf18ee82b8 Roll test262
Bug: v8:7834
Change-Id: I5eec99773ac6f366ec5850350083379b4978446e
Reviewed-on: https://chromium-review.googlesource.com/c/1446334
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59260}
2019-01-31 18:31:47 +00:00
Z Duong Nguyen-Huu
1db56cb5ca Maintain order of keys for object.assign as spec
According to spec https://tc39.github.io/ecma262/#sec-object.assign,
https://tc39.github.io/ecma262/#sec-ordinaryownpropertykeys, object.assign should copy symbols last. The current implementation ignores that order.
The idea of the fix here is to do iteration twice, one to skip symbol first then one to skip string.

Bug: v8:6705
Change-Id: I27a353e0c44a8f7adcf55d7143dd3ce26bea2724
Reviewed-on: https://chromium-review.googlesource.com/c/1432597
Commit-Queue: Z Nguyen-Huu <duongn@microsoft.com>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59258}
2019-01-31 17:55:57 +00:00
Mathias Bynens
b645a259bd [parser] Allow try {} catch (e) { for (var e of x) {} }
This patch changes the parser to allow for-of initializer
var-redeclaration of non-destructured catch parameters.

Previously, the spec allowed var-redeclaration of a
non-destructured catch parameter…

    try {} catch (e) { var e; }

…except in the particular case where the var declaration is
a for-of initializer:

    try {} catch (e) { for (var e of whatever) {} }

https://github.com/tc39/ecma262/pull/1393 removes this strange
exceptional case. This patch implements that change.

BUG=v8:8759

Change-Id: Ia4e33ac1eab89085f8a5fdb547f479cfa38bbee5
Reviewed-on: https://chromium-review.googlesource.com/c/1444954
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Mathias Bynens <mathias@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59209}
2019-01-30 14:20:58 +00:00
Z Duong Nguyen-Huu
0cabc54666 Throw TypeError if a proxy's [[OwnPropertyKeys]] returns dupes
Adding implementation for step 9 which is missing for spec:
https://tc39.github.io/ecma262/#sec-proxy-object-internal-methods-and-internal-slots-ownpropertykeys
Update bytecode_expectations as well.

Bug v8:6776

Change-Id: Id191f9604e2dc08e71cbcff8ebd5707c233af193
Reviewed-on: https://chromium-review.googlesource.com/c/1419779
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Z Nguyen-Huu <duongn@microsoft.com>
Cr-Commit-Position: refs/heads/master@{#59180}
2019-01-29 17:55:06 +00:00
Frank Tang
4bc5932f29 Roll test262
Bug: v8:7834,v8:8613,v8:8243
Change-Id: I4464b52ac70fde0e8cec175197833b3f72806263
Reviewed-on: https://chromium-review.googlesource.com/c/1440561
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59145}
2019-01-28 22:30:37 +00:00
Frank Tang
75f8f2f85e [Intl] Fix resolved-locale-with-hc-unicode
Remove hc from -u- if does not agree with the resolved one.


Bug: v8:7482
Change-Id: I635c5357b8fd2b630ed80577a9b6a116e9a0e3f4
Reviewed-on: https://chromium-review.googlesource.com/c/1417170
Commit-Queue: Frank Tang <ftang@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59084}
2019-01-25 02:56:36 +00:00
Frank Tang
bdf8780f3d Roll Test262
Bug: v8:7834,v8:8707,v8:8664
Change-Id: Idb2d5aa3fb901a6835eb9a07640759dbaee4a1e8
Reviewed-on: https://chromium-review.googlesource.com/c/1436054
Reviewed-by: Mathias Bynens <mathias@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59082}
2019-01-25 02:04:13 +00:00
Frank Tang
9732200408 Reland test part of "[Intl] Cleans up intl-relative-time-format flag"
This is a partial reland of 048a3a3ecb

Original change's description:
> [Intl] Cleans up intl-relative-time-format flag
>
> Cleans up always=true intl-relative-time-format flag
> It shipped in m71 in Dec 2018.
>
> Bug: v8:8704
> Change-Id: I52d86aea9aedf201a216a1df0773a486fbee37b9
> Reviewed-on: https://chromium-review.googlesource.com/c/1417299
> Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
> Commit-Queue: Frank Tang <ftang@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#58904}

Bug: v8:8704
Change-Id: Iac62a347eea7f85dd3fa4a3bbfb18091b80f9a5e
Reviewed-on: https://chromium-review.googlesource.com/c/1429224
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59081}
2019-01-24 23:17:35 +00:00
Michael Achenbach
4d2a3cc9a5 [test] Add interpreted-regexp testing variant
This adds the new runtime flag as a variant and runs it on a subset of
builders corresponding to the "extra" testing set.

Currently failing tests are skipped in the new variant.

After https://crrev.com/c/1433777 this costs only little additional
resources.

Bug: v8:8678
Change-Id: Ibd0e38872814d11252e55a7c6a58d313aa84ebe3
Reviewed-on: https://chromium-review.googlesource.com/c/1433774
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59080}
2019-01-24 19:11:22 +00:00
Toon Verwaest
22ad8d4f35 [parser] Fix SyntaxError in case of eval of for-of conflicting with catch variable
Bug: v8:4231
Change-Id: I833ef23d32a27a403fe733e17f6ff1aa182c39b1
Reviewed-on: https://chromium-review.googlesource.com/c/1430701
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59079}
2019-01-24 18:08:55 +00:00
Toon Verwaest
cf88fe3207 [parser] Detect var/let conflicts in the preparser
Also insert NestedVariableDeclarations in the preparser if they occur. This
should be uncommon enough to not hurt preparser performance. This will also
allow us to stop checking for conflicts on already preparsed code. Since the
preparser itself will mainly run off the main thread, this can allow us to free
some main-thread time.

Bug: v8:7829, v8:8706
Change-Id: I03f2690eb7b22e941995d6f2697e64211ddbeffb
Reviewed-on: https://chromium-review.googlesource.com/c/1430069
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59044}
2019-01-23 16:20:57 +00:00
Frank Tang
45fe356e24 [Intl] Remove linebreak from Segmenter
Sync w/ https://github.com/tc39/proposal-intl-segmenter/pull/60

Bug: v8:8717
Change-Id: I98fe9e88367a611c14c82195222c8fe8a52e4bc8
Reviewed-on: https://chromium-review.googlesource.com/c/1422749
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59016}
2019-01-23 04:54:56 +00:00
Frank Tang
2c9efe52f9 Update test262.
Rolling v8/test/test262/data: https://chromium.googlesource.com/external/github.com/tc39/test262/+log/af984c0..4f1155

Bug: v8:7834
Change-Id: I6eeff251b9a3a773b386d7963981dc72f48d6e44
Reviewed-on: https://chromium-review.googlesource.com/c/1423096
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Reviewed-by: Frank Tang <ftang@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58939}
2019-01-19 01:19:54 +00:00
Frank Tang
4682a3572f [Intl] Move GetOptions('localeMatcher') earlier
See https://github.com/tc39/proposal-intl-list-format/pull/36

Bug: v8:8614
Change-Id: Ifa9bebf27163420562c0d62867b9a240b5c4c502
Reviewed-on: https://chromium-review.googlesource.com/c/1386324
Commit-Queue: Frank Tang <ftang@chromium.org>
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58938}
2019-01-19 00:09:51 +00:00
Frank Tang
1b41a5fdf0 Revert "[Intl] Cleans up intl-relative-time-format flag"
This reverts commit 048a3a3ecb.

Reason for revert: Break V8 Linux64 GC Stress 

Original change's description:
> [Intl] Cleans up intl-relative-time-format flag
> 
> Cleans up always=true intl-relative-time-format flag
> It shipped in m71 in Dec 2018.
> 
> Bug: v8:8704
> Change-Id: I52d86aea9aedf201a216a1df0773a486fbee37b9
> Reviewed-on: https://chromium-review.googlesource.com/c/1417299
> Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
> Commit-Queue: Frank Tang <ftang@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#58904}

TBR=jshin@chromium.org,gsathya@chromium.org,ftang@chromium.org

Change-Id: I811decf09e2e1e06323eb5a651cd921d669fc4db
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:8704
Reviewed-on: https://chromium-review.googlesource.com/c/1420359
Reviewed-by: Frank Tang <ftang@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58905}
2019-01-18 07:54:08 +00:00
Frank Tang
048a3a3ecb [Intl] Cleans up intl-relative-time-format flag
Cleans up always=true intl-relative-time-format flag
It shipped in m71 in Dec 2018.

Bug: v8:8704
Change-Id: I52d86aea9aedf201a216a1df0773a486fbee37b9
Reviewed-on: https://chromium-review.googlesource.com/c/1417299
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58904}
2019-01-18 07:16:57 +00:00
Sathya Gunasekaran
263194adeb [test262] Roll
Change-Id: Ic1d4371dc5603df1451bc9adc8386a83f9971786
Bug: v8:7834
Reviewed-on: https://chromium-review.googlesource.com/c/1418857
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Sathya Gunasekaran <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58902}
2019-01-17 23:08:17 +00:00
Frank Tang
2bb5b40f75 [Intl] Fix Intl/getCanonicalLocales/canonicalized-tags
and also fix part of test in intl402/Locale/likely-subtags

Improve Intl::ToLanguageTag to also handle -yes in -u- extension
Avoid removing if there are other text after -true and -yes before -

Bug: v8:7669, v8:8236
Change-Id: I59943651889602288e6978d0b1c875d89199fe33
Reviewed-on: https://chromium-review.googlesource.com/c/1383094
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@{#58900}
2019-01-17 19:52:41 +00:00
Z Duong Nguyen-Huu
f85a3554d2 Handle Date.p.setYear edge cases from test262
The current implementation does not correctly handle the edge case for setYear
where input is something like -0.99

Bug: v8:5139
Change-Id: Ia919814eb6282c7f996cccc4531ed073e843ba27
Reviewed-on: https://chromium-review.googlesource.com/c/1412501
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Z Nguyen-Huu <duongn@microsoft.com>
Cr-Commit-Position: refs/heads/master@{#58899}
2019-01-17 18:29:36 +00:00
Toon Verwaest
f2303d9a34 [parser] Use cached kDynamic variable for eval-introduced vars
That makes the declaration in sync with how dynamic references are resolved,
avoiding duplicate variable creation in the likely case that the variable is
also referenced within the eval.

Bug: v8:5112, v8:5135, v8:8693
Change-Id: I0c55495f573fe8b5076b1627c139ff72d1adda74
Also-by: leszeks@chromium.org
Reviewed-on: https://chromium-review.googlesource.com/c/1408890
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58850}
2019-01-16 14:18:33 +00:00
Frank Tang
c17d21a0fa [Intl] Not harden the array return by supportedLocalesOf
see spec change in
https://github.com/tc39/ecma402/pull/278/

Bug: v8:8398
Change-Id: If5582f96d6dc3debdccb466d3d239efa52bbbf06
Reviewed-on: https://chromium-review.googlesource.com/c/1404436
Commit-Queue: Frank Tang <ftang@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58717}
2019-01-10 21:39:47 +00:00
Frank Tang
09b995e18f [Intl] Remove skipped tests depend on stable sort
TC39 accept stable sort in Oct 2018

Bug: v8:7808
Change-Id: I2ad1bca62bda10838dc33acb109a5c937a3b1947
Reviewed-on: https://chromium-review.googlesource.com/c/1400401
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58646}
2019-01-08 19:11:47 +00:00
Frank Tang
c985078234 [Intl] Fix -0 formatting bugs
The spec changed in 7/2018 to treat -0 and 0 differently.
https://github.com/tc39/ecma402/pull/232

Bug: v8:7474, v8:8099
Change-Id: I77db4ae716b081b7628dc7ee253a463520c7f6e9
Reviewed-on: https://chromium-review.googlesource.com/c/1400403
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58645}
2019-01-08 19:10:42 +00:00
Frank Tang
8b16a54ff5 [Intl] Implement nu/numberingSystem
Sync with latest Intl.RelativeTimeFormat spec.
See https://github.com/tc39/proposal-intl-relative-time/pull/99
See https://github.com/tc39/proposal-intl-relative-time/pull/100

Bug: v8:8613
Change-Id: Icc5bb73ecf65e979abc23cc430259584a7bf4b48
Reviewed-on: https://chromium-review.googlesource.com/c/1385930
Commit-Queue: Frank Tang <ftang@chromium.org>
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58607}
2019-01-08 03:17:07 +00:00
Frank Tang
6bff5d7974 [Intl] Reland part of "Validate u extension type"
Fix intl402/*/ignore-invalid-unicode-ext-values
intl/*/check-*

Bug: v8:7481
Change-Id: I5c9d7e19c010953ff9503a2e0981fa148278a451
Reviewed-on: https://chromium-review.googlesource.com/c/1396739
Commit-Queue: Frank Tang <ftang@chromium.org>
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58606}
2019-01-08 02:10:56 +00:00
Leszek Swirski
00a2481a24 [ignition] Move destructuring assignments to bytecode generation
Instead of de-sugaring destructuring assignment in the parser (using the
pattern rewriter), pass the Object/ArrayLiterals through to the bytecode
generator, which can desugar them in-place.

This allows us to decrease the amount of AST node creation, and improve
the generated bytecode using domain-specific knowledge. As a side effect
we partially fix an old execution ordering spec bug.

Currently only implemented for assignments, not declarations, as the
latter has some additional complexity.

Bug: v8:4951
Change-Id: I3d69d232bea2968ef20df68a74014d9e05808cfe
Reviewed-on: https://chromium-review.googlesource.com/c/1375660
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Adam Klein <adamk@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58512}
2019-01-03 09:41:27 +00:00
Frank Tang
74d00a9b34 [Intl] Implement ApplyOptionsToTag in Intl.Locale
Bug: v8:7684
Change-Id: Ibe7db0ef1baacb33d07a45234e6bda4f69e95643
Reviewed-on: https://chromium-review.googlesource.com/c/1381732
Commit-Queue: Frank Tang <ftang@chromium.org>
Reviewed-by: Jungshik Shin <jshin@chromium.org>
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58511}
2019-01-03 06:17:10 +00:00
Frank Tang
5182e1ad11 Revert "[Intl] Validate u extension type"
This reverts commit 8d0942499c.

Reason for revert: Cause Memory regression

TBR=gsathya@chromium.org

Original change's description:
> [Intl] Validate u extension type
>
> Fix intl402/*/ignore-invalid-unicode-ext-values
> Add tests for other valid/invalid -u- ext values.
>
> Bug: v8:7481
> Change-Id: I429effd071bb03599a1e767bb2a9e9918a91b850
> Reviewed-on: https://chromium-review.googlesource.com/c/1351307
> Commit-Queue: Frank Tang <ftang@chromium.org>
> Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#58173}

TBR=cira@chromium.org,jshin@chromium.org,gsathya@chromium.org,ftang@chromium.org

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

Bug: v8:7481
Change-Id: Idabf2183684f264271ebe2b8c0ca10ae8e30d811
Reviewed-on: https://chromium-review.googlesource.com/c/1393499
Reviewed-by: Frank Tang <ftang@chromium.org>
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58506}
2019-01-03 01:40:09 +00:00
Jakob Gruber
4edfaa1f39 Reland "[regexp] Escape newlines when setting [[OriginalSource]]"
This is a reland of 0e22ec737b

Original change's description:
> [regexp] Escape newlines when setting [[OriginalSource]]
> 
> This escapes LineTerminator characters in a regexp pattern when
> creating the string that will be stored in the [[OriginalSource]] slot.
> 
> As an example, the source property for all following objects will equal
> "\n" (a '\' character followed by 'n'):
> 
>   /\n/
>   new RegExp("\n")
>   new RegExp("\\n")
> 
> Bug: v8:1982, chromium:855009
> Change-Id: I3b539497a0697e3d51ec969cae49308b0b312a19
> Reviewed-on: https://chromium-review.googlesource.com/c/1384316
> Commit-Queue: Jakob Gruber <jgruber@chromium.org>
> Reviewed-by: Yang Guo <yangguo@chromium.org>
> Reviewed-by: Mathias Bynens <mathias@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#58387}

Bug: v8:1982, chromium:855009
Change-Id: I1ba22395477ec37e8e8c944000f9beade1e3250b
Reviewed-on: https://chromium-review.googlesource.com/c/1386495
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58419}
2018-12-21 09:15:09 +00:00
Sathya Gunasekaran
15a7059412 [class] Parse static private fields
Bug: v8:5368
Change-Id: I0f6edc028baf009b81612ecc4be9a70c3621bc4e
Reviewed-on: https://chromium-review.googlesource.com/c/1385528
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Sathya Gunasekaran <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58416}
2018-12-20 20:58:43 +00:00
Michael Achenbach
cd5f5937cd Revert "[regexp] Escape newlines when setting [[OriginalSource]]"
This reverts commit 0e22ec737b.

Reason for revert: Breaks layout tests:
https://ci.chromium.org/p/v8/builders/luci.v8.ci/V8-Blink%20Linux%2064/28814

Original change's description:
> [regexp] Escape newlines when setting [[OriginalSource]]
> 
> This escapes LineTerminator characters in a regexp pattern when
> creating the string that will be stored in the [[OriginalSource]] slot.
> 
> As an example, the source property for all following objects will equal
> "\n" (a '\' character followed by 'n'):
> 
>   /\n/
>   new RegExp("\n")
>   new RegExp("\\n")
> 
> Bug: v8:1982, chromium:855009
> Change-Id: I3b539497a0697e3d51ec969cae49308b0b312a19
> Reviewed-on: https://chromium-review.googlesource.com/c/1384316
> Commit-Queue: Jakob Gruber <jgruber@chromium.org>
> Reviewed-by: Yang Guo <yangguo@chromium.org>
> Reviewed-by: Mathias Bynens <mathias@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#58387}

TBR=yangguo@chromium.org,jgruber@chromium.org,mathias@chromium.org

Change-Id: I1db7e6a0c6cd1cd995fe9f499458108e88dc8cb9
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:1982, chromium:855009
Reviewed-on: https://chromium-review.googlesource.com/c/1386493
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58396}
2018-12-20 12:48:43 +00:00
Jakob Gruber
0e22ec737b [regexp] Escape newlines when setting [[OriginalSource]]
This escapes LineTerminator characters in a regexp pattern when
creating the string that will be stored in the [[OriginalSource]] slot.

As an example, the source property for all following objects will equal
"\n" (a '\' character followed by 'n'):

  /\n/
  new RegExp("\n")
  new RegExp("\\n")

Bug: v8:1982, chromium:855009
Change-Id: I3b539497a0697e3d51ec969cae49308b0b312a19
Reviewed-on: https://chromium-review.googlesource.com/c/1384316
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Reviewed-by: Mathias Bynens <mathias@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58387}
2018-12-20 10:12:48 +00:00
Frank Tang
12f04d8179 [Intl] Use icu::Locale as storage in JSLocale
Remove flags and all string in JSLocale
This does not change the logic of Intl.Locale constructor
but only the way we store the information.
Preparation for logic rewrite that sync with latest spec.

Bug: v8:7684
Change-Id: Ib61705eaf00e5bcf63443c55c29f0b0b61f8e4c9
Reviewed-on: https://chromium-review.googlesource.com/c/1377996
Commit-Queue: Frank Tang <ftang@chromium.org>
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Reviewed-by: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58386}
2018-12-20 06:31:05 +00:00
Frank Tang
5b607f1912 [Intl] Remove passed tests pending on stable sort
Bug: v8:7808
Change-Id: Idcfd927d9e4df3dc30ab8cf815149c6ede76b852
Reviewed-on: https://chromium-review.googlesource.com/c/1384800
Reviewed-by: Mathias Bynens <mathias@chromium.org>
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58385}
2018-12-20 06:30:00 +00:00
Toon Verwaest
704c050a6b [parser] Change how conflicting param and let in body declarations are detected
Now we just check for each variable declared in the parameter scope whether it
occurs as a lexical variable in the body scope. This way the preparser will
also identify them.

Bug: v8:2728, v8:5064
Change-Id: I9fd96590fa431de0656c85295fd31af9b36f2e32
Reviewed-on: https://chromium-review.googlesource.com/c/1384225
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58375}
2018-12-19 17:10:57 +00:00
Toon Verwaest
a5f559c3f8 [parser] Change how catch is parsed
- Directly declares the special catch variable from the parser-base.
- Tracks Scope on PreParserBlock and finds conflicting lexical declarations by
  simply walking the VariableMap of the block inserted for the pattern; or the
  catch variable in case of identifier.
- This also enables throwing errors for duplicate let in the preparser. We may
  have to back that out if it breaks something.

Bug: v8:2728, v8:7828
Change-Id: Id2eea62062533eb99cd6670c42a4b1da87139008
Reviewed-on: https://chromium-review.googlesource.com/c/1382095
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58353}
2018-12-19 11:02:01 +00:00
Toon Verwaest
dde5e3a134 [parser] Detect duplciate lexical declarations in preparser
This changes how rewind upon preparser abort works. It now rewinds to the start
of the parameter scope. In the case of "function X(" it is before the "(". In
the case of arrow functions it's before the start of the arrow function. This
allows us to reparse the arrow function from the start so all parameters are
declared properly.

Bug: v8:2728, v8:7390
Change-Id: I1c40056a49ec198560e63cd73949a59221ee0401
Reviewed-on: https://chromium-review.googlesource.com/c/1382736
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58332}
2018-12-18 16:32:28 +00:00
Frank Tang
8c3112733a [Intl] Rename position to index in Intl.Segmenter
Sync with
https://github.com/tc39/proposal-intl-segmenter/pull/55
and
https://github.com/tc39/test262/pull/1994

Bug: v8:8588
Change-Id: Ifc46779f156ea986e3dbe6a632a781bb7134112b
Reviewed-on: https://chromium-review.googlesource.com/c/1374997
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58301}
2018-12-18 05:39:35 +00:00
Frank Tang
cc494cd3f9 [Intl] Sync Intl.Segmenter w/ latest spec
Change the initial value of breakType to undefined
Store break type into bits
Change the algorithm

Bug: v8:6891
Change-Id: Id2cc1e90c28d92364318928fc8a377f172ebb339
Reviewed-on: https://chromium-review.googlesource.com/c/1374996
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58298}
2018-12-17 23:00:06 +00:00
Frank Tang
57d4b8e619 [test262] test262 roll
Bug: v8:7834
Change-Id: Id8018c01e757741aad9ecbdf331bfb1a4b050d81
Reviewed-on: https://chromium-review.googlesource.com/c/1379570
Commit-Queue: Frank Tang <ftang@chromium.org>
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58296}
2018-12-17 21:42:54 +00:00
Yang Guo
91ac1341c7 Revert "[esnext] ship Object.fromEntries"
This reverts commit dde25872f5.

Reason for revert: GC-Stress failures https://ci.chromium.org/p/v8/builders/luci.v8.ci/V8%20Linux64%20GC%20Stress%20-%20custom%20snapshot/23168

Original change's description:
> [esnext] ship Object.fromEntries
> 
> Enable --harmony-object-from-entries by default.
> 
> Object.fromEntries is a new standard library method, whose proposal
> (https://tc39.github.io/proposal-object-from-entries/) is currently
> at stage 3.
> 
> It simply creates a JSObject from an iterable collection of key/value
> pairs, such that `Object.fromEntries([ [ "a", "b" ] ]) -> { a: "b" }`
> 
> BUG=v8:8021
> R=​gsathya@chromium.org, adamk@chromium.org
> 
> Change-Id: Ib55bb6ca43727d66b471c0fd14845735c1ca2894
> Reviewed-on: https://chromium-review.googlesource.com/c/1373918
> Commit-Queue: Caitlin Potter <caitp@igalia.com>
> Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#58262}

TBR=adamk@chromium.org,gsathya@chromium.org,caitp@igalia.com

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

Bug: v8:8021
Change-Id: Id9582e2710ee6b46be3fbac1cbafefd5c0151cd0
Reviewed-on: https://chromium-review.googlesource.com/c/1379871
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58265}
2018-12-17 09:48:38 +00:00
Caitlin Potter
dde25872f5 [esnext] ship Object.fromEntries
Enable --harmony-object-from-entries by default.

Object.fromEntries is a new standard library method, whose proposal
(https://tc39.github.io/proposal-object-from-entries/) is currently
at stage 3.

It simply creates a JSObject from an iterable collection of key/value
pairs, such that `Object.fromEntries([ [ "a", "b" ] ]) -> { a: "b" }`

BUG=v8:8021
R=gsathya@chromium.org, adamk@chromium.org

Change-Id: Ib55bb6ca43727d66b471c0fd14845735c1ca2894
Reviewed-on: https://chromium-review.googlesource.com/c/1373918
Commit-Queue: Caitlin Potter <caitp@igalia.com>
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58262}
2018-12-15 17:13:02 +00:00
Frank Tang
44771cbe0c [Intl] Fixes Intl.DateTimeFormat hourCycle option issues.
Add bit flags to remember hourCycle
Reorder the code in JSDateTimeFormat::Initialize
Implement the hourCycle option resolutions
Fix intl402/DateTimeFormat/prototype/resolvedOptions/hourCycle in test262

Bug: v8:7482
Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
Change-Id: Idc136276da89b95df6ae864161b114e34f9dcae8
Reviewed-on: https://chromium-review.googlesource.com/c/1253101
Commit-Queue: Frank Tang <ftang@chromium.org>
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Reviewed-by: Jungshik Shin <jshin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58233}
2018-12-14 01:20:42 +00:00
Mathias Bynens
f605302e33 [test] Mark early RegExp errors as FAIL_PHASE_ONLY
This ensures V8 at least throws the correct exception for these
tests, even if it happens at the wrong phase (i.e. at runtime
instead of at parse time).

Bug: v8:8467
Change-Id: I101aa2c7e073a56163c29e96e6c47f6ff0a01e53
Reviewed-on: https://chromium-review.googlesource.com/c/1375909
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Mathias Bynens <mathias@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58226}
2018-12-13 15:52:28 +00:00
Sergiy Belozorov
996cf21954 [tools] Generate additional variant for FAIL_PHASE_ONLY tests
The additional variant does not use wrapper disabling phase tests and negated
outcome processor. This allows to ensure that tests marked FAIL_PHASE_ONLY, do
actually fail without it.

R=machenbach@chromium.org

Bug: v8:8467
Change-Id: I66e07bd7107520872cc013bf0f33fdc6664baf56
Reviewed-on: https://chromium-review.googlesource.com/c/1361164
Commit-Queue: Sergiy Belozorov <sergiyb@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58211}
2018-12-13 11:28:57 +00:00
Frank Tang
fe0c99ad43 [Intl] Remove fixed tests.
TBR=jshin@chromium.org

Bug: v8:8469
Change-Id: I60f7868a19eec925a597f1355182c2fd8550a2d2
Reviewed-on: https://chromium-review.googlesource.com/c/1374990
Reviewed-by: Frank Tang <ftang@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Commit-Queue: Jungshik Shin <jshin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58203}
2018-12-13 01:36:16 +00:00
Frank Tang
8d0942499c [Intl] Validate u extension type
Fix intl402/*/ignore-invalid-unicode-ext-values
Add tests for other valid/invalid -u- ext values.

Bug: v8:7481
Change-Id: I429effd071bb03599a1e767bb2a9e9918a91b850
Reviewed-on: https://chromium-review.googlesource.com/c/1351307
Commit-Queue: Frank Tang <ftang@chromium.org>
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58173}
2018-12-12 02:03:38 +00:00
peterwmwong
29a970a273 [esnext] Update String.p.matchAll as per spec changes
As per (https://github.com/tc39/proposal-string-matchall/pull/41), String.p.matchAll's fallback was removed.
Additionally, removed a IsNullOrUndefined check that was already covered by MaybeCallFunctionAtSymbol.
Updates to Test262 has been submitted: https://github.com/tc39/test262/pull/1990

Bug: v8:6890
Change-Id: I246cbbcb4641ebded704c5f772809f182deaa30e
Reviewed-on: https://chromium-review.googlesource.com/c/1369091
Commit-Queue: Peter Wong <peter.wm.wong@gmail.com>
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Mathias Bynens <mathias@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58172}
2018-12-11 23:05:54 +00:00
Ben L. Titzer
f68ee6e7e4 [typedarrays] Use Detach instead of Neuter
This is purely a renaming change. The ES spec uses the term 'detach'
for the process of removing the backing store of a typed array, while
V8 uses the historical term 'neuter'. Update our internal implementation,
including method names and flag names, to match the spec.

Note that some error messages still use the term 'neuter' since error
messages are asserted by some embedder tests, like layout tests.

R=bmeurer@chromium.org, yangguo@chromium.org, mstarzinger@chromium.org, mlippautz@chromium.org
BUG=chromium:913887

Change-Id: I62f1c3ac9ae67ba01d612a5221afa3d92deae272
Reviewed-on: https://chromium-review.googlesource.com/c/1370036
Commit-Queue: Ben Titzer <titzer@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58149}
2018-12-11 11:57:30 +00:00
Sathya Gunasekaran
cf47678b17 [test262] test262 roll
Bug: v8:7834
Change-Id: I2b1444eded3d2917bf67f5077f35daccdbbbb951
Reviewed-on: https://chromium-review.googlesource.com/c/1367125
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Sathya Gunasekaran <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58079}
2018-12-07 02:09:33 +00:00