Commit Graph

5214 Commits

Author SHA1 Message Date
Paul Bakker 98c7e9114e
Test computed accessor properties and AggregateError constructor without arguments (#4222) 2024-09-11 11:41:07 +02:00
Philip Chimento 70cdc562e3 Temporal: Adjust era code of Japanese pre-Meiji era
As of the current state of the Intl Era and Month Codes proposal,
https://tc39.es/proposal-intl-era-monthcode/#sec-temporal-canonicalizeeraincalendar
the canonical name of this era is "japanese".

See: https://github.com/tc39/proposal-temporal/issues/2901
2024-09-10 09:28:24 -07:00
Philip Chimento 6f8f6b5261 Temporal: Tests for ignoring era and eraYear in calendars without eras
This tests some of the prose requirements of CalendarResolveFields.

See https://github.com/tc39/proposal-temporal/issues/2870
2024-09-10 09:28:24 -07:00
Aapo Alasuutari cff5a6012f
fix: Use Object.getPrototypeOf to get prototype in `__proto__-fn-name.js` (#4205) 2024-09-09 14:37:00 +02:00
Philip Chimento d9b10790bc Temporal: Tests for corner case in TZDB involving DST transition in 1919
These tests add coverage for a corner case in the TZDB. In spring 1919,
the America/Toronto time zone switched to DST at 23:30 on March 30th,
skipping an hour ahead to 00:30 on March 31st. This meant that both March
30th and March 31st were 23.5-hour days.

See: https://github.com/tc39/proposal-temporal/issues/2910
2024-09-05 15:19:17 -07:00
Philip Chimento c93ae0ac2f Temporal: Tests for disallowed corner case in rounding durations
This test covers a normative change to disallow an ambiguous corner case
in the options bag for Temporal.Duration.prototype.round().

See https://github.com/tc39/proposal-temporal/pull/2916
2024-09-05 15:08:08 -07:00
Ioanna M Dimitriou H fc49c9ce16
Move function MayNeedBigInt to RAB helper file and inline WriteToTypedArray. (#4211) 2024-09-03 16:23:23 +02:00
Nicolò Ribaudo d012a4d0ef
Add test for asi between `get`/`set` field and generator (#4189)
Co-authored-by: André Bargull <andre.bargull@gmail.com>
Co-authored-by: Linus Groh <mail@linusgroh.de>
2024-09-02 17:39:12 +02:00
Rezvan Mahdavi Hezaveh d62fa93c8f [explicit-resource-management] Complete exception handling
This CL completes the exception handling (promise rejection) for
async explicit resource management.

Bug: 42203814
Change-Id: Ide4f05df14f74e68b7aa120230f1b1ae33ce8adc
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/5692882
Commit-Queue: Rezvan Mahdavi Hezaveh <rezvan@chromium.org>
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Cr-Commit-Position: refs/heads/main@{#95748}
2024-08-28 19:39:52 +02:00
Rezvan Mahdavi Hezaveh 9f94490ff1
Merge branch 'main' into chromium-export-99eec8f4a2 2024-08-28 09:51:29 -07:00
Rezvan Mahdavi Hezaveh b69e9d5e72 [explicit-resource-management] Add AsyncDisposableStack builtins
This CL adds builtin methods for developer exposed
AsyncDisposableStack object.

Bug: 42203814
Change-Id: I1f16a3bcb80c71a4f33e4ae028f1737c3502dabe
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/5715141
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Commit-Queue: Rezvan Mahdavi Hezaveh <rezvan@chromium.org>
Cr-Commit-Position: refs/heads/main@{#95838}
2024-08-27 21:23:09 +02:00
Ioanna M Dimitriou H 3acb672d11
RAB: Integrate helper to rest of the tests (#4198)
Co-authored-by: Philip Chimento <philip.chimento@gmail.com>
2024-08-27 17:18:44 +02:00
André Bargull a4443793b9 Add coverage when array buffer is resized in SetTypedArrayFromArrayLike 2024-08-27 15:24:28 +02:00
André Bargull 18c8c85746 Add more tests for deleted bindings in object environments 2024-08-27 15:24:28 +02:00
André Bargull b9ed8c920c Add more tests for typed array indices in typed array set 2024-08-27 15:24:28 +02:00
Philip Chimento ea11e0e787 Temporal: Further coverage and tweaks for removing Calendar/TimeZone objs
Tweak some tests to provide coverage of new execution paths in the spec,
such as calling GetOptionsObject inside ToTemporal___; add a few new tests
for things that weren't covered before, such as rounding a PlainDateTime
at the edge of the range; and tweak the tests verifying when the
properties of the options bag are read, which I made a mistake in #4119.

See: https://github.com/tc39/proposal-temporal/pull/2925
2024-08-22 14:00:43 -07:00
Jonatan Klemets 3b4d9f53b5 Remove README about keeping import-assertions tests in sync 2024-08-22 12:19:08 -07:00
Jonatan Klemets 3b56bf655f Remove generated import-assertions test files
Generated by running `./make.py clean` and `./make.py`
2024-08-22 12:19:08 -07:00
Jonatan Klemets cfd81e1698 Remove import-assertions test files 2024-08-22 12:19:08 -07:00
Luis Fernando Pardo Sixtos 2e1843d0a5 [decorators] Support public auto-accessors
Add support for the accessor keywords for public class fields as part of the decorators proposal.

Changes to the parser:

- Minor cleanup of reused code.
- Support declaration of public auto-accessors.

Changes to the bytecode generator:
- Add logic to create the accessor storage private name for public
  members.
- Add the generated getter and setter to the arguments list passed to
  Runtime::kDefineClass

Changes to class boilerplate:

- Add logic to add a template AccessorPair to the descriptors lists
  for each auto accessor property. The template AccessorPair object
  is initialized with consecutive indices corresponding to the
  positions in the Runtime::kDefineClass arguments.

Add tests.

Bug: 42202709
Change-Id: I2253eddb734e950d8faf83fff1763e32b7f53a73
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/5745256
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Reviewed-by: Seth Brenith <seth.brenith@microsoft.com>
Commit-Queue: Luis Pardo <lpardosixtos@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#95784}
2024-08-22 20:23:01 +02:00
Richard Gibson b70b75793d Test `await` in ConditionalExpression 2024-08-21 10:19:55 +02:00
Michael Ficarra 22967c5b7b Math.sqrt: add a test with exact input-output expectations 2024-08-20 10:29:05 -07:00
José Julián Espina dde3050bdb
Fix test regression in asyncHelpers.js (#4197) 2024-08-19 12:33:17 -04:00
Ms2ger 941813e1f0 Revert "Revert "Add invalid index Reflect.set tests""
This reverts commit b110681292.
2024-08-16 17:26:15 +02:00
Ms2ger 79faa2252a Revert "Revert "Add invalid index prototype chain [[Set]] tests""
This reverts commit 3d77404e4f.
2024-08-16 17:26:15 +02:00
Ms2ger 44685c14d7 Revert "Revert "Add valid index Reflect.set tests""
This reverts commit b90326d9a4.
2024-08-16 17:26:15 +02:00
Ms2ger efa4272ffb Revert "Revert "Add valid index prototype chain [[Set]] tests""
This reverts commit bd65623af6.
2024-08-16 17:26:15 +02:00
Ioanna M Dimitriou H 224c5c3cb9
RAB: Integrate staging tests for the .subarray method (#4177)
* Import relevant files from #3888

* Adds resizableArrayBufferUtils.js to includes and removes its content from each test

* renamed tests to indicate the end argument is tested too

* Adds more tests for the 'end' argument of .subarray
2024-08-15 15:13:34 -07:00
Philip Chimento cb4a6c8074 Temporal: Add a test for a coverage gap in Duration.prototype.round
See https://github.com/tc39/proposal-temporal/issues/2919; this adds test
coverage that would have caught an unintentional normative change.
2024-08-15 10:26:58 +02:00
Ioanna M Dimitriou H b1d0933df5
RAB: Integrate staging tests for the .toLocaleString method (#4178)
* Import relevant files from #3888

* Removing parts in resizableArrayBufferUtils.js and adding it in includes,
while applying review changes from PRs for previously tested methods.

* Apply suggestions from code review

* Address review: get implementation dependent toLocaleString separator.

* Apply suggestions from code review
2024-08-14 12:30:54 -07:00
Linus Groh 984df1f3db Remove unused harness/timer.js 2024-08-14 08:37:46 -07:00
Ioanna M Dimitriou H 12307f5c20
RAB: Integrate staging tests for the .slice method (#4174)
* Import relevant files from #3888

* Removing parts in resizableArrayBufferUtils.js and adding it in includes,
while applying review changes from PRs for previously tested methods.

* Add coerced-start-shrink test for Array.p.slice

* Renames files to add more tests for the end argument of .slice.

* Tests for the 'end' argument of .slice and test file for Array.p.slice
parallel to TypedArray.p.slice resizable-buffer.js
2024-08-13 17:03:51 -07:00
Luis Fernando Pardo Sixtos 2020cfbe66 [decorators] Support private auto-accessors
Support for the accessor keywords for private class fields as part of
the decorators proposal.

Changes to AST:

- Add an AUTO_ACCESSOR value to the ClassLiteralProperty::Kind enum.
- Add an AutoAccessorInfo class to be used in ClassLiteralProperty
  objects of kind AUTO_ACCESSOR to hold the information about the
  generated getters/setters and backing storage.
- Add AutoAccessorGetterBody and AutoAccessorSetterBody statements to
  implement the logic of generated getters and setters.

Changes to Parser:
- Add logic to parse the "accessor" keyword and throw when used on non
  field class properties.
- Add preparser logic to mock the function scopes and variable
  declarations required for the generated getters/setters.
- Add parser logic to synthetically create statements for the
  generated setters/getters. 

Changes to the Bytecode Generator:
- Add logic to BuildClassLiteral to build auto accessor storage
  private names.
- Add logic to set the generated getters/setters in the accessor pair.
- Add logic to initialize the accessor storage in BuildClassProperty.
- Add AutoAccessorGetterBody and AutoAccessorSetterBody visitors.

Tests:
- Add parsing-unittests for parsing converage.
- Add test262 tests for functionality coverage.
- Add test-debug test for devtools support coverage.

Bug: 42202709
Change-Id: Ibb9bee3bbd0c09341108856f969e0c22bbb8b9cc
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/5547688
Reviewed-by: Seth Brenith <seth.brenith@microsoft.com>
Commit-Queue: Luis Pardo <lpardosixtos@microsoft.com>
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Cr-Commit-Position: refs/heads/main@{#95612}
2024-08-13 19:35:08 +02:00
Ioanna M Dimitriou H bcb42e339d
RAB: Integrate staging tests for the .some method (#4175)
* Import relevant files from #3888

* Removing parts in resizableArrayBufferUtils.js and adding it in includes,
while applying review changes from PRs for previously tested methods.

* Address review comments.
2024-08-09 09:05:04 -07:00
Marko Lahma 5dc04b7332 Fix TypedArray.reduce tests against RAB
* reduce callback has call signature «accumulator, kValue, 𝔽(k), O »
2024-08-06 15:15:19 -07:00
Ioanna M Dimitriou H dc36c7eae9
RAB: Integrate staging tests for the .values method (#4179)
* Import relevant files from #3888

* Removing parts in resizableArrayBufferUtils.js and adding it in includes,
while applying review changes from PRs for previously tested methods.

* Removes unnecessary .from calls, as suggested in previous PR review
comment: https://github.com/tc39/test262/pull/4138#discussion_r1676183221
2024-08-05 17:26:21 -07:00
Ioanna M Dimitriou H ef72bd1c44
RAB: Integrate staging tests for the .sort method (#4176)
* Import relevant files from #3888

* Removing parts in resizableArrayBufferUtils.js and adding it in includes,
while applying review changes from PRs for previously tested methods.

* Renamed test files

* Some minor documentation fixes and removing onlyStrict flag
2024-08-05 17:22:10 -07:00
Ioanna M Dimitriou H c0942e0883
RAB: Integrate staging tests for the .set method (#4173)
* Import relevant files from #3888

* Removing parts in resizableArrayBufferUtils.js and adding it in includes,
and renaming helper function.
2024-08-05 14:09:41 -07:00
Aurèle ea37a19a4a
Add tests for nullable quantifiers in RegExps (#4185)
* Add tests for nullable quantifiers in RegExps

The JavaScript semantics for a quantifier matching the empty
string are different from other regex languages.
This adds a test that documents this JavaScript-specific
behavior.

This is part of my work at the SYSTEMF lab at EPFL.

* Update nullable-quantifier.js
2024-08-05 13:02:50 -07:00
Lucas Mirelmann 5492929d55 Fix typo
Fix typo in an ObjectLiteral
2024-08-01 16:06:56 +02:00
Sosuke Suzuki 616dcadff4 Fix escaped `a` 2024-07-30 10:01:51 +02:00
Ioanna M Dimitriou H 1842afcbce
RAB: Integrate staging tests for the .reduce method (#4156)
* Import relevant files from #3888

* Removing parts in resizableArrayBufferUtils.js and adding it in includes,
while adjusting usage of CollectValuesAndResize and applying review changes
from PRs for previously tested methods.

* Added missing 'shrink' test for Array.prototype.reduce

* Deleted accidental files

* Fix accidental call of .map instead of .reduce

Addresses review comments

* fix copyright in new file not in origin PR
2024-07-29 17:33:50 -07:00
Ioanna M. Dimitriou H 6add1a22cd adds features: [explicit-resource-management] flag 2024-07-29 16:31:26 -07:00
Ioanna M. Dimitriou H e612296c41 Changed two files to use verifyProperty. 2024-07-29 16:31:26 -07:00
Ioanna M. Dimitriou H 435a89b702 Address review comments and fixes some more descriptions
- Fixes to two tests testing Map.prototype.size
- Description fixes
2024-07-29 16:31:26 -07:00
Ron Buckton cb8324fdba Adds [is/not]-a-constructor.js tests from @rbuckton's PR #3866
to make reviewing easier.
2024-07-29 16:31:26 -07:00
Ron Buckton c916d81d85 Adds .length property descriptor tests for explicit resource management
These are all the length.js tests from @rbuckton's PR #3866 to make reviewing easier.
2024-07-29 16:31:26 -07:00
Ron Buckton 59657217f1 Adds .name property descriptor tests for explicit resource management
These are all the name.js tests from @rbuckton's PR #3866 to make reviewing easier.
2024-07-29 16:31:26 -07:00
Ioanna M. Dimitriou H 8996664a42 Added expected esid's 2024-07-29 16:31:26 -07:00
Ron Buckton 3a615a0c0e Adds property descriptor tests for explicit resource management objects
These are all the prop-desc.js tests from @rbuckton's PR #3866 to make reviewing easier.
2024-07-29 16:31:26 -07:00