| 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 1249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1260 if (dollarPos != -1) { | 1260 if (dollarPos != -1) { |
| 1261 _constructorName = _simpleName.substring(dollarPos+1); | 1261 _constructorName = _simpleName.substring(dollarPos+1); |
| 1262 _simpleName = _simpleName.substring(0, dollarPos); | 1262 _simpleName = _simpleName.substring(0, dollarPos); |
| 1263 _simpleName = '$_simpleName.$_constructorName'; | 1263 _simpleName = '$_simpleName.$_constructorName'; |
| 1264 } | 1264 } |
| 1265 // Simple name is TypeName.constructorName. | 1265 // Simple name is TypeName.constructorName. |
| 1266 _displayName = _simpleName; | 1266 _displayName = _simpleName; |
| 1267 } else if (_simpleName == 'negate') { | 1267 } else if (_simpleName == 'negate') { |
| 1268 _kind = Dart2JsMethodKind.OPERATOR; | 1268 _kind = Dart2JsMethodKind.OPERATOR; |
| 1269 _operatorName = '-'; | 1269 _operatorName = '-'; |
| 1270 // Simple name is 'operator operatorName'. | 1270 // Simple name is 'unary-'. |
| 1271 _simpleName = Mirror.UNARY_MINUS; | 1271 _simpleName = Mirror.UNARY_MINUS; |
| 1272 // Display name is 'operator operatorName'. | 1272 // Display name is 'operator operatorName'. |
| 1273 _displayName = 'operator -'; | 1273 _displayName = 'operator -'; |
| 1274 } else if (_simpleName.startsWith('operator\$')) { | 1274 } else if (_simpleName.startsWith('operator\$')) { |
| 1275 String str = _simpleName.substring(9); | 1275 String str = _simpleName.substring(9); |
| 1276 _simpleName = 'operator'; | 1276 _simpleName = 'operator'; |
| 1277 _kind = Dart2JsMethodKind.OPERATOR; | 1277 _kind = Dart2JsMethodKind.OPERATOR; |
| 1278 _operatorName = _getOperatorFromOperatorName(str); | 1278 _operatorName = _getOperatorFromOperatorName(str); |
| 1279 // Simple name is 'operator operatorName'. | 1279 // Simple name is 'operator operatorName'. |
| 1280 _simpleName = _operatorName; | 1280 _simpleName = _operatorName; |
| (...skipping 107 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 |