| ... | @@ -11432,6 +11432,17 @@ static TypeTableEntry *ir_analyze_instruction_field_ptr(IrAnalyze *ira, IrInstru | ... | @@ -11432,6 +11432,17 @@ static TypeTableEntry *ir_analyze_instruction_field_ptr(IrAnalyze *ira, IrInstru |
| 11432 | if (type_is_invalid(child_type)) { | 11432 | if (type_is_invalid(child_type)) { |
| 11433 | return ira->codegen->builtin_types.entry_invalid; | 11433 | return ira->codegen->builtin_types.entry_invalid; |
| 11434 | } else if (is_container(child_type)) { | 11434 | } else if (is_container(child_type)) { |
| | 11435 | if (is_slice(child_type) && buf_eql_str(field_name, "Child")) { |
| | 11436 | bool ptr_is_const = true; |
| | 11437 | bool ptr_is_volatile = false; |
| | 11438 | TypeStructField *ptr_field = &child_type->data.structure.fields[slice_ptr_index]; |
| | 11439 | assert(ptr_field->type_entry->id == TypeTableEntryIdPointer); |
| | 11440 | TypeTableEntry *child_type = ptr_field->type_entry->data.pointer.child_type; |
| | 11441 | return ir_analyze_const_ptr(ira, &field_ptr_instruction->base, |
| | 11442 | create_const_type(ira->codegen, child_type), |
| | 11443 | ira->codegen->builtin_types.entry_type, |
| | 11444 | ConstPtrMutComptimeConst, ptr_is_const, ptr_is_volatile); |
| | 11445 | } |
| 11435 | if (child_type->id == TypeTableEntryIdEnum) { | 11446 | if (child_type->id == TypeTableEntryIdEnum) { |
| 11436 | ensure_complete_type(ira->codegen, child_type); | 11447 | ensure_complete_type(ira->codegen, child_type); |
| 11437 | if (child_type->data.enumeration.is_invalid) | 11448 | if (child_type->data.enumeration.is_invalid) |
| ... | @@ -11522,7 +11533,7 @@ static TypeTableEntry *ir_analyze_instruction_field_ptr(IrAnalyze *ira, IrInstru | ... | @@ -11522,7 +11533,7 @@ static TypeTableEntry *ir_analyze_instruction_field_ptr(IrAnalyze *ira, IrInstru |
| 11522 | return ira->codegen->builtin_types.entry_invalid; | 11533 | return ira->codegen->builtin_types.entry_invalid; |
| 11523 | } | 11534 | } |
| 11524 | } else if (child_type->id == TypeTableEntryIdPointer) { | 11535 | } else if (child_type->id == TypeTableEntryIdPointer) { |
| 11525 | if (buf_eql_str(field_name, "child")) { | 11536 | if (buf_eql_str(field_name, "Child")) { |
| 11526 | bool ptr_is_const = true; | 11537 | bool ptr_is_const = true; |
| 11527 | bool ptr_is_volatile = false; | 11538 | bool ptr_is_volatile = false; |
| 11528 | return ir_analyze_const_ptr(ira, &field_ptr_instruction->base, | 11539 | return ir_analyze_const_ptr(ira, &field_ptr_instruction->base, |
| ... | @@ -11544,7 +11555,7 @@ static TypeTableEntry *ir_analyze_instruction_field_ptr(IrAnalyze *ira, IrInstru | ... | @@ -11544,7 +11555,7 @@ static TypeTableEntry *ir_analyze_instruction_field_ptr(IrAnalyze *ira, IrInstru |
| 11544 | return ira->codegen->builtin_types.entry_invalid; | 11555 | return ira->codegen->builtin_types.entry_invalid; |
| 11545 | } | 11556 | } |
| 11546 | } else if (child_type->id == TypeTableEntryIdArray) { | 11557 | } else if (child_type->id == TypeTableEntryIdArray) { |
| 11547 | if (buf_eql_str(field_name, "child")) { | 11558 | if (buf_eql_str(field_name, "Child")) { |
| 11548 | bool ptr_is_const = true; | 11559 | bool ptr_is_const = true; |
| 11549 | bool ptr_is_volatile = false; | 11560 | bool ptr_is_volatile = false; |
| 11550 | return ir_analyze_const_ptr(ira, &field_ptr_instruction->base, | 11561 | return ir_analyze_const_ptr(ira, &field_ptr_instruction->base, |