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

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

Issue 13866010: Correctly compile unresolved for-in loops. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Additional problems found during testing. Created 7 years, 8 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
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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.modelx; 5 library elements.modelx;
6 6
7 import 'dart:uri'; 7 import 'dart:uri';
8 import 'dart:collection' show LinkedHashMap; 8 import 'dart:collection' show LinkedHashMap;
9 9
10 import 'elements.dart'; 10 import 'elements.dart';
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 63
64 bool isFunction() => identical(kind, ElementKind.FUNCTION); 64 bool isFunction() => identical(kind, ElementKind.FUNCTION);
65 bool isConstructor() => isFactoryConstructor() || isGenerativeConstructor(); 65 bool isConstructor() => isFactoryConstructor() || isGenerativeConstructor();
66 bool isClosure() => false; 66 bool isClosure() => false;
67 bool isMember() { 67 bool isMember() {
68 // Check that this element is defined in the scope of a Class. 68 // Check that this element is defined in the scope of a Class.
69 return enclosingElement != null && enclosingElement.isClass(); 69 return enclosingElement != null && enclosingElement.isClass();
70 } 70 }
71 bool isInstanceMember() => false; 71 bool isInstanceMember() => false;
72 72
73 /**
74 * Returns [:true:] if this element is enclosed in a static member or is
75 * itself a static member.
76 */
77 bool isInStaticMember() {
78 Element member = getEnclosingMember();
79 return member != null && member.modifiers.isStatic();
80 }
81
82 bool isFactoryConstructor() => modifiers.isFactory(); 73 bool isFactoryConstructor() => modifiers.isFactory();
83 bool isGenerativeConstructor() => 74 bool isGenerativeConstructor() =>
84 identical(kind, ElementKind.GENERATIVE_CONSTRUCTOR); 75 identical(kind, ElementKind.GENERATIVE_CONSTRUCTOR);
85 bool isGenerativeConstructorBody() => 76 bool isGenerativeConstructorBody() =>
86 identical(kind, ElementKind.GENERATIVE_CONSTRUCTOR_BODY); 77 identical(kind, ElementKind.GENERATIVE_CONSTRUCTOR_BODY);
87 bool isCompilationUnit() => identical(kind, ElementKind.COMPILATION_UNIT); 78 bool isCompilationUnit() => identical(kind, ElementKind.COMPILATION_UNIT);
88 bool isClass() => identical(kind, ElementKind.CLASS); 79 bool isClass() => identical(kind, ElementKind.CLASS);
89 bool isPrefix() => identical(kind, ElementKind.PREFIX); 80 bool isPrefix() => identical(kind, ElementKind.PREFIX);
90 bool isVariable() => identical(kind, ElementKind.VARIABLE); 81 bool isVariable() => identical(kind, ElementKind.VARIABLE);
91 bool isParameter() => identical(kind, ElementKind.PARAMETER); 82 bool isParameter() => identical(kind, ElementKind.PARAMETER);
(...skipping 1933 matching lines...) Expand 10 before | Expand all | Expand 10 after
2025 2016
2026 MetadataAnnotation ensureResolved(Compiler compiler) { 2017 MetadataAnnotation ensureResolved(Compiler compiler) {
2027 if (resolutionState == STATE_NOT_STARTED) { 2018 if (resolutionState == STATE_NOT_STARTED) {
2028 compiler.resolver.resolveMetadataAnnotation(this); 2019 compiler.resolver.resolveMetadataAnnotation(this);
2029 } 2020 }
2030 return this; 2021 return this;
2031 } 2022 }
2032 2023
2033 String toString() => 'MetadataAnnotation($value, $resolutionState)'; 2024 String toString() => 'MetadataAnnotation($value, $resolutionState)';
2034 } 2025 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698