Commit Graph

136 Commits

Author SHA1 Message Date
Sosuke Suzuki 9d8efae5c2 Wrap `toSpliced` call with try-finally 2025-02-28 15:04:37 +01:00
Rezvan Mahdavi Hezaveh d4c93d2de1 [explicit-resource-management] Dispose the stack before disposal
This CL adds the requirement of having disposed stack before
calling DisposeResources on the DisposableStack.

Bug: 42203506
Change-Id: I515a5f23e609fdd9448cebc4cd71b0176c86cf99
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/6298949
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Commit-Queue: Rezvan Mahdavi Hezaveh <rezvan@chromium.org>
Cr-Commit-Position: refs/heads/main@{#98902}
2025-02-25 03:18:41 +01:00
Rezvan Mahdavi Hezaveh 15e602780c [explicit-resource-management] Fix async disposal
This CL fixes the async disposal from sync methods that return
a promise. The result of calling `symbol.dispose` should
not be used to resolve the outer promise.

Bug: 42203814
Change-Id: I4c4573035b74b06ad78e2810e3f132301954c048
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/6291492
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Commit-Queue: Rezvan Mahdavi Hezaveh <rezvan@chromium.org>
Cr-Commit-Position: refs/heads/main@{#98898}
2025-02-24 22:18:44 +01:00
Rezvan Mahdavi Hezaveh b3f67f4aaf [explicit-resource-management] Fix await using in top level module
This CL adds one suspend point in any scope that has at least one
`await using` in it.

Bug: 396661138
Change-Id: I144a0ca49395b34309e7e35f070c98cc145af34b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/6279751
Commit-Queue: Rezvan Mahdavi Hezaveh <rezvan@chromium.org>
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Cr-Commit-Position: refs/heads/main@{#98811}
2025-02-19 22:18:46 +01:00
Rezvan Mahdavi Hezaveh 6d5e6c229e
Remove `let` keyword and use `using` declaration (#4403) 2025-02-18 12:54:05 -08:00
Nicolò Ribaudo 43c45f3b37 Remove SM staging tests wrongly testing invalid LHS
It is an early error if the LHS of:
- ForOfStatement
- UpdateExpression
- AssignmentExpression
- DestructuringAssignmentTarget
is not simple (i.e. not a function call).
2025-02-18 14:23:33 +01:00
André Bargull d5c4779c62 Allow different approximations in the observational Islamic calendar
The "islamic" calendar id refers to the observational Islamic calendar
and different implementation may use different algorithms to approximate
when the moon's crescent can be observed. Change the test data to allow
the approximations used in ICU4X in addition to the ones used in ICU4C.
2025-01-30 17:49:04 -08:00
André Bargull 0614bdbd87 Update expected formatting for CLDR 46 2025-01-30 17:27:38 -08:00
André Bargull e99213a96e
Expect TypeError when sealing non-empty TypedArrays 2024-12-16 19:36:06 +01:00
Sosuke Suzuki 82ebbb4060 Add indent to sm tests metadata 2025-01-23 14:28:45 +01:00
Rezvan Mahdavi Hezaveh 701b220976 [base64] Add FromBase64
This CL adds `Uint8Array.fromBase64()`.

Bug: 42204568
Change-Id: Ib68683a2d5ead9720077197c0f895787214b183e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/6026354
Commit-Queue: Rezvan Mahdavi Hezaveh <rezvan@chromium.org>
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Cr-Commit-Position: refs/heads/main@{#98239}
2025-01-22 00:18:32 +01:00
Ms2ger b0f03cb22d Reorder includes in staging/sm
Ref. #4376
2025-01-17 13:49:22 +01:00
Ms2ger 5f98e1d39d Replace gc() calls in staging/sm/
Ref. #4376
2025-01-15 13:02:49 -08:00
Ms2ger a37cb9c206 Update staging/sm 2025-01-13 17:17:15 +01:00
Shu-yu Guo 7f12305f59
Rename support files to end in _FIXTURE.js (#4368) 2025-01-08 16:30:20 -08:00
Rezvan Mahdavi Hezaveh 8296db8873 [explicit-resource-management] Return undefined from dispose builtin
This CL fixes the bug of returning true in dispose method of
DisposableStack.

Bug: 385547086
Change-Id: Iddb72962bd5f7de1ee9346cda3094e98e0565119
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/6119280
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Commit-Queue: Rezvan Mahdavi Hezaveh <rezvan@chromium.org>
Cr-Commit-Position: refs/heads/main@{#97920}
2024-12-26 22:18:25 +01:00
Philip Chimento dc0082c5ea Remove unused test fixtures
These belong to a test that is not imported.
2024-12-09 13:35:08 -08:00
Ms2ger 6ee9579acb Import tests from SpiderMonkey 2024-12-09 13:35:08 -08:00
Shu-yu Guo 05c45a4c43 [rab/gsab] Return false in [[PreventExtensions]] for variable-length TAs
This is a spec normative change: https://github.com/tc39/ecma262/pull/3453

Fixed: 374310073
Change-Id: I085260fea077bc27cf1e4f06d4389519e12c4e14
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/6014979
Commit-Queue: Shu-yu Guo <syg@chromium.org>
Auto-Submit: Shu-yu Guo <syg@chromium.org>
Commit-Queue: Rezvan Mahdavi Hezaveh <rezvan@chromium.org>
Reviewed-by: Rezvan Mahdavi Hezaveh <rezvan@chromium.org>
Cr-Commit-Position: refs/heads/main@{#97166}
2024-11-13 22:22:11 +01:00
Ioanna M Dimitriou H 437f9a7631
Migrate staging tests for JSON-parse-with-source (#4265)
Co-authored-by: Philip Chimento <pchimento@igalia.com>
Co-authored-by: Ms2ger <Ms2ger@igalia.com>
2024-11-06 16:59:30 +01:00
Tim Chevalier b7822bb0b8
Temporal: Move tests for ZonedDateTime/p/{since, until} out of staging (#4293)
Co-authored-by: Philip Chimento <philip.chimento@gmail.com>
2024-11-01 11:02:32 -07:00
Tim Chevalier ccf8977b1c Temporal: Split up ZonedDateTime/old/string-parsing.js and move out of staging 2024-10-31 16:05:30 -07:00
Tim Chevalier 8cc0560713
Temporal: Move all tests out of ZonedDateTime/old/with.js under staging into separate files under test/built-ins (#4297)
Co-authored-by: Philip Chimento <philip.chimento@gmail.com>
2024-10-31 13:34:57 -07:00
Tim Chevalier 0f6b269400 Temporal: Move ZonedDateTime order-of-operations tests out of staging 2024-10-31 13:13:20 -07:00
Tim Chevalier bf46ed66b6 Temporal: move tests for ZonedDateTime/p/{toInstant, toPlainDate, toPlainTime, toString} 2024-10-31 13:08:38 -07:00
Tim Chevalier 7a4426e2b2 Temporal: Move remaining tests from Temporal/ZonedDateTime/old under staging into separate files under test/built-ins
Includes withPlainDateTime and withTimeZone
2024-10-31 11:58:25 -07:00
Tim Chevalier de68177f59 Temporal: Move ZonedDateTime/prototype/round tests and one other ZonedDateTime test out of staging 2024-10-30 17:58:43 -07:00
Tim Chevalier a93fe76f52 Temporal: Move ZonedDateTime property bag tests out of staging 2024-10-30 17:18:26 -07:00
Tim Chevalier bfb957f669 Temporal: Move more ZonedDateTime tests out of staging 2024-10-30 17:03:46 -07:00
Tim Chevalier 85934bf49c
Temporal: Move tests for ZonedDateTime/p/{add, subtract} out of staging into test/built-ins (#4287) 2024-10-30 16:20:09 -07:00
Tim Chevalier 01dbd4db41 Temporal: Move tests for ZonedDateTime/compare out of staging into test/built-ins 2024-10-30 15:58:23 -07:00
Tim Chevalier 3f2486e37f
Move all tests from staging/Temporal/Instant/old to test/built-ins/Temporal/Instant (#4282)
* Temporal: Move all tests from staging/Temporal/Instant/old to test/built-ins/Temporal/instant
2024-10-30 14:29:02 -07:00
Tim Chevalier f178db57fe
Temporal: Move all tests out of total.js under staging into separate files under test/built-ins (#4281)
* Temporal: Move most tests out of total.js under staging into separate files under test/built-ins

Co-authored-by: Philip Chimento <philip.chimento@gmail.com>
2024-10-30 11:44:59 -07:00
Tim Chevalier 713ddf66e0
Temporal: Move some tests out of round.js under staging into separate files under test/built-ins (#4280)
Co-authored-by: Philip Chimento <philip.chimento@gmail.com>
2024-10-30 11:32:37 -07:00
Théo LUDWIG 01776c30d3 test(top-level-await): move out of staging module graphs hanging 2024-10-29 19:35:56 +01:00
André Bargull 5b1757743a Update expected formatting for CLDR 46 2024-10-29 12:10:47 +01:00
Tim Chevalier b8c29a05b5 Temporal: Move tests out of staging/Temporal/Duration/old and into test/built-ins 2024-10-28 12:41:47 -07:00
Chengzhong Wu 3f0a24f4f6 [source-phase-imports] update missing source error type 2024-10-25 11:37:04 +02:00
Meghan Denny 60963bf468
chore: convert many tests to use verifyProperty (#4263)
Co-authored-by: André Bargull <andre.bargull@gmail.com>
2024-10-14 11:25:05 +02:00
Chengzhong Wu 0596ff6981 [source-phase-imports] Dynamic import source call
Add source phase import support in import calls with necessary
embedder APIs. When a imported module does not support source phase
representation, a ReferenceError is thrown in d8.

Bug: 42204365
Change-Id: If40cadfcdf0a547f24d20c67149bba559480341d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/5878343
Commit-Queue: Chengzhong Wu (legendecas) <legendecas@gmail.com>
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Cr-Commit-Position: refs/heads/main@{#96473}
2024-10-09 08:18:20 +02:00
Philip Chimento eb848bb553 Temporal: Remove incorrect toLocaleString tests
These staging tests are incorrect. See tc39/proposal-temporal#2795. This
was an unintended behaviour. It differed from the behaviour for dateStyle
and timeStyle, which was the intended behaviour.
2024-10-07 12:02:45 +02:00
Rezvan Mahdavi Hezaveh dfece8cfc5 [explicit-resource-management] Add test for async generator body
This cl adds a test for having `await using` in the async
generator function body.

Bug: 42203814
Change-Id: I30c0d2fe354a3047f67a4a71f7c6472c3d832bbf
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/5867651
Commit-Queue: Rezvan Mahdavi Hezaveh <rezvan@chromium.org>
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Cr-Commit-Position: refs/heads/main@{#96146}
2024-09-17 22:20:04 +02:00
Shu-yu Guo a9c1c08852
Migrate resizable buffer tests out of staging (#3888)
Co-authored-by: Ioanna M Dimitriou H <idimitriou@igalia.com>
2024-09-12 11:26:33 +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
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
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
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
Philip Chimento 3b89be9c5d Temporal: Fix Japanese era test
This mistakenly used a previous name for the helper function. Also adds
a couple of debugging messages.
2024-07-29 14:17:24 +02:00