Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/Ast.zig
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const v = @import("value.zig");
const Value = v.Value;
const FFI = @import("FFI.zig");
const Parser = @import("Parser.zig");
const GarbageCollector = @import("memory.zig").GarbageCollector;
const GC = @import("GC.zig");
// TODO: cleanup Error sets!
const Error = @import("Codegen.zig").Error;

Expand Down Expand Up @@ -484,7 +484,7 @@ pub const Slice = struct {
return ctx.result orelse false;
}

fn binaryValue(self: Self.Slice, node: Node.Index, gc: *GarbageCollector) !?Value {
fn binaryValue(self: Self.Slice, node: Node.Index, gc: *GC) !?Value {
const components = self.nodes.items(.components)[node].Binary;

const left = try self.toValue(components.left, gc);
Expand Down Expand Up @@ -702,7 +702,7 @@ pub const Slice = struct {
}
}

pub fn toValue(self: Self.Slice, node: Node.Index, gc: *GarbageCollector) Error!Value {
pub fn toValue(self: Self.Slice, node: Node.Index, gc: *GC) Error!Value {
const value = &self.nodes.items(.value)[node];

if (value.* == null and try self.isConstant(gc.allocator, node)) {
Expand Down
6 changes: 3 additions & 3 deletions src/Codegen.zig
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const RunFlavor = vm.RunFlavor;
const Value = @import("value.zig").Value;
const Parser = @import("Parser.zig");
const Token = @import("Token.zig");
const GarbageCollector = @import("memory.zig").GarbageCollector;
const GC = @import("GC.zig");
const Reporter = @import("Reporter.zig");
const BuildOptions = @import("build_options");
const JIT = if (!is_wasm) @import("Jit.zig") else void;
Expand Down Expand Up @@ -60,7 +60,7 @@ const Breaks = std.ArrayList(Break);

current: ?*Frame = null,
ast: Ast.Slice = undefined,
gc: *GarbageCollector,
gc: *GC,
flavor: RunFlavor,
/// Jump to patch at end of current expression with a optional unwrapping in the middle of it
opt_jumps: std.ArrayList(std.ArrayList(usize)) = .{},
Expand Down Expand Up @@ -137,7 +137,7 @@ const generators = [_]?NodeGen{
};

pub fn init(
gc: *GarbageCollector,
gc: *GC,
parser: *Parser,
flavor: RunFlavor,
jit: ?*JIT,
Expand Down
6 changes: 3 additions & 3 deletions src/FFI.zig
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ const Ast = std.zig.Ast;

const BuzzAst = @import("Ast.zig");
const o = @import("obj.zig");
const m = @import("memory.zig");
const v = @import("value.zig");
const Parser = @import("Parser.zig");
const ZigType = @import("zigtypes.zig").Type;
const Reporter = @import("Reporter.zig");
const GC = @import("GC.zig");

const Self = @This();

Expand Down Expand Up @@ -188,12 +188,12 @@ pub const State = struct {
structs: std.StringHashMap(*Zdef),
};

gc: *m.GarbageCollector,
gc: *GC,
reporter: Reporter,
state: ?State = null,
type_expr_cache: std.StringHashMap(?*Zdef),

pub fn init(gc: *m.GarbageCollector) Self {
pub fn init(gc: *GC) Self {
return .{
.gc = gc,
.reporter = .{
Expand Down
Loading
Loading