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

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

Issue 2791263005: Split MirrorsData methods and MirrorsDataImpl data by element kind. (Closed)
Patch Set: Updated cf. comments. Created 3 years, 8 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/mirrors_used_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 319 matching lines...) Expand 10 before | Expand all | Expand 10 after
330 RecordingSourceInformationStrategy strategy = 330 RecordingSourceInformationStrategy strategy =
331 new RecordingSourceInformationStrategy( 331 new RecordingSourceInformationStrategy(
332 backend.sourceInformationStrategy); 332 backend.sourceInformationStrategy);
333 backend.sourceInformationStrategy = strategy; 333 backend.sourceInformationStrategy = strategy;
334 await compiler.run(inputUri); 334 await compiler.run(inputUri);
335 335
336 SourceMapInfo mainSourceMapInfo; 336 SourceMapInfo mainSourceMapInfo;
337 Map<Element, SourceMapInfo> elementSourceMapInfos = 337 Map<Element, SourceMapInfo> elementSourceMapInfos =
338 <Element, SourceMapInfo>{}; 338 <Element, SourceMapInfo>{};
339 if (perElement) { 339 if (perElement) {
340 backend.generatedCode.forEach((Element element, js.Expression node) { 340 backend.generatedCode
341 .forEach((MemberElement element, js.Expression node) {
341 RecordedSourceInformationProcess subProcess = 342 RecordedSourceInformationProcess subProcess =
342 strategy.subProcessForNode(node); 343 strategy.subProcessForNode(node);
343 if (subProcess == null) { 344 if (subProcess == null) {
344 // TODO(johnniwinther): Find out when this is happening and if it 345 // TODO(johnniwinther): Find out when this is happening and if it
345 // is benign. (Known to happen for `bool#fromString`) 346 // is benign. (Known to happen for `bool#fromString`)
346 print('No subProcess found for $element'); 347 print('No subProcess found for $element');
347 return; 348 return;
348 } 349 }
349 LocationMap nodeMap = subProcess.nodeToSourceLocationsMap; 350 LocationMap nodeMap = subProcess.nodeToSourceLocationsMap;
350 String code = subProcess.code; 351 String code = subProcess.code;
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
569 absoluteUri = base.resolveUri(uri); 570 absoluteUri = base.resolveUri(uri);
570 } else { 571 } else {
571 absoluteUri = base.resolve(uri); 572 absoluteUri = base.resolve(uri);
572 } 573 }
573 return sourceFiles.putIfAbsent(absoluteUri, () { 574 return sourceFiles.putIfAbsent(absoluteUri, () {
574 String text = new File.fromUri(absoluteUri).readAsStringSync(); 575 String text = new File.fromUri(absoluteUri).readAsStringSync();
575 return new StringSourceFile.fromUri(absoluteUri, text); 576 return new StringSourceFile.fromUri(absoluteUri, text);
576 }); 577 });
577 } 578 }
578 } 579 }
OLDNEW
« no previous file with comments | « tests/compiler/dart2js/mirrors_used_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698