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

Side by Side Diff: lib/compiler/implementation/dart_backend/placeholder_collector.dart

Issue 11052011: Fix some warnings. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments. 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 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 class LocalPlaceholder { 5 class LocalPlaceholder {
6 final String identifier; 6 final String identifier;
7 final Set<Node> nodes; 7 final Set<Node> nodes;
8 LocalPlaceholder(this.identifier) : nodes = new Set<Node>(); 8 LocalPlaceholder(this.identifier) : nodes = new Set<Node>();
9 int hashCode() => identifier.hashCode(); 9 int hashCode() => identifier.hashCode();
10 String toString() => 10 String toString() =>
(...skipping 446 matching lines...) Expand 10 before | Expand all | Expand 10 after
457 } 457 }
458 // TODO(antonm): is there a better way to detect unresolved types? 458 // TODO(antonm): is there a better way to detect unresolved types?
459 // Corner case: dart:core type with a prefix. 459 // Corner case: dart:core type with a prefix.
460 // Most probably there are some additional problems with 460 // Most probably there are some additional problems with
461 // coreLibPrefix.topLevels. 461 // coreLibPrefix.topLevels.
462 Element typeElement = type.element; 462 Element typeElement = type.element;
463 Element dynamicTypeElement = compiler.types.dynamicType.element; 463 Element dynamicTypeElement = compiler.types.dynamicType.element;
464 if (hasPrefix && 464 if (hasPrefix &&
465 (typeElement.getLibrary() === coreLibrary || 465 (typeElement.getLibrary() === coreLibrary ||
466 typeElement === dynamicTypeElement)) { 466 typeElement === dynamicTypeElement)) {
467 makeNullPlaceholder(node.typeName.receiver); 467 makeNullPlaceholder(node.typeName.asSend().receiver);
468 } else { 468 } else {
469 if (typeElement !== dynamicTypeElement) { 469 if (typeElement !== dynamicTypeElement) {
470 makeTypePlaceholder(target, type); 470 makeTypePlaceholder(target, type);
471 } else { 471 } else {
472 if (!isDynamicType(node)) makeUnresolvedPlaceholder(target); 472 if (!isDynamicType(node)) makeUnresolvedPlaceholder(target);
473 } 473 }
474 } 474 }
475 } 475 }
476 node.visitChildren(this); 476 node.visitChildren(this);
477 } 477 }
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
608 608
609 visitBlock(Block node) { 609 visitBlock(Block node) {
610 for (Node statement in node.statements.nodes) { 610 for (Node statement in node.statements.nodes) {
611 if (statement is VariableDefinitions) { 611 if (statement is VariableDefinitions) {
612 makeVarDeclarationTypePlaceholder(statement); 612 makeVarDeclarationTypePlaceholder(statement);
613 } 613 }
614 } 614 }
615 node.visitChildren(this); 615 node.visitChildren(this);
616 } 616 }
617 } 617 }
OLDNEW
« no previous file with comments | « lib/compiler/implementation/dart_backend/backend.dart ('k') | lib/compiler/implementation/elements/elements.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698