@@ -736,13 +736,8 @@ abstract class FlowAnalysis<Node extends Object, Statement extends Node,
736
736
/// expression to the left hand side of the `.` , and [propertyName] should be
737
737
/// the identifier to the right hand side of the `.` . [staticType] should be
738
738
/// the static type of the value returned by the property get.
739
- ///
740
- /// [propertyMember] should be whatever data structure the client uses to keep
741
- /// track of the field or property being accessed. In the event of
742
- /// non-promotion of a property get, this value can be retrieved from
743
- /// [PropertyNotPromoted.propertyMember] .
744
739
void propertyGet (Expression wholeExpression, Expression target,
745
- String propertyName, Object ? propertyMember, Type staticType);
740
+ String propertyName, Type staticType);
746
741
747
742
/// Retrieves the SSA node associated with [variable] , or `null` if [variable]
748
743
/// is not associated with an SSA node because it is write captured. For
@@ -793,13 +788,8 @@ abstract class FlowAnalysis<Node extends Object, Statement extends Node,
793
788
/// the whole property get, and [propertyName] should be the name of the
794
789
/// property being read. [staticType] should be the static type of the value
795
790
/// returned by the property get.
796
- ///
797
- /// [propertyMember] should be whatever data structure the client uses to keep
798
- /// track of the field or property being accessed. In the event of
799
- /// non-promotion of a property get, this value can be retrieved from
800
- /// [PropertyNotPromoted.propertyMember] .
801
- void thisOrSuperPropertyGet (Expression expression, String propertyName,
802
- Object ? propertyMember, Type staticType);
791
+ void thisOrSuperPropertyGet (
792
+ Expression expression, String propertyName, Type staticType);
803
793
804
794
/// Call this method just before visiting the body of a "try/catch" statement.
805
795
///
@@ -1349,12 +1339,11 @@ class FlowAnalysisDebug<Node extends Object, Statement extends Node,
1349
1339
1350
1340
@override
1351
1341
void propertyGet (Expression wholeExpression, Expression target,
1352
- String propertyName, Object ? propertyMember, Type staticType) {
1342
+ String propertyName, Type staticType) {
1353
1343
_wrap (
1354
- 'propertyGet($wholeExpression , $target , $propertyName , '
1355
- '$propertyMember , $staticType )' ,
1344
+ 'propertyGet($wholeExpression , $target , $propertyName , $staticType )' ,
1356
1345
() => _wrapped.propertyGet (
1357
- wholeExpression, target, propertyName, propertyMember, staticType));
1346
+ wholeExpression, target, propertyName, staticType));
1358
1347
}
1359
1348
1360
1349
@override
@@ -1389,13 +1378,12 @@ class FlowAnalysisDebug<Node extends Object, Statement extends Node,
1389
1378
}
1390
1379
1391
1380
@override
1392
- void thisOrSuperPropertyGet (Expression expression, String propertyName,
1393
- Object ? propertyMember , Type staticType) {
1381
+ void thisOrSuperPropertyGet (
1382
+ Expression expression, String propertyName , Type staticType) {
1394
1383
_wrap (
1395
- 'thisOrSuperPropertyGet($expression , $propertyName , $propertyMember , '
1396
- '$staticType )' ,
1384
+ 'thisOrSuperPropertyGet($expression , $propertyName , $staticType )' ,
1397
1385
() => _wrapped.thisOrSuperPropertyGet (
1398
- expression, propertyName, propertyMember, staticType));
1386
+ expression, propertyName, staticType));
1399
1387
}
1400
1388
1401
1389
@override
@@ -2346,17 +2334,12 @@ class PropertyNotPromoted<Type extends Object> extends NonPromotionReason {
2346
2334
/// The name of the property.
2347
2335
final String propertyName;
2348
2336
2349
- /// The field or property being accessed. This matches a `propertyMember`
2350
- /// value that was passed to either [FlowAnalysis.propertyGet] or
2351
- /// [FlowAnalysis.thisOrSuperPropertyGet] .
2352
- final Object ? propertyMember;
2353
-
2354
2337
/// The static type of the property at the time of the access. This is the
2355
2338
/// type that was passed to [FlowAnalysis.whyNotPromoted] ; it is provided to
2356
2339
/// the client as a convenience for ID testing.
2357
2340
final Type staticType;
2358
2341
2359
- PropertyNotPromoted (this .propertyName, this .propertyMember, this . staticType);
2342
+ PropertyNotPromoted (this .propertyName, this .staticType);
2360
2343
2361
2344
@override
2362
2345
String get documentationLink => 'http://dart.dev/go/non-promo-property' ;
@@ -2534,10 +2517,8 @@ abstract class Reference<Variable extends Object, Type extends Object> {
2534
2517
2535
2518
/// Creates a reference representing a get of a property called [propertyName]
2536
2519
/// on the reference represented by `this` .
2537
- Reference <Variable , Type > propertyGet (
2538
- String propertyName, Object ? propertyMember) =>
2539
- new _PropertyGetReference <Variable , Type >(
2540
- this , propertyName, propertyMember);
2520
+ Reference <Variable , Type > propertyGet (String propertyName) =>
2521
+ new _PropertyGetReference <Variable , Type >(this , propertyName);
2541
2522
2542
2523
/// Stores info for this reference in [variableInfo] .
2543
2524
void storeInfo (Map <Variable ?, VariableModel <Variable , Type >> variableInfo,
@@ -3971,14 +3952,14 @@ class _FlowAnalysisImpl<Node extends Object, Statement extends Node,
3971
3952
3972
3953
@override
3973
3954
void propertyGet (Expression wholeExpression, Expression target,
3974
- String propertyName, Object ? propertyMember, Type staticType) {
3955
+ String propertyName, Type staticType) {
3975
3956
Reference <Variable , Type >? reference =
3976
3957
_getExpressionReference (target)? .reference;
3977
3958
if (reference != null ) {
3978
3959
_storeExpressionReference (
3979
3960
wholeExpression,
3980
3961
new ReferenceWithType <Variable , Type >(
3981
- reference.propertyGet (propertyName, propertyMember ), staticType));
3962
+ reference.propertyGet (propertyName), staticType));
3982
3963
}
3983
3964
}
3984
3965
@@ -4035,13 +4016,12 @@ class _FlowAnalysisImpl<Node extends Object, Statement extends Node,
4035
4016
}
4036
4017
4037
4018
@override
4038
- void thisOrSuperPropertyGet (Expression expression, String propertyName,
4039
- Object ? propertyMember , Type staticType) {
4019
+ void thisOrSuperPropertyGet (
4020
+ Expression expression, String propertyName , Type staticType) {
4040
4021
_storeExpressionReference (
4041
4022
expression,
4042
4023
new ReferenceWithType <Variable , Type >(
4043
- new _ThisReference <Variable , Type >()
4044
- .propertyGet (propertyName, propertyMember),
4024
+ new _ThisReference <Variable , Type >().propertyGet (propertyName),
4045
4025
staticType));
4046
4026
}
4047
4027
@@ -4706,7 +4686,7 @@ class _LegacyTypePromotion<Node extends Object, Statement extends Node,
4706
4686
4707
4687
@override
4708
4688
void propertyGet (Expression wholeExpression, Expression target,
4709
- String propertyName, Object ? propertyMember, Type staticType) {}
4689
+ String propertyName, Type staticType) {}
4710
4690
4711
4691
@override
4712
4692
SsaNode <Variable , Type >? ssaNodeForTesting (Variable variable) {
@@ -4726,8 +4706,8 @@ class _LegacyTypePromotion<Node extends Object, Statement extends Node,
4726
4706
void thisOrSuper (Expression expression, Type staticType) {}
4727
4707
4728
4708
@override
4729
- void thisOrSuperPropertyGet (Expression expression, String propertyName,
4730
- Object ? propertyMember , Type staticType) {}
4709
+ void thisOrSuperPropertyGet (
4710
+ Expression expression, String propertyName , Type staticType) {}
4731
4711
4732
4712
@override
4733
4713
void tryCatchStatement_bodyBegin () {}
@@ -4928,12 +4908,7 @@ class _PropertyGetReference<Variable extends Object, Type extends Object>
4928
4908
/// The name of the property.
4929
4909
final String propertyName;
4930
4910
4931
- /// The field or property being accessed. This matches a `propertyMember`
4932
- /// value that was passed to either [FlowAnalysis.propertyGet] or
4933
- /// [FlowAnalysis.thisOrSuperPropertyGet] .
4934
- final Object ? propertyMember;
4935
-
4936
- _PropertyGetReference (this .target, this .propertyName, this .propertyMember);
4911
+ _PropertyGetReference (this .target, this .propertyName);
4937
4912
4938
4913
@override
4939
4914
Map <Type , NonPromotionReason > Function () getNonPromotionReasons (
@@ -4945,8 +4920,7 @@ class _PropertyGetReference<Variable extends Object, Type extends Object>
4945
4920
return () {
4946
4921
Map <Type , NonPromotionReason > result = < Type , NonPromotionReason > {};
4947
4922
for (Type type in promotedTypes) {
4948
- result[type] =
4949
- new PropertyNotPromoted (propertyName, propertyMember, staticType);
4923
+ result[type] = new PropertyNotPromoted (propertyName, staticType);
4950
4924
}
4951
4925
return result;
4952
4926
};
0 commit comments