zig/src-self-hosted
Andrew Kelley 445b03384a introduce std.heap.ArenaAllocator and std.heap.DirectAllocator
* DirectAllocator does the underlying syscall for every allocation.
 * ArenaAllocator takes another allocator as an argument and
   allocates bytes up front, falling back to DirectAllocator with
   increasingly large allocation sizes, to avoid calling it too often.
   Then the entire arena can be freed at once.

The self hosted parser is updated to take advantage of ArenaAllocator
for the AST that it returns. This significantly reduces the complexity
of cleanup code.

docgen and build runner are updated to use the combination of
ArenaAllocator and DirectAllocator instead of IncrementingAllocator,
which is now deprecated in favor of FixedBufferAllocator combined
with DirectAllocator.

The C allocator calls aligned_alloc instead of malloc, in order to
respect the alignment parameter.

Added asserts in Allocator to ensure that implementors of the
interface return slices of the correct size.

Fixed a bug in Allocator when you call realloc to grow the allocation.
2018-02-12 02:14:44 -05:00
..
c.zig fix self hosted compiler on windows 2018-01-03 04:55:49 -05:00
ir.zig rename "debug safety" to "runtime safety" 2018-01-25 01:46:12 -05:00
llvm.zig syntax: functions require return type. remove `->` 2018-01-25 04:10:11 -05:00
main.zig introduce std.heap.ArenaAllocator and std.heap.DirectAllocator 2018-02-12 02:14:44 -05:00
module.zig introduce std.heap.ArenaAllocator and std.heap.DirectAllocator 2018-02-12 02:14:44 -05:00
scope.zig self-hosted: build against zig_llvm and embedded LLD 2017-12-26 19:44:08 -05:00
target.zig syntax: functions require return type. remove `->` 2018-01-25 04:10:11 -05:00