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

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

Issue 2980033004: Throw if there is no compiler context available (Closed)
Patch Set: cl comments, handle validate and deprecated_InputError 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/fasta_codes_generated.dart ('k') | pkg/front_end/messages.yaml » ('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 180abfa159ca9e4fa716b398daa436fde86ee007..7eff138851329b0bc3b76503d9344378a4f06402 100644
--- a/pkg/front_end/lib/src/fasta/testing/kernel_chain.dart
+++ b/pkg/front_end/lib/src/fasta/testing/kernel_chain.dart
@@ -25,6 +25,8 @@ import 'package:kernel/ast.dart' show Library, Program;
import '../kernel/verifier.dart' show verifyProgram;
+import '../compiler_command_line.dart';
+
import 'package:kernel/binary/ast_to_binary.dart' show BinaryPrinter;
import 'package:kernel/binary/ast_from_binary.dart' show BinaryBuilder;
@@ -65,13 +67,15 @@ class Verify extends Step<Program, Program, ChainContext> {
String get name => "verify";
Future<Result<Program>> run(Program program, ChainContext context) async {
- var errors = verifyProgram(program, isOutline: !fullCompile);
- if (errors.isEmpty) {
- return pass(program);
- } else {
- return new Result<Program>(
- null, context.expectationSet["VerificationError"], errors, null);
- }
+ return await CompilerCommandLine.withGlobalOptions("", [""], (_) async {
+ var errors = verifyProgram(program, isOutline: !fullCompile);
+ if (errors.isEmpty) {
+ return pass(program);
+ } else {
+ return new Result<Program>(
+ null, context.expectationSet["VerificationError"], errors, null);
+ }
+ });
}
}
« no previous file with comments | « pkg/front_end/lib/src/fasta/fasta_codes_generated.dart ('k') | pkg/front_end/messages.yaml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698