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

Side by Side Diff: lib/compiler/implementation/dart2js.dart

Issue 10471002: Avoid repeated declaration of the same loop variable. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 6 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
« no previous file with comments | « lib/compiler/compiler.dart ('k') | lib/compiler/implementation/ssa/codegen.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 // Copyright (c) 2012, 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('dart2js'); 5 #library('dart2js');
6 6
7 #import('dart:io'); 7 #import('dart:io');
8 #import('dart:uri'); 8 #import('dart:uri');
9 #import('dart:utf'); 9 #import('dart:utf');
10 10
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 } 126 }
127 String source; 127 String source;
128 try { 128 try {
129 source = readAll(uriPathToNative(uri.path)); 129 source = readAll(uriPathToNative(uri.path));
130 } catch (FileIOException ex) { 130 } catch (FileIOException ex) {
131 throw 'Error: Cannot read "${relativize(cwd, uri)}" (${ex.osError}).'; 131 throw 'Error: Cannot read "${relativize(cwd, uri)}" (${ex.osError}).';
132 } 132 }
133 dartBytesRead += source.length; 133 dartBytesRead += source.length;
134 sourceFiles[uri.toString()] = 134 sourceFiles[uri.toString()] =
135 new SourceFile(relativize(cwd, uri), source); 135 new SourceFile(relativize(cwd, uri), source);
136 Completer<String> completer = new Completer<String>(); 136 return new Future.immediate(source);
137 completer.complete(source);
138 return completer.future;
139 } 137 }
140 138
141 void info(var message) { 139 void info(var message) {
142 if (verbose) print('${colors.green("info:")} $message'); 140 if (verbose) print('${colors.green("info:")} $message');
143 } 141 }
144 142
145 bool isAborting = false; 143 bool isAborting = false;
146 144
147 void handler(Uri uri, int begin, int end, String message, bool fatal) { 145 void handler(Uri uri, int begin, int end, String message, bool fatal) {
148 if (isAborting) return; 146 if (isAborting) return;
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
309 } catch (var ignored) { 307 } catch (var ignored) {
310 print('Internal error: error while printing exception'); 308 print('Internal error: error while printing exception');
311 } 309 }
312 try { 310 try {
313 print(trace); 311 print(trace);
314 } finally { 312 } finally {
315 exit(253); // 253 is recognized as a crash by our test scripts. 313 exit(253); // 253 is recognized as a crash by our test scripts.
316 } 314 }
317 } 315 }
318 } 316 }
OLDNEW
« no previous file with comments | « lib/compiler/compiler.dart ('k') | lib/compiler/implementation/ssa/codegen.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698