| 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 524 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 535 SourceLocation sourceLocation = | 535 SourceLocation sourceLocation = |
| 536 getSourceLocation(sourceInformation, sourcePositionKind); | 536 getSourceLocation(sourceInformation, sourcePositionKind); |
| 537 if (sourceLocation != null) { | 537 if (sourceLocation != null) { |
| 538 sourceMapper.register(node, codeLocation, sourceLocation); | 538 sourceMapper.register(node, codeLocation, sourceLocation); |
| 539 } | 539 } |
| 540 } | 540 } |
| 541 | 541 |
| 542 switch (kind) { | 542 switch (kind) { |
| 543 case StepKind.FUN_ENTRY: | 543 case StepKind.FUN_ENTRY: |
| 544 // TODO(johnniwinther): Remove this when fully transitioned to the | 544 // TODO(johnniwinther): Remove this when fully transitioned to the |
| 545 // new source info system. | 545 // new source info system. Verify that tools no longer expect JS |
| 546 // function signatures to map to the origin. The main method may still |
| 547 // need mapping to enable breakpoints before calling main. |
| 546 registerPosition(SourcePositionKind.START); | 548 registerPosition(SourcePositionKind.START); |
| 547 break; | 549 break; |
| 548 case StepKind.FUN_EXIT: | 550 case StepKind.FUN_EXIT: |
| 549 registerPosition(SourcePositionKind.INNER); | 551 registerPosition(SourcePositionKind.INNER); |
| 550 break; | 552 break; |
| 551 case StepKind.CALL: | 553 case StepKind.CALL: |
| 552 CallPosition callPosition = | 554 CallPosition callPosition = |
| 553 CallPosition.getSemanticPositionForCall(node); | 555 CallPosition.getSemanticPositionForCall(node); |
| 554 registerPosition(callPosition.sourcePositionKind); | 556 registerPosition(callPosition.sourcePositionKind); |
| 555 break; | 557 break; |
| (...skipping 749 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1305 | 1307 |
| 1306 @override | 1308 @override |
| 1307 CodePosition operator [](js.Node node) { | 1309 CodePosition operator [](js.Node node) { |
| 1308 CodePosition codePosition = codePositions[node]; | 1310 CodePosition codePosition = codePositions[node]; |
| 1309 if (codePosition == null) { | 1311 if (codePosition == null) { |
| 1310 coverage.registerNodesWithoutOffset(node); | 1312 coverage.registerNodesWithoutOffset(node); |
| 1311 } | 1313 } |
| 1312 return codePosition; | 1314 return codePosition; |
| 1313 } | 1315 } |
| 1314 } | 1316 } |
| OLD | NEW |