authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2022-01-31 21:12:37-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2022-01-31 21:12:37-07:00
log39983d7ff524a3e1e25dbd6904e28a6dd11120e6
tree07fbae62ddf8d78dffd7210545d0962f358ccf98
parentcf88cf2657d721c68055a284e8c498a18639f74c

stage2: update to new ArrayHashMap API


4 files changed, 9 insertions(+), 5 deletions(-)

src/InternArena.zig+3-2
......@@ -187,8 +187,9 @@ pub fn deinit(ia: *InternArena, gpa: Allocator) void {
187187}
188188
189189pub fn indexToKey(ia: InternArena, index: Index) Key {
190 const data = ia.items.items(.data)[@enumToInt(index)];
191 return switch (ia.items.items(.tag)[@enumToInt(index)]) {
190 const item = ia.items.get(@enumToInt(index));
191 const data = item.data;
192 return switch (item.tag) {
192193 .type_int_signed => .{
193194 .int_type = .{
194195 .signedness = .signed,
src/codegen/spirv/type.zig+2-1
......@@ -157,8 +157,9 @@ pub const Type = extern union {
157157 _ = self;
158158 return @truncate(u32, t.hashShallow());
159159 }
160 pub fn eql(self: @This(), a: Type, b: Type) bool {
160 pub fn eql(self: @This(), a: Type, b: Type, b_index: usize) bool {
161161 _ = self;
162 _ = b_index;
162163 return a.eqlShallow(b);
163164 }
164165 };
src/type.zig+2-1
......@@ -798,8 +798,9 @@ pub const Type = extern union {
798798 _ = self;
799799 return @truncate(u32, t.hash());
800800 }
801 pub fn eql(self: @This(), a: Type, b: Type) bool {
801 pub fn eql(self: @This(), a: Type, b: Type, b_index: usize) bool {
802802 _ = self;
803 _ = b_index;
803804 return a.eql(b);
804805 }
805806 };
src/value.zig+2-1
......@@ -1765,7 +1765,8 @@ pub const Value = extern union {
17651765 const other_context: HashContext = .{ .ty = self.ty };
17661766 return @truncate(u32, other_context.hash(val));
17671767 }
1768 pub fn eql(self: @This(), a: Value, b: Value) bool {
1768 pub fn eql(self: @This(), a: Value, b: Value, b_index: usize) bool {
1769 _ = b_index;
17691770 return a.eql(b, self.ty);
17701771 }
17711772 };