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

Unified Diff: runtime/bin/builtin_natives.cc

Issue 10887024: Move print to corelib. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Get rid of more builtin importing that is no longer needed. 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/bin/builtin_natives.cc
diff --git a/runtime/bin/builtin_natives.cc b/runtime/bin/builtin_natives.cc
index 008f7b91e4fdbaa89b8ba38b56eea4226d453f58..4da5c97420c8fb7291ad77de8b4661c37e892008 100644
--- a/runtime/bin/builtin_natives.cc
+++ b/runtime/bin/builtin_natives.cc
@@ -47,7 +47,6 @@
V(File_OpenStdio, 1) \
V(File_GetStdioHandleType, 1) \
V(File_NewServicePort, 0) \
- V(Logger_PrintString, 1) \
V(Platform_NumberOfProcessors, 0) \
V(Platform_OperatingSystem, 0) \
V(Platform_PathSeparator, 0) \
@@ -100,30 +99,6 @@ Dart_NativeFunction Builtin::NativeLookup(Dart_Handle name,
// Implementation of native functions which are used for some
// test/debug functionality in standalone dart mode.
-void Builtin::PrintString(FILE* out, Dart_Handle str) {
- const uint8_t* characters = NULL;
- intptr_t length;
- Dart_Handle result = Dart_StringToBytes(str, &characters, &length);
- if (Dart_IsError(result)) {
- // TODO(turnidge): Consider propagating some errors here. What if
- // an isolate gets interrupted by the embedder in the middle of
- // Dart_StringToBytes? We need to make sure not to swallow the
- // interrupt.
- fputs(Dart_GetError(result), out);
- } else {
- fwrite(characters, sizeof(*characters), length, out);
- }
- fputc('\n', out);
- fflush(out);
-}
-
-
-void FUNCTION_NAME(Logger_PrintString)(Dart_NativeArguments args) {
- Dart_EnterScope();
- Builtin::PrintString(stdout, Dart_GetNativeArgument(args, 0));
- Dart_ExitScope();
-}
-
void FUNCTION_NAME(Exit)(Dart_NativeArguments args) {
Dart_EnterScope();
int64_t status = 0;

Powered by Google App Engine
This is Rietveld 408576698