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

Side by Side Diff: pkg/front_end/lib/incremental_resolved_ast_generator.dart

Issue 2642083003: Add initial support for parts to the incremental kernel generator. (Closed)
Patch Set: Created 3 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
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/src/base/processed_options.dart'; 7 import 'package:front_end/src/base/processed_options.dart';
8 import 'package:front_end/src/incremental_resolved_ast_generator_impl.dart'; 8 import 'package:front_end/src/incremental_resolved_ast_generator_impl.dart';
9 import 'package:analyzer/dart/ast/ast.dart'; 9 import 'package:analyzer/dart/ast/ast.dart';
10 10
(...skipping 14 matching lines...) Expand all
25 /// TODO(paulberry): add information about libraries that were removed. 25 /// TODO(paulberry): add information about libraries that were removed.
26 } 26 }
27 27
28 /// Represents the resolved ASTs for all the compilation units in a single 28 /// Represents the resolved ASTs for all the compilation units in a single
29 /// library. 29 /// library.
30 /// 30 ///
31 /// Not intended to be implemented or extended by clients. 31 /// Not intended to be implemented or extended by clients.
32 class ResolvedLibrary { 32 class ResolvedLibrary {
33 final CompilationUnit definingCompilationUnit; 33 final CompilationUnit definingCompilationUnit;
34 34
35 ResolvedLibrary(this.definingCompilationUnit); 35 final Map<Uri, CompilationUnit> partUnits;
36 36
37 // TODO(paulberry): add support for parts. 37 ResolvedLibrary(this.definingCompilationUnit, this.partUnits);
38 } 38 }
39 39
40 /// Interface for generating an initial resolved representation of a program and 40 /// Interface for generating an initial resolved representation of a program and
41 /// keeping it up to date as incremental changes are made. 41 /// keeping it up to date as incremental changes are made.
42 /// 42 ///
43 /// This class maintains an internal "previous program state"; each 43 /// This class maintains an internal "previous program state"; each
44 /// time [computeDelta] is called, it updates the previous program state and 44 /// time [computeDelta] is called, it updates the previous program state and
45 /// produces a representation of what has changed. When there are few changes, 45 /// produces a representation of what has changed. When there are few changes,
46 /// a call to [computeDelta] should be much faster than compiling the whole 46 /// a call to [computeDelta] should be much faster than compiling the whole
47 /// program from scratch. 47 /// program from scratch.
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 95
96 /// Remove all source files from the set of valid sources. This guarantees 96 /// Remove all source files from the set of valid sources. This guarantees
97 /// that all files will be re-read on the next call to [computeDelta]. 97 /// that all files will be re-read on the next call to [computeDelta].
98 /// 98 ///
99 /// Note that this does not erase the previous program state; the next time 99 /// Note that this does not erase the previous program state; the next time
100 /// [computeDelta] is called, if parts of the program are discovered to be 100 /// [computeDelta] is called, if parts of the program are discovered to be
101 /// unchanged, parts of the previous program state will still be re-used to 101 /// unchanged, parts of the previous program state will still be re-used to
102 /// speed up compilation. 102 /// speed up compilation.
103 void invalidateAll(); 103 void invalidateAll();
104 } 104 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698