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

Unified Diff: lib/compiler/implementation/resolution/members.dart

Issue 11230011: Make hasNext a getter instead of a method. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Remove unused variable. Created 8 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: lib/compiler/implementation/resolution/members.dart
diff --git a/lib/compiler/implementation/resolution/members.dart b/lib/compiler/implementation/resolution/members.dart
index d62146da0dd7cba79e9ca326d0d93ba794854a31..0a446c3ee85a85c9c1b7a5dca871e21c0d2a0724 100644
--- a/lib/compiler/implementation/resolution/members.dart
+++ b/lib/compiler/implementation/resolution/members.dart
@@ -2078,13 +2078,18 @@ class ResolverVisitor extends CommonResolverVisitor<Element> {
world.registerDynamicInvocation(name, selector);
}
+ registerImplicitFieldGet(SourceString name) {
+ Selector selector = new Selector.getter(name, null);
+ world.registerDynamicGetter(name, selector);
+ }
+
visitForIn(ForIn node) {
for (final name in const [
const SourceString('iterator'),
- const SourceString('next'),
- const SourceString('hasNext')]) {
+ const SourceString('next')]) {
registerImplicitInvocation(name, 0);
}
+ registerImplicitFieldGet(const SourceString('hasNext'));
visit(node.expression);
Scope blockScope = new BlockScope(scope);
Node declaration = node.declaredIdentifier;
« no previous file with comments | « lib/compiler/implementation/lib/string_helper.dart ('k') | lib/compiler/implementation/scanner/byte_strings.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698