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

Side by Side Diff: pkg/compiler/lib/src/resolution/resolution_common.dart

Issue 1172693003: Move computeType to TypedElement and TypeDeclarationElement. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years, 6 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
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 part of resolution; 5 part of resolution;
6 6
7 class ResolverTask extends CompilerTask { 7 class ResolverTask extends CompilerTask {
8 final ConstantCompiler constantCompiler; 8 final ConstantCompiler constantCompiler;
9 9
10 ResolverTask(Compiler compiler, this.constantCompiler) : super(compiler); 10 ResolverTask(Compiler compiler, this.constantCompiler) : super(compiler);
(...skipping 716 matching lines...) Expand 10 before | Expand all | Expand 10 after
727 if (lookupElement == null) { 727 if (lookupElement == null) {
728 compiler.internalError(member, 728 compiler.internalError(member,
729 "No abstract field for accessor"); 729 "No abstract field for accessor");
730 } else if (!identical(lookupElement.kind, ElementKind.ABSTRACT_FIELD)) { 730 } else if (!identical(lookupElement.kind, ElementKind.ABSTRACT_FIELD)) {
731 if (lookupElement.isErroneous || lookupElement.isAmbiguous) return; 731 if (lookupElement.isErroneous || lookupElement.isAmbiguous) return;
732 compiler.internalError(member, 732 compiler.internalError(member,
733 "Inaccessible abstract field for accessor"); 733 "Inaccessible abstract field for accessor");
734 } 734 }
735 AbstractFieldElement field = lookupElement; 735 AbstractFieldElement field = lookupElement;
736 736
737 MethodElementX getter = field.getter; 737 GetterElementX getter = field.getter;
738 if (getter == null) return; 738 if (getter == null) return;
739 MethodElementX setter = field.setter; 739 SetterElementX setter = field.setter;
740 if (setter == null) return; 740 if (setter == null) return;
741 int getterFlags = getter.modifiers.flags | Modifiers.FLAG_ABSTRACT; 741 int getterFlags = getter.modifiers.flags | Modifiers.FLAG_ABSTRACT;
742 int setterFlags = setter.modifiers.flags | Modifiers.FLAG_ABSTRACT; 742 int setterFlags = setter.modifiers.flags | Modifiers.FLAG_ABSTRACT;
743 if (!identical(getterFlags, setterFlags)) { 743 if (!identical(getterFlags, setterFlags)) {
744 final mismatchedFlags = 744 final mismatchedFlags =
745 new Modifiers.withFlags(null, getterFlags ^ setterFlags); 745 new Modifiers.withFlags(null, getterFlags ^ setterFlags);
746 compiler.reportError( 746 compiler.reportError(
747 field.getter, 747 field.getter,
748 MessageKind.GETTER_MISMATCH, 748 MessageKind.GETTER_MISMATCH,
749 {'modifiers': mismatchedFlags}); 749 {'modifiers': mismatchedFlags});
(...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after
1042 1042
1043 void reportDuplicateDefinition(String name, 1043 void reportDuplicateDefinition(String name,
1044 Spannable definition, 1044 Spannable definition,
1045 Spannable existing) { 1045 Spannable existing) {
1046 compiler.reportError(definition, 1046 compiler.reportError(definition,
1047 MessageKind.DUPLICATE_DEFINITION, {'name': name}); 1047 MessageKind.DUPLICATE_DEFINITION, {'name': name});
1048 compiler.reportInfo(existing, 1048 compiler.reportInfo(existing,
1049 MessageKind.EXISTING_DEFINITION, {'name': name}); 1049 MessageKind.EXISTING_DEFINITION, {'name': name});
1050 } 1050 }
1051 } 1051 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/resolution/resolution.dart ('k') | pkg/compiler/lib/src/resolution/type_resolver.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698