| ... | ... | @@ -2770,8 +2770,8 @@ fn zirStructDecl( |
| 2770 | 2770 | // InternPool index. |
| 2771 | 2771 | |
| 2772 | 2772 | const new_decl_index = try sema.createAnonymousDeclTypeNamed(block, src, .{ |
| 2773 | | .ty = Type.type, |
| 2774 | | .val = undefined, |
| 2773 | .ty = Type.noreturn, |
| 2774 | .val = Value.@"unreachable", |
| 2775 | 2775 | }, small.name_strategy, "struct", inst); |
| 2776 | 2776 | const new_decl = mod.declPtr(new_decl_index); |
| 2777 | 2777 | new_decl.owns_tv = true; |
| ... | ... | @@ -2804,6 +2804,7 @@ fn zirStructDecl( |
| 2804 | 2804 | // TODO: figure out InternPool removals for incremental compilation |
| 2805 | 2805 | //errdefer mod.intern_pool.remove(struct_ty); |
| 2806 | 2806 | |
| 2807 | new_decl.ty = Type.type; |
| 2807 | 2808 | new_decl.val = struct_ty.toValue(); |
| 2808 | 2809 | new_namespace.ty = struct_ty.toType(); |
| 2809 | 2810 | |
| ... | ... | @@ -2973,8 +2974,8 @@ fn zirEnumDecl( |
| 2973 | 2974 | |
| 2974 | 2975 | var done = false; |
| 2975 | 2976 | const new_decl_index = try sema.createAnonymousDeclTypeNamed(block, src, .{ |
| 2976 | | .ty = Type.type, |
| 2977 | | .val = undefined, |
| 2977 | .ty = Type.noreturn, |
| 2978 | .val = Value.@"unreachable", |
| 2978 | 2979 | }, small.name_strategy, "enum", inst); |
| 2979 | 2980 | const new_decl = mod.declPtr(new_decl_index); |
| 2980 | 2981 | new_decl.owns_tv = true; |
| ... | ... | @@ -3016,6 +3017,7 @@ fn zirEnumDecl( |
| 3016 | 3017 | // TODO: figure out InternPool removals for incremental compilation |
| 3017 | 3018 | //errdefer if (!done) mod.intern_pool.remove(incomplete_enum.index); |
| 3018 | 3019 | |
| 3020 | new_decl.ty = Type.type; |
| 3019 | 3021 | new_decl.val = incomplete_enum.index.toValue(); |
| 3020 | 3022 | new_namespace.ty = incomplete_enum.index.toType(); |
| 3021 | 3023 | |
| ... | ... | @@ -3232,8 +3234,8 @@ fn zirUnionDecl( |
| 3232 | 3234 | // InternPool index. |
| 3233 | 3235 | |
| 3234 | 3236 | const new_decl_index = try sema.createAnonymousDeclTypeNamed(block, src, .{ |
| 3235 | | .ty = Type.type, |
| 3236 | | .val = undefined, |
| 3237 | .ty = Type.noreturn, |
| 3238 | .val = Value.@"unreachable", |
| 3237 | 3239 | }, small.name_strategy, "union", inst); |
| 3238 | 3240 | const new_decl = mod.declPtr(new_decl_index); |
| 3239 | 3241 | new_decl.owns_tv = true; |
| ... | ... | @@ -3272,6 +3274,7 @@ fn zirUnionDecl( |
| 3272 | 3274 | // TODO: figure out InternPool removals for incremental compilation |
| 3273 | 3275 | //errdefer mod.intern_pool.remove(union_ty); |
| 3274 | 3276 | |
| 3277 | new_decl.ty = Type.type; |
| 3275 | 3278 | new_decl.val = union_ty.toValue(); |
| 3276 | 3279 | new_namespace.ty = union_ty.toType(); |
| 3277 | 3280 | |
| ... | ... | @@ -3312,8 +3315,8 @@ fn zirOpaqueDecl( |
| 3312 | 3315 | // type gains an InternPool index. |
| 3313 | 3316 | |
| 3314 | 3317 | const new_decl_index = try sema.createAnonymousDeclTypeNamed(block, src, .{ |
| 3315 | | .ty = Type.type, |
| 3316 | | .val = undefined, |
| 3318 | .ty = Type.noreturn, |
| 3319 | .val = Value.@"unreachable", |
| 3317 | 3320 | }, small.name_strategy, "opaque", inst); |
| 3318 | 3321 | const new_decl = mod.declPtr(new_decl_index); |
| 3319 | 3322 | new_decl.owns_tv = true; |
| ... | ... | @@ -3334,6 +3337,7 @@ fn zirOpaqueDecl( |
| 3334 | 3337 | // TODO: figure out InternPool removals for incremental compilation |
| 3335 | 3338 | //errdefer mod.intern_pool.remove(opaque_ty); |
| 3336 | 3339 | |
| 3340 | new_decl.ty = Type.type; |
| 3337 | 3341 | new_decl.val = opaque_ty.toValue(); |
| 3338 | 3342 | new_namespace.ty = opaque_ty.toType(); |
| 3339 | 3343 | |
| ... | ... | @@ -19433,8 +19437,8 @@ fn zirReify( |
| 19433 | 19437 | // an InternPool index. |
| 19434 | 19438 | |
| 19435 | 19439 | const new_decl_index = try sema.createAnonymousDeclTypeNamed(block, src, .{ |
| 19436 | | .ty = Type.type, |
| 19437 | | .val = undefined, |
| 19440 | .ty = Type.noreturn, |
| 19441 | .val = Value.@"unreachable", |
| 19438 | 19442 | }, name_strategy, "enum", inst); |
| 19439 | 19443 | const new_decl = mod.declPtr(new_decl_index); |
| 19440 | 19444 | new_decl.owns_tv = true; |
| ... | ... | @@ -19459,6 +19463,7 @@ fn zirReify( |
| 19459 | 19463 | // TODO: figure out InternPool removals for incremental compilation |
| 19460 | 19464 | //errdefer ip.remove(incomplete_enum.index); |
| 19461 | 19465 | |
| 19466 | new_decl.ty = Type.type; |
| 19462 | 19467 | new_decl.val = incomplete_enum.index.toValue(); |
| 19463 | 19468 | |
| 19464 | 19469 | for (0..fields_len) |field_i| { |
| ... | ... | @@ -19527,8 +19532,8 @@ fn zirReify( |
| 19527 | 19532 | // after the opaque type gains an InternPool index. |
| 19528 | 19533 | |
| 19529 | 19534 | const new_decl_index = try sema.createAnonymousDeclTypeNamed(block, src, .{ |
| 19530 | | .ty = Type.type, |
| 19531 | | .val = undefined, |
| 19535 | .ty = Type.noreturn, |
| 19536 | .val = Value.@"unreachable", |
| 19532 | 19537 | }, name_strategy, "opaque", inst); |
| 19533 | 19538 | const new_decl = mod.declPtr(new_decl_index); |
| 19534 | 19539 | new_decl.owns_tv = true; |
| ... | ... | @@ -19552,6 +19557,7 @@ fn zirReify( |
| 19552 | 19557 | // TODO: figure out InternPool removals for incremental compilation |
| 19553 | 19558 | //errdefer ip.remove(opaque_ty); |
| 19554 | 19559 | |
| 19560 | new_decl.ty = Type.type; |
| 19555 | 19561 | new_decl.val = opaque_ty.toValue(); |
| 19556 | 19562 | new_namespace.ty = opaque_ty.toType(); |
| 19557 | 19563 | |
| ... | ... | @@ -19585,8 +19591,8 @@ fn zirReify( |
| 19585 | 19591 | // InternPool index. |
| 19586 | 19592 | |
| 19587 | 19593 | const new_decl_index = try sema.createAnonymousDeclTypeNamed(block, src, .{ |
| 19588 | | .ty = Type.type, |
| 19589 | | .val = undefined, |
| 19594 | .ty = Type.noreturn, |
| 19595 | .val = Value.@"unreachable", |
| 19590 | 19596 | }, name_strategy, "union", inst); |
| 19591 | 19597 | const new_decl = mod.declPtr(new_decl_index); |
| 19592 | 19598 | new_decl.owns_tv = true; |
| ... | ... | @@ -19629,6 +19635,7 @@ fn zirReify( |
| 19629 | 19635 | // TODO: figure out InternPool removals for incremental compilation |
| 19630 | 19636 | //errdefer ip.remove(union_ty); |
| 19631 | 19637 | |
| 19638 | new_decl.ty = Type.type; |
| 19632 | 19639 | new_decl.val = union_ty.toValue(); |
| 19633 | 19640 | new_namespace.ty = union_ty.toType(); |
| 19634 | 19641 | |
| ... | ... | @@ -19886,8 +19893,8 @@ fn reifyStruct( |
| 19886 | 19893 | // InternPool index. |
| 19887 | 19894 | |
| 19888 | 19895 | const new_decl_index = try sema.createAnonymousDeclTypeNamed(block, src, .{ |
| 19889 | | .ty = Type.type, |
| 19890 | | .val = undefined, |
| 19896 | .ty = Type.noreturn, |
| 19897 | .val = Value.@"unreachable", |
| 19891 | 19898 | }, name_strategy, "struct", inst); |
| 19892 | 19899 | const new_decl = mod.declPtr(new_decl_index); |
| 19893 | 19900 | new_decl.owns_tv = true; |
| ... | ... | @@ -19924,6 +19931,7 @@ fn reifyStruct( |
| 19924 | 19931 | // TODO: figure out InternPool removals for incremental compilation |
| 19925 | 19932 | //errdefer ip.remove(struct_ty); |
| 19926 | 19933 | |
| 19934 | new_decl.ty = Type.type; |
| 19927 | 19935 | new_decl.val = struct_ty.toValue(); |
| 19928 | 19936 | new_namespace.ty = struct_ty.toType(); |
| 19929 | 19937 | |
| ... | ... | @@ -33441,8 +33449,8 @@ fn generateUnionTagTypeNumbered( |
| 33441 | 33449 | break :name try ip.getOrPutTrailingString(gpa, ip.string_bytes.items.len - start); |
| 33442 | 33450 | }; |
| 33443 | 33451 | try mod.initNewAnonDecl(new_decl_index, src_decl.src_line, block.namespace, .{ |
| 33444 | | .ty = Type.type, |
| 33445 | | .val = undefined, |
| 33452 | .ty = Type.noreturn, |
| 33453 | .val = Value.@"unreachable", |
| 33446 | 33454 | }, name); |
| 33447 | 33455 | errdefer mod.abortAnonDecl(new_decl_index); |
| 33448 | 33456 | |
| ... | ... | @@ -33463,6 +33471,7 @@ fn generateUnionTagTypeNumbered( |
| 33463 | 33471 | .tag_mode = .explicit, |
| 33464 | 33472 | } }); |
| 33465 | 33473 | |
| 33474 | new_decl.ty = Type.type; |
| 33466 | 33475 | new_decl.val = enum_ty.toValue(); |
| 33467 | 33476 | |
| 33468 | 33477 | try mod.finalizeAnonDecl(new_decl_index); |
| ... | ... | @@ -33482,8 +33491,8 @@ fn generateUnionTagTypeSimple( |
| 33482 | 33491 | const new_decl_index = new_decl_index: { |
| 33483 | 33492 | const union_obj = maybe_union_obj orelse { |
| 33484 | 33493 | break :new_decl_index try mod.createAnonymousDecl(block, .{ |
| 33485 | | .ty = Type.type, |
| 33486 | | .val = undefined, |
| 33494 | .ty = Type.noreturn, |
| 33495 | .val = Value.@"unreachable", |
| 33487 | 33496 | }); |
| 33488 | 33497 | }; |
| 33489 | 33498 | const src_decl = mod.declPtr(block.src_decl); |
| ... | ... | @@ -33501,8 +33510,8 @@ fn generateUnionTagTypeSimple( |
| 33501 | 33510 | break :name try ip.getOrPutTrailingString(gpa, ip.string_bytes.items.len - start); |
| 33502 | 33511 | }; |
| 33503 | 33512 | try mod.initNewAnonDecl(new_decl_index, src_decl.src_line, block.namespace, .{ |
| 33504 | | .ty = Type.type, |
| 33505 | | .val = undefined, |
| 33513 | .ty = Type.noreturn, |
| 33514 | .val = Value.@"unreachable", |
| 33506 | 33515 | }, name); |
| 33507 | 33516 | mod.declPtr(new_decl_index).name_fully_qualified = true; |
| 33508 | 33517 | break :new_decl_index new_decl_index; |
| ... | ... | @@ -33523,6 +33532,7 @@ fn generateUnionTagTypeSimple( |
| 33523 | 33532 | |
| 33524 | 33533 | const new_decl = mod.declPtr(new_decl_index); |
| 33525 | 33534 | new_decl.owns_tv = true; |
| 33535 | new_decl.ty = Type.type; |
| 33526 | 33536 | new_decl.val = enum_ty.toValue(); |
| 33527 | 33537 | |
| 33528 | 33538 | try mod.finalizeAnonDecl(new_decl_index); |