aboutsummaryrefslogtreecommitdiff
path: root/src/common.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/common.cpp')
-rw-r--r--src/common.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/common.cpp b/src/common.cpp
index a38af63f4..0c096a40d 100644
--- a/src/common.cpp
+++ b/src/common.cpp
@@ -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;