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

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

Issue 10001008: Many type fixes. (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) 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 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 void writeString(Uri uri, String text) { 136 void writeString(Uri uri, String text) {
137 if (uri.scheme != 'file') { 137 if (uri.scheme != 'file') {
138 throw new AbortLeg('unhandled scheme ${uri.scheme}'); 138 throw new AbortLeg('unhandled scheme ${uri.scheme}');
139 } 139 }
140 var file = new File(uri.path).openSync(FileMode.WRITE); 140 var file = new File(uri.path).openSync(FileMode.WRITE);
141 file.writeStringSync(text); 141 file.writeStringSync(text);
142 file.closeSync(); 142 file.closeSync();
143 } 143 }
144 144
145 String readAll(String filename) { 145 String readAll(String filename) {
146 var file = (new File(filename)).openSync(); 146 var file = (new File(filename)).openSync(FileMode.READ);
147 var length = file.lengthSync(); 147 var length = file.lengthSync();
148 var buffer = new List<int>(length); 148 var buffer = new List<int>(length);
149 var bytes = file.readListSync(buffer, 0, length); 149 var bytes = file.readListSync(buffer, 0, length);
150 file.closeSync(); 150 file.closeSync();
151 return new String.fromCharCodes(new Utf8Decoder(buffer).decodeRest()); 151 return new String.fromCharCodes(new Utf8Decoder(buffer).decodeRest());
152 } 152 }
153 153
154 String getCurrentDirectory() { 154 String getCurrentDirectory() {
155 String dir = new File(".").fullPathSync(); 155 String dir = new File(".").fullPathSync();
156 if (dir.endsWith("/")) return dir; 156 if (dir.endsWith("/")) return dir;
157 return "$dir/"; 157 return "$dir/";
158 } 158 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698