diff options
author | ian <ian@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-10-20 19:12:44 +0000 |
---|---|---|
committer | ian <ian@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-10-20 19:12:44 +0000 |
commit | 23d77f918907311888efe827ff253429ce2f2353 (patch) | |
tree | f104ef0ebe6cc82d982a30c5de643b4f9c1c063b /libgo/runtime | |
parent | 9ec5e00396736b45996fb22a4c6c86ed86f08229 (diff) | |
download | gcc-23d77f918907311888efe827ff253429ce2f2353.tar.gz |
compiler, runtime: Add type information to single object allocation.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@216490 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgo/runtime')
-rw-r--r-- | libgo/runtime/go-new.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/libgo/runtime/go-new.c b/libgo/runtime/go-new.c index 9d46706eaa4..dad6efb30c0 100644 --- a/libgo/runtime/go-new.c +++ b/libgo/runtime/go-new.c @@ -10,13 +10,17 @@ #include "malloc.h" void * -__go_new (uintptr_t size) +__go_new (const struct __go_type_descriptor *td, uintptr_t size) { - return runtime_mallocgc (size, 0, 0); + return runtime_mallocgc (size, + (uintptr) td | TypeInfo_SingleObject, + 0); } void * -__go_new_nopointers (uintptr_t size) +__go_new_nopointers (const struct __go_type_descriptor *td, uintptr_t size) { - return runtime_mallocgc (size, 0, FlagNoScan); + return runtime_mallocgc (size, + (uintptr) td | TypeInfo_SingleObject, + FlagNoScan); } |