@@ -1011,10 +1011,11 @@ pub const Inst = struct {
1011
1011
null_type = @intFromEnum (InternPool .Index .null_type ),
1012
1012
undefined_type = @intFromEnum (InternPool .Index .undefined_type ),
1013
1013
enum_literal_type = @intFromEnum (InternPool .Index .enum_literal_type ),
1014
+ ptr_usize_type = @intFromEnum (InternPool .Index .ptr_usize_type ),
1015
+ ptr_const_comptime_int_type = @intFromEnum (InternPool .Index .ptr_const_comptime_int_type ),
1014
1016
manyptr_u8_type = @intFromEnum (InternPool .Index .manyptr_u8_type ),
1015
1017
manyptr_const_u8_type = @intFromEnum (InternPool .Index .manyptr_const_u8_type ),
1016
1018
manyptr_const_u8_sentinel_0_type = @intFromEnum (InternPool .Index .manyptr_const_u8_sentinel_0_type ),
1017
- single_const_pointer_to_comptime_int_type = @intFromEnum (InternPool .Index .single_const_pointer_to_comptime_int_type ),
1018
1019
slice_const_u8_type = @intFromEnum (InternPool .Index .slice_const_u8_type ),
1019
1020
slice_const_u8_sentinel_0_type = @intFromEnum (InternPool .Index .slice_const_u8_sentinel_0_type ),
1020
1021
vector_8_i8_type = @intFromEnum (InternPool .Index .vector_8_i8_type ),
@@ -1070,11 +1071,16 @@ pub const Inst = struct {
1070
1071
generic_poison_type = @intFromEnum (InternPool .Index .generic_poison_type ),
1071
1072
empty_tuple_type = @intFromEnum (InternPool .Index .empty_tuple_type ),
1072
1073
undef = @intFromEnum (InternPool .Index .undef ),
1074
+ undef_bool = @intFromEnum (InternPool .Index .undef_bool ),
1075
+ undef_usize = @intFromEnum (InternPool .Index .undef_usize ),
1076
+ undef_u1 = @intFromEnum (InternPool .Index .undef_u1 ),
1073
1077
zero = @intFromEnum (InternPool .Index .zero ),
1074
1078
zero_usize = @intFromEnum (InternPool .Index .zero_usize ),
1079
+ zero_u1 = @intFromEnum (InternPool .Index .zero_u1 ),
1075
1080
zero_u8 = @intFromEnum (InternPool .Index .zero_u8 ),
1076
1081
one = @intFromEnum (InternPool .Index .one ),
1077
1082
one_usize = @intFromEnum (InternPool .Index .one_usize ),
1083
+ one_u1 = @intFromEnum (InternPool .Index .one_u1 ),
1078
1084
one_u8 = @intFromEnum (InternPool .Index .one_u8 ),
1079
1085
four_u8 = @intFromEnum (InternPool .Index .four_u8 ),
1080
1086
negative_one = @intFromEnum (InternPool .Index .negative_one ),
@@ -1121,7 +1127,7 @@ pub const Inst = struct {
1121
1127
}
1122
1128
1123
1129
pub fn toType (ref : Ref ) Type {
1124
- return Type .fromInterned (ref .toInterned ().? );
1130
+ return .fromInterned (ref .toInterned ().? );
1125
1131
}
1126
1132
};
1127
1133
@@ -1393,7 +1399,7 @@ pub fn getMainBody(air: Air) []const Air.Inst.Index {
1393
1399
1394
1400
pub fn typeOf (air : * const Air , inst : Air.Inst.Ref , ip : * const InternPool ) Type {
1395
1401
if (inst .toInterned ()) | ip_index | {
1396
- return Type .fromInterned (ip .typeOf (ip_index ));
1402
+ return .fromInterned (ip .typeOf (ip_index ));
1397
1403
} else {
1398
1404
return air .typeOfIndex (inst .toIndex ().? , ip );
1399
1405
}
@@ -1483,7 +1489,7 @@ pub fn typeOfIndex(air: *const Air, inst: Air.Inst.Index, ip: *const InternPool)
1483
1489
.is_non_err_ptr ,
1484
1490
.is_named_enum_value ,
1485
1491
.error_set_has_value ,
1486
- = > return Type .bool ,
1492
+ = > return .bool ,
1487
1493
1488
1494
.alloc ,
1489
1495
.ret_ptr ,
@@ -1574,7 +1580,7 @@ pub fn typeOfIndex(air: *const Air, inst: Air.Inst.Index, ip: *const InternPool)
1574
1580
.ret_load ,
1575
1581
.unreach ,
1576
1582
.trap ,
1577
- = > return Type .noreturn ,
1583
+ = > return .noreturn ,
1578
1584
1579
1585
.breakpoint ,
1580
1586
.dbg_stmt ,
@@ -1597,22 +1603,22 @@ pub fn typeOfIndex(air: *const Air, inst: Air.Inst.Index, ip: *const InternPool)
1597
1603
.set_err_return_trace ,
1598
1604
.vector_store_elem ,
1599
1605
.c_va_end ,
1600
- = > return Type .void ,
1606
+ = > return .void ,
1601
1607
1602
1608
.slice_len ,
1603
1609
.ret_addr ,
1604
1610
.frame_addr ,
1605
1611
.save_err_return_trace_index ,
1606
- = > return Type .usize ,
1612
+ = > return .usize ,
1607
1613
1608
- .wasm_memory_grow = > return Type .isize ,
1609
- .wasm_memory_size = > return Type .usize ,
1614
+ .wasm_memory_grow = > return .isize ,
1615
+ .wasm_memory_size = > return .usize ,
1610
1616
1611
- .tag_name , .error_name = > return Type .slice_const_u8_sentinel_0 ,
1617
+ .tag_name , .error_name = > return .slice_const_u8_sentinel_0 ,
1612
1618
1613
1619
.call , .call_always_tail , .call_never_tail , .call_never_inline = > {
1614
1620
const callee_ty = air .typeOf (datas [@intFromEnum (inst )].pl_op .operand , ip );
1615
- return Type .fromInterned (ip .funcTypeReturnType (callee_ty .toIntern ()));
1621
+ return .fromInterned (ip .funcTypeReturnType (callee_ty .toIntern ()));
1616
1622
},
1617
1623
1618
1624
.slice_elem_val , .ptr_elem_val , .array_elem_val = > {
@@ -1630,7 +1636,7 @@ pub fn typeOfIndex(air: *const Air, inst: Air.Inst.Index, ip: *const InternPool)
1630
1636
1631
1637
.reduce , .reduce_optimized = > {
1632
1638
const operand_ty = air .typeOf (datas [@intFromEnum (inst )].reduce .operand , ip );
1633
- return Type .fromInterned (ip .indexToKey (operand_ty .ip_index ).vector_type .child );
1639
+ return .fromInterned (ip .indexToKey (operand_ty .ip_index ).vector_type .child );
1634
1640
},
1635
1641
1636
1642
.mul_add = > return air .typeOf (datas [@intFromEnum (inst )].pl_op .operand , ip ),
@@ -1641,15 +1647,15 @@ pub fn typeOfIndex(air: *const Air, inst: Air.Inst.Index, ip: *const InternPool)
1641
1647
1642
1648
.@"try" , .try_cold = > {
1643
1649
const err_union_ty = air .typeOf (datas [@intFromEnum (inst )].pl_op .operand , ip );
1644
- return Type .fromInterned (ip .indexToKey (err_union_ty .ip_index ).error_union_type .payload_type );
1650
+ return .fromInterned (ip .indexToKey (err_union_ty .ip_index ).error_union_type .payload_type );
1645
1651
},
1646
1652
1647
1653
.tlv_dllimport_ptr = > return .fromInterned (datas [@intFromEnum (inst )].ty_nav .ty ),
1648
1654
1649
1655
.work_item_id ,
1650
1656
.work_group_size ,
1651
1657
.work_group_id ,
1652
- = > return Type .u32 ,
1658
+ = > return .u32 ,
1653
1659
1654
1660
.inferred_alloc = > unreachable ,
1655
1661
.inferred_alloc_comptime = > unreachable ,
@@ -1696,7 +1702,7 @@ pub fn internedToRef(ip_index: InternPool.Index) Inst.Ref {
1696
1702
/// Returns `null` if runtime-known.
1697
1703
pub fn value (air : Air , inst : Inst.Ref , pt : Zcu.PerThread ) ! ? Value {
1698
1704
if (inst .toInterned ()) | ip_index | {
1699
- return Value .fromInterned (ip_index );
1705
+ return .fromInterned (ip_index );
1700
1706
}
1701
1707
const index = inst .toIndex ().? ;
1702
1708
return air .typeOfIndex (index , & pt .zcu .intern_pool ).onePossibleValue (pt );
0 commit comments