authorchloe caruso <git@paperclover.net> 2024-11-19 02:26:01-08:00
committerchloe caruso <git@paperclover.net> 2024-11-19 02:26:01-08:00
log6a36a7d112bef93e6ceba5477a5427e96eed6175
tree67a422777cc3c4b9869d26a3dfe6d3d0e4ad1e93
parentd0dcd18fdc6d392a08e9449f59bc9f2d2049f720
signature Commit is signed but in an unrecognized format.

zig upgrade


8 files changed, 13 insertions(+), 11 deletions(-)

build.zig.zon+2-2
...@@ -2,12 +2,12 @@...@@ -2,12 +2,12 @@
2 .name = "",2 .name = "",
3 .version = "0.0.0",3 .version = "0.0.0",
44
5 .minimum_zig_version = "0.14.0-dev.2034+56996a280",5 .minimum_zig_version = "0.14.0-dev.2254+73f2671c7",
66
7 .dependencies = .{7 .dependencies = .{
8 // Used to determine unicode properties to tokenize identifiers8 // Used to determine unicode properties to tokenize identifiers
9 .zg = .{9 .zg = .{
10 .url = "https://codeberg.org/dude_the_builder/zg/archive/c425c9c8511bf92e14b8b612d1d16e774b186f2e.tar.gz",10 .url = "https://codeberg.org/atman/zg/archive/c425c9c8511bf92e14b8b612d1d16e774b186f2e.tar.gz",
11 .hash = "1220c79009f1e443b015db4de6e5319432538ead2fea10d271f3f35d3ae83c996789",11 .hash = "1220c79009f1e443b015db4de6e5319432538ead2fea10d271f3f35d3ae83c996789",
12 },12 },
13 // Optional: Used for tracing13 // Optional: Used for tracing
src/core/Ast.zig+1-1
...@@ -360,7 +360,7 @@ pub const Node = struct {...@@ -360,7 +360,7 @@ pub const Node = struct {
360 });360 });
361361
362 pub const Data = union {362 pub const Data = union {
363 none: struct { Unused = .zero, Unused = .zero },363 none: struct { a: Unused = .zero, b: Unused = .zero },
364 function: struct {364 function: struct {
365 /// A `Fn`365 /// A `Fn`
366 extra: ExtraIndex,366 extra: ExtraIndex,
src/core/Sema.zig+2-2
...@@ -172,7 +172,7 @@ const Frame = struct {...@@ -172,7 +172,7 @@ const Frame = struct {
172 data: Data,172 data: Data,
173173
174 const Data = union {174 const Data = union {
175 pub const none = .{ .undefined = {} };175 pub const none: Data = .{ .undefined = {} };
176176
177 undefined: void,177 undefined: void,
178 conditional: Conditional,178 conditional: Conditional,
...@@ -961,7 +961,7 @@ fn stepInner(s: *Sema, comptime tag: Hir.Tag) Error!InstructionKind.fromTag(tag)...@@ -961,7 +961,7 @@ fn stepInner(s: *Sema, comptime tag: Hir.Tag) Error!InstructionKind.fromTag(tag)
961 const data: Hir.Func = s.frame.currentPayload(.func);961 const data: Hir.Func = s.frame.currentPayload(.func);
962 const reserve = try s.scratch.reserveMulti(962 const reserve = try s.scratch.reserveMulti(
963 s.arena(),963 s.arena(),
964 .{ .params = Type, .captures = Air.Inst.Ref },964 FunctionReserve.input,
965 .{ data.params.len, data.captures.len },965 .{ data.params.len, data.captures.len },
966 );966 );
967 if (data.captures.len > 0) @panic("TODO: captures");967 if (data.captures.len > 0) @panic("TODO: captures");
src/core/Transform.zig+1-1
...@@ -368,7 +368,7 @@ const BuiltIn = struct {...@@ -368,7 +368,7 @@ const BuiltIn = struct {
368 value: Inst.Ref,368 value: Inst.Ref,
369};369};
370370
371const built_in_ids = std.StaticStringMap(BuiltIn).initComptime(.{371const built_in_ids = std.StaticStringMap(BuiltIn).initComptime([_]struct { []const u8, BuiltIn }{
372 .{ "void", .{ .value = .void, .type = .void } },372 .{ "void", .{ .value = .void, .type = .void } },
373 .{ "true", .{ .value = .bool_true, .type = .bool_type } },373 .{ "true", .{ .value = .bool_true, .type = .bool_type } },
374 .{ "false", .{ .value = .bool_false, .type = .bool_type } },374 .{ "false", .{ .value = .bool_false, .type = .bool_type } },
src/core/mod.zig+1-1
...@@ -25,7 +25,7 @@ pub const unicode_props = @import("unicode_props.zig");...@@ -25,7 +25,7 @@ pub const unicode_props = @import("unicode_props.zig");
25// sort-lines: end25// sort-lines: end
2626
27// The rest of this file is small utility functions, which are not specific to27// The rest of this file is small utility functions, which are not specific to
28// any of the above namespaces. Remember Zig discourages namespaces like `utils`.28// any of the above namespaces. Remember, Zig discourages namespaces like `utils`.
2929
30pub const runtime_safety = switch (@import("builtin").mode) {30pub const runtime_safety = switch (@import("builtin").mode) {
31 .Debug, .ReleaseSafe => true,31 .Debug, .ReleaseSafe => true,
src/core/stack.zig+2
...@@ -104,6 +104,8 @@ pub fn Stack(comptime Base: type) type {...@@ -104,6 +104,8 @@ pub fn Stack(comptime Base: type) type {
104 starts: [fields.len]u32,104 starts: [fields.len]u32,
105 lengths: [fields.len]u32,105 lengths: [fields.len]u32,
106106
107 pub const input = types;
108
107 fn Type(comptime field: FieldEnum) type {109 fn Type(comptime field: FieldEnum) type {
108 return @field(types, @tagName(field));110 return @field(types, @tagName(field));
109 }111 }
src/deps/quickjs/build.zig+3-3
...@@ -146,10 +146,10 @@ pub fn build(b: *Build) !void {...@@ -146,10 +146,10 @@ pub fn build(b: *Build) !void {
146 .optimize = optimize,146 .optimize = optimize,
147 .link_libc = true,147 .link_libc = true,
148 });148 });
149 const module2 = translate_libc.addModule("quickjs-libc");149 const module_libc = translate_libc.addModule("quickjs-libc");
150 if (pthread.pthreads) |pt| translate_libc.addIncludePath(pt.include);150 if (pthread.pthreads) |pt| translate_libc.addIncludePath(pt.include);
151 module2.linkLibrary(libquickjs);151 module_libc.linkLibrary(libquickjs);
152 module2.linkLibrary(libquickjs_libc);152 module_libc.linkLibrary(libquickjs_libc);
153}153}
154154
155fn runQjsc(b: *Build, qjsc: *Build.Step.Compile, in: Build.LazyPath) Build.LazyPath {155fn runQjsc(b: *Build, qjsc: *Build.Step.Compile, in: Build.LazyPath) Build.LazyPath {
src/main.zig+1-1
...@@ -41,7 +41,7 @@ const top_level_commands: []const Command.ListItem = &.{...@@ -41,7 +41,7 @@ const top_level_commands: []const Command.ListItem = &.{
41 .name = "run",41 .name = "run",
42 .description = "Create executable and run with QuickJS",42 .description = "Create executable and run with QuickJS",
43 .cli = .{43 .cli = .{
44 .options = general_compiler_options ++ .{44 .options = general_compiler_options ++ [_]Cli.Option{
45 .{ .name = "--dump-code", .desc = "Dump compiled JavaScript to standard out" },45 .{ .name = "--dump-code", .desc = "Dump compiled JavaScript to standard out" },
46 },46 },
47 .positionals = .single,47 .positionals = .single,