Chromium Code Reviews| Index: runtime/bin/builtin.dart |
| diff --git a/runtime/bin/builtin.dart b/runtime/bin/builtin.dart |
| index c54c48619e6e1e85bbf3fc9a01e75f49887b8911..bf6d77304ed2fe3fafb0280fef62c4d22d8eb242 100644 |
| --- a/runtime/bin/builtin.dart |
| +++ b/runtime/bin/builtin.dart |
| @@ -8,6 +8,15 @@ void print(arg) { |
| _Logger._printString(arg.toString()); |
| } |
| +void exit(int status) { |
| + if (!(status is int)) { |
|
Ivan Posva
2011/10/27 14:07:55
This reads a bit easier:
if (status is !int) {
rchandia
2011/10/28 15:33:43
Done.
|
| + throw new IllegalArgumentException("int status expected"); |
| + } |
| + _exit(status); |
| +} |
| + |
| +_exit(int status) native "Exit"; |
| + |
| class _Logger { |
| static void _printString(String s) native "Logger_PrintString"; |
| } |