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

Side by Side Diff: sdk/lib/_internal/compiler/implementation/elements/elements.dart

Issue 11548027: Implement is-checks for closures. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Add ClassElement.lookupBackendMember. Created 8 years 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 | sdk/lib/_internal/compiler/implementation/js_backend/emitter.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) 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 library elements; 5 library elements;
6 6
7 import 'dart:uri'; 7 import 'dart:uri';
8 8
9 // TODO(ahe): Rename prefix to 'api' when VM bug is fixed. 9 // TODO(ahe): Rename prefix to 'api' when VM bug is fixed.
10 import '../../compiler.dart' as api_e; 10 import '../../compiler.dart' as api_e;
(...skipping 1471 matching lines...) Expand 10 before | Expand all | Expand 10 after
1482 1482
1483 /** 1483 /**
1484 * Lookup local members in the class. This will ignore constructors. 1484 * Lookup local members in the class. This will ignore constructors.
1485 */ 1485 */
1486 Element lookupLocalMember(SourceString memberName) { 1486 Element lookupLocalMember(SourceString memberName) {
1487 var result = localLookup(memberName); 1487 var result = localLookup(memberName);
1488 if (result != null && result.isConstructor()) return null; 1488 if (result != null && result.isConstructor()) return null;
1489 return result; 1489 return result;
1490 } 1490 }
1491 1491
1492 /// Lookup a synthetic element created by the backend.
1493 Element lookupBackendMember(SourceString memberName) {
1494 for (Element element in backendMembers) {
1495 if (element.name == memberName) {
1496 return element;
1497 }
1498 }
1499 }
1500
1492 /** 1501 /**
1493 * Lookup super members for the class. This will ignore constructors. 1502 * Lookup super members for the class. This will ignore constructors.
1494 */ 1503 */
1495 Element lookupSuperMember(SourceString memberName) { 1504 Element lookupSuperMember(SourceString memberName) {
1496 return lookupSuperMemberInLibrary(memberName, getLibrary()); 1505 return lookupSuperMemberInLibrary(memberName, getLibrary());
1497 } 1506 }
1498 1507
1499 /** 1508 /**
1500 * Lookup super members for the class that is accessible in [library]. 1509 * Lookup super members for the class that is accessible in [library].
1501 * This will ignore constructors. 1510 * This will ignore constructors.
(...skipping 630 matching lines...) Expand 10 before | Expand all | Expand 10 after
2132 2141
2133 MetadataAnnotation ensureResolved(Compiler compiler) { 2142 MetadataAnnotation ensureResolved(Compiler compiler) {
2134 if (resolutionState == STATE_NOT_STARTED) { 2143 if (resolutionState == STATE_NOT_STARTED) {
2135 compiler.resolver.resolveMetadataAnnotation(this); 2144 compiler.resolver.resolveMetadataAnnotation(this);
2136 } 2145 }
2137 return this; 2146 return this;
2138 } 2147 }
2139 2148
2140 String toString() => 'MetadataAnnotation($value, $resolutionState)'; 2149 String toString() => 'MetadataAnnotation($value, $resolutionState)';
2141 } 2150 }
OLDNEW
« no previous file with comments | « no previous file | sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698