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

Unified Diff: dart/lib/compiler/implementation/scanner/node_scanner_bench.dart

Issue 10164004: Remove frogsh. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Rebased Created 8 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « dart/lib/compiler/implementation/scanner/motile_node.dart ('k') | dart/samples/swarm/htmlconverter.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dart/lib/compiler/implementation/scanner/node_scanner_bench.dart
diff --git a/dart/lib/compiler/implementation/scanner/node_scanner_bench.dart b/dart/lib/compiler/implementation/scanner/node_scanner_bench.dart
deleted file mode 100644
index 1630e79081894bad800b6afd3ebafa792293df42..0000000000000000000000000000000000000000
--- a/dart/lib/compiler/implementation/scanner/node_scanner_bench.dart
+++ /dev/null
@@ -1,49 +0,0 @@
-// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-#library('node_scanner_bench');
-#import('../util/characters.dart');
-#import('../../../../frog/lib/node/node.dart');
-#import('scannerlib.dart');
-#import('scanner_implementation.dart');
-#import('scanner_bench.dart');
-#import('../../../utf/utf.dart');
-#source('byte_strings.dart');
-#source('byte_array_scanner.dart');
-
-class NodeScannerBench extends ScannerBench {
- int getBytes(String filename, void callback(bytes)) {
- // This actually returns a buffer, not a String.
- var s = fs.readFileSync(filename, null);
- callback(s);
- return s.length;
- }
-
- Scanner makeScanner(bytes) => new InflexibleByteArrayScanner(bytes);
-
- void checkExistence(String filename) {
- if (!path.existsSync(filename)) {
- throw "no such file: ${filename}";
- }
- }
-}
-
-class InflexibleByteArrayScanner extends ByteArrayScanner {
- InflexibleByteArrayScanner(List<int> bytes) : super(bytes);
-
- int byteAt(int index) => (bytes.length > index) ? bytes[index] : $EOF;
-
- int advance() {
- // This method should be equivalent to the one in super. However,
- // this is a *HOT* method and V8 performs better if it is easy to
- // inline.
- int index = ++byteOffset;
- int next = (bytes.length > index) ? bytes[index] : $EOF;
- return next;
- }
-}
-
-main() {
- new NodeScannerBench().main(argv);
-}
« no previous file with comments | « dart/lib/compiler/implementation/scanner/motile_node.dart ('k') | dart/samples/swarm/htmlconverter.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698