| ... | ... | @@ -25575,7 +25575,7 @@ static Error ir_make_type_info_value(IrAnalyze *ira, IrInst* source_instr, ZigTy |
| 25575 | 25575 | // alignment: u29 |
| 25576 | 25576 | ensure_field_index(result->type, "alignment", 1); |
| 25577 | 25577 | fields[1]->special = ConstValSpecialStatic; |
| 25578 | | fields[1]->type = ira->codegen->builtin_types.entry_u29; |
| 25578 | fields[1]->type = ira->codegen->builtin_types.entry_num_lit_int; |
| 25579 | 25579 | bigint_init_unsigned(&fields[1]->data.x_bigint, type_entry->data.fn.fn_type_id.alignment); |
| 25580 | 25580 | // is_generic: bool |
| 25581 | 25581 | ensure_field_index(result->type, "is_generic", 2); |
| ... | ... | @@ -25756,17 +25756,6 @@ static Error get_const_field_bool(IrAnalyze *ira, AstNode *source_node, ZigValue |
| 25756 | 25756 | return ErrorNone; |
| 25757 | 25757 | } |
| 25758 | 25758 | |
| 25759 | | static Error get_const_field_u29(IrAnalyze *ira, AstNode *source_node, ZigValue *struct_value, |
| 25760 | | const char *name, size_t field_index, uint32_t *out) |
| 25761 | | { |
| 25762 | | ZigValue *value = get_const_field(ira, source_node, struct_value, name, field_index); |
| 25763 | | if (value == nullptr) |
| 25764 | | return ErrorSemanticAnalyzeFail; |
| 25765 | | assert(value->type == ira->codegen->builtin_types.entry_u29); |
| 25766 | | *out = bigint_as_u32(&value->data.x_bigint); |
| 25767 | | return ErrorNone; |
| 25768 | | } |
| 25769 | | |
| 25770 | 25759 | static BigInt *get_const_field_lit_int(IrAnalyze *ira, AstNode *source_node, ZigValue *struct_value, const char *name, size_t field_index) |
| 25771 | 25760 | { |
| 25772 | 25761 | ZigValue *value = get_const_field(ira, source_node, struct_value, name, field_index); |
| ... | ... | @@ -26353,8 +26342,8 @@ static ZigType *type_info_to_type(IrAnalyze *ira, IrInst *source_instr, ZigTypeI |
| 26353 | 26342 | assert(cc_value->type == get_builtin_type(ira->codegen, "CallingConvention")); |
| 26354 | 26343 | CallingConvention cc = (CallingConvention)bigint_as_u32(&cc_value->data.x_enum_tag); |
| 26355 | 26344 | |
| 26356 | | uint32_t alignment; |
| 26357 | | if ((err = get_const_field_u29(ira, source_instr->source_node, payload, "alignment", 1, &alignment))) |
| 26345 | BigInt *alignment = get_const_field_lit_int(ira, source_instr->source_node, payload, "alignment", 1); |
| 26346 | if (alignment == nullptr) |
| 26358 | 26347 | return ira->codegen->invalid_inst_gen->value->type; |
| 26359 | 26348 | |
| 26360 | 26349 | Error err; |
| ... | ... | @@ -26396,7 +26385,7 @@ static ZigType *type_info_to_type(IrAnalyze *ira, IrInst *source_instr, ZigTypeI |
| 26396 | 26385 | fn_type_id.next_param_index = args_len; |
| 26397 | 26386 | fn_type_id.is_var_args = is_var_args; |
| 26398 | 26387 | fn_type_id.cc = cc; |
| 26399 | | fn_type_id.alignment = alignment; |
| 26388 | fn_type_id.alignment = bigint_as_u32(alignment); |
| 26400 | 26389 | |
| 26401 | 26390 | assert(args_ptr->data.x_ptr.special == ConstPtrSpecialBaseArray); |
| 26402 | 26391 | assert(args_ptr->data.x_ptr.data.base_array.elem_index == 0); |