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

Side by Side Diff: lib/compiler/implementation/scanner/parser_bench.dart

Issue 10091028: Fix type warnings and a few other warnings, and probably even an error. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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 /** 5 /**
6 * A benchmark for the Dart parser. 6 * A benchmark for the Dart parser.
7 */ 7 */
8 class ParserBench extends BaseParserBench { 8 class ParserBench extends BaseParserBench {
9 int charCount = 0; 9 int charCount = 0;
10 double score = 0.0; 10 double score = 0.0;
11 11
12 Token scanFileNamed(String filename) { 12 Token scanFileNamed(String filename) {
13 Token token; 13 Token token;
14 getBytes(filename, (bytes) { 14 getBytes(filename, (bytes) {
15 Scanner scanner = makeScanner(bytes); 15 AbstractScanner scanner = makeScanner(bytes);
16 try { 16 try {
17 token = scanner.tokenize(); 17 token = scanner.tokenize();
18 printTokens(token); 18 printTokens(token);
19 charCount += scanner.charOffset; 19 charCount += scanner.charOffset;
20 } catch (MalformedInputException e) { 20 } catch (MalformedInputException e) {
21 print("${filename}: ${e}"); 21 print("${filename}: ${e}");
22 } 22 }
23 }); 23 });
24 return token; 24 return token;
25 } 25 }
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 } 105 }
106 106
107 void beginClass(Token token) { 107 void beginClass(Token token) {
108 classCount++; 108 classCount++;
109 } 109 }
110 110
111 void beginFunctionTypeAlias(Token token) { 111 void beginFunctionTypeAlias(Token token) {
112 aliasCount++; 112 aliasCount++;
113 } 113 }
114 } 114 }
OLDNEW
« no previous file with comments | « lib/compiler/implementation/scanner/parser.dart ('k') | lib/compiler/implementation/ssa/tracer.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698