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

Side by Side Diff: pkg/front_end/tool/example.dart

Issue 3006963002: Add missing copyright on test cases. (Closed)
Patch Set: Created 3 years, 3 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
« no previous file with comments | « pkg/front_end/testcases/void_methods.dart.strong.expect ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
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 file.
4
1 import 'dart:async'; 5 import 'dart:async';
2 6
3 import 'package:front_end/kernel_generator.dart'; 7 import 'package:front_end/kernel_generator.dart';
4 import 'package:front_end/compiler_options.dart'; 8 import 'package:front_end/compiler_options.dart';
5 import 'package:kernel/binary/ast_to_binary.dart'; 9 import 'package:kernel/binary/ast_to_binary.dart';
6 import 'package:kernel/kernel.dart' show Program; 10 import 'package:kernel/kernel.dart' show Program;
7 11
8 Future dumpToSink(Program program, StreamSink<List<int>> sink) { 12 Future dumpToSink(Program program, StreamSink<List<int>> sink) {
9 new BinaryPrinter(sink).writeProgramFile(program); 13 new BinaryPrinter(sink).writeProgramFile(program);
10 return sink.close(); 14 return sink.close();
11 } 15 }
12 16
13 Future kernelToSink(Uri entry, StreamSink<List<int>> sink) async { 17 Future kernelToSink(Uri entry, StreamSink<List<int>> sink) async {
14 var program = await kernelForProgram( 18 var program = await kernelForProgram(
15 entry, 19 entry,
16 new CompilerOptions() 20 new CompilerOptions()
17 ..sdkRoot = new Uri.file('sdk') 21 ..sdkRoot = new Uri.file('sdk')
18 ..packagesFileUri = new Uri.file('.packages') 22 ..packagesFileUri = new Uri.file('.packages')
19 ..onError = (e) => print(e.message)); 23 ..onError = (e) => print(e.message));
20 24
21 await dumpToSink(program, sink); 25 await dumpToSink(program, sink);
22 } 26 }
23 27
24 main(args) async { 28 main(args) async {
25 kernelToSink( 29 kernelToSink(
26 Uri.base.resolve(args[0]), 30 Uri.base.resolve(args[0]),
27 // TODO(sigmund,hausner): define memory type where to dump binary data. 31 // TODO(sigmund,hausner): define memory type where to dump binary data.
28 new StreamController<List<int>>.broadcast().sink); 32 new StreamController<List<int>>.broadcast().sink);
29 } 33 }
OLDNEW
« no previous file with comments | « pkg/front_end/testcases/void_methods.dart.strong.expect ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698