Named procedure calls

This commit is contained in:
Ginger Bill
2017-06-11 12:01:40 +01:00
parent af2736daec
commit b2fdb69b4d
12 changed files with 448 additions and 184 deletions
+7 -3
View File
@@ -3,7 +3,7 @@
#include <xmmintrin.h>
#endif
#define GB_NO_DEFER
// #define GB_NO_DEFER
#define GB_IMPLEMENTATION
#include "gb/gb.h"
@@ -18,18 +18,22 @@ gbAllocator heap_allocator(void) {
#include "array.cpp"
#include "integer128.cpp"
#include "murmurhash3.cpp"
#include "map.cpp"
u128 fnv128a(void const *data, isize len) {
u128 o = u128_lo_hi(0x13bull, 0x1000000ull);
u128 h = u128_lo_hi(0x62b821756295c58dull, 0x6c62272e07bb0142ull);
u8 const *bytes = cast(u8 const *)data;
for (isize i = 0; i < len; i++) {
h = u128_mul(u128_xor(h, u128_from_u64(bytes[i])), o);
h.lo ^= bytes[i];
h = h * o;
}
return h;
}
#include "map.cpp"
gb_global String global_module_path = {0};
gb_global bool global_module_path_set = false;