mirror of
https://github.com/odin-lang/Odin.git
synced 2026-06-13 13:53:43 +00:00
Make the type hash 63-bit to not crash OMG JIT in WebKit under WASM.
This commit is contained in:
@@ -520,6 +520,8 @@ gb_internal u64 type_hash_canonical_type(Type *type) {
|
||||
type_writer_make_hasher(&w, &w.hash_ctx);
|
||||
write_type_to_canonical_string(&w, type);
|
||||
u64 hash = typeid_hash_context_fini(&w.hash_ctx);
|
||||
hash &= 0x7fffffffffffffffull;
|
||||
hash = hash ? hash : 1;
|
||||
|
||||
type->canonical_hash.store(hash, std::memory_order_relaxed);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user