1
0
mirror of https://github.com/dart-lang/sdk synced 2024-07-01 07:14:29 +00:00
dart-sdk/pkg/js_shared
Kallen Tu 64584c128a [web] Move Variance to js_shared/lib/ for shared use.
Moving variance to `js_shared/lib/variance.dart` so we can use the same synced indices when marking variance in both dart2js and ddc.

This avoids needing to sync multiple data structures that all represent variance.

Bug: https://github.com/dart-lang/sdk/issues/54367

Change-Id: Ia6fda84decd43374c08ed3bd0d0b240071310d9a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/341840
Reviewed-by: Mayank Patke <fishythefish@google.com>
Commit-Queue: Kallen Tu <kallentu@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
2023-12-22 18:16:01 +00:00
..
lib [web] Move Variance to js_shared/lib/ for shared use. 2023-12-22 18:16:01 +00:00
test [deps] roll package:lints to the latest 2023-10-05 03:36:59 +00:00
analysis_options.yaml [pkg/js_*] use package:lints/recommended.yaml for analysis for pkg/js_shared and pkg/js_runtime 2023-03-24 01:10:09 +00:00
OWNERS
pubspec.yaml [deps] roll package:lints to the latest 2023-10-05 03:36:59 +00:00
README.md

Package js_shared:

This code is a compile time dependency of dart2js and DDC. It is imported as a package: import by both compilers.

There is an exact copy in the SDK of the libraries in the pkg/js_shared/lib/synced sub-directory. Those libraries are imported as dart: imports by the dart2js and DDC runtime libraries.

Important: all code under pkg/js_shared/lib/synced must be kept in sync with the runtime (in sdk/lib/_internal/js_shared/lib/synced) at all times. The test/in_sync_test.dart test verifies this.