authorgravatar for jacobly@ziglang.orgJacob Young <jacobly@ziglang.org> 2023-06-03 19:39:59-04:00
committergravatar for jacobly@ziglang.orgJacob Young <jacobly@ziglang.org> 2023-06-20 14:02:08-04:00
log3c4b58cea76e51da1b79dee9e6c0a5cd2627a283
treeda8c8131633b44d190fe4d9309e4bdb535178692
parent9eb008717b2786e885f4110503dc461d0bf2e682

Air: optimize around byval struct passing compiler bug


1 files changed, 2 insertions(+), 2 deletions(-)

src/Air.zig+2-2
......@@ -1182,7 +1182,7 @@ pub fn getMainBody(air: Air) []const Air.Inst.Index {
11821182 return air.extra[extra.end..][0..extra.data.body_len];
11831183}
11841184
1185pub fn typeOf(air: Air, inst: Air.Inst.Ref, ip: *const InternPool) Type {
1185pub fn typeOf(air: *const Air, inst: Air.Inst.Ref, ip: *const InternPool) Type {
11861186 const ref_int = @intFromEnum(inst);
11871187 if (ref_int < InternPool.static_keys.len) {
11881188 return InternPool.static_keys[ref_int].typeOf().toType();
......@@ -1190,7 +1190,7 @@ pub fn typeOf(air: Air, inst: Air.Inst.Ref, ip: *const InternPool) Type {
11901190 return air.typeOfIndex(ref_int - ref_start_index, ip);
11911191}
11921192
1193pub fn typeOfIndex(air: Air, inst: Air.Inst.Index, ip: *const InternPool) Type {
1193pub fn typeOfIndex(air: *const Air, inst: Air.Inst.Index, ip: *const InternPool) Type {
11941194 const datas = air.instructions.items(.data);
11951195 switch (air.instructions.items(.tag)[inst]) {
11961196 .add,