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

Side by Side Diff: lib/compiler/implementation/dart_backend/backend.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, 1 month 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 | lib/compiler/implementation/dart_backend/placeholder_collector.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 class ElementAst { 5 class ElementAst {
6 final Node ast; 6 final Node ast;
7 final TreeElements treeElements; 7 final TreeElements treeElements;
8 8
9 ElementAst(this.ast, this.treeElements); 9 ElementAst(this.ast, this.treeElements);
10 10
(...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after
319 if (element.isMember()) { 319 if (element.isMember()) {
320 ClassElement enclosingClass = element.getEnclosingClass(); 320 ClassElement enclosingClass = element.getEnclosingClass();
321 assert(enclosingClass.isClass()); 321 assert(enclosingClass.isClass());
322 assert(enclosingClass.isTopLevel()); 322 assert(enclosingClass.isTopLevel());
323 assert(shouldOutput(enclosingClass)); 323 assert(shouldOutput(enclosingClass));
324 addClass(enclosingClass); 324 addClass(enclosingClass);
325 classMembers[enclosingClass].add(element); 325 classMembers[enclosingClass].add(element);
326 processElement(element, elementAst); 326 processElement(element, elementAst);
327 } else { 327 } else {
328 if (!element.isTopLevel()) { 328 if (!element.isTopLevel()) {
329 compiler.cancel(reason: 'Cannot process $element', element: element); 329 compiler.cancel('Cannot process $element', element: element);
330 } 330 }
331 addTopLevel(element, elementAst); 331 addTopLevel(element, elementAst);
332 } 332 }
333 }); 333 });
334 334
335 // Add synthesized constructors to classes with no resolved constructors, 335 // Add synthesized constructors to classes with no resolved constructors,
336 // but which originally had any constructor. That should prevent 336 // but which originally had any constructor. That should prevent
337 // those classes from being instantiable with default constructor. 337 // those classes from being instantiable with default constructor.
338 Identifier synthesizedIdentifier = 338 Identifier synthesizedIdentifier =
339 new Identifier(new StringToken(IDENTIFIER_INFO, '', -1)); 339 new Identifier(new StringToken(IDENTIFIER_INFO, '', -1));
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
536 } 536 }
537 537
538 compareElements(e0, e1) { 538 compareElements(e0, e1) {
539 int result = compareBy((e) => e.getLibrary().uri.toString())(e0, e1); 539 int result = compareBy((e) => e.getLibrary().uri.toString())(e0, e1);
540 if (result != 0) return result; 540 if (result != 0) return result;
541 return compareBy((e) => e.position().charOffset)(e0, e1); 541 return compareBy((e) => e.position().charOffset)(e0, e1);
542 } 542 }
543 543
544 List<Element> sortElements(Collection<Element> elements) => 544 List<Element> sortElements(Collection<Element> elements) =>
545 sorted(elements, compareElements); 545 sorted(elements, compareElements);
OLDNEW
« no previous file with comments | « no previous file | lib/compiler/implementation/dart_backend/placeholder_collector.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698