diff options
| author | Michael Dusan <michael.dusan@gmail.com> | 2020-03-05 12:17:47 -0500 |
|---|---|---|
| committer | Michael Dusan <michael.dusan@gmail.com> | 2020-03-05 12:17:47 -0500 |
| commit | 371c21aa70fc61ef703e34079ce6de6c52ec91df (patch) | |
| tree | 5dcabfab50a9c5de730e26eccf3aaea2227591c5 /src/analyze.cpp | |
| parent | 378bf1c3b71fdcc823fb9a5382400ec0a659fc00 (diff) | |
| download | zig-371c21aa70fc61ef703e34079ce6de6c52ec91df.tar.gz zig-371c21aa70fc61ef703e34079ce6de6c52ec91df.zip | |
stage1: housekeeping
- use consistent allocator in `realloc_const_vals_ptrs()`
- unexport `create_fn_raw()`
Diffstat (limited to 'src/analyze.cpp')
| -rw-r--r-- | src/analyze.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/analyze.cpp b/src/analyze.cpp index 336ea55a69..a61c4f2906 100644 --- a/src/analyze.cpp +++ b/src/analyze.cpp @@ -3379,7 +3379,7 @@ static void get_fully_qualified_decl_name(CodeGen *g, Buf *buf, Tld *tld, bool i } } -ZigFn *create_fn_raw(CodeGen *g, FnInline inline_value) { +static ZigFn *create_fn_raw(CodeGen *g, FnInline inline_value) { ZigFn *fn_entry = heap::c_allocator.create<ZigFn>(); fn_entry->ir_executable = heap::c_allocator.create<IrExecutableSrc>(); @@ -6111,7 +6111,7 @@ ZigValue **realloc_const_vals_ptrs(CodeGen *g, ZigValue **ptr, size_t old_count, assert(new_count >= old_count); size_t new_item_count = new_count - old_count; - ZigValue **result = heap::c_allocator.reallocate(ptr, old_count, new_count); + ZigValue **result = g->pass1_arena->reallocate(ptr, old_count, new_count); ZigValue *vals = g->pass1_arena->allocate<ZigValue>(new_item_count); for (size_t i = old_count; i < new_count; i += 1) { result[i] = &vals[i - old_count]; |
