mirror of
https://github.com/dart-lang/sdk
synced 2024-09-16 02:57:35 +00:00
[dart2js] rebase deferred_loading_test for nnbd.
Change-Id: Ia8cd18e19554afec57675bab64797984445556c5 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/143820 Commit-Queue: Joshua Litt <joshualitt@google.com> Reviewed-by: Sigmund Cherem <sigmund@google.com>
This commit is contained in:
parent
cb32f0e9eb
commit
6f5f7ad05c
|
@ -11,12 +11,14 @@ import '../util/colors.dart' as colors;
|
|||
const String cfeMarker = 'cfe';
|
||||
const String cfeWithNnbdMarker = '$cfeMarker:nnbd';
|
||||
const String dart2jsMarker = 'dart2js';
|
||||
const String dart2jsWithNnbdMarker = '$dart2jsMarker:nnbd';
|
||||
const String analyzerMarker = 'analyzer';
|
||||
|
||||
/// Markers used in annotated tests shared by CFE, analyzer and dart2js.
|
||||
const List<String> sharedMarkers = [
|
||||
cfeMarker,
|
||||
dart2jsMarker,
|
||||
dart2jsWithNnbdMarker,
|
||||
analyzerMarker,
|
||||
];
|
||||
|
||||
|
@ -31,6 +33,7 @@ const List<String> sharedMarkersWithNnbd = [
|
|||
cfeMarker,
|
||||
cfeWithNnbdMarker,
|
||||
dart2jsMarker,
|
||||
dart2jsWithNnbdMarker,
|
||||
analyzerMarker,
|
||||
];
|
||||
|
||||
|
|
|
@ -1,2 +1,3 @@
|
|||
cfe=pkg/front_end/test/id_testing/id_testing_test.dart
|
||||
dart2js=tests/compiler/dart2js/equivalence/id_testing_test.dart
|
||||
dart2js:nnbd=tests/compiler/dart2js/equivalence/id_testing_test.dart
|
||||
|
|
|
@ -1,2 +1,3 @@
|
|||
strong=tests/compiler/dart2js/annotations/annotations_test.dart
|
||||
omit=tests/compiler/dart2js/annotations/annotations_test.dart
|
||||
omit=tests/compiler/dart2js/annotations/annotations_test.dart
|
||||
dart2js:nnbd=tests/compiler/dart2js/annotations/annotations_test.dart
|
|
@ -58,11 +58,11 @@ class Class1<T> {
|
|||
}
|
||||
|
||||
var local2 =
|
||||
/*strong.fields=[S,this],free=[S,this],hasThis*/
|
||||
/*strong|dart2js:nnbd.fields=[S,this],free=[S,this],hasThis*/
|
||||
/*omit.hasThis*/
|
||||
(o) {
|
||||
return
|
||||
/*strong.fields=[S,this],free=[S,this],hasThis*/
|
||||
/*strong|dart2js:nnbd.fields=[S,this],free=[S,this],hasThis*/
|
||||
/*omit.hasThis*/
|
||||
() => new Map<T, S>();
|
||||
};
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
T id<T>(T t) => t;
|
||||
|
||||
method<S>(S s) {
|
||||
/*strong.fields=[S],free=[S]*/
|
||||
/*strong|dart2js:nnbd.fields=[S],free=[S]*/
|
||||
/*omit.*/
|
||||
S Function(S) getId() => id;
|
||||
return getId();
|
||||
|
|
|
@ -13,7 +13,7 @@ class B<S> {
|
|||
/*member: B.method:hasThis*/
|
||||
method() {
|
||||
return
|
||||
/*strong.fields=[this],free=[this],hasThis*/
|
||||
/*strong|dart2js:nnbd.fields=[this],free=[this],hasThis*/
|
||||
/*omit.hasThis*/
|
||||
() {
|
||||
F<S> c = f;
|
||||
|
|
|
@ -13,8 +13,7 @@ class B<S> {
|
|||
/*member: B.method:hasThis*/
|
||||
method() {
|
||||
return
|
||||
/*strong.fields=[this],free=[this],hasThis*/
|
||||
/*omit.fields=[this],free=[this],hasThis*/
|
||||
/*fields=[this],free=[this],hasThis*/
|
||||
() {
|
||||
F<S> c = f;
|
||||
return c;
|
||||
|
|
|
@ -10,7 +10,7 @@ typedef int F<R>(R a);
|
|||
|
||||
method<S>() {
|
||||
return
|
||||
/*strong.fields=[S],free=[S]*/
|
||||
/*strong|dart2js:nnbd.fields=[S],free=[S]*/
|
||||
/*omit.*/
|
||||
() {
|
||||
F<S> c = f;
|
||||
|
|
|
@ -10,8 +10,7 @@ typedef bool F<R>(R a);
|
|||
|
||||
method<S>() {
|
||||
return
|
||||
/*strong.fields=[S],free=[S]*/
|
||||
/*omit.fields=[S],free=[S]*/
|
||||
/*fields=[S],free=[S]*/
|
||||
() {
|
||||
F<S> c = f;
|
||||
return c;
|
||||
|
|
|
@ -12,7 +12,7 @@ class A<T> {
|
|||
@pragma('dart2js:noInline')
|
||||
method() {
|
||||
/*omit.hasThis*/
|
||||
/*strong.fields=[this],free=[this],hasThis*/
|
||||
/*strong|dart2js:nnbd.fields=[this],free=[this],hasThis*/
|
||||
dynamic local() => <T>[];
|
||||
return local;
|
||||
}
|
||||
|
|
|
@ -9,7 +9,7 @@ import 'package:expect/expect.dart';
|
|||
@pragma('dart2js:noInline')
|
||||
method<T>() {
|
||||
/*omit.*/
|
||||
/*strong.fields=[T],free=[T]*/
|
||||
/*strong|dart2js:nnbd.fields=[T],free=[T]*/
|
||||
dynamic local() => <T>[];
|
||||
return local;
|
||||
}
|
||||
|
|
|
@ -12,7 +12,7 @@ class A<T> {
|
|||
@pragma('dart2js:noInline')
|
||||
method() {
|
||||
/*omit.hasThis*/
|
||||
/*strong.fields=[this],free=[this],hasThis*/
|
||||
/*strong|dart2js:nnbd.fields=[this],free=[this],hasThis*/
|
||||
dynamic local() => <T, int>{};
|
||||
return local;
|
||||
}
|
||||
|
|
|
@ -9,7 +9,7 @@ import 'package:expect/expect.dart';
|
|||
@pragma('dart2js:noInline')
|
||||
method<T>() {
|
||||
/*omit.*/
|
||||
/*strong.fields=[T],free=[T]*/
|
||||
/*strong|dart2js:nnbd.fields=[T],free=[T]*/
|
||||
dynamic local() => <T, int>{};
|
||||
return local;
|
||||
}
|
||||
|
|
|
@ -1,2 +1,3 @@
|
|||
strong=tests/compiler/dart2js/closure/closure_test.dart
|
||||
omit=tests/compiler/dart2js/closure/closure_test.dart
|
||||
omit=tests/compiler/dart2js/closure/closure_test.dart
|
||||
dart2js:nnbd=tests/compiler/dart2js/closure/closure_test.dart
|
|
@ -41,7 +41,7 @@ class Class3<T> {
|
|||
/*member: Class3.method3:hasThis*/
|
||||
method3(dynamic o) {
|
||||
/*omit.fields=[o],free=[o],hasThis*/
|
||||
/*strong.fields=[o,this],free=[o,this],hasThis*/
|
||||
/*strong|dart2js:nnbd.fields=[o,this],free=[o,this],hasThis*/
|
||||
T local() => o;
|
||||
return local;
|
||||
}
|
||||
|
|
|
@ -32,7 +32,7 @@ method2<T>(dynamic o) {
|
|||
|
||||
/*member: method3:*/
|
||||
method3<T>(dynamic o) {
|
||||
/*strong.fields=[T,o],free=[T,o]*/
|
||||
/*strong|dart2js:nnbd.fields=[T,o],free=[T,o]*/
|
||||
/*omit.fields=[o],free=[o]*/
|
||||
T local() => o;
|
||||
return local;
|
||||
|
|
|
@ -51,7 +51,7 @@ class Class2<T> {
|
|||
/*member: Class2.method2:hasThis*/
|
||||
method2() {
|
||||
/*omit.hasThis*/
|
||||
/*strong.fields=[this],free=[this],hasThis*/
|
||||
/*strong|dart2js:nnbd.fields=[this],free=[this],hasThis*/
|
||||
dynamic local(T t) => t;
|
||||
return local;
|
||||
}
|
||||
|
@ -66,7 +66,7 @@ class Class3<T> {
|
|||
/*member: Class3.method3:hasThis*/
|
||||
method3(dynamic o) {
|
||||
/*omit.fields=[o],free=[o],hasThis*/
|
||||
/*strong.fields=[o,this],free=[o,this],hasThis*/
|
||||
/*strong|dart2js:nnbd.fields=[o,this],free=[o,this],hasThis*/
|
||||
T local() => o;
|
||||
return local;
|
||||
}
|
||||
|
@ -109,7 +109,7 @@ class Class6<T> {
|
|||
/*member: Class6.method6:hasThis*/
|
||||
method6() {
|
||||
/*omit.hasThis*/
|
||||
/*strong.fields=[this],free=[this],hasThis*/
|
||||
/*strong|dart2js:nnbd.fields=[this],free=[this],hasThis*/
|
||||
dynamic local(T t) {
|
||||
/*fields=[t],free=[t],hasThis*/
|
||||
dynamic inner() => t;
|
||||
|
@ -129,7 +129,7 @@ class Class7<T> {
|
|||
/*member: Class7.method7:hasThis*/
|
||||
method7(dynamic o) {
|
||||
/*omit.fields=[o],free=[o],hasThis*/
|
||||
/*strong.fields=[o,this],free=[o,this],hasThis*/
|
||||
/*strong|dart2js:nnbd.fields=[o,this],free=[o,this],hasThis*/
|
||||
T local() {
|
||||
/*fields=[o],free=[o],hasThis*/
|
||||
dynamic inner() => o;
|
||||
|
|
|
@ -23,7 +23,7 @@ method1<T>(T o) {
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
method2<T>() {
|
||||
/*strong.fields=[T],free=[T]*/
|
||||
/*strong|dart2js:nnbd.fields=[T],free=[T]*/
|
||||
/*omit.*/
|
||||
dynamic local(T t) => t;
|
||||
return local;
|
||||
|
@ -34,7 +34,7 @@ method2<T>() {
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
method3<T>(dynamic o) {
|
||||
/*strong.fields=[T,o],free=[T,o]*/
|
||||
/*strong|dart2js:nnbd.fields=[T,o],free=[T,o]*/
|
||||
/*omit.fields=[o],free=[o]*/
|
||||
T local() => o;
|
||||
return local;
|
||||
|
@ -65,7 +65,7 @@ T method5<T>(dynamic o) {
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
method6<T>() {
|
||||
/*strong.fields=[T],free=[T]*/
|
||||
/*strong|dart2js:nnbd.fields=[T],free=[T]*/
|
||||
/*omit.*/
|
||||
dynamic local(T t) {
|
||||
/*fields=[t],free=[t]*/
|
||||
|
@ -81,7 +81,7 @@ method6<T>() {
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
method7<T>(dynamic o) {
|
||||
/*strong.fields=[T,o],free=[T,o]*/
|
||||
/*strong|dart2js:nnbd.fields=[T,o],free=[T,o]*/
|
||||
/*omit.fields=[o],free=[o]*/
|
||||
T local() {
|
||||
/*fields=[o],free=[o]*/
|
||||
|
|
|
@ -1,2 +1,3 @@
|
|||
strong=tests/compiler/dart2js/codegen/model_test.dart
|
||||
omit=tests/compiler/dart2js/codegen/model_test.dart
|
||||
omit=tests/compiler/dart2js/codegen/model_test.dart
|
||||
dart2js:nnbd=tests/compiler/dart2js/codegen/model_test.dart
|
|
@ -6,11 +6,12 @@
|
|||
|
||||
import 'lib1.dart' deferred as lib;
|
||||
|
||||
/*member: main:
|
||||
/*strong.member: main:
|
||||
OutputUnit(main, {}),
|
||||
constants=[
|
||||
MapConstant(<int, dynamic Function({M b})>{IntConstant(1): FunctionConstant(f1), IntConstant(2): FunctionConstant(f2)})=OutputUnit(1, {lib})]
|
||||
*/
|
||||
/*dart2js:nnbd.member: main:OutputUnit(main, {}),constants=[MapConstant(<int*, dynamic Function({M* b})*>{IntConstant(1): FunctionConstant(f1), IntConstant(2): FunctionConstant(f2)})=OutputUnit(1, {lib})]*/
|
||||
main() async {
|
||||
await lib.loadLibrary();
|
||||
print(lib.table[1]);
|
||||
|
|
|
@ -9,10 +9,11 @@ T getFoo<T>(T v) => v;
|
|||
|
||||
typedef dynamic G<T>(T v);
|
||||
|
||||
/*member: m:
|
||||
/*strong.member: m:
|
||||
OutputUnit(1, {b}),
|
||||
constants=[InstantiationConstant([int],FunctionConstant(getFoo))=OutputUnit(1, {b})]
|
||||
*/
|
||||
/*dart2js:nnbd.member: m:OutputUnit(1, {b}),constants=[InstantiationConstant([int*],FunctionConstant(getFoo))=OutputUnit(1, {b})]*/
|
||||
m(int x, {G<int> f: getFoo}) {
|
||||
print(f(x));
|
||||
}
|
||||
|
|
|
@ -9,11 +9,12 @@ T getFoo<T>(T v) => v;
|
|||
|
||||
typedef dynamic G<T>(T v);
|
||||
|
||||
/*member: m:
|
||||
/*strong.member: m:
|
||||
OutputUnit(1, {b}),
|
||||
constants=[
|
||||
InstantiationConstant([int],FunctionConstant(getFoo))=OutputUnit(1, {b})]
|
||||
*/
|
||||
/*dart2js:nnbd.member: m:OutputUnit(1, {b}),constants=[InstantiationConstant([int*],FunctionConstant(getFoo))=OutputUnit(1, {b})]*/
|
||||
m(int x, {G<int> f: getFoo}) {
|
||||
print(f(x));
|
||||
}
|
||||
|
|
|
@ -9,11 +9,12 @@ T getFoo<T, S>(T v, S w) => v;
|
|||
|
||||
typedef dynamic G<T, S>(T v, S w);
|
||||
|
||||
/*member: m:
|
||||
/*strong.member: m:
|
||||
OutputUnit(3, {c}),
|
||||
constants=[
|
||||
InstantiationConstant([int, int],FunctionConstant(getFoo))=OutputUnit(3, {c})]
|
||||
*/
|
||||
/*dart2js:nnbd.member: m:OutputUnit(3, {c}),constants=[InstantiationConstant([int*, int*],FunctionConstant(getFoo))=OutputUnit(3, {c})]*/
|
||||
m(int x, int y, {G<int, int> f: getFoo}) {
|
||||
print(f(x, y));
|
||||
}
|
||||
|
|
|
@ -9,11 +9,12 @@ T getFoo<T>(T v) => v;
|
|||
|
||||
typedef dynamic G<T>(T v);
|
||||
|
||||
/*member: m:
|
||||
/*strong.member: m:
|
||||
OutputUnit(2, {b}),
|
||||
constants=[
|
||||
InstantiationConstant([int],FunctionConstant(getFoo))=OutputUnit(2, {b})]
|
||||
*/
|
||||
/*dart2js:nnbd.member: m:OutputUnit(2, {b}),constants=[InstantiationConstant([int*],FunctionConstant(getFoo))=OutputUnit(2, {b})]*/
|
||||
m(int x, {G<int> f: getFoo}) {
|
||||
print(f(x));
|
||||
}
|
||||
|
|
|
@ -9,11 +9,12 @@ T getFoo<T>(T v) => v;
|
|||
|
||||
typedef dynamic G<T>(T v);
|
||||
|
||||
/*member: m:
|
||||
/*strong.member: m:
|
||||
OutputUnit(3, {c}),
|
||||
constants=[
|
||||
InstantiationConstant([int],FunctionConstant(getFoo))=OutputUnit(3, {c})]
|
||||
*/
|
||||
/*dart2js:nnbd.member: m:OutputUnit(3, {c}),constants=[InstantiationConstant([int*],FunctionConstant(getFoo))=OutputUnit(3, {c})]*/
|
||||
m(int x, {G<int> f: getFoo}) {
|
||||
print(f(x));
|
||||
}
|
||||
|
|
|
@ -1 +1,2 @@
|
|||
strong=tests/compiler/dart2js/deferred_loading/deferred_loading_test.dart
|
||||
strong=tests/compiler/dart2js/deferred_loading/deferred_loading_test.dart
|
||||
dart2js:nnbd=tests/compiler/dart2js/deferred_loading/deferred_loading_test.dart
|
|
@ -9,12 +9,13 @@ library lib2;
|
|||
import "package:expect/expect.dart";
|
||||
import "lib1.dart";
|
||||
|
||||
/*member: foo:
|
||||
/*strong.member: foo:
|
||||
OutputUnit(3, {lib2}),
|
||||
constants=[
|
||||
ListConstant(<Map<int,int>>[MapConstant(<int, int>{IntConstant(1): IntConstant(3)})])=OutputUnit(3, {lib2}),
|
||||
MapConstant(<int, int>{IntConstant(1): IntConstant(3)})=OutputUnit(3, {lib2})]
|
||||
*/
|
||||
/*dart2js:nnbd.member: foo:OutputUnit(3, {lib2}),constants=[ListConstant(<Map<int*,int*>*>[MapConstant(<int*, int*>{IntConstant(1): IntConstant(3)})])=OutputUnit(3, {lib2}),MapConstant(<int*, int*>{IntConstant(1): IntConstant(3)})=OutputUnit(3, {lib2})]*/
|
||||
foo() {
|
||||
Expect.equals(1, C.foo());
|
||||
Expect.mapEquals({}, C1.foo);
|
||||
|
|
|
@ -8,7 +8,7 @@ import 'lib1.dart' deferred as lib1;
|
|||
import 'lib2.dart' as lib2;
|
||||
import 'lib3.dart' deferred as lib3;
|
||||
|
||||
/*member: main:
|
||||
/*strong.member: main:
|
||||
OutputUnit(main, {}),
|
||||
constants=[
|
||||
ConstructedConstant(A<B>())=OutputUnit(1, {lib1}),
|
||||
|
@ -16,6 +16,7 @@ import 'lib3.dart' deferred as lib3;
|
|||
ConstructedConstant(C<D>())=OutputUnit(main, {}),
|
||||
ConstructedConstant(E<F>())=OutputUnit(3, {lib3})]
|
||||
*/
|
||||
/*dart2js:nnbd.member: main:OutputUnit(main, {}),constants=[ConstructedConstant(A<B*>())=OutputUnit(1, {lib1}),ConstructedConstant(A<F*>())=OutputUnit(1, {lib1}),ConstructedConstant(C<D*>())=OutputUnit(main, {}),ConstructedConstant(E<F*>())=OutputUnit(3, {lib3})]*/
|
||||
main() async {
|
||||
await lib1.loadLibrary();
|
||||
lib1.field1;
|
||||
|
|
|
@ -19,6 +19,7 @@ import 'package:compiler/src/kernel/kernel_strategy.dart';
|
|||
import 'package:expect/expect.dart';
|
||||
import 'package:kernel/ast.dart' as ir;
|
||||
|
||||
import '../helpers/compiler_helper.dart';
|
||||
import '../helpers/memory_compiler.dart';
|
||||
import '../equivalence/id_equivalence.dart';
|
||||
|
||||
|
@ -37,16 +38,22 @@ const TestConfig omitConfig = const TestConfig(
|
|||
'strong mode without implicit checks',
|
||||
[Flags.omitImplicitChecks, Flags.laxRuntimeTypeToString]);
|
||||
|
||||
const TestConfig dart2jsWithNnbdConfig =
|
||||
const TestConfig(dart2jsWithNnbdMarker, 'dart2js with nnbd', []);
|
||||
|
||||
const List<String> allInternalMarkers = const [
|
||||
strongMarker,
|
||||
omitMarker,
|
||||
dart2jsWithNnbdMarker
|
||||
];
|
||||
|
||||
/// Default internal configurations not including experimental features.
|
||||
const List<TestConfig> defaultInternalConfigs = const [
|
||||
strongConfig,
|
||||
omitConfig
|
||||
];
|
||||
List<TestConfig> defaultInternalConfigs = isDart2jsNnbd
|
||||
? const [dart2jsWithNnbdConfig]
|
||||
: const [
|
||||
strongConfig,
|
||||
omitConfig,
|
||||
];
|
||||
|
||||
/// All internal configurations including experimental features.
|
||||
const List<TestConfig> allInternalConfigs = const [
|
||||
|
@ -56,12 +63,13 @@ const List<TestConfig> allInternalConfigs = const [
|
|||
|
||||
/// Compliance mode configurations (with strong mode checks) including
|
||||
/// experimental features.
|
||||
const List<TestConfig> allStrongConfigs = const [
|
||||
strongConfig,
|
||||
];
|
||||
List<TestConfig> allStrongConfigs =
|
||||
isDart2jsNnbd ? const [dart2jsWithNnbdConfig] : const [strongConfig];
|
||||
|
||||
/// Test configuration used in tests shared with CFE.
|
||||
const TestConfig sharedConfig = const TestConfig(dart2jsMarker, 'dart2js', []);
|
||||
TestConfig sharedConfig = isDart2jsNnbd
|
||||
? dart2jsWithNnbdConfig
|
||||
: const TestConfig(dart2jsMarker, 'dart2js', []);
|
||||
|
||||
abstract class DataComputer<T> {
|
||||
const DataComputer();
|
||||
|
@ -400,7 +408,8 @@ Future<void> checkTests<T>(Directory dataDir, DataComputer<T> dataComputer,
|
|||
int shards: 1,
|
||||
int shardIndex: 0,
|
||||
void onTest(Uri uri),
|
||||
List<TestConfig> testedConfigs = defaultInternalConfigs}) async {
|
||||
List<TestConfig> testedConfigs = const []}) async {
|
||||
if (testedConfigs.isEmpty) testedConfigs = defaultInternalConfigs;
|
||||
Set<String> testedMarkers =
|
||||
testedConfigs.map((config) => config.marker).toSet();
|
||||
Expect.isTrue(
|
||||
|
|
|
@ -1,2 +1,3 @@
|
|||
strong=tests/compiler/dart2js/field_analysis/jfield_analysis_test.dart
|
||||
omit=tests/compiler/dart2js/field_analysis/jfield_analysis_test.dart
|
||||
omit=tests/compiler/dart2js/field_analysis/jfield_analysis_test.dart
|
||||
dart2js:nnbd=tests/compiler/dart2js/field_analysis/jfield_analysis_test.dart
|
|
@ -1,2 +1,3 @@
|
|||
strong=tests/compiler/dart2js/field_analysis/kfield_analysis_test.dart
|
||||
omit=tests/compiler/dart2js/field_analysis/kfield_analysis_test.dart
|
||||
omit=tests/compiler/dart2js/field_analysis/kfield_analysis_test.dart
|
||||
dart2js:nnbd=tests/compiler/dart2js/field_analysis/kfield_analysis_test.dart
|
|
@ -1 +1,2 @@
|
|||
strong=tests/compiler/dart2js/impact/impact_test.dart
|
||||
strong=tests/compiler/dart2js/impact/impact_test.dart
|
||||
dart2js:nnbd=tests/compiler/dart2js/impact/impact_test.dart
|
|
@ -1,2 +1,3 @@
|
|||
strong=tests/compiler/dart2js/inference/callers_test.dart
|
||||
omit=tests/compiler/dart2js/inference/callers_test.dart
|
||||
omit=tests/compiler/dart2js/inference/callers_test.dart
|
||||
dart2js:nnbd=tests/compiler/dart2js/inference/callers_test.dart
|
|
@ -1 +1,2 @@
|
|||
strong=tests/compiler/dart2js/inference/inference_data_test.dart
|
||||
dart2js:nnbd=tests/compiler/dart2js/inference/inference_data_test.dart
|
||||
|
|
|
@ -1,2 +1,3 @@
|
|||
strong=tests/compiler/dart2js/inference/side_effects_test.dart
|
||||
omit=tests/compiler/dart2js/inference/side_effects_test.dart
|
||||
omit=tests/compiler/dart2js/inference/side_effects_test.dart
|
||||
dart2js:nnbd=tests/compiler/dart2js/inference/side_effects_test.dart
|
|
@ -1,2 +1,3 @@
|
|||
strong=tests/compiler/dart2js/inlining/inlining_test.dart
|
||||
omit=tests/compiler/dart2js/inlining/inlining_test.dart
|
||||
omit=tests/compiler/dart2js/inlining/inlining_test.dart
|
||||
dart2js:nnbd=tests/compiler/dart2js/inlining/inlining_test.dart
|
|
@ -1,2 +1,3 @@
|
|||
strong=tests/compiler/dart2js/jumps/jump_test.dart
|
||||
omit=tests/compiler/dart2js/jumps/jump_test.dart
|
||||
omit=tests/compiler/dart2js/jumps/jump_test.dart
|
||||
dart2js:nnbd=tests/compiler/dart2js/jumps/jump_test.dart
|
|
@ -1,2 +1,3 @@
|
|||
strong=tests/compiler/dart2js/member_usage/member_usage_test.dart
|
||||
omit=tests/compiler/dart2js/member_usage/member_usage_test.dart
|
||||
omit=tests/compiler/dart2js/member_usage/member_usage_test.dart
|
||||
dart2js:nnbd=tests/compiler/dart2js/member_usage/member_usage_test.dart
|
|
@ -1,2 +1,3 @@
|
|||
strong=tests/compiler/dart2js/optimization/optimization_test.dart
|
||||
omit=tests/compiler/dart2js/optimization/optimization_test.dart
|
||||
omit=tests/compiler/dart2js/optimization/optimization_test.dart
|
||||
dart2js:nnbd=tests/compiler/dart2js/optimization/optimization_test.dart
|
|
@ -1,2 +1,3 @@
|
|||
strong=tests/compiler/dart2js/rti/rti_need_test_helper.dart
|
||||
omit=tests/compiler/dart2js/rti/rti_need_test_helper.dart
|
||||
omit=tests/compiler/dart2js/rti/rti_need_test_helper.dart
|
||||
dart2js:nnbd=tests/compiler/dart2js/rti/rti_need_test_helper.dart
|
|
@ -10,8 +10,7 @@ test(o) => o is Function;
|
|||
main() {
|
||||
test(
|
||||
|
||||
/*strong.checks=[],instance*/
|
||||
/*omit.checks=[],instance*/
|
||||
/*checks=[],instance*/
|
||||
() {});
|
||||
test(null);
|
||||
}
|
||||
|
|
|
@ -11,7 +11,6 @@ main() {
|
|||
test(/*checks=[$signature],instance*/ () {});
|
||||
test(
|
||||
|
||||
/*strong.checks=[],instance*/
|
||||
/*omit.checks=[],instance*/
|
||||
/*checks=[],instance*/
|
||||
(a) {});
|
||||
}
|
||||
|
|
|
@ -12,8 +12,7 @@ class A<T> {
|
|||
// potential subtype of the checked function types.
|
||||
return
|
||||
|
||||
/*strong.checks=[],instance*/
|
||||
/*omit.checks=[],instance*/
|
||||
/*checks=[],instance*/
|
||||
(T t, String s) {};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,13 +4,13 @@
|
|||
|
||||
// @dart = 2.7
|
||||
|
||||
/*strong.class: A1:checkedInstance,checks=[],instance*/
|
||||
/*strong|dart2js:nnbd.class: A1:checkedInstance,checks=[],instance*/
|
||||
/*omit.class: A1:checks=[],instance*/
|
||||
class A1 {}
|
||||
|
||||
// Constructor calls are always statically invoked, so there is no checks at the
|
||||
// entry and the `Test1` constructor does not cause any checks.
|
||||
/*strong.class: B1:checks=[$isA1],instance*/
|
||||
/*strong|dart2js:nnbd.class: B1:checks=[$isA1],instance*/
|
||||
/*omit.class: B1:checks=[],instance*/
|
||||
class B1 implements A1 {}
|
||||
|
||||
|
|
|
@ -4,11 +4,11 @@
|
|||
|
||||
// @dart = 2.7
|
||||
|
||||
/*strong.class: A:checkedInstance,checkedTypeArgument,checks=[],typeArgument*/
|
||||
/*strong|dart2js:nnbd.class: A:checkedInstance,checkedTypeArgument,checks=[],typeArgument*/
|
||||
/*omit.class: A:checkedTypeArgument,checks=[],typeArgument*/
|
||||
class A {}
|
||||
|
||||
/*strong.class: B:checkedInstance,checks=[$isA],typeArgument*/
|
||||
/*strong|dart2js:nnbd.class: B:checkedInstance,checks=[$isA],typeArgument*/
|
||||
/*omit.class: B:checks=[$isA],typeArgument*/
|
||||
class B implements A {}
|
||||
|
||||
|
@ -24,7 +24,7 @@ class D extends C<B> {}
|
|||
main() {
|
||||
C<A> c = new D();
|
||||
c.method(
|
||||
/*strong.checks=[$signature],instance*/
|
||||
/*strong|dart2js:nnbd.checks=[$signature],instance*/
|
||||
/*omit.checks=[],instance*/
|
||||
(A a) {});
|
||||
}
|
||||
|
|
|
@ -7,18 +7,18 @@
|
|||
// Test that we emit the relation between B and A even when B is only live
|
||||
// as a type argument through the supertype of D.
|
||||
|
||||
/*strong.class: A:checkedTypeArgument,checks=[],typeArgument*/
|
||||
/*strong|dart2js:nnbd.class: A:checkedTypeArgument,checks=[],typeArgument*/
|
||||
class A {}
|
||||
|
||||
/*strong.class: B:checks=[$isA],typeArgument*/
|
||||
/*strong|dart2js:nnbd.class: B:checks=[$isA],typeArgument*/
|
||||
/*omit.class: B:checks=[],typeArgument*/
|
||||
class B implements A {}
|
||||
|
||||
/*strong.class: C:checkedInstance*/
|
||||
/*strong|dart2js:nnbd.class: C:checkedInstance*/
|
||||
/*omit.class: C:*/
|
||||
class C<T> {}
|
||||
|
||||
/*strong.class: D:checks=[$isC],instance*/
|
||||
/*strong|dart2js:nnbd.class: D:checks=[$isC],instance*/
|
||||
/*omit.class: D:checks=[],instance*/
|
||||
class D implements C<B> {}
|
||||
|
||||
|
|
|
@ -6,13 +6,13 @@
|
|||
|
||||
import 'package:expect/expect.dart';
|
||||
|
||||
/*strong.class: C:checkedInstance,checks=[],instance,typeArgument*/
|
||||
/*strong|dart2js:nnbd.class: C:checkedInstance,checks=[],instance,typeArgument*/
|
||||
/*omit.class: C:checks=[],instance,typeArgument*/
|
||||
class C {
|
||||
call(int i) {}
|
||||
}
|
||||
|
||||
/*strong.class: D:checkedInstance,checks=[],instance,typeArgument*/
|
||||
/*strong|dart2js:nnbd.class: D:checkedInstance,checks=[],instance,typeArgument*/
|
||||
/*omit.class: D:checks=[],instance,typeArgument*/
|
||||
class D {
|
||||
call(double i) {}
|
||||
|
|
|
@ -8,11 +8,11 @@
|
|||
|
||||
library generic_methods_dynamic_test;
|
||||
|
||||
/*strong.class: A:checkedInstance,checks=[],typeArgument*/
|
||||
/*strong|dart2js:nnbd.class: A:checkedInstance,checks=[],typeArgument*/
|
||||
/*omit.class: A:*/
|
||||
class A {}
|
||||
|
||||
/*strong.class: B:checks=[],instance*/
|
||||
/*strong|dart2js:nnbd.class: B:checks=[],instance*/
|
||||
/*omit.class: B:*/
|
||||
class B {}
|
||||
|
||||
|
|
|
@ -4,16 +4,13 @@
|
|||
|
||||
// @dart = 2.7
|
||||
|
||||
/*strong.class: A:checkedInstance,checks=[],typeArgument*/
|
||||
/*omit.class: A:checkedInstance,checks=[],typeArgument*/
|
||||
/*class: A:checkedInstance,checks=[],typeArgument*/
|
||||
abstract class A {}
|
||||
|
||||
/*strong.class: B:checks=[$isA],typeArgument*/
|
||||
/*omit.class: B:checks=[$isA],typeArgument*/
|
||||
/*class: B:checks=[$isA],typeArgument*/
|
||||
class B implements A {}
|
||||
|
||||
/*strong.class: C:checkedInstance,checks=[],instance,typeArgument*/
|
||||
/*omit.class: C:checkedInstance,checks=[],instance,typeArgument*/
|
||||
/*class: C:checkedInstance,checks=[],instance,typeArgument*/
|
||||
class C<T> {}
|
||||
|
||||
final Map<String, C> map = {};
|
||||
|
|
|
@ -14,7 +14,7 @@ library foo;
|
|||
import 'package:expect/expect.dart';
|
||||
import 'package:js/js.dart';
|
||||
|
||||
/*strong.class: A:checkedInstance,checkedTypeArgument,checks=[],typeArgument*/
|
||||
/*strong|dart2js:nnbd.class: A:checkedInstance,checkedTypeArgument,checks=[],typeArgument*/
|
||||
/*omit.class: A:checkedTypeArgument,checks=[],typeArgument*/
|
||||
@JS()
|
||||
@anonymous
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
// @dart = 2.7
|
||||
|
||||
/*strong.class: A:checkedInstance,checkedTypeArgument,checks=[],typeArgument*/
|
||||
/*strong|dart2js:nnbd.class: A:checkedInstance,checkedTypeArgument,checks=[],typeArgument*/
|
||||
/*omit.class: A:checkedTypeArgument,checks=[],typeArgument*/
|
||||
/*strong.class: global#JSArray:checkedInstance,checks=[$isIterable],instance*/
|
||||
/*omit.class: global#JSArray:checks=[$isIterable],instance*/
|
||||
|
@ -13,7 +13,7 @@
|
|||
|
||||
class A {}
|
||||
|
||||
/*strong.class: B:checkedInstance,checks=[],typeArgument*/
|
||||
/*strong|dart2js:nnbd.class: B:checkedInstance,checks=[],typeArgument*/
|
||||
/*omit.class: B:checks=[],typeArgument*/
|
||||
class B {}
|
||||
|
||||
|
|
|
@ -1,2 +1,3 @@
|
|||
strong=tests/compiler/dart2js/rti/rti_emission_test.dart
|
||||
omit=tests/compiler/dart2js/rti/rti_emission_test.dart
|
||||
omit=tests/compiler/dart2js/rti/rti_emission_test.dart
|
||||
dart2js:nnbd=tests/compiler/dart2js/rti/rti_emission_test.dart
|
|
@ -28,11 +28,11 @@ main() {
|
|||
// inserts an implicit cast at the call-site or we disregard the forced check
|
||||
// because it is a static call.
|
||||
|
||||
/*strong.class: Class1a:checkedInstance*/
|
||||
/*strong|dart2js:nnbd.class: Class1a:checkedInstance*/
|
||||
/*omit.class: Class1a:*/
|
||||
class Class1a {}
|
||||
|
||||
/*strong.class: Class1b:checkedInstance*/
|
||||
/*strong|dart2js:nnbd.class: Class1b:checkedInstance*/
|
||||
/*omit.class: Class1b:*/
|
||||
class Class1b {}
|
||||
|
||||
|
@ -52,11 +52,11 @@ class Class3a {}
|
|||
/*class: Class3b:*/
|
||||
class Class3b {}
|
||||
|
||||
/*strong.class: Class4a:checkedInstance*/
|
||||
/*strong|dart2js:nnbd.class: Class4a:checkedInstance*/
|
||||
/*omit.class: Class4a:*/
|
||||
class Class4a<T> {}
|
||||
|
||||
/*strong.class: Class4b:checkedInstance*/
|
||||
/*strong|dart2js:nnbd.class: Class4b:checkedInstance*/
|
||||
/*omit.class: Class4b:*/
|
||||
class Class4b<T> {}
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
// @dart = 2.7
|
||||
|
||||
main() {
|
||||
/*strong.checks=[$signature],instance*/
|
||||
/*strong|dart2js:nnbd.checks=[$signature],instance*/
|
||||
/*omit.checks=[],instance*/
|
||||
T id<T>(T t) => t;
|
||||
int Function(int) x = id;
|
||||
|
|
|
@ -4,18 +4,17 @@
|
|||
|
||||
// @dart = 2.7
|
||||
|
||||
/*strong.class: I1:*/
|
||||
/*omit.class: I1:*/
|
||||
/*strong|omit.class: I1:*/
|
||||
class I1 {}
|
||||
|
||||
/*strong.class: I2:checkedInstance*/
|
||||
/*strong|dart2js:nnbd.class: I2:checkedInstance*/
|
||||
class I2 {}
|
||||
|
||||
/*strong.class: A:checks=[$isI2],instance*/
|
||||
/*strong|dart2js:nnbd.class: A:checks=[$isI2],instance*/
|
||||
/*omit.class: A:checks=[],instance*/
|
||||
class A implements I1, I2 {}
|
||||
|
||||
/*strong.class: B:checks=[$isI2],instance*/
|
||||
/*strong|dart2js:nnbd.class: B:checks=[$isI2],instance*/
|
||||
/*omit.class: B:checks=[],instance*/
|
||||
class B implements I1, I2 {}
|
||||
|
||||
|
|
|
@ -8,31 +8,31 @@
|
|||
|
||||
import 'package:expect/expect.dart';
|
||||
|
||||
/*strong.class: A:checkedInstance,checkedTypeArgument,checks=[],typeArgument*/
|
||||
/*strong|dart2js:nnbd.class: A:checkedInstance,checkedTypeArgument,checks=[],typeArgument*/
|
||||
/*omit.class: A:checkedTypeArgument,checks=[],typeArgument*/
|
||||
class A {}
|
||||
|
||||
/*strong.class: A1:checkedInstance,checkedTypeArgument,checks=[],typeArgument*/
|
||||
/*strong|dart2js:nnbd.class: A1:checkedInstance,checkedTypeArgument,checks=[],typeArgument*/
|
||||
/*omit.class: A1:checkedTypeArgument,checks=[],typeArgument*/
|
||||
class A1 {}
|
||||
|
||||
/*strong.class: A2:checkedInstance,checkedTypeArgument,checks=[],typeArgument*/
|
||||
/*strong|dart2js:nnbd.class: A2:checkedInstance,checkedTypeArgument,checks=[],typeArgument*/
|
||||
/*omit.class: A2:checkedTypeArgument,checks=[],typeArgument*/
|
||||
class A2 {}
|
||||
|
||||
/*strong.class: B:checkedInstance,checkedTypeArgument,checks=[$isA,$isA1,$isA2],typeArgument*/
|
||||
/*strong|dart2js:nnbd.class: B:checkedInstance,checkedTypeArgument,checks=[$isA,$isA1,$isA2],typeArgument*/
|
||||
/*omit.class: B:checkedTypeArgument,checks=[$isA,$isA1,$isA2],typeArgument*/
|
||||
class B implements A, A1, A2 {}
|
||||
|
||||
/*strong.class: C:checkedInstance,checkedTypeArgument,checks=[$isA,$isA1,$isA2,$isB],typeArgument*/
|
||||
/*strong|dart2js:nnbd.class: C:checkedInstance,checkedTypeArgument,checks=[$isA,$isA1,$isA2,$isB],typeArgument*/
|
||||
/*omit.class: C:checkedTypeArgument,checks=[$isA,$isA1,$isA2,$isB],typeArgument*/
|
||||
class C implements B {}
|
||||
|
||||
/*strong.class: D:checkedInstance,checkedTypeArgument,checks=[$isA,$isA1,$isA2,$isB,$isC],typeArgument*/
|
||||
/*strong|dart2js:nnbd.class: D:checkedInstance,checkedTypeArgument,checks=[$isA,$isA1,$isA2,$isB,$isC],typeArgument*/
|
||||
/*omit.class: D:checkedTypeArgument,checks=[$isA,$isA1,$isA2,$isB,$isC],typeArgument*/
|
||||
class D implements C {}
|
||||
|
||||
/*strong.class: G:checkedInstance,checkedTypeArgument,checks=[],typeArgument*/
|
||||
/*strong|dart2js:nnbd.class: G:checkedInstance,checkedTypeArgument,checks=[],typeArgument*/
|
||||
/*omit.class: G:checkedTypeArgument,checks=[],typeArgument*/
|
||||
class G<T, S, U, W> {}
|
||||
|
||||
|
@ -55,22 +55,22 @@ typedef okWithDynamicFunc_2({int x, bool y, List<Map> z, classesFunc v});
|
|||
|
||||
main() {
|
||||
Expect.isTrue(
|
||||
/*strong.checks=[$signature],instance*/
|
||||
/*strong|dart2js:nnbd.checks=[$signature],instance*/
|
||||
/*omit.checks=[],instance*/
|
||||
({D a, B b, C c, A d}) {} is classesFunc);
|
||||
Expect.isTrue(
|
||||
/*checks=[$signature],instance*/
|
||||
({A a, A b, A c, A d}) {} is classesFunc);
|
||||
Expect.isTrue(
|
||||
/*strong.checks=[$signature],instance*/
|
||||
/*strong|dart2js:nnbd.checks=[$signature],instance*/
|
||||
/*omit.checks=[],instance*/
|
||||
({D a, A1 b, A1 c, A1 d}) {} is classesFunc);
|
||||
Expect.isTrue(
|
||||
/*strong.checks=[$signature],instance*/
|
||||
/*strong|dart2js:nnbd.checks=[$signature],instance*/
|
||||
/*omit.checks=[],instance*/
|
||||
({D a, A2 b, A2 c, A2 d}) {} is classesFunc);
|
||||
Expect.isTrue(
|
||||
/*strong.checks=[$signature],instance*/
|
||||
/*strong|dart2js:nnbd.checks=[$signature],instance*/
|
||||
/*omit.checks=[],instance*/
|
||||
({D a, D b, D c, D d}) {} is classesFunc);
|
||||
Expect.isTrue(
|
||||
|
@ -83,7 +83,7 @@ main() {
|
|||
({Map<num, num> m, List<List<A1>> l, G<A, A1, A1, A1> g}) {}
|
||||
is genericsFunc);
|
||||
Expect.isTrue(
|
||||
/*strong.checks=[$signature],instance*/
|
||||
/*strong|dart2js:nnbd.checks=[$signature],instance*/
|
||||
/*omit.checks=[],instance*/
|
||||
({Map<int, int> m, List<List<D>> l, G<D, D, D, D> g}) {} is genericsFunc);
|
||||
Expect.isTrue(
|
||||
|
@ -94,11 +94,11 @@ main() {
|
|||
({Object m, Object l, Object g}) {} is genericsFunc);
|
||||
|
||||
Expect.isTrue(
|
||||
/*strong.checks=[$signature],instance*/
|
||||
/*strong|dart2js:nnbd.checks=[$signature],instance*/
|
||||
/*omit.checks=[],instance*/
|
||||
({A x, G y, mixFunc z, var v}) {} is dynamicFunc);
|
||||
Expect.isTrue(
|
||||
/*strong.checks=[$signature],instance*/
|
||||
/*strong|dart2js:nnbd.checks=[$signature],instance*/
|
||||
/*omit.checks=[],instance*/
|
||||
({int x, bool y, List<Map> z, classesFunc v}) {} is dynamicFunc);
|
||||
|
||||
|
|
|
@ -36,11 +36,11 @@ A1<String> method1c() => null;
|
|||
@pragma('dart2js:noInline')
|
||||
bool _test1(f) => f is A1<int> Function();
|
||||
|
||||
/*strong.class: A2:checkedInstance,checkedTypeArgument,checks=[],typeArgument*/
|
||||
/*strong|dart2js:nnbd.class: A2:checkedInstance,checkedTypeArgument,checks=[],typeArgument*/
|
||||
/*omit.class: A2:checkedTypeArgument,checks=[],typeArgument*/
|
||||
class A2<T> {}
|
||||
|
||||
/*strong.class: B2:checkedInstance,checkedTypeArgument,checks=[],typeArgument*/
|
||||
/*strong|dart2js:nnbd.class: B2:checkedInstance,checkedTypeArgument,checks=[],typeArgument*/
|
||||
/*omit.class: B2:checkedTypeArgument,checks=[],typeArgument*/
|
||||
class B2 extends A2<int> {}
|
||||
|
||||
|
@ -58,11 +58,11 @@ void method2c(A2<String> a) {}
|
|||
@pragma('dart2js:noInline')
|
||||
bool _test2(f) => f is void Function(A2<int>);
|
||||
|
||||
/*strong.class: A3:checkedInstance,checkedTypeArgument,checks=[],typeArgument*/
|
||||
/*strong|dart2js:nnbd.class: A3:checkedInstance,checkedTypeArgument,checks=[],typeArgument*/
|
||||
/*omit.class: A3:checkedTypeArgument,checks=[],typeArgument*/
|
||||
class A3<T> {}
|
||||
|
||||
/*strong.class: B3:checkedInstance,checkedTypeArgument,checks=[],typeArgument*/
|
||||
/*strong|dart2js:nnbd.class: B3:checkedInstance,checkedTypeArgument,checks=[],typeArgument*/
|
||||
/*omit.class: B3:checkedTypeArgument,checks=[],typeArgument*/
|
||||
class B3 extends A3<int> {}
|
||||
|
||||
|
|
|
@ -1,2 +1,3 @@
|
|||
strong=tests/compiler/dart2js/static_type/static_type_test.dart
|
||||
omit=tests/compiler/dart2js/static_type/static_type_test.dart
|
||||
omit=tests/compiler/dart2js/static_type/static_type_test.dart
|
||||
dart2js:nnbd=tests/compiler/dart2js/static_type/static_type_test.dart
|
|
@ -1,2 +1,3 @@
|
|||
strong=tests/compiler/dart2js/static_type/type_promotion_test.dart
|
||||
omit=tests/compiler/dart2js/static_type/type_promotion_test.dart
|
||||
omit=tests/compiler/dart2js/static_type/type_promotion_test.dart
|
||||
dart2js:nnbd=tests/compiler/dart2js/static_type/type_promotion_test.dart
|
Loading…
Reference in a new issue