OLD | NEW |
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 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. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 #library('vm_scanner_bench'); | 5 #library('vm_scanner_bench'); |
| 6 #import('dart:io'); |
6 #import('scannerlib.dart'); | 7 #import('scannerlib.dart'); |
7 #import('scanner_implementation.dart'); | 8 #import('scanner_implementation.dart'); |
8 #import('scanner_bench.dart'); | 9 #import('scanner_bench.dart'); |
9 #import('../../../utils/utf8/utf8.dart'); | 10 #import('../../../utils/utf8/utf8.dart'); |
10 #import('../util/characters.dart'); | 11 #import('../util/characters.dart'); |
11 #source('byte_strings.dart'); | 12 #source('byte_strings.dart'); |
12 #source('byte_array_scanner.dart'); | 13 #source('byte_array_scanner.dart'); |
13 | 14 |
14 class VmScannerBench extends ScannerBench { | 15 class VmScannerBench extends ScannerBench { |
15 int getBytes(String filename, void callback(List<int> bytes)) { | 16 int getBytes(String filename, void callback(List<int> bytes)) { |
(...skipping 13 matching lines...) Expand all Loading... |
29 print("no such file: ${filename}"); | 30 print("no such file: ${filename}"); |
30 } | 31 } |
31 } | 32 } |
32 | 33 |
33 Scanner makeScanner(bytes) => new ByteArrayScanner(bytes); | 34 Scanner makeScanner(bytes) => new ByteArrayScanner(bytes); |
34 } | 35 } |
35 | 36 |
36 main() { | 37 main() { |
37 new VmScannerBench().main(argv); | 38 new VmScannerBench().main(argv); |
38 } | 39 } |
OLD | NEW |