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

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

Issue 2682813005: Add NoSourceLocationMarker in old source-info engine. (Closed)
Patch Set: Cleanup. 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
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 407 matching lines...) Expand 10 before | Expand all | Expand 10 after
418 /// 418 ///
419 /// foo: function() { return 0; } 419 /// foo: function() { return 0; }
420 /// ^ // the function end position 420 /// ^ // the function end position
421 /// ^ // the return end position 421 /// ^ // the return end position
422 /// 422 ///
423 END, 423 END,
424 } 424 }
425 425
426 /// Processor that associates [SourceLocation]s from [SourceInformation] on 426 /// Processor that associates [SourceLocation]s from [SourceInformation] on
427 /// [js.Node]s with the target offsets in a [SourceMapper]. 427 /// [js.Node]s with the target offsets in a [SourceMapper].
428 class PositionSourceInformationProcessor implements SourceInformationProcessor { 428 class PositionSourceInformationProcessor extends SourceInformationProcessor {
429 final CodePositionRecorder codePositionRecorder = new CodePositionRecorder(); 429 final CodePositionRecorder codePositionRecorder = new CodePositionRecorder();
430 CodePositionMap codePositionMap; 430 CodePositionMap codePositionMap;
431 List<TraceListener> traceListeners; 431 List<TraceListener> traceListeners;
432 432
433 PositionSourceInformationProcessor(SourceMapper sourceMapper, 433 PositionSourceInformationProcessor(SourceMapper sourceMapper,
434 [Coverage coverage]) { 434 [Coverage coverage]) {
435 codePositionMap = coverage != null 435 codePositionMap = coverage != null
436 ? new CodePositionCoverage(codePositionRecorder, coverage) 436 ? new CodePositionCoverage(codePositionRecorder, coverage)
437 : codePositionRecorder; 437 : codePositionRecorder;
438 traceListeners = [new PositionTraceListener(sourceMapper)]; 438 traceListeners = [new PositionTraceListener(sourceMapper)];
(...skipping 868 matching lines...) Expand 10 before | Expand all | Expand 10 after
1307 1307
1308 @override 1308 @override
1309 CodePosition operator [](js.Node node) { 1309 CodePosition operator [](js.Node node) {
1310 CodePosition codePosition = codePositions[node]; 1310 CodePosition codePosition = codePositions[node];
1311 if (codePosition == null) { 1311 if (codePosition == null) {
1312 coverage.registerNodesWithoutOffset(node); 1312 coverage.registerNodesWithoutOffset(node);
1313 } 1313 }
1314 return codePosition; 1314 return codePosition;
1315 } 1315 }
1316 } 1316 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698