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

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

Issue 10735030: dart2dart fix synthesized constructor appearing in unparser. Don't output it. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 5 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 BailoutException { 5 class BailoutException {
6 final String reason; 6 final String reason;
7 7
8 const BailoutException(this.reason); 8 const BailoutException(this.reason);
9 } 9 }
10 10
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 * Outputs given class element with given inner elements to a string buffer. 50 * Outputs given class element with given inner elements to a string buffer.
51 */ 51 */
52 void outputClass(ClassElement classElement, List<Element> innerElements, 52 void outputClass(ClassElement classElement, List<Element> innerElements,
53 StringBuffer sb) { 53 StringBuffer sb) {
54 // TODO(smok): Very soon properly print out correct class declaration with 54 // TODO(smok): Very soon properly print out correct class declaration with
55 // extends, implements, etc. 55 // extends, implements, etc.
56 sb.add('class '); 56 sb.add('class ');
57 sb.add(classElement.name.slowToString()); 57 sb.add(classElement.name.slowToString());
58 sb.add('{'); 58 sb.add('{');
59 innerElements.forEach((element) { 59 innerElements.forEach((element) {
60 if (element is SynthesizedConstructorElement) return;
60 // TODO(smok): Filter out default constructors here. 61 // TODO(smok): Filter out default constructors here.
61 sb.add(element.parseNode(compiler).unparse()); 62 sb.add(element.parseNode(compiler).unparse());
62 }); 63 });
63 sb.add('}'); 64 sb.add('}');
64 } 65 }
65 66
66 void assembleProgram() { 67 void assembleProgram() {
67 resolvedElements.forEach((element, treeElements) { 68 resolvedElements.forEach((element, treeElements) {
68 unparseValidator.check(element); 69 unparseValidator.check(element);
69 }); 70 });
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 compiler.assembledCode = ''' 128 compiler.assembledCode = '''
128 main() { 129 main() {
129 final bailout_reason = "${e.reason}"; 130 final bailout_reason = "${e.reason}";
130 } 131 }
131 '''; 132 ''';
132 } 133 }
133 } 134 }
134 135
135 log(String message) => compiler.log('[DartBackend] $message'); 136 log(String message) => compiler.log('[DartBackend] $message');
136 } 137 }
OLDNEW
« no previous file with comments | « no previous file | tests/compiler/dart2js/unparser_test.dart » ('j') | tests/compiler/dart2js/unparser_test.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698