diff options
author | Ian Lance Taylor <ian@gcc.gnu.org> | 2016-10-11 00:08:35 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@gcc.gnu.org> | 2016-10-11 00:08:35 +0000 |
commit | abe08b7d909d27884e9f5f2cb879739e2c909106 (patch) | |
tree | 4bf60096697ceb0808430d2f207d7b3220b44460 /libgo/runtime/go-print.c | |
parent | 5b69c5e55df08ca91989f746ed2b459e0658d6dd (diff) | |
download | gcc-abe08b7d909d27884e9f5f2cb879739e2c909106.zip gcc-abe08b7d909d27884e9f5f2cb879739e2c909106.tar.gz gcc-abe08b7d909d27884e9f5f2cb879739e2c909106.tar.bz2 |
Accidentally failed to commit these earlier, as part of:
Update the compiler to use the new names. Add calls to printlock and
printunlock around print statements. Move expression evaluation before
the call to printlock. Update g's writebuf field to a slice, and adjust
C code accordingly.
Reviewed-on: https://go-review.googlesource.com/30717
From-SVN: r240958
Diffstat (limited to 'libgo/runtime/go-print.c')
-rw-r--r-- | libgo/runtime/go-print.c | 36 |
1 files changed, 0 insertions, 36 deletions
diff --git a/libgo/runtime/go-print.c b/libgo/runtime/go-print.c deleted file mode 100644 index 4c520de..0000000 --- a/libgo/runtime/go-print.c +++ /dev/null @@ -1,36 +0,0 @@ -/* go-print.c -- support for the go print statement. - - Copyright 2009 The Go Authors. All rights reserved. - Use of this source code is governed by a BSD-style - license that can be found in the LICENSE file. */ - -#include <math.h> -#include <stdint.h> -#include <stdio.h> - -#include "runtime.h" -#include "array.h" -#include "go-panic.h" -#include "interface.h" - -/* This implements the various little functions which are called by - the predeclared functions print/println/panic/panicln. */ - -void -__go_print_empty_interface (struct __go_empty_interface e) -{ - runtime_printf ("(%p,%p)", e.__type_descriptor, e.__object); -} - -void -__go_print_interface (struct __go_interface i) -{ - runtime_printf ("(%p,%p)", i.__methods, i.__object); -} - -void -__go_print_slice (struct __go_open_array val) -{ - runtime_printf ("[%d/%d]", val.__count, val.__capacity); - runtime_printpointer (val.__values); -} |