diff options
author | Ian Lance Taylor <ian@gcc.gnu.org> | 2014-10-20 19:12:44 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@gcc.gnu.org> | 2014-10-20 19:12:44 +0000 |
commit | 0f2aeaa817167043259bbea22180bc8798411cdd (patch) | |
tree | f104ef0ebe6cc82d982a30c5de643b4f9c1c063b /libgo/runtime | |
parent | 7b28fa2c6b956d08b2ef909026f42b5df60ae990 (diff) | |
download | gcc-0f2aeaa817167043259bbea22180bc8798411cdd.zip gcc-0f2aeaa817167043259bbea22180bc8798411cdd.tar.gz gcc-0f2aeaa817167043259bbea22180bc8798411cdd.tar.bz2 |
compiler, runtime: Add type information to single object allocation.
From-SVN: r216490
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 9d46706..dad6efb 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); } |