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

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

Issue 10993059: Stop using the Hashable interface. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Another space removed. 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 implements Hashable { 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() =>
11 'local_placeholder[id($identifier), nodes($nodes)]'; 11 'local_placeholder[id($identifier), nodes($nodes)]';
12 } 12 }
13 13
14 class FunctionScope { 14 class FunctionScope {
15 final Set<String> parameterIdentifiers; 15 final Set<String> parameterIdentifiers;
(...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after
425 if (currentElement is TypeDeclarationElement) { 425 if (currentElement is TypeDeclarationElement) {
426 typeDeclarationElement = currentElement; 426 typeDeclarationElement = currentElement;
427 } else { 427 } else {
428 typeDeclarationElement = currentElement.getEnclosingClass(); 428 typeDeclarationElement = currentElement.getEnclosingClass();
429 } 429 }
430 if (typeDeclarationElement !== null && isPlainTypeName(node) 430 if (typeDeclarationElement !== null && isPlainTypeName(node)
431 && tryResolveAndCollectTypeVariable( 431 && tryResolveAndCollectTypeVariable(
432 typeDeclarationElement, node.typeName)) { 432 typeDeclarationElement, node.typeName)) {
433 return; 433 return;
434 } 434 }
435 // We call [resolveReturnType] to allow having 'void'. 435 // We call [resolveReturnType] to allow having 'void'.
436 final type = compiler.resolveReturnType(currentElement, node); 436 final type = compiler.resolveReturnType(currentElement, node);
437 if (type is InterfaceType || type is TypedefType) { 437 if (type is InterfaceType || type is TypedefType) {
438 Node target = node.typeName; 438 Node target = node.typeName;
439 bool hasPrefix = false; 439 bool hasPrefix = false;
440 if (node.typeName is Send) { 440 if (node.typeName is Send) {
441 final element = treeElements[node]; 441 final element = treeElements[node];
442 if (element !== null) { 442 if (element !== null) {
443 final send = node.typeName.asSend(); 443 final send = node.typeName.asSend();
444 Identifier receiver = send.receiver; 444 Identifier receiver = send.receiver;
445 Identifier selector = send.selector; 445 Identifier selector = send.selector;
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
603 603
604 visitBlock(Block node) { 604 visitBlock(Block node) {
605 for (Node statement in node.statements.nodes) { 605 for (Node statement in node.statements.nodes) {
606 if (statement is VariableDefinitions) { 606 if (statement is VariableDefinitions) {
607 makeVarDeclarationTypePlaceholder(statement); 607 makeVarDeclarationTypePlaceholder(statement);
608 } 608 }
609 } 609 }
610 node.visitChildren(this); 610 node.visitChildren(this);
611 } 611 }
612 } 612 }
OLDNEW
« no previous file with comments | « lib/compiler/implementation/constants.dart ('k') | lib/compiler/implementation/elements/elements.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698