Chromium Code Reviews| 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" |
|
Ivan Posva
2012/08/30 00:32:13
Again this change file makes no sense to me.
Mads Ager (google)
2012/08/30 06:59:17
Diff tools playing with the change. New file.
|
| 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)); |
|
Ivan Posva
2012/08/30 00:32:13
The core VM is not allowed to write to stdout. Thi
Mads Ager (google)
2012/08/30 06:59:17
That makes sense. I'll move this back to builtins
|
| + const char* cstring = str.ToCString(); |
| + fputs(cstring, stdout); |
| + fputc('\n', stdout); |
|
Ivan Posva
2012/08/30 00:32:13
By having two calls you will be hit with concurren
Mads Ager (google)
2012/08/30 06:59:17
Nothing wrong with that. I was following what was
|
| + fflush(stdout); |
| } |
| } // namespace dart |