OLD | NEW |
---|---|
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, 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("builtin"); | 5 #library("builtin"); |
6 #import("dart:nativewrappers"); | |
Ivan Posva
2011/11/17 19:35:06
As discussed you can add #import("dart:coreimpl");
siva
2011/11/17 20:00:17
Done.
| |
6 | 7 |
7 void print(arg) { | 8 void print(arg) { |
8 _Logger._printString(arg.toString()); | 9 _Logger._printString(arg.toString()); |
9 } | 10 } |
10 | 11 |
11 void exit(int status) { | 12 void exit(int status) { |
12 if (status is !int) { | 13 if (status is !int) { |
13 throw new IllegalArgumentException("int status expected"); | 14 throw new IllegalArgumentException("int status expected"); |
14 } | 15 } |
15 _exit(status); | 16 _exit(status); |
(...skipping 26 matching lines...) Expand all Loading... | |
42 return _stderr.outputStream; | 43 return _stderr.outputStream; |
43 } | 44 } |
44 | 45 |
45 _exit(int status) native "Exit"; | 46 _exit(int status) native "Exit"; |
46 | 47 |
47 _getStdioHandle(Socket socket, int num) native "Socket_GetStdioHandle"; | 48 _getStdioHandle(Socket socket, int num) native "Socket_GetStdioHandle"; |
48 | 49 |
49 class _Logger { | 50 class _Logger { |
50 static void _printString(String s) native "Logger_PrintString"; | 51 static void _printString(String s) native "Logger_PrintString"; |
51 } | 52 } |
OLD | NEW |