| OLD | NEW |
| 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, 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 /** | 5 /** |
| 6 * This library is capable of producing linked summaries from unlinked | 6 * This library is capable of producing linked summaries from unlinked |
| 7 * ones (or prelinked ones). It functions by building a miniature | 7 * ones (or prelinked ones). It functions by building a miniature |
| 8 * element model to represent the contents of the summaries, and then | 8 * element model to represent the contents of the summaries, and then |
| 9 * scanning the element model to gather linked information and adding | 9 * scanning the element model to gather linked information and adding |
| 10 * it to the summary data structures. | 10 * it to the summary data structures. |
| (...skipping 2354 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2365 } else { | 2365 } else { |
| 2366 FunctionType rawType = StaticTypeAnalyzer | 2366 FunctionType rawType = StaticTypeAnalyzer |
| 2367 .constructorToGenericFunctionType(constructorElement); | 2367 .constructorToGenericFunctionType(constructorElement); |
| 2368 FunctionType inferredType = _inferExecutableType( | 2368 FunctionType inferredType = _inferExecutableType( |
| 2369 rawType, | 2369 rawType, |
| 2370 numNamed, | 2370 numNamed, |
| 2371 numPositional, | 2371 numPositional, |
| 2372 namedArgNames, | 2372 namedArgNames, |
| 2373 namedArgTypeList, | 2373 namedArgTypeList, |
| 2374 positionalArgTypes, const <DartType>[]); | 2374 positionalArgTypes, const <DartType>[]); |
| 2375 if (identical(inferredType, rawType)) { | 2375 if (inferredType == null || identical(inferredType, rawType)) { |
| 2376 inferredType = linker.typeSystem.instantiateToBounds(rawType); | 2376 inferredType = linker.typeSystem.instantiateToBounds(rawType); |
| 2377 } | 2377 } |
| 2378 return inferredType.returnType; | 2378 return inferredType.returnType; |
| 2379 } | 2379 } |
| 2380 }()); | 2380 }()); |
| 2381 } else { | 2381 } else { |
| 2382 ClassElementForLink classElement = | 2382 ClassElementForLink classElement = |
| 2383 unit.resolveConstructorClassRef(ref.reference).asClass; | 2383 unit.resolveConstructorClassRef(ref.reference).asClass; |
| 2384 stack.add(classElement?.type ?? DynamicTypeImpl.instance); | 2384 stack.add(classElement?.type ?? DynamicTypeImpl.instance); |
| 2385 } | 2385 } |
| (...skipping 2745 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5131 * there are no type parameters in scope. | 5131 * there are no type parameters in scope. |
| 5132 */ | 5132 */ |
| 5133 TypeParameterizedElementMixin get _typeParameterContext; | 5133 TypeParameterizedElementMixin get _typeParameterContext; |
| 5134 | 5134 |
| 5135 @override | 5135 @override |
| 5136 noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation); | 5136 noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation); |
| 5137 | 5137 |
| 5138 @override | 5138 @override |
| 5139 String toString() => '$enclosingElement.$name'; | 5139 String toString() => '$enclosingElement.$name'; |
| 5140 } | 5140 } |
| OLD | NEW |