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

Unified Diff: runtime/bin/builtin.dart

Issue 8317006: Added builtin native call to exit the running vm (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Review comments Created 9 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: runtime/bin/builtin.dart
diff --git a/runtime/bin/builtin.dart b/runtime/bin/builtin.dart
index c54c48619e6e1e85bbf3fc9a01e75f49887b8911..11784443d50cc98c615f33cadd4877a14fc438d4 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)) {
+ throw new IllegalArgumentException("int status expected");
+ }
+ _exit(status);
+}
+
+_exit(int status) native "Runtime_Exit";
siva 2011/10/21 22:04:09 The convention for native method names so far seem
rchandia 2011/10/25 14:37:50 Done.
+
class _Logger {
static void _printString(String s) native "Logger_PrintString";
}

Powered by Google App Engine
This is Rietveld 408576698