@@ -3934,7 +3934,7 @@ fn fnDecl(
3934
3934
var section_gz = decl_gz.makeSubBlock(params_scope);
3935
3935
defer section_gz.unstack();
3936
3936
const section_ref: Zir.Inst.Ref = if (fn_proto.ast.section_expr == 0) .none else inst: {
3937
- const inst = try expr(&decl_gz, params_scope, .{ .rl = .{ .coerced_ty = .const_slice_u8_type } }, fn_proto.ast.section_expr);
3937
+ const inst = try expr(&decl_gz, params_scope, .{ .rl = .{ .coerced_ty = .slice_const_u8_type } }, fn_proto.ast.section_expr);
3938
3938
if (section_gz.instructionsSlice().len == 0) {
3939
3939
// In this case we will send a len=0 body which can be encoded more efficiently.
3940
3940
break :inst inst;
@@ -4137,7 +4137,7 @@ fn globalVarDecl(
4137
4137
break :inst try expr(&block_scope, &block_scope.base, .{ .rl = .{ .ty = .address_space_type } }, var_decl.ast.addrspace_node);
4138
4138
};
4139
4139
const section_inst: Zir.Inst.Ref = if (var_decl.ast.section_node == 0) .none else inst: {
4140
- break :inst try comptimeExpr(&block_scope, &block_scope.base, .{ .rl = .{ .ty = .const_slice_u8_type } }, var_decl.ast.section_node);
4140
+ break :inst try comptimeExpr(&block_scope, &block_scope.base, .{ .rl = .{ .ty = .slice_const_u8_type } }, var_decl.ast.section_node);
4141
4141
};
4142
4142
const has_section_or_addrspace = section_inst != .none or addrspace_inst != .none;
4143
4143
wip_members.nextDecl(is_pub, is_export, align_inst != .none, has_section_or_addrspace);
@@ -7878,7 +7878,7 @@ fn unionInit(
7878
7878
params: []const Ast.Node.Index,
7879
7879
) InnerError!Zir.Inst.Ref {
7880
7880
const union_type = try typeExpr(gz, scope, params[0]);
7881
- const field_name = try comptimeExpr(gz, scope, .{ .rl = .{ .ty = .const_slice_u8_type } }, params[1]);
7881
+ const field_name = try comptimeExpr(gz, scope, .{ .rl = .{ .ty = .slice_const_u8_type } }, params[1]);
7882
7882
const field_type = try gz.addPlNode(.field_type_ref, params[1], Zir.Inst.FieldTypeRef{
7883
7883
.container_type = union_type,
7884
7884
.field_name = field_name,
@@ -8100,12 +8100,12 @@ fn builtinCall(
8100
8100
if (ri.rl == .ref) {
8101
8101
return gz.addPlNode(.field_ptr_named, node, Zir.Inst.FieldNamed{
8102
8102
.lhs = try expr(gz, scope, .{ .rl = .ref }, params[0]),
8103
- .field_name = try comptimeExpr(gz, scope, .{ .rl = .{ .ty = .const_slice_u8_type } }, params[1]),
8103
+ .field_name = try comptimeExpr(gz, scope, .{ .rl = .{ .ty = .slice_const_u8_type } }, params[1]),
8104
8104
});
8105
8105
}
8106
8106
const result = try gz.addPlNode(.field_val_named, node, Zir.Inst.FieldNamed{
8107
8107
.lhs = try expr(gz, scope, .{ .rl = .none }, params[0]),
8108
- .field_name = try comptimeExpr(gz, scope, .{ .rl = .{ .ty = .const_slice_u8_type } }, params[1]),
8108
+ .field_name = try comptimeExpr(gz, scope, .{ .rl = .{ .ty = .slice_const_u8_type } }, params[1]),
8109
8109
});
8110
8110
return rvalue(gz, ri, result, node);
8111
8111
},
@@ -8271,11 +8271,11 @@ fn builtinCall(
8271
8271
.align_of => return simpleUnOpType(gz, scope, ri, node, params[0], .align_of),
8272
8272
8273
8273
.ptr_to_int => return simpleUnOp(gz, scope, ri, node, .{ .rl = .none }, params[0], .ptr_to_int),
8274
- .compile_error => return simpleUnOp(gz, scope, ri, node, .{ .rl = .{ .ty = .const_slice_u8_type } }, params[0], .compile_error),
8274
+ .compile_error => return simpleUnOp(gz, scope, ri, node, .{ .rl = .{ .ty = .slice_const_u8_type } }, params[0], .compile_error),
8275
8275
.set_eval_branch_quota => return simpleUnOp(gz, scope, ri, node, .{ .rl = .{ .coerced_ty = .u32_type } }, params[0], .set_eval_branch_quota),
8276
8276
.enum_to_int => return simpleUnOp(gz, scope, ri, node, .{ .rl = .none }, params[0], .enum_to_int),
8277
8277
.bool_to_int => return simpleUnOp(gz, scope, ri, node, bool_ri, params[0], .bool_to_int),
8278
- .embed_file => return simpleUnOp(gz, scope, ri, node, .{ .rl = .{ .ty = .const_slice_u8_type } }, params[0], .embed_file),
8278
+ .embed_file => return simpleUnOp(gz, scope, ri, node, .{ .rl = .{ .ty = .slice_const_u8_type } }, params[0], .embed_file),
8279
8279
.error_name => return simpleUnOp(gz, scope, ri, node, .{ .rl = .{ .ty = .anyerror_type } }, params[0], .error_name),
8280
8280
.set_runtime_safety => return simpleUnOp(gz, scope, ri, node, bool_ri, params[0], .set_runtime_safety),
8281
8281
.sqrt => return simpleUnOp(gz, scope, ri, node, .{ .rl = .none }, params[0], .sqrt),
@@ -8334,7 +8334,7 @@ fn builtinCall(
8334
8334
},
8335
8335
.panic => {
8336
8336
try emitDbgNode(gz, node);
8337
- return simpleUnOp(gz, scope, ri, node, .{ .rl = .{ .ty = .const_slice_u8_type } }, params[0], .panic);
8337
+ return simpleUnOp(gz, scope, ri, node, .{ .rl = .{ .ty = .slice_const_u8_type } }, params[0], .panic);
8338
8338
},
8339
8339
.trap => {
8340
8340
try emitDbgNode(gz, node);
@@ -8450,7 +8450,7 @@ fn builtinCall(
8450
8450
},
8451
8451
.c_define => {
8452
8452
if (!gz.c_import) return gz.astgen.failNode(node, "C define valid only inside C import block", .{});
8453
- const name = try comptimeExpr(gz, scope, .{ .rl = .{ .ty = .const_slice_u8_type } }, params[0]);
8453
+ const name = try comptimeExpr(gz, scope, .{ .rl = .{ .ty = .slice_const_u8_type } }, params[0]);
8454
8454
const value = try comptimeExpr(gz, scope, .{ .rl = .none }, params[1]);
8455
8455
const result = try gz.addExtendedPayload(.c_define, Zir.Inst.BinNode{
8456
8456
.node = gz.nodeIndexToRelative(node),
@@ -8546,7 +8546,7 @@ fn builtinCall(
8546
8546
},
8547
8547
.field_parent_ptr => {
8548
8548
const parent_type = try typeExpr(gz, scope, params[0]);
8549
- const field_name = try comptimeExpr(gz, scope, .{ .rl = .{ .ty = .const_slice_u8_type } }, params[1]);
8549
+ const field_name = try comptimeExpr(gz, scope, .{ .rl = .{ .ty = .slice_const_u8_type } }, params[1]);
8550
8550
const result = try gz.addPlNode(.field_parent_ptr, node, Zir.Inst.FieldParentPtr{
8551
8551
.parent_type = parent_type,
8552
8552
.field_name = field_name,
@@ -8701,7 +8701,7 @@ fn hasDeclOrField(
8701
8701
tag: Zir.Inst.Tag,
8702
8702
) InnerError!Zir.Inst.Ref {
8703
8703
const container_type = try typeExpr(gz, scope, lhs_node);
8704
- const name = try comptimeExpr(gz, scope, .{ .rl = .{ .ty = .const_slice_u8_type } }, rhs_node);
8704
+ const name = try comptimeExpr(gz, scope, .{ .rl = .{ .ty = .slice_const_u8_type } }, rhs_node);
8705
8705
const result = try gz.addPlNode(tag, node, Zir.Inst.Bin{
8706
8706
.lhs = container_type,
8707
8707
.rhs = name,
@@ -8851,7 +8851,7 @@ fn simpleCBuiltin(
8851
8851
) InnerError!Zir.Inst.Ref {
8852
8852
const name: []const u8 = if (tag == .c_undef) "C undef" else "C include";
8853
8853
if (!gz.c_import) return gz.astgen.failNode(node, "{s} valid only inside C import block", .{name});
8854
- const operand = try comptimeExpr(gz, scope, .{ .rl = .{ .ty = .const_slice_u8_type } }, operand_node);
8854
+ const operand = try comptimeExpr(gz, scope, .{ .rl = .{ .ty = .slice_const_u8_type } }, operand_node);
8855
8855
_ = try gz.addExtendedPayload(tag, Zir.Inst.UnNode{
8856
8856
.node = gz.nodeIndexToRelative(node),
8857
8857
.operand = operand,
@@ -8869,7 +8869,7 @@ fn offsetOf(
8869
8869
tag: Zir.Inst.Tag,
8870
8870
) InnerError!Zir.Inst.Ref {
8871
8871
const type_inst = try typeExpr(gz, scope, lhs_node);
8872
- const field_name = try comptimeExpr(gz, scope, .{ .rl = .{ .ty = .const_slice_u8_type } }, rhs_node);
8872
+ const field_name = try comptimeExpr(gz, scope, .{ .rl = .{ .ty = .slice_const_u8_type } }, rhs_node);
8873
8873
const result = try gz.addPlNode(tag, node, Zir.Inst.Bin{
8874
8874
.lhs = type_inst,
8875
8875
.rhs = field_name,
@@ -10317,8 +10317,8 @@ fn rvalue(
10317
10317
as_ty | @enumToInt(Zir.Inst.Ref.manyptr_const_u8_type),
10318
10318
as_ty | @enumToInt(Zir.Inst.Ref.manyptr_const_u8_sentinel_0_type),
10319
10319
as_ty | @enumToInt(Zir.Inst.Ref.single_const_pointer_to_comptime_int_type),
10320
- as_ty | @enumToInt(Zir.Inst.Ref.const_slice_u8_type ),
10321
- as_ty | @enumToInt(Zir.Inst.Ref.const_slice_u8_sentinel_0_type ),
10320
+ as_ty | @enumToInt(Zir.Inst.Ref.slice_const_u8_type ),
10321
+ as_ty | @enumToInt(Zir.Inst.Ref.slice_const_u8_sentinel_0_type ),
10322
10322
as_ty | @enumToInt(Zir.Inst.Ref.anyerror_void_error_union_type),
10323
10323
as_ty | @enumToInt(Zir.Inst.Ref.generic_poison_type),
10324
10324
as_ty | @enumToInt(Zir.Inst.Ref.empty_struct_type),
0 commit comments