Chromium Code Reviews| Index: runtime/bin/builtin.dart |
| diff --git a/runtime/bin/builtin.dart b/runtime/bin/builtin.dart |
| index adc1c636d1b0c6cd01d6aea2276b20154954af51..670bcfcbf9f9110c26c392c690536a0a01bc7c36 100644 |
| --- a/runtime/bin/builtin.dart |
| +++ b/runtime/bin/builtin.dart |
| @@ -15,6 +15,33 @@ void exit(int status) { |
| _exit(status); |
| } |
| +Socket _stdin ; |
| +OutputStream get stdin() { |
| + if (_stdin == null) { |
| + _stdin = new _Socket._internalInputOnly(); |
| + _stdin._id = 0; |
| + } |
| + return _stdin.inputStream; |
| +} |
| + |
| +Socket _stdout; |
| +OutputStream get stdout() { |
| + if (_stdout == null) { |
| + _stdout = new _Socket._internalOutputOnly(); |
| + _stdout._id = 1; |
| + } |
| + return _stdout.outputStream; |
| +} |
| + |
| +Socket _stderr; |
| +OutputStream get stderr() { |
| + if (_stderr == null) { |
| + _stderr = new _Socket._internalOutputOnly(); |
| + _stderr._id = 1; |
|
Mads Ager (google)
2011/11/10 18:08:51
1 -> 2
|
| + } |
| + return _stderr.outputStream; |
| +} |
| + |
| _exit(int status) native "Exit"; |
| class _Logger { |