Skip to content

Commit a13a2d7

Browse files
rakudramacommit-bot@chromium.org
authored andcommitted
Redo "[dart2js] Delete unused old-rti helpers"
Change-Id: I756a1adde6bbecdb5f28eb93f93041463435476d Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151041 Reviewed-by: Stephen Adams <[email protected]> Commit-Queue: Stephen Adams <[email protected]>
1 parent a39a3cd commit a13a2d7

File tree

18 files changed

+6
-1139
lines changed

18 files changed

+6
-1139
lines changed

pkg/compiler/lib/src/common_elements.dart

Lines changed: 0 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -452,24 +452,6 @@ abstract class CommonElements {
452452

453453
FunctionEntity get getRuntimeTypeArgumentIntercepted;
454454

455-
FunctionEntity get assertIsSubtype;
456-
457-
FunctionEntity get checkSubtype;
458-
459-
FunctionEntity get assertSubtype;
460-
461-
FunctionEntity get subtypeCast;
462-
463-
FunctionEntity get functionTypeTest;
464-
465-
FunctionEntity get futureOrTest;
466-
467-
FunctionEntity get checkSubtypeOfRuntimeType;
468-
469-
FunctionEntity get assertSubtypeOfRuntimeType;
470-
471-
FunctionEntity get subtypeOfRuntimeTypeCast;
472-
473455
FunctionEntity get checkDeferredIsLoaded;
474456

475457
FunctionEntity get throwNoSuchMethod;
@@ -1837,37 +1819,6 @@ class CommonElementsImpl
18371819
FunctionEntity get getRuntimeTypeArgumentIntercepted =>
18381820
_findHelperFunction('getRuntimeTypeArgumentIntercepted');
18391821

1840-
@override
1841-
FunctionEntity get assertIsSubtype => _findHelperFunction('assertIsSubtype');
1842-
1843-
@override
1844-
FunctionEntity get checkSubtype => _findHelperFunction('checkSubtype');
1845-
1846-
@override
1847-
FunctionEntity get assertSubtype => _findHelperFunction('assertSubtype');
1848-
1849-
@override
1850-
FunctionEntity get subtypeCast => _findHelperFunction('subtypeCast');
1851-
1852-
@override
1853-
FunctionEntity get functionTypeTest =>
1854-
_findHelperFunction('functionTypeTest');
1855-
1856-
@override
1857-
FunctionEntity get futureOrTest => _findHelperFunction('futureOrTest');
1858-
1859-
@override
1860-
FunctionEntity get checkSubtypeOfRuntimeType =>
1861-
_findHelperFunction('checkSubtypeOfRuntimeType');
1862-
1863-
@override
1864-
FunctionEntity get assertSubtypeOfRuntimeType =>
1865-
_findHelperFunction('assertSubtypeOfRuntimeType');
1866-
1867-
@override
1868-
FunctionEntity get subtypeOfRuntimeTypeCast =>
1869-
_findHelperFunction('subtypeOfRuntimeTypeCast');
1870-
18711822
@override
18721823
FunctionEntity get checkDeferredIsLoaded =>
18731824
_findHelperFunction('checkDeferredIsLoaded');

pkg/compiler/lib/src/js_backend/backend_impact.dart

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -478,7 +478,6 @@ class BackendImpacts {
478478

479479
BackendImpact get genericTypeCheck {
480480
return _genericTypeCheck ??= new BackendImpact(staticUses: [
481-
_commonElements.checkSubtype,
482481
// TODO(johnniwinther): Investigate why this is needed.
483482
_commonElements.setRuntimeTypeInfo,
484483
_commonElements.getRuntimeTypeInfo
@@ -499,9 +498,8 @@ class BackendImpacts {
499498
BackendImpact _typeVariableTypeCheck;
500499

501500
BackendImpact get typeVariableTypeCheck {
502-
return _typeVariableTypeCheck ??= new BackendImpact(
503-
staticUses: [_commonElements.checkSubtypeOfRuntimeType],
504-
otherImpacts: [newRtiImpact]);
501+
return _typeVariableTypeCheck ??=
502+
new BackendImpact(staticUses: [], otherImpacts: [newRtiImpact]);
505503
}
506504

507505
BackendImpact _functionTypeCheck;
@@ -515,9 +513,8 @@ class BackendImpacts {
515513
BackendImpact _futureOrTypeCheck;
516514

517515
BackendImpact get futureOrTypeCheck {
518-
return _futureOrTypeCheck ??= new BackendImpact(
519-
staticUses: [_commonElements.futureOrTest],
520-
otherImpacts: [newRtiImpact]);
516+
return _futureOrTypeCheck ??=
517+
new BackendImpact(staticUses: [], otherImpacts: [newRtiImpact]);
521518
}
522519

523520
BackendImpact _nativeTypeCheck;

pkg/compiler/test/impact/data/classes.dart

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -268,8 +268,6 @@ class ForwardingConstructorGenericSuperClass<T> {
268268
_isObject(1),
269269
_isString(1),
270270
_isTop(1),
271-
checkSubtype(4),
272-
checkSubtypeOfRuntimeType(2),
273271
findType(1),
274272
getRuntimeTypeArgument(3),
275273
getRuntimeTypeArgumentIntercepted(4),
@@ -323,8 +321,6 @@ class ForwardingConstructorGenericSuperClass<T> {
323321
_isObject(1),
324322
_isString(1),
325323
_isTop(1),
326-
checkSubtype(4),
327-
checkSubtypeOfRuntimeType(2),
328324
findType(1),
329325
getRuntimeTypeArgument(3),
330326
getRuntimeTypeArgumentIntercepted(4),
@@ -403,8 +399,6 @@ testEnum() => Enum.A;
403399
_isObject(1),
404400
_isString(1),
405401
_isTop(1),
406-
checkSubtype(4),
407-
checkSubtypeOfRuntimeType(2),
408402
findType(1),
409403
getRuntimeTypeArgument(3),
410404
getRuntimeTypeArgumentIntercepted(4),
@@ -459,8 +453,6 @@ testEnum() => Enum.A;
459453
_isObject(1),
460454
_isString(1),
461455
_isTop(1),
462-
checkSubtype(4),
463-
checkSubtypeOfRuntimeType(2),
464456
findType(1),
465457
getRuntimeTypeArgument(3),
466458
getRuntimeTypeArgumentIntercepted(4),
@@ -570,8 +562,6 @@ class GenericClass<X, Y> {
570562
_isObject(1),
571563
_isString(1),
572564
_isTop(1),
573-
checkSubtype(4),
574-
checkSubtypeOfRuntimeType(2),
575565
findType(1),
576566
getRuntimeTypeArgument(3),
577567
getRuntimeTypeArgumentIntercepted(4),
@@ -627,8 +617,6 @@ class GenericClass<X, Y> {
627617
_isObject(1),
628618
_isString(1),
629619
_isTop(1),
630-
checkSubtype(4),
631-
checkSubtypeOfRuntimeType(2),
632620
findType(1),
633621
getRuntimeTypeArgument(3),
634622
getRuntimeTypeArgumentIntercepted(4),

pkg/compiler/test/impact/data/constants/lib.dart

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,6 @@ const typeLiteralField = String;
7676
_isObject(1),
7777
_isString(1),
7878
_isTop(1),
79-
checkSubtype(4),
80-
checkSubtypeOfRuntimeType(2),
8179
findType(1),
8280
getRuntimeTypeArgument(3),
8381
getRuntimeTypeArgumentIntercepted(4),
@@ -131,8 +129,6 @@ const typeLiteralField = String;
131129
_isObject(1),
132130
_isString(1),
133131
_isTop(1),
134-
checkSubtype(4),
135-
checkSubtypeOfRuntimeType(2),
136132
findType(1),
137133
getRuntimeTypeArgument(3),
138134
getRuntimeTypeArgumentIntercepted(4),

pkg/compiler/test/impact/data/expressions.dart

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,6 @@ testIs() => null is Class;
224224
_isObject(1),
225225
_isString(1),
226226
_isTop(1),
227-
checkSubtype(4),
228227
findType(1),
229228
getRuntimeTypeArgument(3),
230229
getRuntimeTypeArgumentIntercepted(4),
@@ -278,7 +277,6 @@ testIs() => null is Class;
278277
_isObject(1),
279278
_isString(1),
280279
_isTop(1),
281-
checkSubtype(4),
282280
findType(1),
283281
getRuntimeTypeArgument(3),
284282
getRuntimeTypeArgumentIntercepted(4),
@@ -586,7 +584,6 @@ testIsNot() => null is! Class;
586584
_isObject(1),
587585
_isString(1),
588586
_isTop(1),
589-
checkSubtype(4),
590587
findType(1),
591588
getRuntimeTypeArgument(3),
592589
getRuntimeTypeArgumentIntercepted(4),
@@ -640,7 +637,6 @@ testIsNot() => null is! Class;
640637
_isObject(1),
641638
_isString(1),
642639
_isTop(1),
643-
checkSubtype(4),
644640
findType(1),
645641
getRuntimeTypeArgument(3),
646642
getRuntimeTypeArgumentIntercepted(4),
@@ -863,7 +859,6 @@ testIsNotGenericDynamic() => null is! GenericClass<dynamic, dynamic>;
863859
_isObject(1),
864860
_isString(1),
865861
_isTop(1),
866-
checkSubtype(4),
867862
findType(1),
868863
getRuntimeTypeArgument(3),
869864
getRuntimeTypeArgumentIntercepted(4),
@@ -917,7 +912,6 @@ testIsNotGenericDynamic() => null is! GenericClass<dynamic, dynamic>;
917912
_isObject(1),
918913
_isString(1),
919914
_isTop(1),
920-
checkSubtype(4),
921915
findType(1),
922916
getRuntimeTypeArgument(3),
923917
getRuntimeTypeArgumentIntercepted(4),
@@ -970,7 +964,6 @@ testIsTypedef() => null is Typedef;
970964
_isObject(1),
971965
_isString(1),
972966
_isTop(1),
973-
checkSubtype(4),
974967
findType(1),
975968
getRuntimeTypeArgument(3),
976969
getRuntimeTypeArgumentIntercepted(4),
@@ -1024,7 +1017,6 @@ testIsTypedef() => null is Typedef;
10241017
_isObject(1),
10251018
_isString(1),
10261019
_isTop(1),
1027-
checkSubtype(4),
10281020
findType(1),
10291021
getRuntimeTypeArgument(3),
10301022
getRuntimeTypeArgumentIntercepted(4),
@@ -1077,7 +1069,6 @@ testIsTypedefGeneric() => null is GenericTypedef<int, String>;
10771069
_isObject(1),
10781070
_isString(1),
10791071
_isTop(1),
1080-
checkSubtype(4),
10811072
findType(1),
10821073
getRuntimeTypeArgument(3),
10831074
getRuntimeTypeArgumentIntercepted(4),
@@ -1131,7 +1122,6 @@ testIsTypedefGeneric() => null is GenericTypedef<int, String>;
11311122
_isObject(1),
11321123
_isString(1),
11331124
_isTop(1),
1134-
checkSubtype(4),
11351125
findType(1),
11361126
getRuntimeTypeArgument(3),
11371127
getRuntimeTypeArgumentIntercepted(4),
@@ -1184,7 +1174,6 @@ testIsTypedefGenericRaw() => null is GenericTypedef;
11841174
_isObject(1),
11851175
_isString(1),
11861176
_isTop(1),
1187-
checkSubtype(4),
11881177
findType(1),
11891178
getRuntimeTypeArgument(3),
11901179
getRuntimeTypeArgumentIntercepted(4),
@@ -1238,7 +1227,6 @@ testIsTypedefGenericRaw() => null is GenericTypedef;
12381227
_isObject(1),
12391228
_isString(1),
12401229
_isTop(1),
1241-
checkSubtype(4),
12421230
findType(1),
12431231
getRuntimeTypeArgument(3),
12441232
getRuntimeTypeArgumentIntercepted(4),
@@ -1291,7 +1279,6 @@ testIsTypedefGenericDynamic() => null is GenericTypedef<dynamic, dynamic>;
12911279
_isObject(1),
12921280
_isString(1),
12931281
_isTop(1),
1294-
checkSubtype(4),
12951282
findType(1),
12961283
getRuntimeTypeArgument(3),
12971284
getRuntimeTypeArgumentIntercepted(4),
@@ -1345,7 +1332,6 @@ testIsTypedefGenericDynamic() => null is GenericTypedef<dynamic, dynamic>;
13451332
_isObject(1),
13461333
_isString(1),
13471334
_isTop(1),
1348-
checkSubtype(4),
13491335
findType(1),
13501336
getRuntimeTypeArgument(3),
13511337
getRuntimeTypeArgumentIntercepted(4),
@@ -1484,7 +1470,6 @@ testAs(dynamic o) => o as Class;
14841470
_isObject(1),
14851471
_isString(1),
14861472
_isTop(1),
1487-
checkSubtype(4),
14881473
findType(1),
14891474
getRuntimeTypeArgument(3),
14901475
getRuntimeTypeArgumentIntercepted(4),
@@ -1538,7 +1523,6 @@ testAs(dynamic o) => o as Class;
15381523
_isObject(1),
15391524
_isString(1),
15401525
_isTop(1),
1541-
checkSubtype(4),
15421526
findType(1),
15431527
getRuntimeTypeArgument(3),
15441528
getRuntimeTypeArgumentIntercepted(4),

pkg/compiler/test/impact/data/extract_type_arguments.dart

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ class C implements A<int>, B<String, bool> {}
4747
_isObject(1),
4848
_isString(1),
4949
_isTop(1),
50-
checkSubtype(4),
5150
extractTypeArguments<A<dynamic>>(2),
5251
findType(1),
5352
getRuntimeTypeArgument(3),
@@ -104,7 +103,6 @@ class C implements A<int>, B<String, bool> {}
104103
_isObject(1),
105104
_isString(1),
106105
_isTop(1),
107-
checkSubtype(4),
108106
extractTypeArguments<A<dynamic>*>(2),
109107
findType(1),
110108
getRuntimeTypeArgument(3),
@@ -160,7 +158,6 @@ testA(c, f) => extractTypeArguments<A>(c, f);
160158
_isObject(1),
161159
_isString(1),
162160
_isTop(1),
163-
checkSubtype(4),
164161
extractTypeArguments<B<dynamic,dynamic>>(2),
165162
findType(1),
166163
getRuntimeTypeArgument(3),
@@ -217,7 +214,6 @@ testA(c, f) => extractTypeArguments<A>(c, f);
217214
_isObject(1),
218215
_isString(1),
219216
_isTop(1),
220-
checkSubtype(4),
221217
extractTypeArguments<B<dynamic,dynamic>*>(2),
222218
findType(1),
223219
getRuntimeTypeArgument(3),

pkg/compiler/test/impact/data/initializers.dart

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -477,8 +477,6 @@ class ClassGeneric<T> {
477477
_isObject(1),
478478
_isString(1),
479479
_isTop(1),
480-
checkSubtype(4),
481-
checkSubtypeOfRuntimeType(2),
482480
findType(1),
483481
getRuntimeTypeArgument(3),
484482
getRuntimeTypeArgumentIntercepted(4),
@@ -532,8 +530,6 @@ class ClassGeneric<T> {
532530
_isObject(1),
533531
_isString(1),
534532
_isTop(1),
535-
checkSubtype(4),
536-
checkSubtypeOfRuntimeType(2),
537533
findType(1),
538534
getRuntimeTypeArgument(3),
539535
getRuntimeTypeArgumentIntercepted(4),

0 commit comments

Comments
 (0)