Update build system to be more POSIX-portable
Update README and split goals into a separate file
Rework alloc_slab into slab_pool
src/table.c: Reduce code duplication
Revamp the build system to generate header guards

Header guards (in the modern sense - guards that forbid you from
including a header more than once) are now generated by an awk script.

There are two directives that may appear in a header.  The first is the
"provide" directive:

    //provide foo.h

This is expanded to #ifdef rubbish that prevents the header from being
included more than once.  This should be the file's name unless it is
one of several mutually exclusive headers (e.g. foo-oldway.h, foo-newway.h).

The second is the "require" directive:

    //require bar.h

This is expanded to #ifndef rubbish that gives a clean error if a header
that must be required before this one has not been included.

This is a much better way to manage headers than to use traditional
header guards and recursive includes, as these typically end up with
some common headers being included dozens or hundreds of times.
Miscellaneous cleanup
A wide variety of changes (the perfect commit)

- Create a new build system where the different build options
  (debug/release/valgrind/ASan-UBSan) put build artifacts into different
  directories.  This solves the problem of trying to detect when the
  build options have changed and rebuild.
- Rename struct field names to have a common prefix that is unique to
  each structure, generally derived from the struct type name.  This is
  obviously a tradeoff, because in some circumstances it's just noise
  (e.g. t->t_pairs[0].tkv_key->tk_obj instead of t->pairs[0].key->obj)
  but I find that overall it improves readability.
- Create a new allocator, the slab allocator.  Technically this isn't
  actually an allocator, but an object pool.  It isn't usable as
  a struct alloc * like the other allocators.
Improve strings and allocators
Switch entirely to 64-bit hashing

There are now just two hash functions: fnv1a and fnv1a_nt.  The only
difference between them is that fnv1a operates on a byte array specified
by a ptr/len pair while fnv1a_nt operates on a nul-terminated byte

Instead of having a 64-bit hash function based on FNV1A_64 and a 32-bit
hash function using XOR-folded FNV1A_64, there is now just a 64-bit hash
function based on XOR-folded FNV1A_128. For now this is only implemented
using GCC unsigned __int128, but could be implemented for a wide variety
of platforms easily.
Extend and clean up object system

struct object is now union object, and there are now
vobject_{copy,deinit,delete} functions available
Add sanitiser build mode (asan/ubsan)
Completely rework object system
Documentation/formatting changes
Add prerequisites to 'tags' target in Makefile
Fix printf-style format warnings
Rename 'system' to 'subsystem' in log (sub)system
1c1d3a88 — Miles Rout 2 years ago
Move container_of macro to a new header
f95f76e6 — Miles Rout 2 years ago
Change README and docs/