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

Side by Side Diff: compiler/java/com/google/dart/compiler/resolver/Elements.java

Issue 10961038: Issue 5255. Remember 'overridden' for getters/setters and fields (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | compiler/java/com/google/dart/compiler/resolver/FieldElement.java » ('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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 package com.google.dart.compiler.resolver; 5 package com.google.dart.compiler.resolver;
6 6
7 import com.google.common.annotations.VisibleForTesting; 7 import com.google.common.annotations.VisibleForTesting;
8 import com.google.common.base.Objects; 8 import com.google.common.base.Objects;
9 import com.google.common.collect.Lists; 9 import com.google.common.collect.Lists;
10 import com.google.dart.compiler.DartSource; 10 import com.google.dart.compiler.DartSource;
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 ClassElement declaringClas s, 191 ClassElement declaringClas s,
192 ClassElement constructorTy pe) { 192 ClassElement constructorTy pe) {
193 return ConstructorElementImplementation.fromMethodNode(node, name, declaring Class, 193 return ConstructorElementImplementation.fromMethodNode(node, name, declaring Class,
194 constructorType); 194 constructorType);
195 } 195 }
196 196
197 public static void setType(Element element, Type type) { 197 public static void setType(Element element, Type type) {
198 ((AbstractNodeElement) element).setType(type); 198 ((AbstractNodeElement) element).setType(type);
199 } 199 }
200 200
201 public static void setOverridden(MethodElement methodElement, Set<Element> ove rridden) { 201 public static void setOverridden(Element element, Set<Element> overridden) {
202 ((MethodElementImplementation) methodElement).setOverridden(overridden); 202 if (element instanceof MethodElementImplementation) {
203 ((MethodElementImplementation) element).setOverridden(overridden);
204 }
205 if (element instanceof FieldElementImplementation) {
206 ((FieldElementImplementation) element).setOverridden(overridden);
207 }
203 } 208 }
204 209
205 static FieldElementImplementation fieldFromNode(DartField node, 210 static FieldElementImplementation fieldFromNode(DartField node,
206 EnclosingElement holder, 211 EnclosingElement holder,
207 DartObsoleteMetadata metadata, 212 DartObsoleteMetadata metadata,
208 Modifiers modifiers) { 213 Modifiers modifiers) {
209 return FieldElementImplementation.fromNode(node, holder, metadata, modifiers ); 214 return FieldElementImplementation.fromNode(node, holder, metadata, modifiers );
210 } 215 }
211 216
212 static ClassElement classFromNode(DartClass node, LibraryElement library) { 217 static ClassElement classFromNode(DartClass node, LibraryElement library) {
(...skipping 581 matching lines...) Expand 10 before | Expand all | Expand 10 after
794 */ 799 */
795 public static boolean handlesNoSuchMethod(InterfaceType type) { 800 public static boolean handlesNoSuchMethod(InterfaceType type) {
796 Member member = type.lookupMember("noSuchMethod"); 801 Member member = type.lookupMember("noSuchMethod");
797 if (member == null) { 802 if (member == null) {
798 return false; 803 return false;
799 } 804 }
800 Source source = member.getElement().getSourceInfo().getSource(); 805 Source source = member.getElement().getSourceInfo().getSource();
801 return !isCoreLibrarySource(source); 806 return !isCoreLibrarySource(source);
802 } 807 }
803 } 808 }
OLDNEW
« no previous file with comments | « no previous file | compiler/java/com/google/dart/compiler/resolver/FieldElement.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698