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

Unified Diff: pkg/front_end/lib/src/fasta/testing/kernel_chain.dart

Issue 2979463002: Revert "Tweak public APIs and use them in patch_sdk, dart2js, and kernel-service." (Closed)
Patch Set: Created 3 years, 5 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/target_implementation.dart ('k') | pkg/front_end/lib/src/fasta/vm.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/testing/kernel_chain.dart
diff --git a/pkg/front_end/lib/src/fasta/testing/kernel_chain.dart b/pkg/front_end/lib/src/fasta/testing/kernel_chain.dart
index bdb0ff71bacb40946129d9ee6bad1e44288a72db..04ae0cfa6fa7f3eca9eaa6305050a6e8586666ed 100644
--- a/pkg/front_end/lib/src/fasta/testing/kernel_chain.dart
+++ b/pkg/front_end/lib/src/fasta/testing/kernel_chain.dart
@@ -28,14 +28,10 @@ import 'package:kernel/binary/ast_to_binary.dart' show BinaryPrinter;
import 'package:kernel/binary/ast_from_binary.dart' show BinaryBuilder;
import 'package:testing/testing.dart'
- show ChainContext, Result, StdioProcess, Step, TestDescription;
+ show ChainContext, Result, StdioProcess, Step;
import 'package:kernel/ast.dart' show Program;
-import 'package:front_end/front_end.dart';
-
-import 'patched_sdk_location.dart' show computePatchedSdk;
-
class Print extends Step<Program, Program, ChainContext> {
const Print();
@@ -174,40 +170,6 @@ class Copy extends Step<Program, Program, ChainContext> {
}
}
-/// A `package:testing` step that runs the `package:front_end` compiler to
-/// generate a kernel program for an individual file.
-///
-/// Most options are hard-coded, but if necessary they could be moved to the
-/// [CompileContext] object in the future.
-class Compile extends Step<TestDescription, Program, CompileContext> {
- const Compile();
-
- String get name => "fasta compilation";
-
- Future<Result<Program>> run(
- TestDescription description, CompileContext context) async {
- Result<Program> result;
- reportError(CompilationError error) {
- result ??= fail(null, error.message);
- }
-
- Uri sdk = await computePatchedSdk();
- Program p = await kernelForProgram(
- description.uri,
- new CompilerOptions()
- ..sdkRoot = sdk
- ..packagesFileUri = Uri.base.resolve('.packages')
- ..strongMode = context.strongMode
- ..linkedDependencies = [sdk.resolve('platform.dill')]
- ..onError = reportError);
- return result ??= pass(p);
- }
-}
-
-abstract class CompileContext implements ChainContext {
- bool get strongMode;
-}
-
class BytesCollector implements Sink<List<int>> {
final List<List<int>> lists = <List<int>>[];
« no previous file with comments | « pkg/front_end/lib/src/fasta/target_implementation.dart ('k') | pkg/front_end/lib/src/fasta/vm.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698