updating the sexp_allocated_bytes signature to use the context for

context-local types
This commit is contained in:
Alex Shinn 2009-12-27 13:34:53 +09:00
parent b1b14fb750
commit f645ecbb54

View file

@ -10,7 +10,7 @@
#endif #endif
extern sexp sexp_gc (sexp ctx, size_t *sum_freed); extern sexp sexp_gc (sexp ctx, size_t *sum_freed);
extern sexp_uint_t sexp_allocated_bytes (sexp x); extern sexp_uint_t sexp_allocated_bytes (sexp ctx, sexp x);
static void sexp_print_simple (sexp ctx, sexp x, sexp out, int depth) { static void sexp_print_simple (sexp ctx, sexp x, sexp out, int depth) {
int i; int i;
@ -88,7 +88,7 @@ static sexp sexp_heap_walk (sexp ctx, int depth, int printp) {
stats[sexp_pointer_tag(p)]++; stats[sexp_pointer_tag(p)]++;
if (sexp_pointer_tag(p) > hi_type) if (sexp_pointer_tag(p) > hi_type)
hi_type = sexp_pointer_tag(p); hi_type = sexp_pointer_tag(p);
p = (sexp) (((char*)p) + sexp_heap_align(sexp_allocated_bytes(p))); p = (sexp) (((char*)p) + sexp_heap_align(sexp_allocated_bytes(ctx, p)));
} }
} }