| ... | @@ -25431,11 +25431,15 @@ static Error ir_make_type_info_value(IrAnalyze *ira, IrInst* source_instr, ZigTy | ... | @@ -25431,11 +25431,15 @@ static Error ir_make_type_info_value(IrAnalyze *ira, IrInst* source_instr, ZigTy |
| 25431 | union_field_val->special = ConstValSpecialStatic; | 25431 | union_field_val->special = ConstValSpecialStatic; |
| 25432 | union_field_val->type = type_info_union_field_type; | 25432 | union_field_val->type = type_info_union_field_type; |
| 25433 | | 25433 | |
| 25434 | ZigValue **inner_fields = alloc_const_vals_ptrs(ira->codegen, 2); | 25434 | ZigValue **inner_fields = alloc_const_vals_ptrs(ira->codegen, 3); |
| 25435 | inner_fields[1]->special = ConstValSpecialStatic; | 25435 | inner_fields[1]->special = ConstValSpecialStatic; |
| 25436 | inner_fields[1]->type = ira->codegen->builtin_types.entry_type; | 25436 | inner_fields[1]->type = ira->codegen->builtin_types.entry_type; |
| 25437 | inner_fields[1]->data.x_type = union_field->type_entry; | 25437 | inner_fields[1]->data.x_type = union_field->type_entry; |
| 25438 | | 25438 | |
| | 25439 | inner_fields[2]->special = ConstValSpecialStatic; |
| | 25440 | inner_fields[2]->type = ira->codegen->builtin_types.entry_u29; |
| | 25441 | bigint_init_unsigned(&inner_fields[2]->data.x_bigint, union_field->align); |
| | 25442 | |
| 25439 | ZigValue *name = create_const_str_lit(ira->codegen, union_field->name)->data.x_ptr.data.ref.pointee; | 25443 | ZigValue *name = create_const_str_lit(ira->codegen, union_field->name)->data.x_ptr.data.ref.pointee; |
| 25440 | init_const_slice(ira->codegen, inner_fields[0], name, 0, buf_len(union_field->name), true); | 25444 | init_const_slice(ira->codegen, inner_fields[0], name, 0, buf_len(union_field->name), true); |
| 25441 | | 25445 | |
| ... | @@ -25502,7 +25506,7 @@ static Error ir_make_type_info_value(IrAnalyze *ira, IrInst* source_instr, ZigTy | ... | @@ -25502,7 +25506,7 @@ static Error ir_make_type_info_value(IrAnalyze *ira, IrInst* source_instr, ZigTy |
| 25502 | struct_field_val->special = ConstValSpecialStatic; | 25506 | struct_field_val->special = ConstValSpecialStatic; |
| 25503 | struct_field_val->type = type_info_struct_field_type; | 25507 | struct_field_val->type = type_info_struct_field_type; |
| 25504 | | 25508 | |
| 25505 | ZigValue **inner_fields = alloc_const_vals_ptrs(ira->codegen, 4); | 25509 | ZigValue **inner_fields = alloc_const_vals_ptrs(ira->codegen, 5); |
| 25506 | | 25510 | |
| 25507 | inner_fields[1]->special = ConstValSpecialStatic; | 25511 | inner_fields[1]->special = ConstValSpecialStatic; |
| 25508 | inner_fields[1]->type = ira->codegen->builtin_types.entry_type; | 25512 | inner_fields[1]->type = ira->codegen->builtin_types.entry_type; |
| ... | @@ -25522,6 +25526,10 @@ static Error ir_make_type_info_value(IrAnalyze *ira, IrInst* source_instr, ZigTy | ... | @@ -25522,6 +25526,10 @@ static Error ir_make_type_info_value(IrAnalyze *ira, IrInst* source_instr, ZigTy |
| 25522 | inner_fields[3]->type = ira->codegen->builtin_types.entry_bool; | 25526 | inner_fields[3]->type = ira->codegen->builtin_types.entry_bool; |
| 25523 | inner_fields[3]->data.x_bool = struct_field->is_comptime; | 25527 | inner_fields[3]->data.x_bool = struct_field->is_comptime; |
| 25524 | | 25528 | |
| | 25529 | inner_fields[4]->special = ConstValSpecialStatic; |
| | 25530 | inner_fields[4]->type = ira->codegen->builtin_types.entry_u29; |
| | 25531 | bigint_init_unsigned(&inner_fields[4]->data.x_bigint, struct_field->align); |
| | 25532 | |
| 25525 | ZigValue *name = create_const_str_lit(ira->codegen, struct_field->name)->data.x_ptr.data.ref.pointee; | 25533 | ZigValue *name = create_const_str_lit(ira->codegen, struct_field->name)->data.x_ptr.data.ref.pointee; |
| 25526 | init_const_slice(ira->codegen, inner_fields[0], name, 0, buf_len(struct_field->name), true); | 25534 | init_const_slice(ira->codegen, inner_fields[0], name, 0, buf_len(struct_field->name), true); |
| 25527 | | 25535 | |
| ... | @@ -26145,6 +26153,8 @@ static ZigType *type_info_to_type(IrAnalyze *ira, IrInst *source_instr, ZigTypeI | ... | @@ -26145,6 +26153,8 @@ static ZigType *type_info_to_type(IrAnalyze *ira, IrInst *source_instr, ZigTypeI |
| 26145 | } | 26153 | } |
| 26146 | if ((err = get_const_field_bool(ira, source_instr->source_node, field_value, "is_comptime", 3, &field->is_comptime))) | 26154 | if ((err = get_const_field_bool(ira, source_instr->source_node, field_value, "is_comptime", 3, &field->is_comptime))) |
| 26147 | return ira->codegen->invalid_inst_gen->value->type; | 26155 | return ira->codegen->invalid_inst_gen->value->type; |
| | 26156 | if ((err = get_const_field_u29(ira, source_instr->source_node, field_value, "alignment", 4, &field->align))) |
| | 26157 | return ira->codegen->invalid_inst_gen->value->type; |
| 26148 | } | 26158 | } |
| 26149 | | 26159 | |
| 26150 | return entry; | 26160 | return entry; |
| ... | @@ -26314,6 +26324,8 @@ static ZigType *type_info_to_type(IrAnalyze *ira, IrInst *source_instr, ZigTypeI | ... | @@ -26314,6 +26324,8 @@ static ZigType *type_info_to_type(IrAnalyze *ira, IrInst *source_instr, ZigTypeI |
| 26314 | return ira->codegen->invalid_inst_gen->value->type; | 26324 | return ira->codegen->invalid_inst_gen->value->type; |
| 26315 | field->type_val = type_value; | 26325 | field->type_val = type_value; |
| 26316 | field->type_entry = type_value->data.x_type; | 26326 | field->type_entry = type_value->data.x_type; |
| | 26327 | if ((err = get_const_field_u29(ira, source_instr->source_node, field_value, "alignment", 2, &field->align))) |
| | 26328 | return ira->codegen->invalid_inst_gen->value->type; |
| 26317 | } | 26329 | } |
| 26318 | return entry; | 26330 | return entry; |
| 26319 | } | 26331 | } |