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

Side by Side Diff: pkg/kernel/bin/transform.dart

Issue 2531873002: Add --verify-ir flag to dartk and test.py. (Closed)
Patch Set: Minor fixes Created 4 years 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
« no previous file with comments | « pkg/kernel/bin/dartk.dart ('k') | pkg/kernel/lib/ast.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env dart 1 #!/usr/bin/env dart
2 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file 2 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
3 // for details. All rights reserved. Use of this source code is governed by a 3 // for details. All rights reserved. Use of this source code is governed by a
4 // BSD-style license that can be found in the LICENSE file. 4 // BSD-style license that can be found in the LICENSE file.
5 5
6 import 'dart:async'; 6 import 'dart:async';
7 import 'dart:io'; 7 import 'dart:io';
8 8
9 import 'package:args/args.dart'; 9 import 'package:args/args.dart';
10 import 'package:kernel/checks.dart'; 10 import 'package:kernel/verifier.dart';
11 import 'package:kernel/kernel.dart'; 11 import 'package:kernel/kernel.dart';
12 import 'package:kernel/transformations/continuation.dart' as cont; 12 import 'package:kernel/transformations/continuation.dart' as cont;
13 import 'package:kernel/transformations/infer_values.dart' as infer_values; 13 import 'package:kernel/transformations/infer_values.dart' as infer_values;
14 import 'package:kernel/transformations/mixin_full_resolution.dart' as mix; 14 import 'package:kernel/transformations/mixin_full_resolution.dart' as mix;
15 import 'package:kernel/transformations/treeshaker.dart' as treeshaker; 15 import 'package:kernel/transformations/treeshaker.dart' as treeshaker;
16 16
17 import 'batch_util.dart'; 17 import 'batch_util.dart';
18 18
19 ArgParser parser = new ArgParser() 19 ArgParser parser = new ArgParser()
20 ..addOption('format', 20 ..addOption('format',
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 case 'resolve-mixins': 72 case 'resolve-mixins':
73 program = mix.transformProgram(program); 73 program = mix.transformProgram(program);
74 break; 74 break;
75 case 'treeshake': 75 case 'treeshake':
76 program = treeshaker.transformProgram(program); 76 program = treeshaker.transformProgram(program);
77 break; 77 break;
78 default: 78 default:
79 throw 'Unknown transformation'; 79 throw 'Unknown transformation';
80 } 80 }
81 81
82 runSanityChecks(program); 82 verifyProgram(program);
83 83
84 if (format == 'text') { 84 if (format == 'text') {
85 writeProgramToText(program, path: output); 85 writeProgramToText(program, path: output);
86 } else { 86 } else {
87 assert(format == 'bin'); 87 assert(format == 'bin');
88 await writeProgramToBinary(program, output); 88 await writeProgramToBinary(program, output);
89 } 89 }
90 90
91 if (verbose) { 91 if (verbose) {
92 writeLibraryToText(program.mainMethod.parent as Library); 92 writeLibraryToText(program.mainMethod.parent as Library);
93 } 93 }
94 94
95 return CompilerOutcome.Ok; 95 return CompilerOutcome.Ok;
96 } 96 }
OLDNEW
« no previous file with comments | « pkg/kernel/bin/dartk.dart ('k') | pkg/kernel/lib/ast.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698