math.cpp: Fix theoretical gc bug.
parent
6a1f280e88
commit
91d8326b77
|
@ -219,11 +219,13 @@ void factor_vm::primitive_bignum_log2()
|
||||||
ctx->replace(tag<bignum>(bignum_integer_length(untag<bignum>(ctx->peek()))));
|
ctx->replace(tag<bignum>(bignum_integer_length(untag<bignum>(ctx->peek()))));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* allocates memory */
|
||||||
cell factor_vm::unbox_array_size_slow()
|
cell factor_vm::unbox_array_size_slow()
|
||||||
{
|
{
|
||||||
if(tagged<object>(ctx->peek()).type() == BIGNUM_TYPE)
|
if(tagged<object>(ctx->peek()).type() == BIGNUM_TYPE)
|
||||||
{
|
{
|
||||||
bignum *zero = untag<bignum>(bignum_zero);
|
bignum *zero = untag<bignum>(bignum_zero);
|
||||||
|
GC_BIGNUM(zero);
|
||||||
bignum *max = cell_to_bignum(array_size_max);
|
bignum *max = cell_to_bignum(array_size_max);
|
||||||
bignum *n = untag<bignum>(ctx->peek());
|
bignum *n = untag<bignum>(ctx->peek());
|
||||||
if(bignum_compare(n,zero) != bignum_comparison_less
|
if(bignum_compare(n,zero) != bignum_comparison_less
|
||||||
|
|
Loading…
Reference in New Issue