| OLD | NEW | 
|      1 // Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file |      1 // Copyright (c) 2014, 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 library engine.element; |      5 library engine.element; | 
|      6  |      6  | 
|      7 import 'dart:collection'; |      7 import 'dart:collection'; | 
|      8 import 'dart:math' show min; |      8 import 'dart:math' show min; | 
|      9  |      9  | 
|     10 import 'package:analyzer/src/generated/utilities_general.dart'; |     10 import 'package:analyzer/src/generated/utilities_general.dart'; | 
| (...skipping 7036 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|   7047       result.typeArguments = |   7047       result.typeArguments = | 
|   7048           typeArguments.map((TypeImpl t) => t.pruned(prune)).toList(); |   7048           typeArguments.map((TypeImpl t) => t.pruned(prune)).toList(); | 
|   7049       return result; |   7049       return result; | 
|   7050     } |   7050     } | 
|   7051   } |   7051   } | 
|   7052  |   7052  | 
|   7053   @override |   7053   @override | 
|   7054   InterfaceTypeImpl substitute2( |   7054   InterfaceTypeImpl substitute2( | 
|   7055       List<DartType> argumentTypes, List<DartType> parameterTypes, |   7055       List<DartType> argumentTypes, List<DartType> parameterTypes, | 
|   7056       [List<FunctionTypeAliasElement> prune]) { |   7056       [List<FunctionTypeAliasElement> prune]) { | 
|   7057     // Pruned types should only ever result from performing type variable |  | 
|   7058     // substitution, and it doesn't make sense to substitute again after |  | 
|   7059     // substituting once. |  | 
|   7060     assert(this.prunedTypedefs == null); |  | 
|   7061     if (argumentTypes.length != parameterTypes.length) { |   7057     if (argumentTypes.length != parameterTypes.length) { | 
|   7062       throw new IllegalArgumentException( |   7058       throw new IllegalArgumentException( | 
|   7063           "argumentTypes.length (${argumentTypes.length}) != parameterTypes.leng
       th (${parameterTypes.length})"); |   7059           "argumentTypes.length (${argumentTypes.length}) != parameterTypes.leng
       th (${parameterTypes.length})"); | 
|   7064     } |   7060     } | 
|   7065     if (argumentTypes.length == 0 || typeArguments.length == 0) { |   7061     if (argumentTypes.length == 0 || typeArguments.length == 0) { | 
|   7066       return this.pruned(prune); |   7062       return this.pruned(prune); | 
|   7067     } |   7063     } | 
|   7068     List<DartType> newTypeArguments = TypeImpl.substitute( |   7064     List<DartType> newTypeArguments = TypeImpl.substitute( | 
|   7069         typeArguments, argumentTypes, parameterTypes, prune); |   7065         typeArguments, argumentTypes, parameterTypes, prune); | 
|   7070     if (JavaArrays.equals(newTypeArguments, typeArguments)) { |   7066     if (JavaArrays.equals(newTypeArguments, typeArguments)) { | 
| (...skipping 4081 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  11152  |  11148  | 
|  11153   @override |  11149   @override | 
|  11154   void visitElement(Element element) { |  11150   void visitElement(Element element) { | 
|  11155     int offset = element.nameOffset; |  11151     int offset = element.nameOffset; | 
|  11156     if (offset != -1) { |  11152     if (offset != -1) { | 
|  11157       map[offset] = element; |  11153       map[offset] = element; | 
|  11158     } |  11154     } | 
|  11159     super.visitElement(element); |  11155     super.visitElement(element); | 
|  11160   } |  11156   } | 
|  11161 } |  11157 } | 
| OLD | NEW |