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

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

Issue 11270008: Add type annotations to remove warnings and fix a bug. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: 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 get hashCode => identifier.hashCode; 9 int get hashCode => identifier.hashCode;
10 String toString() => 10 String toString() =>
(...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after
361 LocalPlaceholder localPlaceholder = new LocalPlaceholder(name); 361 LocalPlaceholder localPlaceholder = new LocalPlaceholder(name);
362 currentFunctionScope.localPlaceholders.add(localPlaceholder); 362 currentFunctionScope.localPlaceholders.add(localPlaceholder);
363 return localPlaceholder; 363 return localPlaceholder;
364 }); 364 });
365 } 365 }
366 366
367 getLocalPlaceholder().nodes.add(identifier); 367 getLocalPlaceholder().nodes.add(identifier);
368 } 368 }
369 369
370 void internalError(String reason, {Node node}) { 370 void internalError(String reason, {Node node}) {
371 compiler.cancel(reason: reason, node: node); 371 compiler.cancel(reason, node: node);
372 } 372 }
373 373
374 void unreachable() { internalError('Unreachable case'); } 374 void unreachable() { internalError('Unreachable case'); }
375 375
376 visit(Node node) => (node == null) ? null : node.accept(this); 376 visit(Node node) => (node == null) ? null : node.accept(this);
377 377
378 visitNode(Node node) { node.visitChildren(this); } // We must go deeper. 378 visitNode(Node node) { node.visitChildren(this); } // We must go deeper.
379 379
380 visitSend(Send send) { 380 visitSend(Send send) {
381 new SendVisitor(this, treeElements).visitSend(send); 381 new SendVisitor(this, treeElements).visitSend(send);
(...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after
636 636
637 visitBlock(Block node) { 637 visitBlock(Block node) {
638 for (Node statement in node.statements.nodes) { 638 for (Node statement in node.statements.nodes) {
639 if (statement is VariableDefinitions) { 639 if (statement is VariableDefinitions) {
640 makeVarDeclarationTypePlaceholder(statement); 640 makeVarDeclarationTypePlaceholder(statement);
641 } 641 }
642 } 642 }
643 node.visitChildren(this); 643 node.visitChildren(this);
644 } 644 }
645 } 645 }
OLDNEW
« no previous file with comments | « lib/compiler/implementation/dart_backend/backend.dart ('k') | lib/compiler/implementation/scanner/parser.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698