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

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

Issue 2748093005: Swap two methods. (Closed)
Patch Set: Created 3 years, 9 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 | « no previous file | no next file » | 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 5f2e87e875dba6597fcadb21bcf3e542f646cc64..b503d0fb4b2fa83c34fd8ad36dde1ee774086223 100644
--- a/pkg/front_end/lib/src/fasta/kernel/kernel_target.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/kernel_target.dart
@@ -216,6 +216,30 @@ class KernelTarget extends TargetImplementation {
: writeLinkedProgram(uri, program, isFullProgram: isFullProgram);
}
+ Future<Program> writeOutline(Uri uri) async {
+ if (loader.first == null) return null;
+ try {
+ await loader.buildOutlines();
+ loader.resolveParts();
+ loader.computeLibraryScopes();
+ loader.resolveTypes();
+ loader.buildProgram();
+ loader.checkSemantics();
+ List<SourceClassBuilder> sourceClasses = collectAllSourceClasses();
+ installDefaultSupertypes();
+ installDefaultConstructors(sourceClasses);
+ loader.resolveConstructors();
+ loader.finishTypeVariables(objectClassBuilder);
+ program = link(new List<Library>.from(loader.libraries));
+ if (uri == null) return program;
+ return await writeLinkedProgram(uri, program, isFullProgram: false);
+ } on InputError catch (e) {
+ return handleInputError(uri, e, isFullProgram: false);
+ } catch (e, s) {
+ return reportCrash(e, s, loader?.currentUriForCrashReporting);
+ }
+ }
+
Future<Program> writeProgram(Uri uri,
{bool dumpIr: false, bool verify: false}) async {
if (loader.first == null) return null;
@@ -247,30 +271,6 @@ class KernelTarget extends TargetImplementation {
}
}
- Future<Program> writeOutline(Uri uri) async {
- if (loader.first == null) return null;
- try {
- await loader.buildOutlines();
- loader.resolveParts();
- loader.computeLibraryScopes();
- loader.resolveTypes();
- loader.buildProgram();
- loader.checkSemantics();
- List<SourceClassBuilder> sourceClasses = collectAllSourceClasses();
- installDefaultSupertypes();
- installDefaultConstructors(sourceClasses);
- loader.resolveConstructors();
- loader.finishTypeVariables(objectClassBuilder);
- program = link(new List<Library>.from(loader.libraries));
- if (uri == null) return program;
- return await writeLinkedProgram(uri, program, isFullProgram: false);
- } on InputError catch (e) {
- return handleInputError(uri, e, isFullProgram: false);
- } catch (e, s) {
- return reportCrash(e, s, loader?.currentUriForCrashReporting);
- }
- }
-
Future writeDepsFile(Uri output, Uri depsFile) async {
if (loader.first == null) return null;
StringBuffer sb = new StringBuffer();
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698