Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Side by Side Diff: pkg/compiler/lib/src/io/position_information.dart

Issue 2667983002: Add test for expected source mappings (Closed)
Patch Set: Update comment. Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | tests/compiler/dart2js/annotated_code_helper.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « no previous file | tests/compiler/dart2js/annotated_code_helper.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698