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

Side by Side Diff: pkg/front_end/lib/src/fasta/testing/suite.dart

Issue 2665723002: Implement canonical name scheme in kernel. (Closed)
Patch Set: Address Kevin's comments 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 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.md file. 3 // BSD-style license that can be found in the LICENSE.md file.
4 4
5 library fasta.testing.suite; 5 library fasta.testing.suite;
6 6
7 import 'dart:async' show 7 import 'dart:async' show
8 Future; 8 Future;
9 9
10 import 'dart:convert' show 10 import 'dart:convert' show
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 steps.add(const WriteDill()); 117 steps.add(const WriteDill());
118 steps.add(const Run()); 118 steps.add(const Run());
119 } 119 }
120 } 120 }
121 121
122 Future<Program> createPlatform() { 122 Future<Program> createPlatform() {
123 return platform ??= new Future<Program>(() async { 123 return platform ??= new Future<Program>(() async {
124 DartLoader loader = await createLoader(); 124 DartLoader loader = await createLoader();
125 Target target = getTarget( 125 Target target = getTarget(
126 "vm", new TargetFlags(strongMode: options.strongMode)); 126 "vm", new TargetFlags(strongMode: options.strongMode));
127 Program program = loader.loadProgram( 127 loader.loadProgram(
128 Uri.base.resolve("pkg/fasta/test/platform.dart"), target: target); 128 Uri.base.resolve("pkg/fasta/test/platform.dart"), target: target);
129 var program = loader.program;
129 if (loader.errors.isNotEmpty) { 130 if (loader.errors.isNotEmpty) {
130 throw loader.errors.join("\n"); 131 throw loader.errors.join("\n");
131 } 132 }
132 Library mainLibrary = program.mainMethod.enclosingLibrary; 133 Library mainLibrary = program.mainMethod.enclosingLibrary;
133 program.uriToSource.remove(mainLibrary.fileUri); 134 program.uriToSource.remove(mainLibrary.fileUri);
134 program = new Program( 135 program = new Program(
135 program.libraries.where((Library l) => l != mainLibrary).toList(), 136 program.libraries.where((Library l) => l != mainLibrary).toList(),
136 program.uriToSource); 137 program.uriToSource);
137 target.performModularTransformations(program); 138 target.performModularTransformations(program);
138 target.performGlobalTransformations(program); 139 target.performGlobalTransformations(program);
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 p = await sourceTarget.writeOutline(null); 184 p = await sourceTarget.writeOutline(null);
184 if (fullCompile) { 185 if (fullCompile) {
185 p = await sourceTarget.writeProgram(null, astKind); 186 p = await sourceTarget.writeProgram(null, astKind);
186 } 187 }
187 } on InputError catch (e, s) { 188 } on InputError catch (e, s) {
188 return fail(null, e.error, s); 189 return fail(null, e.error, s);
189 } 190 }
190 return pass(p); 191 return pass(p);
191 } 192 }
192 } 193 }
OLDNEW
« no previous file with comments | « pkg/front_end/lib/src/fasta/testing/kernel_chain.dart ('k') | pkg/front_end/lib/src/incremental_kernel_generator_impl.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698