dart-sdk/tests
Srujan Gaddam 1d28f8e821 [dart:js_interop/ddc/dart2js] Implement JS types using @staticInterop
Currently, dart:_js_types types are all typedefs in the web backends.
This leads to inconsistent semantics, since you can statically pass
Strings to JSString, for example. You cannot do this in dart2wasm.
In order to ensure consistent semantics, we reify these types using
a custom @staticInterop lowering. They all get erased to their
respective Dart type. When we have inline classes, these types
should be implemented using inline classes.

Note that Interceptor will not work for this use case. The reified
type of JS primitives are Dart types e.g. String, bool, and therefore
can not be casted to Interceptor.

In order to do this, the eraser is refactored and the JS backends use
shared erasure code to either erase/emit types.

Tests are added to make sure you need to go through a conversion or
cast to pass Dart objects to JS types.

CoreLibraryReviewExempt: Backend-specific internal library changes.
Change-Id: I5942be628102919ec167f094cfe10fced606363c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/295105
Commit-Queue: Srujan Gaddam <srujzs@google.com>
Reviewed-by: Joshua Litt <joshualitt@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
2023-04-26 15:55:54 +00:00
..
co19 [test] Introduce status variable $simulator, and fix some cases missing simarm_x64. 2023-04-04 03:10:26 +00:00
co19_2 [test] Introduce status variable $simulator, and fix some cases missing simarm_x64. 2023-04-04 03:10:26 +00:00
corelib [gardening] Update status files after starting to run tests in obfucated/dwarf nnbd mode 2023-04-21 10:13:57 +00:00
corelib_2 Migrate corelib and lib tests off @compile-error. 2023-04-20 19:19:01 +00:00
dartdevc [flip-modifiers]: opt out failing ddc tests from class modifiers 2023-03-02 20:27:25 +00:00
dartdevc_2 [test_runner] Cleanup unused compiler names 2023-03-07 02:09:16 +00:00
ffi [test/ffi] Format record types 2023-04-21 08:23:57 +00:00
ffi_2 Reland "[vm] Expose Dart_{CurrentIsolate,ExitIsolate,EnterIsolate}" 2023-04-13 09:20:17 +00:00
language [cfe] Report error on indirect implementation of base class 2023-04-26 08:16:34 +00:00
language_2 Migrate "u" and "v" directory language tests off @compile-error. 2023-04-20 22:33:22 +00:00
lib [dart:js_interop/ddc/dart2js] Implement JS types using @staticInterop 2023-04-26 15:55:54 +00:00
lib_2 Migrate corelib and lib tests off @compile-error. 2023-04-20 19:19:01 +00:00
modular [Reland][cfe] Support external constructor with final fields 2023-01-17 17:29:28 +00:00
standalone Fix HTTPS client certificate test 2023-04-26 06:45:20 +00:00
standalone_2 Fix HTTPS client certificate test 2023-04-26 06:45:20 +00:00
web [dart2js] Convert recordTypes after closureData 2023-04-26 03:57:07 +00:00
web_2 Remove left-over patch declarations for List constructor. 2023-04-22 00:38:28 +00:00
legacy_status_dart2js.csv Spelling tests 2022-12-19 12:56:47 +00:00
OWNERS
README.md

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