diff options
author | Leo Tenenbaum <pommicket@gmail.com> | 2020-05-05 13:28:04 -0400 |
---|---|---|
committer | Leo Tenenbaum <pommicket@gmail.com> | 2020-05-05 13:28:04 -0400 |
commit | 8557783d1c415384dcdb8482b7e4178979484de5 (patch) | |
tree | 4f1652dec5270cbb0e372434dcda16ea17eaaf34 | |
parent | cfeec003c1b9c96c284f5a8191bae6256c78b463 (diff) |
figured out what the problem was
-rw-r--r-- | allocator.c | 2 | ||||
-rw-r--r-- | types.c | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/allocator.c b/allocator.c index a731928..98005ef 100644 --- a/allocator.c +++ b/allocator.c @@ -25,7 +25,7 @@ static void *err_malloc(size_t bytes); static void *err_calloc(size_t n, size_t sz); static void *err_realloc(void *prev, size_t new_size); #ifdef TOC_DEBUG -//#define NO_ALLOCATOR 1 /* useful for debugging; valgrind checks writing past the end of a malloc, but that won't work with an allocator */ +#define NO_ALLOCATOR 1 /* useful for debugging; valgrind checks writing past the end of a malloc, but that won't work with an allocator */ #endif /* number of bytes a page hold, not including the header */ #define PAGE_BYTES (16384 - sizeof(Page)) @@ -2757,12 +2757,12 @@ static Status types_expr(Typer *tr, Expression *e) { /* if anything happens, make sure we let the user know that this happened while generating a fn */ ErrCtx *err_ctx = e->where.file->ctx; - typer_arr_add(tr, err_ctx->instance_stack, e->where); + arr_add(err_ctx->instance_stack, e->where); Block *prev_block = tr->block; tr->block = fn_copy->body.parent; bool success = types_fn(tr, c->instance->fn, &f->type, c->instance); tr->block = prev_block; - arr_remove_lasta(err_ctx->instance_stack, tr->allocr); + arr_remove_last(err_ctx->instance_stack); if (!success) return false; } |