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

Side by Side Diff: pkg/front_end/lib/src/incremental_kernel_generator_impl.dart

Issue 2992173002: Get logger / fileSystem / byteStore from ProcessedOptions. (Closed)
Patch Set: Created 3 years, 4 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) 2017, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2017, 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 import 'dart:async'; 5 import 'dart:async';
6 6
7 import 'package:front_end/incremental_kernel_generator.dart'; 7 import 'package:front_end/incremental_kernel_generator.dart';
8 import 'package:front_end/src/base/performace_logger.dart'; 8 import 'package:front_end/src/base/performace_logger.dart';
9 import 'package:front_end/src/base/processed_options.dart'; 9 import 'package:front_end/src/base/processed_options.dart';
10 import 'package:front_end/src/fasta/uri_translator.dart'; 10 import 'package:front_end/src/fasta/uri_translator.dart';
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 _watchFn = watch { 49 _watchFn = watch {
50 _testView = new _TestView(this); 50 _testView = new _TestView(this);
51 51
52 Future<Null> onFileAdded(Uri uri) { 52 Future<Null> onFileAdded(Uri uri) {
53 if (_watchFn != null) { 53 if (_watchFn != null) {
54 return _watchFn(uri, true); 54 return _watchFn(uri, true);
55 } 55 }
56 return new Future.value(); 56 return new Future.value();
57 } 57 }
58 58
59 _driver = new KernelDriver( 59 _driver =
60 _logger, options.fileSystem, options.byteStore, uriTranslator, options, 60 new KernelDriver(options, uriTranslator, fileAddedFn: onFileAdded);
61 fileAddedFn: onFileAdded);
62 } 61 }
63 62
64 /// Return the object that provides additional information for tests. 63 /// Return the object that provides additional information for tests.
65 @visibleForTesting 64 @visibleForTesting
66 _TestView get test => _testView; 65 _TestView get test => _testView;
67 66
68 @override 67 @override
69 Future<DeltaProgram> computeDelta() async { 68 Future<DeltaProgram> computeDelta() async {
70 return await _logger.runAsync('Compute delta', () async { 69 return await _logger.runAsync('Compute delta', () async {
71 KernelResult kernelResult = await _driver.getKernel(_entryPoint); 70 KernelResult kernelResult = await _driver.getKernel(_entryPoint);
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 143
145 @visibleForTesting 144 @visibleForTesting
146 class _TestView { 145 class _TestView {
147 final IncrementalKernelGeneratorImpl _generator; 146 final IncrementalKernelGeneratorImpl _generator;
148 147
149 _TestView(this._generator); 148 _TestView(this._generator);
150 149
151 /// The [KernelDriver] that is used to actually compile. 150 /// The [KernelDriver] that is used to actually compile.
152 KernelDriver get driver => _generator._driver; 151 KernelDriver get driver => _generator._driver;
153 } 152 }
OLDNEW
« no previous file with comments | « pkg/front_end/lib/src/incremental/kernel_driver.dart ('k') | pkg/front_end/test/src/incremental/kernel_driver_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698