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

Side by Side Diff: pkg/kernel/test/treeshaker_membench.dart

Issue 2561723003: Merge kernel closure conversion into the Dart SDK (Closed)
Patch Set: Remove path constraint 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/test/round_trip.dart ('k') | pkg/kernel/test/type_propagation_dump.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 library kernel.treeshaker_membench; 5 library kernel.treeshaker_membench;
6 6
7 import 'package:kernel/kernel.dart'; 7 import 'package:kernel/kernel.dart';
8 import 'package:kernel/transformations/treeshaker.dart'; 8 import 'package:kernel/transformations/treeshaker.dart';
9 import 'package:kernel/class_hierarchy.dart'; 9 import 'package:kernel/class_hierarchy.dart';
10 import 'package:kernel/core_types.dart'; 10 import 'package:kernel/core_types.dart';
11 import 'package:args/args.dart'; 11 import 'package:args/args.dart';
12 import 'dart:io'; 12 import 'dart:io';
13 13
14 ArgParser argParser = new ArgParser() 14 ArgParser argParser = new ArgParser()
15 ..addOption('count', abbr: 'c', 15 ..addOption('count',
16 help: 'Build N copies of the tree shaker', 16 abbr: 'c', help: 'Build N copies of the tree shaker', defaultsTo: '100');
17 defaultsTo: '100');
18 17
19 String usage = """ 18 String usage = """
20 Usage: treeshaker_membench [options] FILE.dart 19 Usage: treeshaker_membench [options] FILE.dart
21 20
22 Options: 21 Options:
23 ${argParser.usage} 22 ${argParser.usage}
24 """; 23 """;
25 24
26 /// Builds N copies of the tree shaker data structure for the given program. 25 /// Builds N copies of the tree shaker data structure for the given program.
27 /// Pass --print-metrics to the Dart VM to measure the memory use. 26 /// Pass --print-metrics to the Dart VM to measure the memory use.
(...skipping 26 matching lines...) Expand all
54 53
55 print('$copyCount copies built'); 54 print('$copyCount copies built');
56 55
57 if (args.contains('-v')) { 56 if (args.contains('-v')) {
58 // Use of the list for something to avoid premature GC. 57 // Use of the list for something to avoid premature GC.
59 for (var treeShaker in keepAlive) { 58 for (var treeShaker in keepAlive) {
60 treeShaker.getClassRetention(hierarchy.rootClass); 59 treeShaker.getClassRetention(hierarchy.rootClass);
61 } 60 }
62 } 61 }
63 } 62 }
OLDNEW
« no previous file with comments | « pkg/kernel/test/round_trip.dart ('k') | pkg/kernel/test/type_propagation_dump.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698