| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 } |
| OLD | NEW |