| 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 #library('leg_apiimpl'); | 5 #library('leg_apiimpl'); |
| 6 | 6 |
| 7 #import('leg.dart', prefix: 'leg'); | 7 #import('leg.dart', prefix: 'leg'); |
| 8 #import('elements/elements.dart', prefix: 'leg'); | 8 #import('elements/elements.dart', prefix: 'leg'); |
| 9 #import('tree/tree.dart', prefix: 'leg'); | 9 #import('tree/tree.dart', prefix: 'leg'); |
| 10 #import('ssa/tracer.dart', prefix: 'ssa'); | 10 #import('ssa/tracer.dart', prefix: 'ssa'); |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 return new leg.Script(uri, sourceFile); | 52 return new leg.Script(uri, sourceFile); |
| 53 } | 53 } |
| 54 | 54 |
| 55 bool run(Uri uri) { | 55 bool run(Uri uri) { |
| 56 bool success = super.run(uri); | 56 bool success = super.run(uri); |
| 57 for (final task in tasks) { | 57 for (final task in tasks) { |
| 58 log('${task.name} took ${task.timing}msec'); | 58 log('${task.name} took ${task.timing}msec'); |
| 59 } | 59 } |
| 60 return success; | 60 return success; |
| 61 } | 61 } |
| 62 |
| 63 void reportDiagnostic(leg.SourceSpan span, String message, bool fatal) { |
| 64 if (span === null) { |
| 65 handler(null, null, null, message, fatal); |
| 66 } else { |
| 67 handler(span.uri, span.begin, span.end, message, fatal); |
| 68 } |
| 69 } |
| 62 } | 70 } |
| OLD | NEW |