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

Side by Side Diff: tests/compiler/dart2js/serialization/helper.dart

Issue 2488353004: Remove Compiler access from ResolutionEnqueuer (Closed)
Patch Set: Updated cf. comments. Created 4 years, 1 month 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) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, 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 dart2js.serialization_helper; 5 library dart2js.serialization_helper;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:io'; 8 import 'dart:io';
9 9
10 import 'package:compiler/src/commandline_options.dart'; 10 import 'package:compiler/src/commandline_options.dart';
11 import 'package:compiler/src/common/names.dart'; 11 import 'package:compiler/src/common/names.dart';
12 import 'package:compiler/src/compiler.dart'; 12 import 'package:compiler/src/compiler.dart';
13 import 'package:compiler/src/elements/elements.dart'; 13 import 'package:compiler/src/elements/elements.dart';
14 import 'package:compiler/src/filenames.dart';
14 15
15 import '../memory_compiler.dart'; 16 import '../memory_compiler.dart';
16 import 'test_data.dart'; 17 import 'test_data.dart';
17 18
18 const String DEFAULT_DATA_FILE_NAME = 'out.data'; 19 const String DEFAULT_DATA_FILE_NAME = 'out.data';
19 20
20 class Arguments { 21 class Arguments {
21 final String filename; 22 final String filename;
22 final int start; 23 final int start;
23 final int end; 24 final int end;
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 } 65 }
65 return new Arguments( 66 return new Arguments(
66 filename: filename, 67 filename: filename,
67 start: start, 68 start: start,
68 end: end, 69 end: end,
69 verbose: verbose, 70 verbose: verbose,
70 loadSerializedData: loadSerializedData, 71 loadSerializedData: loadSerializedData,
71 saveSerializedData: saveSerializedData); 72 saveSerializedData: saveSerializedData);
72 } 73 }
73 74
75 Uri get uri {
76 if (filename != null) {
77 return Uri.base.resolve(nativeToUriPath(filename));
78 }
79 return null;
80 }
81
74 Future forEachTest(SerializedData serializedData, List<Test> tests, 82 Future forEachTest(SerializedData serializedData, List<Test> tests,
75 TestFunction testFunction) async { 83 TestFunction testFunction) async {
76 Uri entryPoint = Uri.parse('memory:main.dart'); 84 Uri entryPoint = Uri.parse('memory:main.dart');
77 int first = start ?? 0; 85 int first = start ?? 0;
78 int last = end ?? tests.length; 86 int last = end ?? tests.length;
79 87
80 for (int index = first; index < last; index++) { 88 for (int index = first; index < last; index++) {
81 Test test = TESTS[index]; 89 Test test = TESTS[index];
82 List<SerializedData> dataList = 90 List<SerializedData> dataList =
83 await preserializeData(serializedData, test); 91 await preserializeData(serializedData, test);
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
296 print('$taskTitle: $title'); 304 print('$taskTitle: $title');
297 print('----------------------------------------------------------------'); 305 print('----------------------------------------------------------------');
298 var result = await task(); 306 var result = await task();
299 stopwatch.stop(); 307 stopwatch.stop();
300 int elapsedMilliseconds = stopwatch.elapsedMilliseconds; 308 int elapsedMilliseconds = stopwatch.elapsedMilliseconds;
301 print('$taskTitle: $title: ${elapsedMilliseconds}ms'); 309 print('$taskTitle: $title: ${elapsedMilliseconds}ms');
302 measurementResults 310 measurementResults
303 .add(new MeasurementResult(title, taskTitle, elapsedMilliseconds)); 311 .add(new MeasurementResult(title, taskTitle, elapsedMilliseconds));
304 return result; 312 return result;
305 } 313 }
OLDNEW
« no previous file with comments | « tests/compiler/dart2js/related_types_test.dart ('k') | tests/compiler/dart2js/serialization/model_test_helper.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698