dart-sdk/tests
Srujan Gaddam 1c534e5fd5 [dart2wasm/ddc/dart2js] Lower Function.toJS and JSExportedDartFunction.toDart
Lowers these extension methods to some helper functions instead of
allowInterop to improve performance and get consistent semantics.

Specifically:
- Function.toJS no longer gives you the same JSFunction when calling
toJS on the same function multiple times in the JS compilers.
- Adds fast calling syntax for functions with 0-5 args in the JS
compilers.
- Allows additional args to be passed to converted functions that
are omitted in the JS compilers.
- The static type now determines the number of args that can be
passed to the JS function in the JS compilers.
- Fixes an issue in dart2wasm where if too few arguments are
passed, the call may succeed due to conversion of undefined to
null.
- Adds throws when a user tries to wrap a JS function that
returned from Function.toJS in the JS compilers.

Closes https://github.com/dart-lang/sdk/issues/55515
Addresses https://github.com/dart-lang/sdk/issues/48186

CoreLibraryReviewExempt: Changes to docs only in API surface.
Change-Id: I41d864dc5e02b597d9f1c16c88e3c04872f28225
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/368065
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Srujan Gaddam <srujzs@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2024-06-26 23:06:36 +00:00
..
co19 [co19] Roll co19 to 0a9f7daccd0e682ab791f04ecc23f1dbcee04977 2024-06-03 09:12:56 +00:00
corelib [tests] Add int.tryParse overflow check tests 2024-06-20 18:01:57 +00:00
dartdevc Reland "Tweak expect.dart library." 2024-04-26 15:28:26 +00:00
ffi [vm] Native asset path resolution symlinks with spaces 2024-06-20 14:36:36 +00:00
hot_reload [reload_test] Adding several new reload tests. 2024-05-01 20:01:19 +00:00
language [cfe] Wildcard import prefixes are non-binding. 2024-06-24 18:08:47 +00:00
lib [dart2wasm/ddc/dart2js] Lower Function.toJS and JSExportedDartFunction.toDart 2024-06-26 23:06:36 +00:00
macro_build add package:_macros (SDK vendored) and package:macros (pub published) 2024-03-26 18:40:00 +00:00
modular Support prebuilt macros in the incremental compiler mode for DDC 2024-04-09 07:37:26 +00:00
standalone [vm/io] Follow up to c2e9cee 2024-06-20 19:55:19 +00:00
web [dart2wasm] Fix new web/wasm/allow_import_export_pragmas_test test: Add --extra-compiler-option= before the flag name 2024-06-14 10:18:23 +00:00
legacy_status_dart2js.csv Spelling tests 2022-12-19 12:56:47 +00:00
OWNERS [infra] Add OWNERS to the Dart SDK 2022-02-14 14:06:34 +00:00
README.md [wiki] move the https://github.com/dart-lang/sdk/wiki to the docs/ dir 2024-05-16 18:19:40 +00:00

This directory contains tests of the language and core library implementations. For more information, see https://github.com/dart-lang/sdk/tree/main/docs/Testing.md.