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

Side by Side Diff: lib/compiler/implementation/tools/mini_parser.dart

Issue 10383023: Fix breakage in the JavaScript compilers. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 7 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/implementation/lib/mock.dart ('k') | runtime/lib/byte_array.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('parser'); 5 #library('parser');
6 6
7 #import('dart:io'); 7 #import('dart:io');
8 8
9 #import('../../../utf/utf.dart'); 9 #import('../../../utf/utf.dart');
10 10
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 } 160 }
161 }; 161 };
162 stringStream.onClosed = closeHandler; 162 stringStream.onClosed = closeHandler;
163 } 163 }
164 164
165 List<int> read(String filename) { 165 List<int> read(String filename) {
166 RandomAccessFile file = new File(filename).openSync(); 166 RandomAccessFile file = new File(filename).openSync();
167 bool threw = true; 167 bool threw = true;
168 try { 168 try {
169 int size = file.lengthSync(); 169 int size = file.lengthSync();
170 List<int> bytes = new ByteArray(size + 1); 170 List<int> bytes = new Uint8List(size + 1);
171 file.readListSync(bytes, 0, size); 171 file.readListSync(bytes, 0, size);
172 bytes[size] = $EOF; 172 bytes[size] = $EOF;
173 threw = false; 173 threw = false;
174 return bytes; 174 return bytes;
175 } finally { 175 } finally {
176 try { 176 try {
177 file.closeSync(); 177 file.closeSync();
178 } catch (var ex) { 178 } catch (var ex) {
179 if (!threw) throw; 179 if (!threw) throw;
180 } 180 }
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
324 String _GREEN_COLOR = '\u001b[32m'; 324 String _GREEN_COLOR = '\u001b[32m';
325 String _RED_COLOR = '\u001b[31m'; 325 String _RED_COLOR = '\u001b[31m';
326 String _MAGENTA_COLOR = '\u001b[35m'; 326 String _MAGENTA_COLOR = '\u001b[35m';
327 String _NO_COLOR = '\u001b[0m'; 327 String _NO_COLOR = '\u001b[0m';
328 328
329 class Mock { 329 class Mock {
330 const Mock(); 330 const Mock();
331 bool get useColors() => true; 331 bool get useColors() => true;
332 internalError(message) { throw message.toString(); } 332 internalError(message) { throw message.toString(); }
333 } 333 }
OLDNEW
« no previous file with comments | « lib/compiler/implementation/lib/mock.dart ('k') | runtime/lib/byte_array.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698