Commit 39983d7ff5

Andrew Kelley <andrew@ziglang.org>
2022-02-01 05:12:37
stage2: update to new ArrayHashMap API
1 parent cf88cf2
Changed files (4)
src/codegen/spirv/type.zig
@@ -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);
         }
     };
src/InternArena.zig
@@ -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,
src/type.zig
@@ -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);
         }
     };
src/value.zig
@@ -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);
         }
     };