Commit Graph

6617 Commits

Author SHA1 Message Date
Shu-yu Guo 29c6f7028a [top-level-await] Sync implementation with spec text
The module evaluation machinery has undergone non-trivial refactoring
since implementation. Sync up the comments and code for maintenance.

Notably,

- Actually use the kEvaluatingAsync status (previously conflated under
  kEvaluated)
- [[IsAsyncEvaluating]] -> [[IsAsyncEvaluation]]
- GatherAsyncParentCompletions -> GatherAvailableAncestors
- async -> has_toplevel_await
- kAsyncModule -> kModuleWithTopLevelAwait

Bug: 347060515
Change-Id: Ia2c35d5b42ee9f58db841cdfcaef9d17b018c9c6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/5636701
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Shu-yu Guo <syg@chromium.org>
Cr-Commit-Position: refs/heads/main@{#94591}
2024-06-21 23:23:02 +02:00
André Bargull 43a64eabe3 Remove empty info block scalar 2024-06-21 10:17:07 +02:00
Jordan Harband 9dec509c93
Merge pull request #4109 from linusg/arraynt
Fix wrong array literal in Map/Set value tests
2024-06-13 16:37:10 -07:00
Linus Groh 15ae4bb43f Fix wrong array literal in Map/Set value tests 2024-06-14 01:26:22 +02:00
Philip Chimento 58df8fb22a Temporal: Remove methods with ISO-named pairs
See tc39/proposal-temporal#2846
2024-06-13 22:04:16 +02:00
Philip Chimento 3c28e3a359 Temporal: Remove Plain/ZonedDateTime to PlainYearMonth/MonthDay APIs
See tc39/proposal-temporal#2848
2024-06-13 22:04:16 +02:00
Philip Chimento 1c900ca59c Temporal: Remove epoch seconds and epoch microseconds APIs
See: tc39/proposal-temporal#2849
2024-06-13 22:04:16 +02:00
Philip Chimento 7184313667 Temporal: Remove PlainTime.toPlainDateTime/toZonedDateTime methods
See tc39/proposal-temporal#2848
2024-06-13 22:04:16 +02:00
Philip Chimento a9c223c60e Temporal: Remove withPlainDate() methods
See tc39/proposal-temporal#2847.
2024-06-13 22:04:16 +02:00
Philip Chimento 61e3f5ec4d Temporal: Tests for removal of relativeTo from Duration.p.add/subtract
See tc39/proposal-temporal#2825.

Various edits to existing tests so that they make more sense with the
removal of relativeTo.

New tests specifically testing that calendar units cannot be added or
subtracted directly.
2024-06-13 13:54:46 +02:00
Philip Chimento ea4945c66f Temporal: Remove tests using relativeTo in Duration.p.add/subtract
See tc39/proposal-temporal#2825. This is a mass removal of tests that use
this functionality, in a separate commit for ease of review. Further
adjustments will be made in the following commit.
2024-06-13 13:54:46 +02:00
Adam Shaw ba9c397923 tests for https://github.com/tc39/proposal-temporal/issues/2820 2024-06-13 08:54:19 +02:00
Daniel Minor a15874163e Remove current contents of implementation-contributed 2024-06-06 19:24:14 +02:00
André Bargull 2496577225
Fix strict mode errors in Temporal staging test (#4100) 2024-05-30 16:07:35 +02:00
André Bargull 42a9f69ab2 Declare variables to allow running in strict-mode 2024-05-29 11:10:42 +02:00
André Bargull 57b9f154a6 Allow alternative implementations for Chinese lunar calendar 2024-05-29 10:47:09 +02:00
André Bargull efe0b1871f Split yearMonthFromFields/reference-day.js into calendar specific files 2024-05-29 10:47:09 +02:00
Sosuke Suzuki c00830acef Fix description of `fractionalDigits` tests 2024-05-28 15:41:01 +02:00
Luis Fernando Pardo Sixtos e394ebb6fc [decorators] Add flag, accessor keyword and token
This change doesn't do any functionality changes.

Bug: 42202709
Change-Id: I613b96b6e7630e10748e31162080a61e7da4c2a1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/5542951
Commit-Queue: Luis Pardo <lpardosixtos@microsoft.com>
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Cr-Commit-Position: refs/heads/main@{#94086}
2024-05-27 09:22:09 +02:00
Timothy Leverett 2a7468c934 Temporal: fix messages on `Duration/out-of-range` tests
Fixed test messages that incorrectly referenced the `days` parameter to say `weeks` instead.
2024-05-23 19:16:00 -07:00
DevMirza ac778eaa29
update es-meta version to v0.4.1 2024-05-18 12:33:09 +05:00
test262-merge-bot 9c94de66c8
Merge pull request #4083 from tc39/chromium-export-7eb56ce860
[explicit-resource-management] Add move and disposed getter
2024-05-21 10:50:36 +02:00
test262-merge-bot 0eb7f6eccb
Merge branch 'main' into chromium-export-7eb56ce860 2024-05-19 12:19:57 +02:00
Timothy Flynn 232dfc7b60
Add missing `return` statement to `throwsAsync` callback
This callback is expected to return a thenable.
2024-05-18 11:30:57 -04:00
Jordan Harband 5217ef396e
throwsAsync, `Promise.try`: avoid unneeded syntax
Followup to #4086
2024-05-17 09:13:21 -07:00
Sosuke Suzuki 57c7d06bf1 Wrap `throwsAsync` with `asyncTest` 2024-05-17 16:31:13 +02:00
Jordan Harband d9c67327ca
Merge pull request #4085 from sosukesuzuki/fifx-promise-try-tests-2
Remove incorrect property access in `Promise.try` test
2024-05-17 06:31:04 -07:00
Sosuke Suzuki 3d3df6ec02 Remove incorrect property access 2024-05-17 21:57:46 +09:00
Sosuke Suzuki d4fac47d3b Fix `asyncTest` usage for `Promise.try` tests 2024-05-17 14:20:50 +02:00
Rezvan Mahdavi Hezaveh 081808bebd [explicit-resource-management] Add adopt and defer
This CL adds adopt() and defer() to DisposableStack
prototype.

Bug: 42203506
Change-Id: I556b96a0cf42595acdd483b0a02aef9ca41bd0bc
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/5512877
Reviewed-by: Simon Zünd <szuend@chromium.org>
Commit-Queue: Rezvan Mahdavi Hezaveh <rezvan@chromium.org>
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Cr-Commit-Position: refs/heads/main@{#93930}
2024-05-15 23:18:28 +02:00
Rezvan Mahdavi Hezaveh fb7ab87dd5 [explicit-resource-management] Add move and disposed getter
This CL adds move() function and a getter for disposed to
DisposableStack prototype.

Bug: 42203506
Change-Id: I8d7750b1d4aa199ebeb997bde7fe6d06c9ccbff0
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/5528992
Commit-Queue: Rezvan Mahdavi Hezaveh <rezvan@chromium.org>
Reviewed-by: Adam Klein <adamk@chromium.org>
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Cr-Commit-Position: refs/heads/main@{#93931}
2024-05-15 13:19:32 -07:00
Jordan Harband 8b6b0f516d
add Promise.try tests 2024-05-01 15:27:31 -07:00
Philip Chimento a7e796a4ce Temporal: Add test coverage for edge case in DST balancing after rounding
This covers an edge case that we hit, where 24 hours would not balance up
to one day in a 25-hour day if only largestUnit was specified, but would
erroneously balance up if rounding was also performed by specifying
smallestUnit.
2024-05-14 09:24:12 +02:00
Philip Chimento 500cea9384 Temporal: Add test coverage for large roundingIncrement in ZDT math
In ZonedDateTime.p.since/until, it's possible for AddDateTime to hit the
limit if the rounding increment is very high, even if the resulting
rounded duration isn't outside of the limit. Add a test covering this
case.
2024-05-14 09:24:12 +02:00
Philip Chimento e02220badd Temporal: Move some round() and total() tests out of staging
Including tests for every possible combination of largest and smallest
unit, for each type of relativeTo (undefined, PlainDate, ZonedDateTime).
2024-05-14 09:24:12 +02:00
Philip Chimento 96e31e7e28 Temporal: Tests for round() and since()/until() using the same code path
This should produce all the same results (except for a change to weeks
balancing in round(), which is now more consistent with since()/until())
but leads to different observable user code calls.

See https://github.com/tc39/proposal-temporal/issues/2742
2024-05-14 09:24:12 +02:00
Philip Chimento 6c6c72b063 Temporal: Adjust tests for Duration rounding fix
A MoveRelativeZonedDateTime step was missing, causing incorrect results.
See https://github.com/tc39/proposal-temporal/issues/2742
2024-05-14 09:24:12 +02:00
Rezvan Mahdavi Hezaveh 9b4c6577f6 [explicit-resource-management] Add DisposableStack constructor, use
and dispose method

This CL adds DisposableStack constructor, use() and dispose() methods
as developer exposed methods. Also, this CL fixed the use
of `using` keyword with `null` and `undefined` and adds tests for them.

Bug: 42203506
Change-Id: If50b9e33d9cbb3de2be41dc81e656d9d202b8fa8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/5498999
Commit-Queue: Rezvan Mahdavi Hezaveh <rezvan@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
Cr-Commit-Position: refs/heads/main@{#93807}
2024-05-09 00:18:17 +02:00
Ioanna M Dimitriou H 55a5346f99
RAB: Integrate staging tests for .byteLength method (#4071)
* RAB: Integrate staging tests for .byteLength method
of TypedArray.prototype

This is part of PR #3888 to make reviewing easier.
Includes changes to use the helper ./harness/resizableArrayBufferUtils.js
2024-05-08 08:35:46 -07:00
Ioanna M Dimitriou H 0fca7339eb
RAB: Integrate staging tests for .at method (#4070)
* RAB: Integrate staging tests for .at method
of Array.prototype and TypedArray.prototype

This is part of PR #3888 to make reviewing easier.
Includes changes to use the helper ./harness/resizableArrayBufferUtils.js
2024-05-08 08:27:49 -07:00
Ioanna M Dimitriou H c95cc6873d
Collection of helper constants and functions for testing RABs (#4030)
Collection of helper constants and functions for testing resizable array buffers.

These are the parts of the code in RAB staging tests that are heavily repeated.
In order to somewhat compact the migration of RAB staging tests (see PR #3888).
2024-04-30 11:10:19 -07:00
Ben Allen 8724a0de23 ListFormats used in DurationFormat/prototype/format/fractions-of-subsecond-units-en.js were missing required `type: "unit"` option 2024-04-29 15:54:34 +02:00
Linus Groh cdf7ba7396 Fix typo in with statement test file name 2024-04-29 15:30:25 +02:00
Rezvan Mahdavi Hezaveh 27b6e4500f [explicit-resource-management]Add exception handling to sync ERM
This CL adds exception handling to the implementation of sync
explicit management proposal.

Bug: v8:13559
Change-Id: I2f4ffea432057b753634c2af4801f9dc48edac43
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/5405985
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Rezvan Mahdavi Hezaveh <rezvan@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/main@{#93620}
2024-04-26 20:18:23 +02:00
Frank Yung-Fong Tang c2ae5ed5e9 Fix mixed-short-and-numeric.js
The option for the listFormat need to include {type: "unit"}
2024-04-25 10:55:21 +02:00
André Bargull a640565994 Add test for negative zero inputs 2024-04-23 18:27:01 +02:00
André Bargull 859b5c67ef Update numeric-hour-with-zero-minutes-and-non-zero-seconds for new default display of sub-hours units
Numeric "minute" and "seconds" units now default to "always" display, so we have
to add an additional test to cover when "auto" display is used. Additionally add
more inputs to cover all possible test combinations.
2024-04-23 18:27:01 +02:00
André Bargull 19d2a38558 Add tests for negative durations with leading zero unit 2024-04-23 18:27:01 +02:00
André Bargull cadd064174 Use formatDurationFormatPattern for "/numeric-hour-with-zero-minutes-and-non-zero-seconds"
The changes from the first commit allow to use
`formatDurationFormatPattern` for this test.
2024-04-23 18:27:01 +02:00
André Bargull 330ecdd016 Sync partitionDurationFormatPattern with latest spec draft
Sync `partitionDurationFormatPattern` with the latest spec draft and
change it to use an `Intl.DurationFormat` object as the input, so it's
easier to compare it against the spec text and because it allows to test
more inputs.

Includes the fixes for:
- https://github.com/tc39/proposal-intl-duration-format/pull/183
- https://github.com/tc39/proposal-intl-duration-format/pull/184
2024-04-23 18:27:01 +02:00