| 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('mirrors.dart2js'); | 5 #library('mirrors.dart2js'); |
| 6 | 6 |
| 7 #import('dart:io'); | 7 #import('dart:io'); |
| 8 #import('dart:uri'); | 8 #import('dart:uri'); |
| 9 | 9 |
| 10 #import('../../../../../lib/compiler/compiler.dart', prefix: 'diagnostics'); | 10 #import('../../../../../lib/compiler/compiler.dart', prefix: 'diagnostics'); |
| (...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 155 return newName; | 155 return newName; |
| 156 } | 156 } |
| 157 | 157 |
| 158 DiagnosticListener get _diagnosticListener { | 158 DiagnosticListener get _diagnosticListener { |
| 159 return const Dart2JsDiagnosticListener(); | 159 return const Dart2JsDiagnosticListener(); |
| 160 } | 160 } |
| 161 | 161 |
| 162 class Dart2JsDiagnosticListener implements DiagnosticListener { | 162 class Dart2JsDiagnosticListener implements DiagnosticListener { |
| 163 const Dart2JsDiagnosticListener(); | 163 const Dart2JsDiagnosticListener(); |
| 164 | 164 |
| 165 void cancel([String reason, node, token, instruction, element]) { | 165 void cancel(String reason, {node, token, instruction, element}) { |
| 166 print(reason); | 166 print(reason); |
| 167 } | 167 } |
| 168 | 168 |
| 169 void log(message) { | 169 void log(message) { |
| 170 print(message); | 170 print(message); |
| 171 } | 171 } |
| 172 | 172 |
| 173 void internalError(String message, | 173 void internalError(String message, |
| 174 [Node node, Token token, HInstruction instruction, | 174 [Node node, Token token, HInstruction instruction, |
| 175 Element element]) { | 175 Element element]) { |
| (...skipping 1212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1388 if (node !== null) { | 1388 if (node !== null) { |
| 1389 var span = system.compiler.spanFromNode(node, script.uri); | 1389 var span = system.compiler.spanFromNode(node, script.uri); |
| 1390 return new Dart2JsLocation(script, span); | 1390 return new Dart2JsLocation(script, span); |
| 1391 } else { | 1391 } else { |
| 1392 var span = system.compiler.spanFromElement(_variable); | 1392 var span = system.compiler.spanFromElement(_variable); |
| 1393 return new Dart2JsLocation(script, span); | 1393 return new Dart2JsLocation(script, span); |
| 1394 } | 1394 } |
| 1395 } | 1395 } |
| 1396 } | 1396 } |
| 1397 | 1397 |
| OLD | NEW |