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

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

Issue 11267018: Make getKeys, getValues getters (keys, values). (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Update status files with co19 issue number. Created 8 years, 1 month 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
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 1485 matching lines...) Expand 10 before | Expand all | Expand 10 after
1496 1496
1497 Element lookupFactoryConstructor(Selector selector, 1497 Element lookupFactoryConstructor(Selector selector,
1498 [Element noMatch(Element)]) { 1498 [Element noMatch(Element)]) {
1499 SourceString constructorName = selector.name; 1499 SourceString constructorName = selector.name;
1500 Element result = localLookup(constructorName); 1500 Element result = localLookup(constructorName);
1501 return validateConstructorLookupResults(selector, result, noMatch); 1501 return validateConstructorLookupResults(selector, result, noMatch);
1502 } 1502 }
1503 1503
1504 bool get hasConstructor { 1504 bool get hasConstructor {
1505 // Search in scope to be sure we search patched constructors. 1505 // Search in scope to be sure we search patched constructors.
1506 for (var element in localScope.getValues()) { 1506 for (var element in localScope.values) {
1507 if (element.isConstructor()) return true; 1507 if (element.isConstructor()) return true;
1508 } 1508 }
1509 return false; 1509 return false;
1510 } 1510 }
1511 1511
1512 Link<Element> get constructors { 1512 Link<Element> get constructors {
1513 // TODO(ajohnsen): See if we can avoid this method at some point. 1513 // TODO(ajohnsen): See if we can avoid this method at some point.
1514 Link<Element> result = const Link<Element>(); 1514 Link<Element> result = const Link<Element>();
1515 // TODO(johnniwinther): Should we include injected constructors? 1515 // TODO(johnniwinther): Should we include injected constructors?
1516 forEachMember((_, Element member) { 1516 forEachMember((_, Element member) {
(...skipping 416 matching lines...) Expand 10 before | Expand all | Expand 10 after
1933 1933
1934 MetadataAnnotation ensureResolved(Compiler compiler) { 1934 MetadataAnnotation ensureResolved(Compiler compiler) {
1935 if (resolutionState == STATE_NOT_STARTED) { 1935 if (resolutionState == STATE_NOT_STARTED) {
1936 compiler.resolver.resolveMetadataAnnotation(this); 1936 compiler.resolver.resolveMetadataAnnotation(this);
1937 } 1937 }
1938 return this; 1938 return this;
1939 } 1939 }
1940 1940
1941 String toString() => 'MetadataAnnotation($value, $resolutionState)'; 1941 String toString() => 'MetadataAnnotation($value, $resolutionState)';
1942 } 1942 }
OLDNEW
« no previous file with comments | « lib/compiler/implementation/dart_backend/renamer.dart ('k') | lib/compiler/implementation/js_backend/backend.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698