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

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

Issue 1617083002: Base JavaScript code position computation on JavaScript tracer. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Updated cf. comments. Created 4 years, 11 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 | « pkg/compiler/lib/src/io/source_information.dart ('k') | pkg/compiler/lib/src/js/js.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 that maps spans of Dart AST nodes to spans of 5 /// Source information system that maps spans of Dart AST nodes to spans of
6 /// JavaScript nodes. 6 /// JavaScript nodes.
7 7
8 library dart2js.source_information.start_end; 8 library dart2js.source_information.start_end;
9 9
10 import '../common.dart'; 10 import '../common.dart';
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 String get shortText { 109 String get shortText {
110 return _computeText(startPosition.sourceUri.pathSegments.last); 110 return _computeText(startPosition.sourceUri.pathSegments.last);
111 } 111 }
112 112
113 String toString() { 113 String toString() {
114 return _computeText('${startPosition.sourceUri}'); 114 return _computeText('${startPosition.sourceUri}');
115 } 115 }
116 } 116 }
117 117
118 class StartEndSourceInformationStrategy 118 class StartEndSourceInformationStrategy
119 implements JavaScriptSourceInformationStrategy { 119 extends JavaScriptSourceInformationStrategy {
120 const StartEndSourceInformationStrategy(); 120 const StartEndSourceInformationStrategy();
121 121
122 @override 122 @override
123 SourceInformationBuilder createBuilderForContext(AstElement element) { 123 SourceInformationBuilder createBuilderForContext(AstElement element) {
124 return new StartEndSourceInformationBuilder(element); 124 return new StartEndSourceInformationBuilder(element);
125 } 125 }
126 126
127 @override 127 @override
128 SourceInformationProcessor createProcessor(SourceMapper sourceMapper) { 128 SourceInformationProcessor createProcessor(SourceMapper sourceMapper) {
129 return new StartEndSourceInformationProcessor(sourceMapper); 129 return new StartEndSourceInformationProcessor(sourceMapper);
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
225 225
226 @override 226 @override
227 SourceInformationBuilder forContext( 227 SourceInformationBuilder forContext(
228 AstElement element, {SourceInformation sourceInformation}) { 228 AstElement element, {SourceInformation sourceInformation}) {
229 return new StartEndSourceInformationBuilder(element); 229 return new StartEndSourceInformationBuilder(element);
230 } 230 }
231 } 231 }
232 232
233 233
234 234
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/io/source_information.dart ('k') | pkg/compiler/lib/src/js/js.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698