This repository was archived by the owner on Feb 25, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 6 files changed +25
-7
lines changed Expand file tree Collapse file tree 6 files changed +25
-7
lines changed Original file line number Diff line number Diff line change @@ -81,7 +81,7 @@ import 'package:meta/meta.dart';
8181/// TODO(scheglov) Clean up the list of implicitly analyzed files.
8282class AnalysisDriver implements AnalysisDriverGeneric {
8383 /// The version of data format, should be incremented on every format change.
84- static const int DATA_VERSION = 141 ;
84+ static const int DATA_VERSION = 143 ;
8585
8686 /// The length of the list returned by [_computeDeclaredVariablesSignature] .
8787 static const int _declaredVariablesSignatureLength = 4 ;
Original file line number Diff line number Diff line change @@ -575,7 +575,7 @@ class AstBinaryReader {
575575 typeArguments,
576576 arguments,
577577 );
578- _readExpressionResolution (node);
578+ _readInvocationExpression (node);
579579 return node;
580580 }
581581
@@ -748,8 +748,8 @@ class AstBinaryReader {
748748 }
749749
750750 void _readInvocationExpression (InvocationExpressionImpl node) {
751- // TODO(scheglov) typeArgumentTypes and staticInvokeType?
752- node.typeArgumentTypes = [] ;
751+ node.staticInvokeType = _reader. readType ();
752+ node.typeArgumentTypes = _reader. readOptionalTypeList () ;
753753 _readExpressionResolution (node);
754754 }
755755
Original file line number Diff line number Diff line change @@ -790,8 +790,9 @@ class AstBinaryWriter extends ThrowingAstVisitor<void> {
790790 void _storeInvocationExpression (InvocationExpression node) {
791791 _writeOptionalNode (node.typeArguments);
792792 _writeNode (node.argumentList);
793+ _sink.writeType (node.staticInvokeType);
794+ _sink.writeOptionalTypeList (node.typeArgumentTypes);
793795 _storeExpression (node);
794- // TODO(scheglov) typeArgumentTypes and staticInvokeType?
795796 }
796797
797798 void _storeNormalFormalParameter (
Original file line number Diff line number Diff line change @@ -1343,6 +1343,12 @@ class ResolutionReader {
13431343 throw UnimplementedError ('memberFlags: $memberFlags ' );
13441344 }
13451345
1346+ List <DartType >? readOptionalTypeList () {
1347+ if (_reader.readBool ()) {
1348+ return _readTypeList ();
1349+ }
1350+ }
1351+
13461352 DartType readRequiredType () {
13471353 return readType ()! ;
13481354 }
Original file line number Diff line number Diff line change @@ -547,6 +547,15 @@ class ResolutionSink extends _SummaryDataWriter {
547547 }
548548 }
549549
550+ void writeOptionalTypeList (List <DartType >? types) {
551+ if (types != null ) {
552+ writeBool (true );
553+ _writeTypeList (types);
554+ } else {
555+ writeBool (false );
556+ }
557+ }
558+
550559 void writeType (DartType ? type) {
551560 if (type == null ) {
552561 writeByte (Tag .NullType );
Original file line number Diff line number Diff line change @@ -3012,7 +3012,7 @@ const int a;
30123012 staticType: int Function()
30133013 token: abs
30143014 operator: ..
3015- staticInvokeType: null
3015+ staticInvokeType: int Function()
30163016 staticType: int
30173017 staticType: int
30183018 target: IntegerLiteral
@@ -3908,8 +3908,10 @@ const int b;
39083908 staticElement: self::@function::f
39093909 staticType: T Function<T>(T)
39103910 token: f
3911- staticInvokeType: null
3911+ staticInvokeType: int Function(int)
39123912 staticType: int
3913+ typeArgumentTypes
3914+ int
39133915 typeArguments: TypeArgumentList
39143916 arguments
39153917 TypeName
You can’t perform that action at this time.
0 commit comments