ref: 9d1884599c62a813514f29c0bf033db1fee7e650
parent: 5155bfd6b3ff944b62196c03f81d601c1c8a6b56
author: Sigrid Solveig Haflínudóttir <sigrid@ftrv.se>
date: Sun Apr 2 19:18:59 EDT 2023
double the stack size right away instead of trying to play smart
--- a/cvalues.c
+++ b/cvalues.c
@@ -1208,12 +1208,12 @@
*pt = T_FIXNUM;
return 1;
}else if(iscprim(a)){
- cp = (cprim_t*)ptr(a);
+ cp = ptr(a);
*pp = cp_data(cp);
*pt = cp_numtype(cp);
return 1;
}else if(iscvalue(a)){
- cv = (cvalue_t*)ptr(a);
+ cv = ptr(a);
*pp = cv_data(cv);
*pt = cv_class(cv)->numtype;
return valid_numtype(*pt);
--- a/flisp.c
+++ b/flisp.c
@@ -591,7 +591,7 @@
static void
grow_stack(void)
{
- size_t newsz = N_STACK + (N_STACK>>1);
+ size_t newsz = N_STACK * 2;
value_t *ns = realloc(Stack, newsz*sizeof(value_t));
if(ns == nil)
lerrorf(MemoryError, "stack overflow");