| OLD | NEW |
| 1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 /// Logic to build unlinked summaries. | 5 /// Logic to build unlinked summaries. |
| 6 library summary.src.summary_builder; | 6 library summary.src.summary_builder; |
| 7 | 7 |
| 8 import 'package:front_end/src/fasta/parser.dart' | 8 import 'package:front_end/src/fasta/parser.dart' |
| 9 show | 9 show |
| 10 ClassMemberParser, | 10 ClassMemberParser, |
| (...skipping 1055 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1066 topScope.unit.typedefs.add(new UnlinkedTypedefBuilder( | 1066 topScope.unit.typedefs.add(new UnlinkedTypedefBuilder( |
| 1067 name: name, | 1067 name: name, |
| 1068 typeParameters: typeVariables, | 1068 typeParameters: typeVariables, |
| 1069 returnType: returnType, | 1069 returnType: returnType, |
| 1070 parameters: formals, | 1070 parameters: formals, |
| 1071 annotations: metadata)); | 1071 annotations: metadata)); |
| 1072 | 1072 |
| 1073 _addNameIfPublic(name, ReferenceKind.typedef, typeVariables.length); | 1073 _addNameIfPublic(name, ReferenceKind.typedef, typeVariables.length); |
| 1074 } | 1074 } |
| 1075 | 1075 |
| 1076 void endFunctionTypedFormalParameter( | 1076 void endFunctionTypedFormalParameter() { |
| 1077 Token thisKeyword, FormalParameterType kind) { | |
| 1078 debugEvent("FunctionTypedFormalParameter"); | 1077 debugEvent("FunctionTypedFormalParameter"); |
| 1079 List<UnlinkedParamBuilder> formals = pop(); | 1078 List<UnlinkedParamBuilder> formals = pop(); |
| 1080 if (formals != null) formals.forEach((p) => p.inheritsCovariantSlot = null); | 1079 if (formals != null) formals.forEach((p) => p.inheritsCovariantSlot = null); |
| 1081 | 1080 |
| 1082 /* List typeVariables = */ pop(); | |
| 1083 String name = pop(); | 1081 String name = pop(); |
| 1084 EntityRef returnType = pop(); | 1082 EntityRef returnType = pop(); |
| 1083 /* List typeVariables = */ pop(); |
| 1085 /* int modifiers = */ pop(); | 1084 /* int modifiers = */ pop(); |
| 1086 List metadata = pop(); | 1085 List metadata = pop(); |
| 1087 | 1086 |
| 1088 push(new UnlinkedParamBuilder( | 1087 push(new UnlinkedParamBuilder( |
| 1089 name: name, | 1088 name: name, |
| 1090 kind: _nextParamKind, | 1089 kind: _nextParamKind, |
| 1091 isFunctionTyped: true, | 1090 isFunctionTyped: true, |
| 1092 parameters: formals, | 1091 parameters: formals, |
| 1093 annotations: metadata, | 1092 annotations: metadata, |
| 1094 type: returnType)); | 1093 type: returnType)); |
| (...skipping 465 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1560 } | 1559 } |
| 1561 | 1560 |
| 1562 /// Internal representation of an initialized name. | 1561 /// Internal representation of an initialized name. |
| 1563 class _InitializedName { | 1562 class _InitializedName { |
| 1564 final String name; | 1563 final String name; |
| 1565 final UnlinkedExecutableBuilder initializer; | 1564 final UnlinkedExecutableBuilder initializer; |
| 1566 _InitializedName(this.name, this.initializer); | 1565 _InitializedName(this.name, this.initializer); |
| 1567 | 1566 |
| 1568 toString() => "II:" + (initializer != null ? "$name = $initializer" : name); | 1567 toString() => "II:" + (initializer != null ? "$name = $initializer" : name); |
| 1569 } | 1568 } |
| OLD | NEW |