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 {...@@ -1182,7 +1182,7 @@ pub fn getMainBody(air: Air) []const Air.Inst.Index {
1182 return air.extra[extra.end..][0..extra.data.body_len];1182 return air.extra[extra.end..][0..extra.data.body_len];
1183}1183}
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 {
1186 const ref_int = @intFromEnum(inst);1186 const ref_int = @intFromEnum(inst);
1187 if (ref_int < InternPool.static_keys.len) {1187 if (ref_int < InternPool.static_keys.len) {
1188 return InternPool.static_keys[ref_int].typeOf().toType();1188 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 {...@@ -1190,7 +1190,7 @@ pub fn typeOf(air: Air, inst: Air.Inst.Ref, ip: *const InternPool) Type {
1190 return air.typeOfIndex(ref_int - ref_start_index, ip);1190 return air.typeOfIndex(ref_int - ref_start_index, ip);
1191}1191}
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 {
1194 const datas = air.instructions.items(.data);1194 const datas = air.instructions.items(.data);
1195 switch (air.instructions.items(.tag)[inst]) {1195 switch (air.instructions.items(.tag)[inst]) {
1196 .add,1196 .add,