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

Unified Diff: sdk/lib/_internal/compiler/implementation/dart_backend/placeholder_collector.dart

Issue 392873002: Element-model refactoring. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Updated cf. comments. Created 6 years, 5 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: sdk/lib/_internal/compiler/implementation/dart_backend/placeholder_collector.dart
diff --git a/sdk/lib/_internal/compiler/implementation/dart_backend/placeholder_collector.dart b/sdk/lib/_internal/compiler/implementation/dart_backend/placeholder_collector.dart
index 9b62291cb2f022c66fae53d4fb9a9c6f8ed2d294..d7279d54a7bfb622670c2808bc6e3187ce05b91b 100644
--- a/sdk/lib/_internal/compiler/implementation/dart_backend/placeholder_collector.dart
+++ b/sdk/lib/_internal/compiler/implementation/dart_backend/placeholder_collector.dart
@@ -210,7 +210,7 @@ class PlaceholderCollector extends Visitor {
// just to escape conflicts and that should be enough as we shouldn't
// be able to resolve private identifiers for other libraries.
makeElementPlaceholder(node.name, element);
- } else if (element.isMember) {
+ } else if (element.isClassMember) {
if (node.name is Identifier) {
tryMakeMemberPlaceholder(node.name);
} else {
@@ -407,7 +407,7 @@ class PlaceholderCollector extends Visitor {
Identifier name = named.name;
String nameAsString = name.source;
for (final parameter in optionalParameters) {
- if (identical(parameter.kind, ElementKind.FIELD_PARAMETER)) {
+ if (parameter.isInitializingFormal) {
if (parameter.name == nameAsString) {
tryMakeMemberPlaceholder(name);
break;
@@ -501,14 +501,14 @@ class PlaceholderCollector extends Visitor {
// May get FunctionExpression here in definition.selector
// in case of A(int this.f());
if (send.selector is Identifier) {
- if (identical(definitionElement.kind, ElementKind.FIELD_PARAMETER)) {
+ if (definitionElement.isInitializingFormal) {
tryMakeMemberPlaceholder(send.selector);
} else {
tryMakeLocalPlaceholder(definitionElement, send.selector);
}
} else {
assert(send.selector is FunctionExpression);
- if (identical(definitionElement.kind, ElementKind.FIELD_PARAMETER)) {
+ if (definitionElement.isInitializingFormal) {
tryMakeMemberPlaceholder(
send.selector.asFunctionExpression().name);
}

Powered by Google App Engine
This is Rietveld 408576698