| ... | ... | @@ -6226,12 +6226,12 @@ static IrInstruction *ir_get_const_ptr(IrAnalyze *ira, IrInstruction *instructio |
| 6226 | 6226 | ConstExprValue *const_val = &const_instr->value; |
| 6227 | 6227 | const_val->type = pointee_type; |
| 6228 | 6228 | type_ensure_zero_bits_known(ira->codegen, type_entry); |
| 6229 | | const_val->data.x_type = get_pointer_to_type_volatile(ira->codegen, type_entry, |
| 6230 | | ptr_is_const, ptr_is_volatile); |
| 6229 | const_val->data.x_type = get_pointer_to_type_extra(ira->codegen, type_entry, |
| 6230 | ptr_is_const, 0, ptr_is_volatile); |
| 6231 | 6231 | return const_instr; |
| 6232 | 6232 | } else { |
| 6233 | | TypeTableEntry *ptr_type = get_pointer_to_type_volatile(ira->codegen, pointee_type, |
| 6234 | | ptr_is_const, ptr_is_volatile); |
| 6233 | TypeTableEntry *ptr_type = get_pointer_to_type_extra(ira->codegen, pointee_type, |
| 6234 | ptr_is_const, 0, ptr_is_volatile); |
| 6235 | 6235 | IrInstruction *const_instr = ir_get_const(ira, instruction); |
| 6236 | 6236 | ConstExprValue *const_val = &const_instr->value; |
| 6237 | 6237 | const_val->type = ptr_type; |
| ... | ... | @@ -6547,7 +6547,7 @@ static IrInstruction *ir_get_ref(IrAnalyze *ira, IrInstruction *source_instructi |
| 6547 | 6547 | ConstPtrMutComptimeConst, is_const, is_volatile); |
| 6548 | 6548 | } |
| 6549 | 6549 | |
| 6550 | | TypeTableEntry *ptr_type = get_pointer_to_type_volatile(ira->codegen, value->value.type, is_const, is_volatile); |
| 6550 | TypeTableEntry *ptr_type = get_pointer_to_type_extra(ira->codegen, value->value.type, is_const, 0, is_volatile); |
| 6551 | 6551 | FnTableEntry *fn_entry = exec_fn_entry(ira->new_irb.exec); |
| 6552 | 6552 | assert(fn_entry); |
| 6553 | 6553 | IrInstruction *new_instruction = ir_build_ref(&ira->new_irb, source_instruction->scope, |
| ... | ... | @@ -8838,8 +8838,8 @@ static TypeTableEntry *ir_analyze_instruction_elem_ptr(IrAnalyze *ira, IrInstruc |
| 8838 | 8838 | buf_sprintf("index 0 outside array of size 0")); |
| 8839 | 8839 | } |
| 8840 | 8840 | TypeTableEntry *child_type = array_type->data.array.child_type; |
| 8841 | | return_type = get_pointer_to_type_volatile(ira->codegen, child_type, |
| 8842 | | ptr_type->data.pointer.is_const, ptr_type->data.pointer.is_volatile); |
| 8841 | return_type = get_pointer_to_type_extra(ira->codegen, child_type, |
| 8842 | ptr_type->data.pointer.is_const, 0, ptr_type->data.pointer.is_volatile); |
| 8843 | 8843 | } else if (array_type->id == TypeTableEntryIdPointer) { |
| 8844 | 8844 | return_type = array_type; |
| 8845 | 8845 | } else if (is_slice(array_type)) { |
| ... | ... | @@ -9056,8 +9056,8 @@ static TypeTableEntry *ir_analyze_container_field_ptr(IrAnalyze *ira, Buf *field |
| 9056 | 9056 | if (ptr_val->data.x_ptr.special != ConstPtrSpecialHardCodedAddr) { |
| 9057 | 9057 | ConstExprValue *struct_val = const_ptr_pointee(ptr_val); |
| 9058 | 9058 | ConstExprValue *field_val = &struct_val->data.x_struct.fields[field->src_index]; |
| 9059 | | TypeTableEntry *ptr_type = get_pointer_to_type_volatile(ira->codegen, field_val->type, |
| 9060 | | is_const, is_volatile); |
| 9059 | TypeTableEntry *ptr_type = get_pointer_to_type_extra(ira->codegen, field_val->type, |
| 9060 | is_const, 0, is_volatile); |
| 9061 | 9061 | ConstExprValue *const_val = ir_build_const_from(ira, &field_ptr_instruction->base); |
| 9062 | 9062 | const_val->data.x_ptr.special = ConstPtrSpecialBaseStruct; |
| 9063 | 9063 | const_val->data.x_ptr.mut = container_ptr->value.data.x_ptr.mut; |
| ... | ... | @@ -9067,7 +9067,7 @@ static TypeTableEntry *ir_analyze_container_field_ptr(IrAnalyze *ira, Buf *field |
| 9067 | 9067 | } |
| 9068 | 9068 | } |
| 9069 | 9069 | ir_build_struct_field_ptr_from(&ira->new_irb, &field_ptr_instruction->base, container_ptr, field); |
| 9070 | | return get_pointer_to_type_volatile(ira->codegen, field->type_entry, is_const, is_volatile); |
| 9070 | return get_pointer_to_type_extra(ira->codegen, field->type_entry, is_const, 0, is_volatile); |
| 9071 | 9071 | } else { |
| 9072 | 9072 | return ir_analyze_container_member_access_inner(ira, bare_type, field_name, |
| 9073 | 9073 | field_ptr_instruction, container_ptr, container_type); |
| ... | ... | @@ -9079,7 +9079,7 @@ static TypeTableEntry *ir_analyze_container_field_ptr(IrAnalyze *ira, Buf *field |
| 9079 | 9079 | TypeEnumField *field = find_enum_type_field(bare_type, field_name); |
| 9080 | 9080 | if (field) { |
| 9081 | 9081 | ir_build_enum_field_ptr_from(&ira->new_irb, &field_ptr_instruction->base, container_ptr, field); |
| 9082 | | return get_pointer_to_type_volatile(ira->codegen, field->type_entry, is_const, is_volatile); |
| 9082 | return get_pointer_to_type_extra(ira->codegen, field->type_entry, is_const, 0, is_volatile); |
| 9083 | 9083 | } else { |
| 9084 | 9084 | return ir_analyze_container_member_access_inner(ira, bare_type, field_name, |
| 9085 | 9085 | field_ptr_instruction, container_ptr, container_type); |
| ... | ... | @@ -10014,8 +10014,8 @@ static TypeTableEntry *ir_analyze_instruction_unwrap_maybe(IrAnalyze *ira, |
| 10014 | 10014 | return ira->codegen->builtin_types.entry_invalid; |
| 10015 | 10015 | } |
| 10016 | 10016 | TypeTableEntry *child_type = type_entry->data.maybe.child_type; |
| 10017 | | TypeTableEntry *result_type = get_pointer_to_type_volatile(ira->codegen, child_type, |
| 10018 | | ptr_type->data.pointer.is_const, ptr_type->data.pointer.is_volatile); |
| 10017 | TypeTableEntry *result_type = get_pointer_to_type_extra(ira->codegen, child_type, |
| 10018 | ptr_type->data.pointer.is_const, 0, ptr_type->data.pointer.is_volatile); |
| 10019 | 10019 | |
| 10020 | 10020 | if (instr_is_comptime(value)) { |
| 10021 | 10021 | ConstExprValue *val = ir_resolve_const(ira, value, UndefBad); |
| ... | ... | @@ -11321,7 +11321,7 @@ static TypeTableEntry *ir_analyze_instruction_memset(IrAnalyze *ira, IrInstructi |
| 11321 | 11321 | |
| 11322 | 11322 | TypeTableEntry *usize = ira->codegen->builtin_types.entry_usize; |
| 11323 | 11323 | TypeTableEntry *u8 = ira->codegen->builtin_types.entry_u8; |
| 11324 | | TypeTableEntry *u8_ptr = get_pointer_to_type_volatile(ira->codegen, u8, false, dest_is_volatile); |
| 11324 | TypeTableEntry *u8_ptr = get_pointer_to_type_extra(ira->codegen, u8, false, 0, dest_is_volatile); |
| 11325 | 11325 | |
| 11326 | 11326 | IrInstruction *casted_dest_ptr = ir_implicit_cast(ira, dest_ptr, u8_ptr); |
| 11327 | 11327 | if (casted_dest_ptr->value.type->id == TypeTableEntryIdInvalid) |
| ... | ... | @@ -11409,8 +11409,8 @@ static TypeTableEntry *ir_analyze_instruction_memcpy(IrAnalyze *ira, IrInstructi |
| 11409 | 11409 | |
| 11410 | 11410 | TypeTableEntry *usize = ira->codegen->builtin_types.entry_usize; |
| 11411 | 11411 | TypeTableEntry *u8 = ira->codegen->builtin_types.entry_u8; |
| 11412 | | TypeTableEntry *u8_ptr_mut = get_pointer_to_type_volatile(ira->codegen, u8, false, dest_is_volatile); |
| 11413 | | TypeTableEntry *u8_ptr_const = get_pointer_to_type_volatile(ira->codegen, u8, true, src_is_volatile); |
| 11412 | TypeTableEntry *u8_ptr_mut = get_pointer_to_type_extra(ira->codegen, u8, false, 0, dest_is_volatile); |
| 11413 | TypeTableEntry *u8_ptr_const = get_pointer_to_type_extra(ira->codegen, u8, true, 0, src_is_volatile); |
| 11414 | 11414 | |
| 11415 | 11415 | IrInstruction *casted_dest_ptr = ir_implicit_cast(ira, dest_ptr, u8_ptr_mut); |
| 11416 | 11416 | if (casted_dest_ptr->value.type->id == TypeTableEntryIdInvalid) |
| ... | ... | @@ -11927,8 +11927,8 @@ static TypeTableEntry *ir_analyze_instruction_unwrap_err_payload(IrAnalyze *ira, |
| 11927 | 11927 | return ira->codegen->builtin_types.entry_invalid; |
| 11928 | 11928 | } else if (canon_type->id == TypeTableEntryIdErrorUnion) { |
| 11929 | 11929 | TypeTableEntry *child_type = canon_type->data.error.child_type; |
| 11930 | | TypeTableEntry *result_type = get_pointer_to_type_volatile(ira->codegen, child_type, |
| 11931 | | ptr_type->data.pointer.is_const, ptr_type->data.pointer.is_volatile); |
| 11930 | TypeTableEntry *result_type = get_pointer_to_type_extra(ira->codegen, child_type, |
| 11931 | ptr_type->data.pointer.is_const, 0, ptr_type->data.pointer.is_volatile); |
| 11932 | 11932 | if (instr_is_comptime(value)) { |
| 11933 | 11933 | ConstExprValue *ptr_val = ir_resolve_const(ira, value, UndefBad); |
| 11934 | 11934 | if (!ptr_val) |