From 575fbd5e3592cff70cbfc5153884d919e6bed89f Mon Sep 17 00:00:00 2001 From: Sahnvour Date: Sun, 2 Aug 2020 23:24:03 +0200 Subject: hash_map: rename to ArrayHashMap and add new HashMap implementation --- src-self-hosted/type.zig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src-self-hosted/type.zig') diff --git a/src-self-hosted/type.zig b/src-self-hosted/type.zig index 13024f34de..a9a1acf44b 100644 --- a/src-self-hosted/type.zig +++ b/src-self-hosted/type.zig @@ -238,7 +238,7 @@ pub const Type = extern union { } } - pub fn hash(self: Type) u32 { + pub fn hash(self: Type) u64 { var hasher = std.hash.Wyhash.init(0); const zig_type_tag = self.zigTypeTag(); std.hash.autoHash(&hasher, zig_type_tag); @@ -303,7 +303,7 @@ pub const Type = extern union { // TODO implement more type hashing }, } - return @truncate(u32, hasher.final()); + return hasher.final(); } pub fn copy(self: Type, allocator: *Allocator) error{OutOfMemory}!Type { -- cgit v1.2.3