Started adding support for floating-point type, floating-point literals, and logging of floats. Other operations on float probably don't work yet.

This commit is contained in:
Tim Chevalier
2011-03-21 17:12:05 -07:00
committed by Graydon Hoare
parent 35951c92db
commit caa22c9341
9 changed files with 87 additions and 18 deletions

View File

@@ -39,6 +39,13 @@ void upcall_log_int(rust_task *task, int32_t i) {
"rust: %" PRId32 " (0x%" PRIx32 ")", i, i);
}
extern "C" CDECL
void upcall_log_float(rust_task *task, double *f) {
LOG_UPCALL_ENTRY(task);
task->log(rust_log::UPCALL | rust_log::ULOG,
"rust: %12.12f", *f);
}
extern "C" CDECL void
upcall_log_str(rust_task *task, rust_str *str) {
LOG_UPCALL_ENTRY(task);