| ... | @@ -148,12 +148,12 @@ pub fn main() !void { | ... | @@ -148,12 +148,12 @@ pub fn main() !void { |
| 148 | for (abi_lists) |*abi_list| { | 148 | for (abi_lists) |*abi_list| { |
| 149 | const target_funcs_gop = try target_functions.getOrPut(@ptrToInt(abi_list)); | 149 | const target_funcs_gop = try target_functions.getOrPut(@ptrToInt(abi_list)); |
| 150 | if (!target_funcs_gop.found_existing) { | 150 | if (!target_funcs_gop.found_existing) { |
| 151 | target_funcs_gop.kv.value = FunctionSet{ | 151 | target_funcs_gop.entry.value = FunctionSet{ |
| 152 | .list = std.ArrayList(VersionedFn).init(allocator), | 152 | .list = std.ArrayList(VersionedFn).init(allocator), |
| 153 | .fn_vers_list = FnVersionList.init(allocator), | 153 | .fn_vers_list = FnVersionList.init(allocator), |
| 154 | }; | 154 | }; |
| 155 | } | 155 | } |
| 156 | const fn_set = &target_funcs_gop.kv.value.list; | 156 | const fn_set = &target_funcs_gop.entry.value.list; |
| 157 | | 157 | |
| 158 | for (lib_names) |lib_name, lib_name_index| { | 158 | for (lib_names) |lib_name, lib_name_index| { |
| 159 | const lib_prefix = if (std.mem.eql(u8, lib_name, "ld")) "" else "lib"; | 159 | const lib_prefix = if (std.mem.eql(u8, lib_name, "ld")) "" else "lib"; |
| ... | @@ -203,11 +203,11 @@ pub fn main() !void { | ... | @@ -203,11 +203,11 @@ pub fn main() !void { |
| 203 | _ = try global_ver_set.put(ver, undefined); | 203 | _ = try global_ver_set.put(ver, undefined); |
| 204 | const gop = try global_fn_set.getOrPut(name); | 204 | const gop = try global_fn_set.getOrPut(name); |
| 205 | if (gop.found_existing) { | 205 | if (gop.found_existing) { |
| 206 | if (!std.mem.eql(u8, gop.kv.value.lib, "c")) { | 206 | if (!std.mem.eql(u8, gop.entry.value.lib, "c")) { |
| 207 | gop.kv.value.lib = lib_name; | 207 | gop.entry.value.lib = lib_name; |
| 208 | } | 208 | } |
| 209 | } else { | 209 | } else { |
| 210 | gop.kv.value = Function{ | 210 | gop.entry.value = Function{ |
| 211 | .name = name, | 211 | .name = name, |
| 212 | .lib = lib_name, | 212 | .lib = lib_name, |
| 213 | .index = undefined, | 213 | .index = undefined, |
| ... | @@ -224,14 +224,14 @@ pub fn main() !void { | ... | @@ -224,14 +224,14 @@ pub fn main() !void { |
| 224 | const global_fn_list = blk: { | 224 | const global_fn_list = blk: { |
| 225 | var list = std.ArrayList([]const u8).init(allocator); | 225 | var list = std.ArrayList([]const u8).init(allocator); |
| 226 | var it = global_fn_set.iterator(); | 226 | var it = global_fn_set.iterator(); |
| 227 | while (it.next()) |kv| try list.append(kv.key); | 227 | while (it.next()) |entry| try list.append(entry.key); |
| 228 | std.sort.sort([]const u8, list.span(), {}, strCmpLessThan); | 228 | std.sort.sort([]const u8, list.span(), {}, strCmpLessThan); |
| 229 | break :blk list.span(); | 229 | break :blk list.span(); |
| 230 | }; | 230 | }; |
| 231 | const global_ver_list = blk: { | 231 | const global_ver_list = blk: { |
| 232 | var list = std.ArrayList([]const u8).init(allocator); | 232 | var list = std.ArrayList([]const u8).init(allocator); |
| 233 | var it = global_ver_set.iterator(); | 233 | var it = global_ver_set.iterator(); |
| 234 | while (it.next()) |kv| try list.append(kv.key); | 234 | while (it.next()) |entry| try list.append(entry.key); |
| 235 | std.sort.sort([]const u8, list.span(), {}, versionLessThan); | 235 | std.sort.sort([]const u8, list.span(), {}, versionLessThan); |
| 236 | break :blk list.span(); | 236 | break :blk list.span(); |
| 237 | }; | 237 | }; |
| ... | @@ -254,9 +254,9 @@ pub fn main() !void { | ... | @@ -254,9 +254,9 @@ pub fn main() !void { |
| 254 | var buffered = std.io.bufferedOutStream(fns_txt_file.outStream()); | 254 | var buffered = std.io.bufferedOutStream(fns_txt_file.outStream()); |
| 255 | const fns_txt = buffered.outStream(); | 255 | const fns_txt = buffered.outStream(); |
| 256 | for (global_fn_list) |name, i| { | 256 | for (global_fn_list) |name, i| { |
| 257 | const kv = global_fn_set.get(name).?; | 257 | const entry = global_fn_set.getEntry(name).?; |
| 258 | kv.value.index = i; | 258 | entry.value.index = i; |
| 259 | try fns_txt.print("{} {}\n", .{ name, kv.value.lib }); | 259 | try fns_txt.print("{} {}\n", .{ name, entry.value.lib }); |
| 260 | } | 260 | } |
| 261 | try buffered.flush(); | 261 | try buffered.flush(); |
| 262 | } | 262 | } |
| ... | @@ -264,16 +264,16 @@ pub fn main() !void { | ... | @@ -264,16 +264,16 @@ pub fn main() !void { |
| 264 | // Now the mapping of version and function to integer index is complete. | 264 | // Now the mapping of version and function to integer index is complete. |
| 265 | // Here we create a mapping of function name to list of versions. | 265 | // Here we create a mapping of function name to list of versions. |
| 266 | for (abi_lists) |*abi_list, abi_index| { | 266 | for (abi_lists) |*abi_list, abi_index| { |
| 267 | const kv = target_functions.get(@ptrToInt(abi_list)).?; | 267 | const entry = target_functions.getEntry(@ptrToInt(abi_list)).?; |
| 268 | const fn_vers_list = &kv.value.fn_vers_list; | 268 | const fn_vers_list = &entry.value.fn_vers_list; |
| 269 | for (kv.value.list.span()) |*ver_fn| { | 269 | for (entry.value.list.span()) |*ver_fn| { |
| 270 | const gop = try fn_vers_list.getOrPut(ver_fn.name); | 270 | const gop = try fn_vers_list.getOrPut(ver_fn.name); |
| 271 | if (!gop.found_existing) { | 271 | if (!gop.found_existing) { |
| 272 | gop.kv.value = std.ArrayList(usize).init(allocator); | 272 | gop.entry.value = std.ArrayList(usize).init(allocator); |
| 273 | } | 273 | } |
| 274 | const ver_index = global_ver_set.get(ver_fn.ver).?.value; | 274 | const ver_index = global_ver_set.getEntry(ver_fn.ver).?.value; |
| 275 | if (std.mem.indexOfScalar(usize, gop.kv.value.span(), ver_index) == null) { | 275 | if (std.mem.indexOfScalar(usize, gop.entry.value.span(), ver_index) == null) { |
| 276 | try gop.kv.value.append(ver_index); | 276 | try gop.entry.value.append(ver_index); |
| 277 | } | 277 | } |
| 278 | } | 278 | } |
| 279 | } | 279 | } |
| ... | @@ -287,7 +287,7 @@ pub fn main() !void { | ... | @@ -287,7 +287,7 @@ pub fn main() !void { |
| 287 | | 287 | |
| 288 | // first iterate over the abi lists | 288 | // first iterate over the abi lists |
| 289 | for (abi_lists) |*abi_list, abi_index| { | 289 | for (abi_lists) |*abi_list, abi_index| { |
| 290 | const fn_vers_list = &target_functions.get(@ptrToInt(abi_list)).?.value.fn_vers_list; | 290 | const fn_vers_list = &target_functions.getEntry(@ptrToInt(abi_list)).?.value.fn_vers_list; |
| 291 | for (abi_list.targets) |target, it_i| { | 291 | for (abi_list.targets) |target, it_i| { |
| 292 | if (it_i != 0) try abilist_txt.writeByte(' '); | 292 | if (it_i != 0) try abilist_txt.writeByte(' '); |
| 293 | try abilist_txt.print("{}-linux-{}", .{ @tagName(target.arch), @tagName(target.abi) }); | 293 | try abilist_txt.print("{}-linux-{}", .{ @tagName(target.arch), @tagName(target.abi) }); |
| ... | @@ -295,11 +295,11 @@ pub fn main() !void { | ... | @@ -295,11 +295,11 @@ pub fn main() !void { |
| 295 | try abilist_txt.writeByte('\n'); | 295 | try abilist_txt.writeByte('\n'); |
| 296 | // next, each line implicitly corresponds to a function | 296 | // next, each line implicitly corresponds to a function |
| 297 | for (global_fn_list) |name| { | 297 | for (global_fn_list) |name| { |
| 298 | const kv = fn_vers_list.get(name) orelse { | 298 | const entry = fn_vers_list.getEntry(name) orelse { |
| 299 | try abilist_txt.writeByte('\n'); | 299 | try abilist_txt.writeByte('\n'); |
| 300 | continue; | 300 | continue; |
| 301 | }; | 301 | }; |
| 302 | for (kv.value.span()) |ver_index, it_i| { | 302 | for (entry.value.span()) |ver_index, it_i| { |
| 303 | if (it_i != 0) try abilist_txt.writeByte(' '); | 303 | if (it_i != 0) try abilist_txt.writeByte(' '); |
| 304 | try abilist_txt.print("{d}", .{ver_index}); | 304 | try abilist_txt.print("{d}", .{ver_index}); |
| 305 | } | 305 | } |