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

Unified Diff: runtime/lib/print.cc

Issue 10887024: Move print to corelib. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 4 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/lib/print.cc
diff --git a/runtime/vm/native_arguments.cc b/runtime/lib/print.cc
similarity index 50%
copy from runtime/vm/native_arguments.cc
copy to runtime/lib/print.cc
index 52ef57ff2704e5b04bb166215207d7a2e34399a0..5c5b4d15a194e629e9e60f39970bc2b2a6039c57 100644
--- a/runtime/vm/native_arguments.cc
+++ b/runtime/lib/print.cc
@@ -2,15 +2,16 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-#include "vm/native_arguments.h"
-
-#include "platform/assert.h"
-#include "vm/object.h"
+#include "vm/bootstrap_natives.h"
namespace dart {
-void NativeArguments::SetReturn(const Object& value) const {
- *retval_ = value.raw();
+DEFINE_NATIVE_ENTRY(PrintImplementation_printString, 1) {
+ GET_NATIVE_ARGUMENT(String, str, arguments->At(0));
+ const char* cstring = str.ToCString();
+ fputs(cstring, stdout);
+ fputc('\n', stdout);
+ fflush(stdout);
}
} // namespace dart

Powered by Google App Engine
This is Rietveld 408576698