| ... | ... | @@ -11058,6 +11058,24 @@ static TypeTableEntry *ir_analyze_array_cat(IrAnalyze *ira, IrInstructionBinOp * |
| 11058 | 11058 | result_type = get_array_type(ira->codegen, child_type, new_len); |
| 11059 | 11059 | |
| 11060 | 11060 | out_array_val = out_val; |
| 11061 | } else if (is_slice(op1_type) || is_slice(op2_type)) { |
| 11062 | TypeTableEntry *ptr_type = get_pointer_to_type(ira->codegen, child_type, true); |
| 11063 | result_type = get_slice_type(ira->codegen, ptr_type); |
| 11064 | out_array_val = create_const_vals(1); |
| 11065 | out_array_val->special = ConstValSpecialStatic; |
| 11066 | out_array_val->type = get_array_type(ira->codegen, child_type, new_len); |
| 11067 | |
| 11068 | out_val->data.x_struct.fields = create_const_vals(2); |
| 11069 | |
| 11070 | out_val->data.x_struct.fields[slice_ptr_index].type = ptr_type; |
| 11071 | out_val->data.x_struct.fields[slice_ptr_index].special = ConstValSpecialStatic; |
| 11072 | out_val->data.x_struct.fields[slice_ptr_index].data.x_ptr.special = ConstPtrSpecialBaseArray; |
| 11073 | out_val->data.x_struct.fields[slice_ptr_index].data.x_ptr.data.base_array.array_val = out_array_val; |
| 11074 | out_val->data.x_struct.fields[slice_ptr_index].data.x_ptr.data.base_array.elem_index = 0; |
| 11075 | |
| 11076 | out_val->data.x_struct.fields[slice_len_index].type = ira->codegen->builtin_types.entry_usize; |
| 11077 | out_val->data.x_struct.fields[slice_len_index].special = ConstValSpecialStatic; |
| 11078 | bigint_init_unsigned(&out_val->data.x_struct.fields[slice_len_index].data.x_bigint, new_len); |
| 11061 | 11079 | } else { |
| 11062 | 11080 | new_len += 1; // null byte |
| 11063 | 11081 | |