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 {
10711071 if (stat.size > std.math.maxInt(u32))
10721072 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);
10751075 defer if (!file.source_loaded) gpa.free(source);
10761076 const amt = try f.readAll(source);
10771077 if (amt != stat.size)
......@@ -2441,7 +2441,7 @@ pub fn astGenFile(mod: *Module, file: *Scope.File, prog_node: *std.Progress.Node
24412441 if (stat.size > std.math.maxInt(u32))
24422442 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);
24452445 defer if (!file.source_loaded) gpa.free(source);
24462446 const amt = try source_file.readAll(source);
24472447 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
24832483 const payload = try sema.arena.create(Value.Payload.Error);
24842484 payload.* = .{
24852485 .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)] },
24872487 };
24882488 return sema.mod.constInst(sema.arena, src, .{
24892489 .ty = Type.initTag(.anyerror),
src/main.zig+3-3
......@@ -3642,7 +3642,7 @@ pub fn cmdAstCheck(
36423642 if (stat.size > max_src_size)
36433643 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);
36463646 const amt = try f.readAll(source);
36473647 if (amt != stat.size)
36483648 return error.UnexpectedEndOfFile;
......@@ -3778,7 +3778,7 @@ pub fn cmdChangelist(
37783778 .root_decl = null,
37793779 };
37803780
3781 const source = try arena.allocSentinel(u8, stat.size, 0);
3781 const source = try arena.allocSentinel(u8, @intCast(usize, stat.size), 0);
37823782 const amt = try f.readAll(source);
37833783 if (amt != stat.size)
37843784 return error.UnexpectedEndOfFile;
......@@ -3818,7 +3818,7 @@ pub fn cmdChangelist(
38183818 if (new_stat.size > max_src_size)
38193819 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);
38223822 const new_amt = try new_f.readAll(new_source);
38233823 if (new_amt != new_stat.size)
38243824 return error.UnexpectedEndOfFile;
src/type.zig+1-1
......@@ -2641,7 +2641,7 @@ pub const Type = extern union {
26412641 };
26422642 const end_val = Value.initPayload(&end_payload.base);
26432643 if (int_val.compare(.gte, end_val)) return null;
2644 return int_val.toUnsignedInt();
2644 return @intCast(usize, int_val.toUnsignedInt());
26452645 }
26462646 };
26472647 switch (ty.tag()) {