authorgravatar for joachim.schmidt557@outlook.comJoachim Schmidt <joachim.schmidt557@outlook.com> 2021-05-25 10:34:02+08:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2021-05-25 15:38:32-04:00
log4c75f834e7195d05ca4f358aa093003e60380be7
tree23c0e8998a21e7f5c0d8e08bc580c3a449e92174
parent8c5d4295e5f6459ba99d219c1922a30ec6da24bf

Re-enable building the self-hosted compiler for 32-bit targets


4 files changed, 7 insertions(+), 7 deletions(-)

src/Module.zig+2-2
...@@ -1071,7 +1071,7 @@ pub const Scope = struct {...@@ -1071,7 +1071,7 @@ pub const Scope = struct {
1071 if (stat.size > std.math.maxInt(u32))1071 if (stat.size > std.math.maxInt(u32))
1072 return error.FileTooBig;1072 return error.FileTooBig;
10731073
1074 const source = try gpa.allocSentinel(u8, stat.size, 0);1074 const source = try gpa.allocSentinel(u8, @intCast(usize, stat.size), 0);
1075 defer if (!file.source_loaded) gpa.free(source);1075 defer if (!file.source_loaded) gpa.free(source);
1076 const amt = try f.readAll(source);1076 const amt = try f.readAll(source);
1077 if (amt != stat.size)1077 if (amt != stat.size)
...@@ -2441,7 +2441,7 @@ pub fn astGenFile(mod: *Module, file: *Scope.File, prog_node: *std.Progress.Node...@@ -2441,7 +2441,7 @@ pub fn astGenFile(mod: *Module, file: *Scope.File, prog_node: *std.Progress.Node
2441 if (stat.size > std.math.maxInt(u32))2441 if (stat.size > std.math.maxInt(u32))
2442 return error.FileTooBig;2442 return error.FileTooBig;
24432443
2444 const source = try gpa.allocSentinel(u8, stat.size, 0);2444 const source = try gpa.allocSentinel(u8, @intCast(usize, stat.size), 0);
2445 defer if (!file.source_loaded) gpa.free(source);2445 defer if (!file.source_loaded) gpa.free(source);
2446 const amt = try source_file.readAll(source);2446 const amt = try source_file.readAll(source);
2447 if (amt != stat.size)2447 if (amt != stat.size)
src/Sema.zig+1-1
...@@ -2483,7 +2483,7 @@ fn zirIntToError(sema: *Sema, block: *Scope.Block, inst: Zir.Inst.Index) InnerEr...@@ -2483,7 +2483,7 @@ fn zirIntToError(sema: *Sema, block: *Scope.Block, inst: Zir.Inst.Index) InnerEr
2483 const payload = try sema.arena.create(Value.Payload.Error);2483 const payload = try sema.arena.create(Value.Payload.Error);
2484 payload.* = .{2484 payload.* = .{
2485 .base = .{ .tag = .@"error" },2485 .base = .{ .tag = .@"error" },
2486 .data = .{ .name = sema.mod.error_name_list.items[int] },2486 .data = .{ .name = sema.mod.error_name_list.items[@intCast(usize, int)] },
2487 };2487 };
2488 return sema.mod.constInst(sema.arena, src, .{2488 return sema.mod.constInst(sema.arena, src, .{
2489 .ty = Type.initTag(.anyerror),2489 .ty = Type.initTag(.anyerror),
src/main.zig+3-3
...@@ -3642,7 +3642,7 @@ pub fn cmdAstCheck(...@@ -3642,7 +3642,7 @@ pub fn cmdAstCheck(
3642 if (stat.size > max_src_size)3642 if (stat.size > max_src_size)
3643 return error.FileTooBig;3643 return error.FileTooBig;
36443644
3645 const source = try arena.allocSentinel(u8, stat.size, 0);3645 const source = try arena.allocSentinel(u8, @intCast(usize, stat.size), 0);
3646 const amt = try f.readAll(source);3646 const amt = try f.readAll(source);
3647 if (amt != stat.size)3647 if (amt != stat.size)
3648 return error.UnexpectedEndOfFile;3648 return error.UnexpectedEndOfFile;
...@@ -3778,7 +3778,7 @@ pub fn cmdChangelist(...@@ -3778,7 +3778,7 @@ pub fn cmdChangelist(
3778 .root_decl = null,3778 .root_decl = null,
3779 };3779 };
37803780
3781 const source = try arena.allocSentinel(u8, stat.size, 0);3781 const source = try arena.allocSentinel(u8, @intCast(usize, stat.size), 0);
3782 const amt = try f.readAll(source);3782 const amt = try f.readAll(source);
3783 if (amt != stat.size)3783 if (amt != stat.size)
3784 return error.UnexpectedEndOfFile;3784 return error.UnexpectedEndOfFile;
...@@ -3818,7 +3818,7 @@ pub fn cmdChangelist(...@@ -3818,7 +3818,7 @@ pub fn cmdChangelist(
3818 if (new_stat.size > max_src_size)3818 if (new_stat.size > max_src_size)
3819 return error.FileTooBig;3819 return error.FileTooBig;
38203820
3821 const new_source = try arena.allocSentinel(u8, new_stat.size, 0);3821 const new_source = try arena.allocSentinel(u8, @intCast(usize, new_stat.size), 0);
3822 const new_amt = try new_f.readAll(new_source);3822 const new_amt = try new_f.readAll(new_source);
3823 if (new_amt != new_stat.size)3823 if (new_amt != new_stat.size)
3824 return error.UnexpectedEndOfFile;3824 return error.UnexpectedEndOfFile;
src/type.zig+1-1
...@@ -2641,7 +2641,7 @@ pub const Type = extern union {...@@ -2641,7 +2641,7 @@ pub const Type = extern union {
2641 };2641 };
2642 const end_val = Value.initPayload(&end_payload.base);2642 const end_val = Value.initPayload(&end_payload.base);
2643 if (int_val.compare(.gte, end_val)) return null;2643 if (int_val.compare(.gte, end_val)) return null;
2644 return int_val.toUnsignedInt();2644 return @intCast(usize, int_val.toUnsignedInt());
2645 }2645 }
2646 };2646 };
2647 switch (ty.tag()) {2647 switch (ty.tag()) {