Commit Graph

6662 Commits

Author SHA1 Message Date
Rezvan Mahdavi Hezaveh 6c1116d45f
Merge pull request #4145 from tc39/chromium-export-99eec8f4a2
[explicit-resource-management] Add await using to the bytecode generator
2024-08-28 09:58:46 -07: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 b3d690e47b Remove import-assertions from features.txt 2024-08-22 12:19:08 -07:00
Jonatan Klemets 0661aecf7d Replace reference to import-assertions in rfcs/async-helpers.md 2024-08-22 12:19:08 -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
Ms2ger 5e57a79428 update es-meta version to v0.4.2 2024-08-20 18:26:44 +02: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
Chengzhong Wu 7608bfb146 Update INTERPRETING.md fixing `$262.AbstractModuleSource` position 2024-08-13 11:25:59 -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
Richard Gibson feb400c685 harness/asyncHelpers.js: Update throwsAsync to not succeed on a bad thenable
Fixes #4186
2024-08-02 08:52:05 +02:00
Richard Gibson 7a916718cf
Cleanup asyncHelpers (merge #4091) 2024-08-01 12:21:00 -04:00
Richard Gibson f83c1b9387 harness/asyncHelpers.js: Further reduce the size of assert.throwsAsync 2024-08-01 12:10:32 -04:00
Richard Gibson fa3d0246e7 harness/asyncHelpers.js: Reduce the size of assert.throwsAsync 2024-08-01 11:42:34 -04:00
Richard Gibson 0b61e98564 harness/asyncHelpers.js: Clean up assert.throwsAsync failure messages
* Remove mention of an "inner" promise/thenable.
2024-08-01 11:41:25 -04:00
Richard Gibson b87eaf9ac3 harness/asyncHelpers.js: Fix an assert.throwsAsync failure message typo 2024-08-01 11:39:10 -04:00
Richard Gibson 0631e2111b harness/asyncHelpers.js: Isolate assert.throwsAsync failure conditions 2024-08-01 11:38:06 -04:00
Richard Gibson b22b500f24 harness/asyncHelpers.js: Refactor assert.throwsAsync to fail fast 2024-08-01 11:38:06 -04:00
Richard Gibson 1b34a1c484 harness/asyncHelpers.js: Add doc comments 2024-08-01 11:38:06 -04:00
Richard Gibson 8ca5bdd44c CONTRIBUTING.md: Improve asyncHelpers documentation
* Only mention `$DONE` after `asyncTest`.
* Document that `asyncTest` is not intended to be called multiple times per file.
2024-08-01 11:38:06 -04: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