aboutsummaryrefslogtreecommitdiff
path: root/src/common.cpp
diff options
context:
space:
mode:
authorGinger Bill <bill@gingerbill.org>2017-06-11 12:01:40 +0100
committerGinger Bill <bill@gingerbill.org>2017-06-11 12:01:40 +0100
commitb2fdb69b4dd7f52f42414139a257b3800eb51a90 (patch)
tree5edf1abb568eb59c6c7da9ae25422e4804531a31 /src/common.cpp
parentaf2736daec0e6579a006bd8d4567c977c8e56c45 (diff)
Named procedure calls
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;