Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(98)

Side by Side Diff: pkg/analyzer/lib/src/summary/resynthesize.dart

Issue 1737903005: Properly resynthesize ClassElementImpl.hasBeenInferred. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | pkg/analyzer/test/src/summary/resynthesize_strong_test.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « no previous file | pkg/analyzer/test/src/summary/resynthesize_strong_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698