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

Unified Diff: pkg/front_end/lib/src/fasta/kernel/kernel_target.dart

Issue 2723113002: Consolidate analyzer dependencies. (Closed)
Patch Set: Remove new dependency on AsyncMarker. Created 3 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/front_end/lib/src/fasta/dill/dill_target.dart ('k') | pkg/front_end/lib/src/fasta/loader.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/front_end/lib/src/fasta/kernel/kernel_target.dart
diff --git a/pkg/front_end/lib/src/fasta/kernel/kernel_target.dart b/pkg/front_end/lib/src/fasta/kernel/kernel_target.dart
index 1a1be1bb3735cb157928833d5065c5e33e1ee3f8..d12f74853106dec82310aabf237f938155237aae 100644
--- a/pkg/front_end/lib/src/fasta/kernel/kernel_target.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/kernel_target.dart
@@ -57,8 +57,6 @@ import '../translate_uri.dart' show TranslateUri;
import '../dill/dill_target.dart' show DillTarget;
-import '../ast_kind.dart' show AstKind;
-
import '../errors.dart'
show InputError, internalError, reportCrash, resetCrashReporting;
@@ -99,9 +97,11 @@ class KernelTarget extends TargetImplementation {
uriToSource = uriToSource ?? CompilerContext.current.uriToSource,
super(dillTarget.ticker, uriTranslator) {
resetCrashReporting();
- loader = new SourceLoader<Library>(this);
+ loader = createLoader();
}
+ SourceLoader<Library> createLoader() => new SourceLoader<Library>(this);
+
void addLineStarts(Uri uri, List<int> lineStarts) {
String fileUri = relativizeUri(uri);
uriToSource[fileUri] = new Source(lineStarts, fileUri);
@@ -205,18 +205,14 @@ class KernelTarget extends TargetImplementation {
: writeLinkedProgram(uri, program, isFullProgram: isFullProgram);
}
- Future<Program> writeProgram(Uri uri, AstKind astKind) async {
+ Future<Program> writeProgram(Uri uri) async {
if (loader.first == null) return null;
if (errors.isNotEmpty) {
return handleInputError(uri, null, isFullProgram: true);
}
try {
- if (astKind == AstKind.Analyzer) {
- loader.buildElementStore();
- } else {
- loader.computeHierarchy(program);
- }
- await loader.buildBodies(astKind);
+ loader.computeHierarchy(program);
+ await loader.buildBodies();
loader.finishStaticInvocations();
finishAllConstructors();
loader.finishNativeMethods();
« no previous file with comments | « pkg/front_end/lib/src/fasta/dill/dill_target.dart ('k') | pkg/front_end/lib/src/fasta/loader.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698