mirror of
https://github.com/ziglang/zig.git
synced 2026-02-15 13:58:27 +00:00
Air: optimize around byval struct passing compiler bug
This commit is contained in:
parent
9eb008717b
commit
3c4b58cea7
@ -1182,7 +1182,7 @@ pub fn getMainBody(air: Air) []const Air.Inst.Index {
|
||||
return air.extra[extra.end..][0..extra.data.body_len];
|
||||
}
|
||||
|
||||
pub fn typeOf(air: Air, inst: Air.Inst.Ref, ip: *const InternPool) Type {
|
||||
pub fn typeOf(air: *const Air, inst: Air.Inst.Ref, ip: *const InternPool) Type {
|
||||
const ref_int = @intFromEnum(inst);
|
||||
if (ref_int < InternPool.static_keys.len) {
|
||||
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 {
|
||||
return air.typeOfIndex(ref_int - ref_start_index, ip);
|
||||
}
|
||||
|
||||
pub fn typeOfIndex(air: Air, inst: Air.Inst.Index, ip: *const InternPool) Type {
|
||||
pub fn typeOfIndex(air: *const Air, inst: Air.Inst.Index, ip: *const InternPool) Type {
|
||||
const datas = air.instructions.items(.data);
|
||||
switch (air.instructions.items(.tag)[inst]) {
|
||||
.add,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user