mirror of
https://github.com/justinethier/cyclone.git
synced 2025-05-18 21:29:18 +02:00
Issue #304 - gc_copy_obj must to populate bignums
Even without bignums in the nursery we still need this code in place since gc_alloc calls it, and otherwise all of the callers would need to ensure bignums are properly initialized. There may be an opportunity here for optimization, but let's make sure everything works first!
This commit is contained in:
parent
b2b10ca729
commit
102244be21
1 changed files with 4 additions and 5 deletions
9
gc.c
9
gc.c
|
@ -864,11 +864,10 @@ char *gc_copy_obj(object dest, char *obj, gc_thread_data * thd)
|
|||
bignum_type *hp = dest;
|
||||
mark(hp) = thd->gc_alloc_color;
|
||||
type_of(hp) = bignum_tag;
|
||||
// Bignums are always heap-allocated so there is nothing to copy
|
||||
//((bignum_type *)hp)->bn.used = ((bignum_type *)obj)->bn.used;
|
||||
//((bignum_type *)hp)->bn.alloc = ((bignum_type *)obj)->bn.alloc;
|
||||
//((bignum_type *)hp)->bn.sign = ((bignum_type *)obj)->bn.sign;
|
||||
//((bignum_type *)hp)->bn.dp = ((bignum_type *)obj)->bn.dp;
|
||||
((bignum_type *)hp)->bn.used = ((bignum_type *)obj)->bn.used;
|
||||
((bignum_type *)hp)->bn.alloc = ((bignum_type *)obj)->bn.alloc;
|
||||
((bignum_type *)hp)->bn.sign = ((bignum_type *)obj)->bn.sign;
|
||||
((bignum_type *)hp)->bn.dp = ((bignum_type *)obj)->bn.dp;
|
||||
return (char *)hp;
|
||||
}
|
||||
case cvar_tag:{
|
||||
|
|
Loading…
Add table
Reference in a new issue