diff options
| author | gingerBill <bill@gingerbill.org> | 2020-04-13 13:02:30 +0100 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2020-04-13 13:02:30 +0100 |
| commit | f09b6a4c90805a562b2252430f844e85d06f1ee1 (patch) | |
| tree | 39555c6b9503685c71fd969034ddd5614bfdc357 /src/main.cpp | |
| parent | 65a2125dba5652577588afee31d7333f13eb0c31 (diff) | |
Simplify compiler's `Map` and create a `StringMap` specifically for strings
Diffstat (limited to 'src/main.cpp')
| -rw-r--r-- | src/main.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main.cpp b/src/main.cpp index c2c3ed2b5..e467ae95b 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -919,7 +919,7 @@ bool parse_build_flags(Array<String> args) { break; } - HashKey key = hash_string(name); + HashKey key = hash_pointer(string_intern(name)); if (map_get(&build_context.defined_values, key) != nullptr) { gb_printf_err("Defined constant '%.*s' already exists\n", LIT(name)); @@ -1431,6 +1431,7 @@ int main(int arg_count, char const **arg_ptr) { defer (timings_destroy(timings)); init_string_buffer_memory(); + init_string_interner(); init_global_error_collector(); global_big_int_init(); arena_init(&global_ast_arena, heap_allocator()); |