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 | 8 import '../elements/elements.dart' show |
9 AstElement, | 9 AstElement, |
10 LocalElement; | 10 LocalElement; |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 SourceInformation buildIf(Node node) => null; | 97 SourceInformation buildIf(Node node) => null; |
98 | 98 |
99 /// Generate [SourceInformation] for the constructor invocation in [node]. | 99 /// Generate [SourceInformation] for the constructor invocation in [node]. |
100 SourceInformation buildNew(Node node) => null; | 100 SourceInformation buildNew(Node node) => null; |
101 | 101 |
102 /// Generate [SourceInformation] for the throw in [node]. | 102 /// Generate [SourceInformation] for the throw in [node]. |
103 SourceInformation buildThrow(Node node) => null; | 103 SourceInformation buildThrow(Node node) => null; |
104 | 104 |
105 /// Generate [SourceInformation] for the assignment in [node]. | 105 /// Generate [SourceInformation] for the assignment in [node]. |
106 SourceInformation buildAssignment(Node node) => null; | 106 SourceInformation buildAssignment(Node node) => null; |
| 107 |
| 108 /// Generate [SourceInformation] for the variable declaration inserted as |
| 109 /// first statement of a function. |
| 110 SourceInformation buildVariableDeclaration() => null; |
107 } | 111 } |
108 | 112 |
109 /// A location in a source file. | 113 /// A location in a source file. |
110 abstract class SourceLocation { | 114 abstract class SourceLocation { |
111 final SourceFile _sourceFile; | 115 final SourceFile _sourceFile; |
112 int _line; | 116 int _line; |
113 | 117 |
114 SourceLocation(this._sourceFile) { | 118 SourceLocation(this._sourceFile) { |
115 assert(isValid); | 119 assert(isValid); |
116 } | 120 } |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
198 return '${computeElementNameForSourceMaps(local.executableContext)}.$name'; | 202 return '${computeElementNameForSourceMaps(local.executableContext)}.$name'; |
199 } else if (element.enclosingClass != null) { | 203 } else if (element.enclosingClass != null) { |
200 if (element.enclosingClass.isClosure) { | 204 if (element.enclosingClass.isClosure) { |
201 return computeElementNameForSourceMaps(element.enclosingClass); | 205 return computeElementNameForSourceMaps(element.enclosingClass); |
202 } | 206 } |
203 return '${element.enclosingClass.name}.${element.name}'; | 207 return '${element.enclosingClass.name}.${element.name}'; |
204 } else { | 208 } else { |
205 return element.name; | 209 return element.name; |
206 } | 210 } |
207 } | 211 } |
OLD | NEW |