mirror of
https://github.com/ziglang/zig.git
synced 2026-01-20 14:25:16 +00:00
stage2: update to new ArrayHashMap API
This commit is contained in:
parent
cf88cf2657
commit
39983d7ff5
@ -187,8 +187,9 @@ pub fn deinit(ia: *InternArena, gpa: Allocator) void {
|
||||
}
|
||||
|
||||
pub fn indexToKey(ia: InternArena, index: Index) Key {
|
||||
const data = ia.items.items(.data)[@enumToInt(index)];
|
||||
return switch (ia.items.items(.tag)[@enumToInt(index)]) {
|
||||
const item = ia.items.get(@enumToInt(index));
|
||||
const data = item.data;
|
||||
return switch (item.tag) {
|
||||
.type_int_signed => .{
|
||||
.int_type = .{
|
||||
.signedness = .signed,
|
||||
|
||||
@ -157,8 +157,9 @@ pub const Type = extern union {
|
||||
_ = self;
|
||||
return @truncate(u32, t.hashShallow());
|
||||
}
|
||||
pub fn eql(self: @This(), a: Type, b: Type) bool {
|
||||
pub fn eql(self: @This(), a: Type, b: Type, b_index: usize) bool {
|
||||
_ = self;
|
||||
_ = b_index;
|
||||
return a.eqlShallow(b);
|
||||
}
|
||||
};
|
||||
|
||||
@ -798,8 +798,9 @@ pub const Type = extern union {
|
||||
_ = self;
|
||||
return @truncate(u32, t.hash());
|
||||
}
|
||||
pub fn eql(self: @This(), a: Type, b: Type) bool {
|
||||
pub fn eql(self: @This(), a: Type, b: Type, b_index: usize) bool {
|
||||
_ = self;
|
||||
_ = b_index;
|
||||
return a.eql(b);
|
||||
}
|
||||
};
|
||||
|
||||
@ -1765,7 +1765,8 @@ pub const Value = extern union {
|
||||
const other_context: HashContext = .{ .ty = self.ty };
|
||||
return @truncate(u32, other_context.hash(val));
|
||||
}
|
||||
pub fn eql(self: @This(), a: Value, b: Value) bool {
|
||||
pub fn eql(self: @This(), a: Value, b: Value, b_index: usize) bool {
|
||||
_ = b_index;
|
||||
return a.eql(b, self.ty);
|
||||
}
|
||||
};
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user