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

Side by Side Diff: tests/compiler/dart2js/sourcemaps/sourcemap_helper.dart

Issue 1935933002: Fix source information positions for deserialized patched elements. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Fixes Created 4 years, 7 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 | « tests/compiler/dart2js/serialization_compilation_test.dart ('k') | no next file » | 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 library sourcemap.helper; 5 library sourcemap.helper;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:io'; 8 import 'dart:io';
9 import 'package:compiler/compiler_new.dart'; 9 import 'package:compiler/compiler_new.dart';
10 import 'package:compiler/src/apiimpl.dart' as api; 10 import 'package:compiler/src/apiimpl.dart' as api;
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 extends JavaScriptSourceInformationStrategy { 193 extends JavaScriptSourceInformationStrategy {
194 final JavaScriptSourceInformationStrategy strategy; 194 final JavaScriptSourceInformationStrategy strategy;
195 final Map<RecordedSourceInformationProcess, js.Node> processMap = 195 final Map<RecordedSourceInformationProcess, js.Node> processMap =
196 <RecordedSourceInformationProcess, js.Node>{}; 196 <RecordedSourceInformationProcess, js.Node>{};
197 final Map<js.Node, RecordedSourceInformationProcess> nodeMap = 197 final Map<js.Node, RecordedSourceInformationProcess> nodeMap =
198 <js.Node, RecordedSourceInformationProcess>{}; 198 <js.Node, RecordedSourceInformationProcess>{};
199 199
200 RecordingSourceInformationStrategy(this.strategy); 200 RecordingSourceInformationStrategy(this.strategy);
201 201
202 @override 202 @override
203 SourceInformationBuilder createBuilderForContext(AstElement element) { 203 SourceInformationBuilder createBuilderForContext(ResolvedAst resolvedAst) {
204 return strategy.createBuilderForContext(element); 204 return strategy.createBuilderForContext(resolvedAst);
205 } 205 }
206 206
207 @override 207 @override
208 SourceInformationProcessor createProcessor(SourceMapper sourceMapper) { 208 SourceInformationProcessor createProcessor(SourceMapper sourceMapper) {
209 LocationMap nodeToSourceLocationsMap = 209 LocationMap nodeToSourceLocationsMap =
210 new _LocationRecorder(); 210 new _LocationRecorder();
211 CodePositionRecorder codePositions = new CodePositionRecorder(); 211 CodePositionRecorder codePositions = new CodePositionRecorder();
212 return new RecordingSourceInformationProcessor( 212 return new RecordingSourceInformationProcessor(
213 this, 213 this,
214 strategy.createProcessor(new RecordingSourceMapper( 214 strategy.createProcessor(new RecordingSourceMapper(
(...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after
589 absoluteUri = base.resolveUri(uri); 589 absoluteUri = base.resolveUri(uri);
590 } else { 590 } else {
591 absoluteUri = base.resolve(uri); 591 absoluteUri = base.resolve(uri);
592 } 592 }
593 return sourceFiles.putIfAbsent(absoluteUri, () { 593 return sourceFiles.putIfAbsent(absoluteUri, () {
594 String text = new File.fromUri(absoluteUri).readAsStringSync(); 594 String text = new File.fromUri(absoluteUri).readAsStringSync();
595 return new StringSourceFile.fromUri(absoluteUri, text); 595 return new StringSourceFile.fromUri(absoluteUri, text);
596 }); 596 });
597 } 597 }
598 } 598 }
OLDNEW
« no previous file with comments | « tests/compiler/dart2js/serialization_compilation_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698