| OLD | NEW |
| 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, 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 summary_resynthesizer; | 5 library summary_resynthesizer; |
| 6 | 6 |
| 7 import 'dart:collection'; | 7 import 'dart:collection'; |
| 8 | 8 |
| 9 import 'package:analyzer/dart/ast/ast.dart'; | 9 import 'package:analyzer/dart/ast/ast.dart'; |
| 10 import 'package:analyzer/dart/ast/token.dart'; | 10 import 'package:analyzer/dart/ast/token.dart'; |
| (...skipping 931 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 942 }).toList(); | 942 }).toList(); |
| 943 } | 943 } |
| 944 } | 944 } |
| 945 | 945 |
| 946 /** | 946 /** |
| 947 * Resynthesize a [ClassElement] and place it in [unitHolder]. | 947 * Resynthesize a [ClassElement] and place it in [unitHolder]. |
| 948 */ | 948 */ |
| 949 void buildClass(UnlinkedClass serializedClass) { | 949 void buildClass(UnlinkedClass serializedClass) { |
| 950 ClassElementImpl classElement = | 950 ClassElementImpl classElement = |
| 951 new ClassElementImpl(serializedClass.name, serializedClass.nameOffset); | 951 new ClassElementImpl(serializedClass.name, serializedClass.nameOffset); |
| 952 classElement.hasBeenInferred = summaryResynthesizer.strongMode; |
| 952 classElement.typeParameters = | 953 classElement.typeParameters = |
| 953 buildTypeParameters(serializedClass.typeParameters); | 954 buildTypeParameters(serializedClass.typeParameters); |
| 954 classElement.abstract = serializedClass.isAbstract; | 955 classElement.abstract = serializedClass.isAbstract; |
| 955 classElement.mixinApplication = serializedClass.isMixinApplication; | 956 classElement.mixinApplication = serializedClass.isMixinApplication; |
| 956 InterfaceTypeImpl correspondingType = new InterfaceTypeImpl(classElement); | 957 InterfaceTypeImpl correspondingType = new InterfaceTypeImpl(classElement); |
| 957 if (serializedClass.supertype != null) { | 958 if (serializedClass.supertype != null) { |
| 958 classElement.supertype = buildType(serializedClass.supertype); | 959 classElement.supertype = buildType(serializedClass.supertype); |
| 959 } else if (!serializedClass.hasNoSupertype) { | 960 } else if (!serializedClass.hasNoSupertype) { |
| 960 if (isCoreLibrary) { | 961 if (isCoreLibrary) { |
| 961 delayedObjectSubclasses.add(classElement); | 962 delayedObjectSubclasses.add(classElement); |
| (...skipping 1484 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2446 List<DartType> typeArguments = const <DartType>[]; | 2447 List<DartType> typeArguments = const <DartType>[]; |
| 2447 if (numTypeArguments != 0) { | 2448 if (numTypeArguments != 0) { |
| 2448 typeArguments = <DartType>[]; | 2449 typeArguments = <DartType>[]; |
| 2449 for (int i = 0; i < numTypeArguments; i++) { | 2450 for (int i = 0; i < numTypeArguments; i++) { |
| 2450 typeArguments.add(getTypeArgument(i)); | 2451 typeArguments.add(getTypeArgument(i)); |
| 2451 } | 2452 } |
| 2452 } | 2453 } |
| 2453 return typeArguments; | 2454 return typeArguments; |
| 2454 } | 2455 } |
| 2455 } | 2456 } |
| OLD | NEW |