mirror of
https://github.com/ziglang/zig.git
synced 2026-02-12 20:37:54 +00:00
std: remove fifo
bad API
This commit is contained in:
parent
3650cd3e8e
commit
21df001001
@ -434,7 +434,6 @@ set(ZIG_STAGE2_SOURCES
|
||||
lib/std/dwarf/OP.zig
|
||||
lib/std/dwarf/TAG.zig
|
||||
lib/std/elf.zig
|
||||
lib/std/fifo.zig
|
||||
lib/std/fmt.zig
|
||||
lib/std/fmt/parse_float.zig
|
||||
lib/std/fs.zig
|
||||
|
||||
@ -1269,9 +1269,7 @@ pub const Compiler = struct {
|
||||
pub fn writeResourceDataNoPadding(writer: anytype, data_reader: anytype, data_size: u32) !void {
|
||||
var limited_reader = std.io.limitedReader(data_reader, data_size);
|
||||
|
||||
const FifoBuffer = std.fifo.LinearFifo(u8, .{ .Static = 4096 });
|
||||
var fifo = FifoBuffer.init();
|
||||
try fifo.pump(limited_reader.reader(), writer);
|
||||
try limited_reader.reader().readRemaining(writer);
|
||||
}
|
||||
|
||||
pub fn writeResourceData(writer: anytype, data_reader: anytype, data_size: u32) !void {
|
||||
|
||||
@ -58,7 +58,6 @@ pub const debug = @import("debug.zig");
|
||||
pub const dwarf = @import("dwarf.zig");
|
||||
pub const elf = @import("elf.zig");
|
||||
pub const enums = @import("enums.zig");
|
||||
pub const fifo = @import("fifo.zig");
|
||||
pub const fmt = @import("fmt.zig");
|
||||
pub const fs = @import("fs.zig");
|
||||
pub const gpu = @import("gpu.zig");
|
||||
|
||||
@ -44,6 +44,8 @@ const Builtin = @import("Builtin.zig");
|
||||
const LlvmObject = @import("codegen/llvm.zig").Object;
|
||||
const dev = @import("dev.zig");
|
||||
|
||||
const DeprecatedLinearFifo = @import("deprecated.zig").LinearFifo;
|
||||
|
||||
pub const Config = @import("Compilation/Config.zig");
|
||||
|
||||
/// General-purpose allocator. Used for both temporary and long-term storage.
|
||||
@ -121,15 +123,15 @@ work_queues: [
|
||||
}
|
||||
break :len len;
|
||||
}
|
||||
]std.fifo.LinearFifo(Job, .Dynamic),
|
||||
]DeprecatedLinearFifo(Job),
|
||||
|
||||
/// These jobs are to invoke the Clang compiler to create an object file, which
|
||||
/// gets linked with the Compilation.
|
||||
c_object_work_queue: std.fifo.LinearFifo(*CObject, .Dynamic),
|
||||
c_object_work_queue: DeprecatedLinearFifo(*CObject),
|
||||
|
||||
/// These jobs are to invoke the RC compiler to create a compiled resource file (.res), which
|
||||
/// gets linked with the Compilation.
|
||||
win32_resource_work_queue: if (dev.env.supports(.win32_resource)) std.fifo.LinearFifo(*Win32Resource, .Dynamic) else struct {
|
||||
win32_resource_work_queue: if (dev.env.supports(.win32_resource)) DeprecatedLinearFifo(*Win32Resource) else struct {
|
||||
pub fn ensureUnusedCapacity(_: @This(), _: u0) error{}!void {}
|
||||
pub fn readItem(_: @This()) ?noreturn {
|
||||
return null;
|
||||
|
||||
@ -138,7 +138,7 @@ fn finalize(self: *Trie, allocator: Allocator) !void {
|
||||
defer ordered_nodes.deinit();
|
||||
try ordered_nodes.ensureTotalCapacityPrecise(self.nodes.items(.is_terminal).len);
|
||||
|
||||
var fifo = std.fifo.LinearFifo(Node.Index, .Dynamic).init(allocator);
|
||||
var fifo = DeprecatedLinearFifo(Node.Index).init(allocator);
|
||||
defer fifo.deinit();
|
||||
|
||||
try fifo.writeItem(self.root.?);
|
||||
@ -409,6 +409,7 @@ const mem = std.mem;
|
||||
const std = @import("std");
|
||||
const testing = std.testing;
|
||||
const trace = @import("../../../tracy.zig").trace;
|
||||
const DeprecatedLinearFifo = @import("../../../deprecated.zig").LinearFifo;
|
||||
|
||||
const Allocator = mem.Allocator;
|
||||
const MachO = @import("../../MachO.zig");
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user