| 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 /// Source information system mapping that attempts a semantic mapping between | 5 /// Source information system mapping that attempts a semantic mapping between |
| 6 /// offsets of JavaScript code points to offsets of Dart code points. | 6 /// offsets of JavaScript code points to offsets of Dart code points. |
| 7 | 7 |
| 8 library dart2js.source_information.position; | 8 library dart2js.source_information.position; |
| 9 | 9 |
| 10 import '../common.dart'; | 10 import '../common.dart'; |
| (...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 297 SourceInformation buildBinary(Node node) => buildBegin(node); | 297 SourceInformation buildBinary(Node node) => buildBegin(node); |
| 298 | 298 |
| 299 @override | 299 @override |
| 300 SourceInformation buildCatch(Node node) => buildBegin(node); | 300 SourceInformation buildCatch(Node node) => buildBegin(node); |
| 301 | 301 |
| 302 @override | 302 @override |
| 303 SourceInformation buildIs(Node node) => buildBegin(node); | 303 SourceInformation buildIs(Node node) => buildBegin(node); |
| 304 | 304 |
| 305 @override | 305 @override |
| 306 SourceInformation buildAs(Node node) => buildBegin(node); | 306 SourceInformation buildAs(Node node) => buildBegin(node); |
| 307 |
| 308 @override |
| 309 SourceInformation buildSwitch(Node node) => buildBegin(node); |
| 310 |
| 311 @override |
| 312 SourceInformation buildSwitchCase(Node node) => buildBegin(node); |
| 307 } | 313 } |
| 308 | 314 |
| 309 /// The start, end and closing offsets for a [js.Node]. | 315 /// The start, end and closing offsets for a [js.Node]. |
| 310 class CodePosition { | 316 class CodePosition { |
| 311 final int startPosition; | 317 final int startPosition; |
| 312 final int endPosition; | 318 final int endPosition; |
| 313 final int closingPosition; | 319 final int closingPosition; |
| 314 | 320 |
| 315 CodePosition(this.startPosition, this.endPosition, this.closingPosition); | 321 CodePosition(this.startPosition, this.endPosition, this.closingPosition); |
| 316 | 322 |
| (...skipping 1005 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1322 | 1328 |
| 1323 @override | 1329 @override |
| 1324 CodePosition operator [](js.Node node) { | 1330 CodePosition operator [](js.Node node) { |
| 1325 CodePosition codePosition = codePositions[node]; | 1331 CodePosition codePosition = codePositions[node]; |
| 1326 if (codePosition == null) { | 1332 if (codePosition == null) { |
| 1327 coverage.registerNodesWithoutOffset(node); | 1333 coverage.registerNodesWithoutOffset(node); |
| 1328 } | 1334 } |
| 1329 return codePosition; | 1335 return codePosition; |
| 1330 } | 1336 } |
| 1331 } | 1337 } |
| OLD | NEW |