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

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

Issue 12087094: Removed Dynamic keyword support from dart2js. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Copied inherited dart2js test status to dart2dart status file. Created 7 years, 9 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
« no previous file with comments | « no previous file | sdk/lib/_internal/compiler/implementation/scanner/keyword.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 part of dart_backend; 5 part of dart_backend;
6 6
7 class LocalPlaceholder { 7 class LocalPlaceholder {
8 final String identifier; 8 final String identifier;
9 final Set<Node> nodes; 9 final Set<Node> nodes;
10 LocalPlaceholder(this.identifier) : nodes = new Set<Node>(); 10 LocalPlaceholder(this.identifier) : nodes = new Set<Node>();
(...skipping 430 matching lines...) Expand 10 before | Expand all | Expand 10 after
441 static bool isPlainTypeName(TypeAnnotation typeAnnotation) { 441 static bool isPlainTypeName(TypeAnnotation typeAnnotation) {
442 if (typeAnnotation.typeName is !Identifier) return false; 442 if (typeAnnotation.typeName is !Identifier) return false;
443 if (typeAnnotation.typeArguments == null) return true; 443 if (typeAnnotation.typeArguments == null) return true;
444 if (typeAnnotation.typeArguments.isEmpty) return true; 444 if (typeAnnotation.typeArguments.isEmpty) return true;
445 return false; 445 return false;
446 } 446 }
447 447
448 static bool isDynamicType(TypeAnnotation typeAnnotation) { 448 static bool isDynamicType(TypeAnnotation typeAnnotation) {
449 if (!isPlainTypeName(typeAnnotation)) return false; 449 if (!isPlainTypeName(typeAnnotation)) return false;
450 String name = typeAnnotation.typeName.asIdentifier().source.slowToString(); 450 String name = typeAnnotation.typeName.asIdentifier().source.slowToString();
451 // TODO(aprelev@gmail.com): Removed deprecated Dynamic keyword support. 451 return name == 'dynamic';
452 return name == 'Dynamic' || name == 'dynamic';
453 } 452 }
454 453
455 visitTypeAnnotation(TypeAnnotation node) { 454 visitTypeAnnotation(TypeAnnotation node) {
456 // Poor man generic variables resolution. 455 // Poor man generic variables resolution.
457 // TODO(antonm): get rid of it once resolver can deal with it. 456 // TODO(antonm): get rid of it once resolver can deal with it.
458 TypeDeclarationElement typeDeclarationElement; 457 TypeDeclarationElement typeDeclarationElement;
459 if (currentElement is TypeDeclarationElement) { 458 if (currentElement is TypeDeclarationElement) {
460 typeDeclarationElement = currentElement; 459 typeDeclarationElement = currentElement;
461 } else { 460 } else {
462 typeDeclarationElement = currentElement.getEnclosingClass(); 461 typeDeclarationElement = currentElement.getEnclosingClass();
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
623 622
624 visitBlock(Block node) { 623 visitBlock(Block node) {
625 for (Node statement in node.statements.nodes) { 624 for (Node statement in node.statements.nodes) {
626 if (statement is VariableDefinitions) { 625 if (statement is VariableDefinitions) {
627 makeVarDeclarationTypePlaceholder(statement); 626 makeVarDeclarationTypePlaceholder(statement);
628 } 627 }
629 } 628 }
630 node.visitChildren(this); 629 node.visitChildren(this);
631 } 630 }
632 } 631 }
OLDNEW
« no previous file with comments | « no previous file | sdk/lib/_internal/compiler/implementation/scanner/keyword.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698