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

Side by Side Diff: runtime/bin/process_patch.dart

Issue 13863012: Refactor List.setRange function. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Addressed comments. Created 7 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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 patch class _WindowsCodePageDecoder { 5 patch class _WindowsCodePageDecoder {
6 /* patch */ static String _decodeBytes(List<int> bytes) 6 /* patch */ static String _decodeBytes(List<int> bytes)
7 native "SystemEncodingToString"; 7 native "SystemEncodingToString";
8 } 8 }
9 9
10 10
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 return (negative == 0) ? code : -code; 192 return (negative == 0) ? code : -code;
193 } 193 }
194 194
195 void handleExit() { 195 void handleExit() {
196 _ended = true; 196 _ended = true;
197 _exitCode.complete(exitCode(exitDataBuffer)); 197 _exitCode.complete(exitCode(exitDataBuffer));
198 // Kill stdin, helping hand if the user forgot to do it. 198 // Kill stdin, helping hand if the user forgot to do it.
199 _stdin._sink.destroy(); 199 _stdin._sink.destroy();
200 } 200 }
201 201
202 exitDataBuffer.setRange(exitDataRead, data.length, data); 202 exitDataBuffer.setRange(exitDataRead, exitDataRead + data.length, data);
203 exitDataRead += data.length; 203 exitDataRead += data.length;
204 if (exitDataRead == EXIT_DATA_SIZE) { 204 if (exitDataRead == EXIT_DATA_SIZE) {
205 handleExit(); 205 handleExit();
206 } 206 }
207 }); 207 });
208 208
209 completer.complete(this); 209 completer.complete(this);
210 }); 210 });
211 return completer.future; 211 return completer.future;
212 } 212 }
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
324 324
325 class _ProcessResult implements ProcessResult { 325 class _ProcessResult implements ProcessResult {
326 const _ProcessResult(int this.exitCode, 326 const _ProcessResult(int this.exitCode,
327 String this.stdout, 327 String this.stdout,
328 String this.stderr); 328 String this.stderr);
329 329
330 final int exitCode; 330 final int exitCode;
331 final String stdout; 331 final String stdout;
332 final String stderr; 332 final String stderr;
333 } 333 }
OLDNEW
« no previous file with comments | « editor/util/plugins/com.google.dart.java2dart/resources/java_core.dart ('k') | runtime/lib/array.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698