fix arity check for bad procedure structs, fix accounting-trggered GC
svn: r7447
This commit is contained in:
parent
84c15f6dd3
commit
3f781f75d9
|
@ -1544,7 +1544,7 @@ inline static unsigned long custodian_usage(void *custodian)
|
|||
if(!really_doing_accounting) {
|
||||
park[0] = custodian;
|
||||
really_doing_accounting = 1;
|
||||
garbage_collect(0);
|
||||
garbage_collect(1);
|
||||
custodian = park[0];
|
||||
park[0] = NULL;
|
||||
}
|
||||
|
@ -1757,7 +1757,7 @@ inline static void add_account_hook(int type,void *c1,void *c2,unsigned long b)
|
|||
if(!really_doing_accounting) {
|
||||
park[0] = c1; park[1] = c2;
|
||||
really_doing_accounting = 1;
|
||||
garbage_collect(0);
|
||||
garbage_collect(1);
|
||||
c1 = park[0]; c2 = park[1];
|
||||
park[0] = park[1] = NULL;
|
||||
}
|
||||
|
@ -2982,7 +2982,7 @@ static void garbage_collect(int force_full)
|
|||
|
||||
TIME_STEP("reset");
|
||||
|
||||
/* new we do want the allocator freaking if we go over half */
|
||||
/* now we do want the allocator freaking if we go over half */
|
||||
in_unsafe_allocation_mode = 0;
|
||||
|
||||
/* If we have too many idle pages, flush: */
|
||||
|
|
|
@ -2664,8 +2664,12 @@ static Scheme_Object *get_or_check_arity(Scheme_Object *p, long a, Scheme_Object
|
|||
}
|
||||
} else {
|
||||
p = scheme_extract_struct_procedure(p, -1, NULL, &is_method);
|
||||
if (!SCHEME_PROCP(p))
|
||||
return scheme_null;
|
||||
if (!SCHEME_PROCP(p)) {
|
||||
if (a == -1)
|
||||
return scheme_null;
|
||||
else
|
||||
return scheme_false;
|
||||
}
|
||||
if (is_method)
|
||||
drop++;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user