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

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

Issue 10834065: Revert https://chromiumcodereview.appspot.com/10789012/ (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 4 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 | lib/compiler/implementation/elements/elements.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 /** 5 /**
6 * Dart backend helper for converting program IR back to source code. 6 * Dart backend helper for converting program IR back to source code.
7 */ 7 */
8 class Emitter { 8 class Emitter {
9 9
10 final Compiler compiler; 10 final Compiler compiler;
(...skipping 29 matching lines...) Expand all
40 classNode.extendsKeyword.value.printOn(sb); 40 classNode.extendsKeyword.value.printOn(sb);
41 sb.add(' '); 41 sb.add(' ');
42 sb.add(renamer.renameType(classElement.supertype)); 42 sb.add(renamer.renameType(classElement.supertype));
43 } 43 }
44 if (!classNode.interfaces.isEmpty()) { 44 if (!classNode.interfaces.isEmpty()) {
45 sb.add(classElement.isInterface() ? ' extends ' : ' implements '); 45 sb.add(classElement.isInterface() ? ' extends ' : ' implements ');
46 sb.add(unparser.unparse(classNode.interfaces)); 46 sb.add(unparser.unparse(classNode.interfaces));
47 } 47 }
48 if (classNode.defaultClause !== null) { 48 if (classNode.defaultClause !== null) {
49 sb.add(' default '); 49 sb.add(' default ');
50 sb.add(unparser.unparse(classNode.defaultClause)); 50 sb.add(renamer.renameType(classElement.defaultClass));
51 } 51 }
52 sb.add('{'); 52 sb.add('{');
53 innerElements.forEach((element) { 53 innerElements.forEach((element) {
54 // TODO(smok): Filter out default constructors here. 54 // TODO(smok): Filter out default constructors here.
55 outputElement(element); 55 outputElement(element);
56 }); 56 });
57 sb.add('}'); 57 sb.add('}');
58 } 58 }
59 59
60 void outputElement(Element element) { 60 void outputElement(Element element) {
(...skipping 21 matching lines...) Expand all
82 if (!uri.startsWith('dart:')) continue; 82 if (!uri.startsWith('dart:')) continue;
83 final lib = libraries[uri]; 83 final lib = libraries[uri];
84 if (renamer.imports.containsKey(lib)) { 84 if (renamer.imports.containsKey(lib)) {
85 result.add('#import("$uri", prefix: "${renamer.imports[lib]}");'); 85 result.add('#import("$uri", prefix: "${renamer.imports[lib]}");');
86 } 86 }
87 } 87 }
88 result.add(sb); 88 result.add(sb);
89 return result.toString(); 89 return result.toString();
90 } 90 }
91 } 91 }
OLDNEW
« no previous file with comments | « no previous file | lib/compiler/implementation/elements/elements.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698