| 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 1356 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1367 bool get isConstructor => false; | 1367 bool get isConstructor => false; |
| 1368 | 1368 |
| 1369 bool get isField => true; | 1369 bool get isField => true; |
| 1370 | 1370 |
| 1371 bool get isMethod => false; | 1371 bool get isMethod => false; |
| 1372 | 1372 |
| 1373 bool get isPrivate => _isPrivate(simpleName); | 1373 bool get isPrivate => _isPrivate(simpleName); |
| 1374 | 1374 |
| 1375 bool get isStatic => _variable.modifiers.isStatic(); | 1375 bool get isStatic => _variable.modifiers.isStatic(); |
| 1376 | 1376 |
| 1377 // TODO(johnniwinther): Should this return true on const as well? | |
| 1378 bool get isFinal => _variable.modifiers.isFinal(); | 1377 bool get isFinal => _variable.modifiers.isFinal(); |
| 1379 | 1378 |
| 1379 bool get isConst => _variable.modifiers.isConst(); |
| 1380 |
| 1380 TypeMirror get type => _convertTypeToTypeMirror(system, | 1381 TypeMirror get type => _convertTypeToTypeMirror(system, |
| 1381 _variable.computeType(system.compiler), | 1382 _variable.computeType(system.compiler), |
| 1382 system.compiler.types.dynamicType); | 1383 system.compiler.types.dynamicType); |
| 1383 | 1384 |
| 1384 Location get location { | 1385 Location get location { |
| 1385 var script = _variable.getCompilationUnit().script; | 1386 var script = _variable.getCompilationUnit().script; |
| 1386 var node = _variable.variables.parseNode(_diagnosticListener); | 1387 var node = _variable.variables.parseNode(_diagnosticListener); |
| 1387 if (node !== null) { | 1388 if (node !== null) { |
| 1388 var span = system.compiler.spanFromNode(node, script.uri); | 1389 var span = system.compiler.spanFromNode(node, script.uri); |
| 1389 return new Dart2JsLocation(script, span); | 1390 return new Dart2JsLocation(script, span); |
| 1390 } else { | 1391 } else { |
| 1391 var span = system.compiler.spanFromElement(_variable); | 1392 var span = system.compiler.spanFromElement(_variable); |
| 1392 return new Dart2JsLocation(script, span); | 1393 return new Dart2JsLocation(script, span); |
| 1393 } | 1394 } |
| 1394 } | 1395 } |
| 1395 } | 1396 } |
| 1396 | 1397 |
| OLD | NEW |