| OLD | NEW |
| 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, 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 dart2js.source_information; | 5 library dart2js.source_information; |
| 6 | 6 |
| 7 import '../common.dart'; | 7 import '../common.dart'; |
| 8 import '../elements/elements.dart' show AstElement, LocalElement; | 8 import '../elements/elements.dart' show AstElement, LocalElement; |
| 9 import '../tree/tree.dart' show Node, Send; | |
| 10 import '../js/js.dart' show JavaScriptNodeSourceInformation; | 9 import '../js/js.dart' show JavaScriptNodeSourceInformation; |
| 10 import '../tree/tree.dart' show Node; |
| 11 import 'source_file.dart'; | 11 import 'source_file.dart'; |
| 12 | 12 |
| 13 /// Interface for passing source information, for instance for use in source | 13 /// Interface for passing source information, for instance for use in source |
| 14 /// maps, through the backend. | 14 /// maps, through the backend. |
| 15 abstract class SourceInformation extends JavaScriptNodeSourceInformation { | 15 abstract class SourceInformation extends JavaScriptNodeSourceInformation { |
| 16 const SourceInformation(); | 16 const SourceInformation(); |
| 17 | 17 |
| 18 SourceSpan get sourceSpan; | 18 SourceSpan get sourceSpan; |
| 19 | 19 |
| 20 /// The source location associated with the start of the JS node. | 20 /// The source location associated with the start of the JS node. |
| (...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 236 return '${computeElementNameForSourceMaps(local.executableContext)}.$name'; | 236 return '${computeElementNameForSourceMaps(local.executableContext)}.$name'; |
| 237 } else if (element.enclosingClass != null) { | 237 } else if (element.enclosingClass != null) { |
| 238 if (element.enclosingClass.isClosure) { | 238 if (element.enclosingClass.isClosure) { |
| 239 return computeElementNameForSourceMaps(element.enclosingClass); | 239 return computeElementNameForSourceMaps(element.enclosingClass); |
| 240 } | 240 } |
| 241 return '${element.enclosingClass.name}.${element.name}'; | 241 return '${element.enclosingClass.name}.${element.name}'; |
| 242 } else { | 242 } else { |
| 243 return element.name; | 243 return element.name; |
| 244 } | 244 } |
| 245 } | 245 } |
| OLD | NEW |