| 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 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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}) { |
| 176 cancel('Internal error: $message', node, token, instruction, element); | 176 cancel('Internal error: $message', node, token, instruction, element); |
| 177 } | 177 } |
| 178 | 178 |
| 179 void internalErrorOnElement(Element element, String message) { | 179 void internalErrorOnElement(Element element, String message) { |
| 180 internalError(message, element: element); | 180 internalError(message, element: element); |
| 181 } | 181 } |
| 182 } | 182 } |
| 183 | 183 |
| 184 //------------------------------------------------------------------------------ | 184 //------------------------------------------------------------------------------ |
| 185 // Compiler extension for apidoc. | 185 // Compiler extension for apidoc. |
| (...skipping 1201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1387 if (node !== null) { | 1387 if (node !== null) { |
| 1388 var span = system.compiler.spanFromNode(node, script.uri); | 1388 var span = system.compiler.spanFromNode(node, script.uri); |
| 1389 return new Dart2JsLocation(script, span); | 1389 return new Dart2JsLocation(script, span); |
| 1390 } else { | 1390 } else { |
| 1391 var span = system.compiler.spanFromElement(_variable); | 1391 var span = system.compiler.spanFromElement(_variable); |
| 1392 return new Dart2JsLocation(script, span); | 1392 return new Dart2JsLocation(script, span); |
| 1393 } | 1393 } |
| 1394 } | 1394 } |
| 1395 } | 1395 } |
| 1396 | 1396 |
| OLD | NEW |