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

Unified Diff: pkg/kernel/bin/dartk.dart

Issue 2531873002: Add --verify-ir flag to dartk and test.py. (Closed)
Patch Set: Minor fixes Created 4 years, 1 month 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/compiler/lib/src/kernel/kernel.dart ('k') | pkg/kernel/bin/transform.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/kernel/bin/dartk.dart
diff --git a/pkg/kernel/bin/dartk.dart b/pkg/kernel/bin/dartk.dart
index 1c056843d62a1c11a9f192dcdf0e5d2dbba09273..e735f9789e5a18560c3dd1c4cca2a6f8b418486a 100755
--- a/pkg/kernel/bin/dartk.dart
+++ b/pkg/kernel/bin/dartk.dart
@@ -10,7 +10,7 @@ import 'batch_util.dart';
import 'package:args/args.dart';
import 'package:kernel/analyzer/loader.dart';
-import 'package:kernel/checks.dart';
+import 'package:kernel/verifier.dart';
import 'package:kernel/kernel.dart';
import 'package:kernel/log.dart';
import 'package:kernel/target/targets.dart';
@@ -58,7 +58,7 @@ ArgParser parser = new ArgParser(allowTrailingOptions: true)
negatable: false, help: 'Print performance metrics.')
..addOption('write-dependencies',
help: 'Write all the .dart that were loaded to the given file.')
- ..addFlag('sanity-check', help: 'Perform slow internal correctness checks.')
+ ..addFlag('verify-ir', help: 'Perform slow internal correctness checks.')
..addFlag('tolerant',
help: 'Generate kernel even if there are compile-time errors.',
defaultsTo: false)
@@ -328,14 +328,14 @@ Future<CompilerOutcome> batchMain(
print('loader.time = $loadTime ms');
}
- void sanityCheck() {
- if (options['sanity-check']) {
- runSanityChecks(program);
+ void runVerifier() {
+ if (options['verify-ir']) {
+ verifyProgram(program);
}
}
if (canContinueCompilation) {
- sanityCheck();
+ runVerifier();
}
String outputDependencies = options['write-dependencies'];
@@ -346,7 +346,7 @@ Future<CompilerOutcome> batchMain(
// Apply target-specific transformations.
if (target != null && options['link'] && canContinueCompilation) {
target.transformProgram(program);
- sanityCheck();
+ runVerifier();
}
if (options['no-output']) {
« no previous file with comments | « pkg/compiler/lib/src/kernel/kernel.dart ('k') | pkg/kernel/bin/transform.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698