| ... | @@ -4006,7 +4006,6 @@ fn zirResolveInferredAlloc(sema: *Sema, block: *Block, inst: Zir.Inst.Index) Com | ... | @@ -4006,7 +4006,6 @@ fn zirResolveInferredAlloc(sema: *Sema, block: *Block, inst: Zir.Inst.Index) Com |
| 4006 | .inferred_alloc_comptime => { | 4006 | .inferred_alloc_comptime => { |
| 4007 | const iac = sema.air_instructions.items(.data)[ptr_inst].inferred_alloc_comptime; | 4007 | const iac = sema.air_instructions.items(.data)[ptr_inst].inferred_alloc_comptime; |
| 4008 | const decl_index = iac.decl_index; | 4008 | const decl_index = iac.decl_index; |
| 4009 | try mod.declareDeclDependency(sema.owner_decl_index, decl_index); | | |
| 4010 | | 4009 | |
| 4011 | const decl = mod.declPtr(decl_index); | 4010 | const decl = mod.declPtr(decl_index); |
| 4012 | if (iac.is_const) _ = try decl.internValue(mod); | 4011 | if (iac.is_const) _ = try decl.internValue(mod); |
| ... | @@ -6411,7 +6410,6 @@ fn lookupInNamespace( | ... | @@ -6411,7 +6410,6 @@ fn lookupInNamespace( |
| 6411 | const namespace_decl_index = namespace.getDeclIndex(mod); | 6410 | const namespace_decl_index = namespace.getDeclIndex(mod); |
| 6412 | const namespace_decl = mod.declPtr(namespace_decl_index); | 6411 | const namespace_decl = mod.declPtr(namespace_decl_index); |
| 6413 | if (namespace_decl.analysis == .file_failure) { | 6412 | if (namespace_decl.analysis == .file_failure) { |
| 6414 | try mod.declareDeclDependency(sema.owner_decl_index, namespace_decl_index); | | |
| 6415 | return error.AnalysisFail; | 6413 | return error.AnalysisFail; |
| 6416 | } | 6414 | } |
| 6417 | | 6415 | |
| ... | @@ -6473,7 +6471,6 @@ fn lookupInNamespace( | ... | @@ -6473,7 +6471,6 @@ fn lookupInNamespace( |
| 6473 | 0 => {}, | 6471 | 0 => {}, |
| 6474 | 1 => { | 6472 | 1 => { |
| 6475 | const decl_index = candidates.items[0]; | 6473 | const decl_index = candidates.items[0]; |
| 6476 | try mod.declareDeclDependency(sema.owner_decl_index, decl_index); | | |
| 6477 | return decl_index; | 6474 | return decl_index; |
| 6478 | }, | 6475 | }, |
| 6479 | else => { | 6476 | else => { |
| ... | @@ -6491,14 +6488,9 @@ fn lookupInNamespace( | ... | @@ -6491,14 +6488,9 @@ fn lookupInNamespace( |
| 6491 | }, | 6488 | }, |
| 6492 | } | 6489 | } |
| 6493 | } else if (namespace.decls.getKeyAdapted(ident_name, Module.DeclAdapter{ .mod = mod })) |decl_index| { | 6490 | } else if (namespace.decls.getKeyAdapted(ident_name, Module.DeclAdapter{ .mod = mod })) |decl_index| { |
| 6494 | try mod.declareDeclDependency(sema.owner_decl_index, decl_index); | | |
| 6495 | return decl_index; | 6491 | return decl_index; |
| 6496 | } | 6492 | } |
| 6497 | | 6493 | |
| 6498 | // TODO This dependency is too strong. Really, it should only be a dependency | | |
| 6499 | // on the non-existence of `ident_name` in the namespace. We can lessen the number of | | |
| 6500 | // outdated declarations by making this dependency more sophisticated. | | |
| 6501 | try mod.declareDeclDependency(sema.owner_decl_index, namespace_decl_index); | | |
| 6502 | return null; | 6494 | return null; |
| 6503 | } | 6495 | } |
| 6504 | | 6496 | |
| ... | @@ -7318,8 +7310,6 @@ fn analyzeCall( | ... | @@ -7318,8 +7310,6 @@ fn analyzeCall( |
| 7318 | ); | 7310 | ); |
| 7319 | defer ics.deinit(); | 7311 | defer ics.deinit(); |
| 7320 | | 7312 | |
| 7321 | try mod.declareDeclDependencyType(ics.callee().owner_decl_index, module_fn.owner_decl, .function_body); | | |
| 7322 | | | |
| 7323 | var child_block: Block = .{ | 7313 | var child_block: Block = .{ |
| 7324 | .parent = null, | 7314 | .parent = null, |
| 7325 | .sema = sema, | 7315 | .sema = sema, |
| ... | @@ -16856,7 +16846,6 @@ fn zirTypeInfo(sema: *Sema, block: *Block, inst: Zir.Inst.Index) CompileError!Ai | ... | @@ -16856,7 +16846,6 @@ fn zirTypeInfo(sema: *Sema, block: *Block, inst: Zir.Inst.Index) CompileError!Ai |
| 16856 | type_info_ty.getNamespaceIndex(mod).unwrap().?, | 16846 | type_info_ty.getNamespaceIndex(mod).unwrap().?, |
| 16857 | try ip.getOrPutString(gpa, "Fn"), | 16847 | try ip.getOrPutString(gpa, "Fn"), |
| 16858 | )).?; | 16848 | )).?; |
| 16859 | try mod.declareDeclDependency(sema.owner_decl_index, fn_info_decl_index); | | |
| 16860 | try sema.ensureDeclAnalyzed(fn_info_decl_index); | 16849 | try sema.ensureDeclAnalyzed(fn_info_decl_index); |
| 16861 | const fn_info_decl = mod.declPtr(fn_info_decl_index); | 16850 | const fn_info_decl = mod.declPtr(fn_info_decl_index); |
| 16862 | const fn_info_ty = fn_info_decl.val.toType(); | 16851 | const fn_info_ty = fn_info_decl.val.toType(); |
| ... | @@ -16867,7 +16856,6 @@ fn zirTypeInfo(sema: *Sema, block: *Block, inst: Zir.Inst.Index) CompileError!Ai | ... | @@ -16867,7 +16856,6 @@ fn zirTypeInfo(sema: *Sema, block: *Block, inst: Zir.Inst.Index) CompileError!Ai |
| 16867 | fn_info_ty.getNamespaceIndex(mod).unwrap().?, | 16856 | fn_info_ty.getNamespaceIndex(mod).unwrap().?, |
| 16868 | try ip.getOrPutString(gpa, "Param"), | 16857 | try ip.getOrPutString(gpa, "Param"), |
| 16869 | )).?; | 16858 | )).?; |
| 16870 | try mod.declareDeclDependency(sema.owner_decl_index, param_info_decl_index); | | |
| 16871 | try sema.ensureDeclAnalyzed(param_info_decl_index); | 16859 | try sema.ensureDeclAnalyzed(param_info_decl_index); |
| 16872 | const param_info_decl = mod.declPtr(param_info_decl_index); | 16860 | const param_info_decl = mod.declPtr(param_info_decl_index); |
| 16873 | const param_info_ty = param_info_decl.val.toType(); | 16861 | const param_info_ty = param_info_decl.val.toType(); |
| ... | @@ -16967,7 +16955,6 @@ fn zirTypeInfo(sema: *Sema, block: *Block, inst: Zir.Inst.Index) CompileError!Ai | ... | @@ -16967,7 +16955,6 @@ fn zirTypeInfo(sema: *Sema, block: *Block, inst: Zir.Inst.Index) CompileError!Ai |
| 16967 | type_info_ty.getNamespaceIndex(mod).unwrap().?, | 16955 | type_info_ty.getNamespaceIndex(mod).unwrap().?, |
| 16968 | try ip.getOrPutString(gpa, "Int"), | 16956 | try ip.getOrPutString(gpa, "Int"), |
| 16969 | )).?; | 16957 | )).?; |
| 16970 | try mod.declareDeclDependency(sema.owner_decl_index, int_info_decl_index); | | |
| 16971 | try sema.ensureDeclAnalyzed(int_info_decl_index); | 16958 | try sema.ensureDeclAnalyzed(int_info_decl_index); |
| 16972 | const int_info_decl = mod.declPtr(int_info_decl_index); | 16959 | const int_info_decl = mod.declPtr(int_info_decl_index); |
| 16973 | const int_info_ty = int_info_decl.val.toType(); | 16960 | const int_info_ty = int_info_decl.val.toType(); |
| ... | @@ -16996,7 +16983,6 @@ fn zirTypeInfo(sema: *Sema, block: *Block, inst: Zir.Inst.Index) CompileError!Ai | ... | @@ -16996,7 +16983,6 @@ fn zirTypeInfo(sema: *Sema, block: *Block, inst: Zir.Inst.Index) CompileError!Ai |
| 16996 | type_info_ty.getNamespaceIndex(mod).unwrap().?, | 16983 | type_info_ty.getNamespaceIndex(mod).unwrap().?, |
| 16997 | try ip.getOrPutString(gpa, "Float"), | 16984 | try ip.getOrPutString(gpa, "Float"), |
| 16998 | )).?; | 16985 | )).?; |
| 16999 | try mod.declareDeclDependency(sema.owner_decl_index, float_info_decl_index); | | |
| 17000 | try sema.ensureDeclAnalyzed(float_info_decl_index); | 16986 | try sema.ensureDeclAnalyzed(float_info_decl_index); |
| 17001 | const float_info_decl = mod.declPtr(float_info_decl_index); | 16987 | const float_info_decl = mod.declPtr(float_info_decl_index); |
| 17002 | const float_info_ty = float_info_decl.val.toType(); | 16988 | const float_info_ty = float_info_decl.val.toType(); |
| ... | @@ -17029,7 +17015,6 @@ fn zirTypeInfo(sema: *Sema, block: *Block, inst: Zir.Inst.Index) CompileError!Ai | ... | @@ -17029,7 +17015,6 @@ fn zirTypeInfo(sema: *Sema, block: *Block, inst: Zir.Inst.Index) CompileError!Ai |
| 17029 | (try sema.getBuiltinType("Type")).getNamespaceIndex(mod).unwrap().?, | 17015 | (try sema.getBuiltinType("Type")).getNamespaceIndex(mod).unwrap().?, |
| 17030 | try ip.getOrPutString(gpa, "Pointer"), | 17016 | try ip.getOrPutString(gpa, "Pointer"), |
| 17031 | )).?; | 17017 | )).?; |
| 17032 | try mod.declareDeclDependency(sema.owner_decl_index, decl_index); | | |
| 17033 | try sema.ensureDeclAnalyzed(decl_index); | 17018 | try sema.ensureDeclAnalyzed(decl_index); |
| 17034 | const decl = mod.declPtr(decl_index); | 17019 | const decl = mod.declPtr(decl_index); |
| 17035 | break :t decl.val.toType(); | 17020 | break :t decl.val.toType(); |
| ... | @@ -17041,7 +17026,6 @@ fn zirTypeInfo(sema: *Sema, block: *Block, inst: Zir.Inst.Index) CompileError!Ai | ... | @@ -17041,7 +17026,6 @@ fn zirTypeInfo(sema: *Sema, block: *Block, inst: Zir.Inst.Index) CompileError!Ai |
| 17041 | pointer_ty.getNamespaceIndex(mod).unwrap().?, | 17026 | pointer_ty.getNamespaceIndex(mod).unwrap().?, |
| 17042 | try ip.getOrPutString(gpa, "Size"), | 17027 | try ip.getOrPutString(gpa, "Size"), |
| 17043 | )).?; | 17028 | )).?; |
| 17044 | try mod.declareDeclDependency(sema.owner_decl_index, decl_index); | | |
| 17045 | try sema.ensureDeclAnalyzed(decl_index); | 17029 | try sema.ensureDeclAnalyzed(decl_index); |
| 17046 | const decl = mod.declPtr(decl_index); | 17030 | const decl = mod.declPtr(decl_index); |
| 17047 | break :t decl.val.toType(); | 17031 | break :t decl.val.toType(); |
| ... | @@ -17085,7 +17069,6 @@ fn zirTypeInfo(sema: *Sema, block: *Block, inst: Zir.Inst.Index) CompileError!Ai | ... | @@ -17085,7 +17069,6 @@ fn zirTypeInfo(sema: *Sema, block: *Block, inst: Zir.Inst.Index) CompileError!Ai |
| 17085 | type_info_ty.getNamespaceIndex(mod).unwrap().?, | 17069 | type_info_ty.getNamespaceIndex(mod).unwrap().?, |
| 17086 | try ip.getOrPutString(gpa, "Array"), | 17070 | try ip.getOrPutString(gpa, "Array"), |
| 17087 | )).?; | 17071 | )).?; |
| 17088 | try mod.declareDeclDependency(sema.owner_decl_index, array_field_ty_decl_index); | | |
| 17089 | try sema.ensureDeclAnalyzed(array_field_ty_decl_index); | 17072 | try sema.ensureDeclAnalyzed(array_field_ty_decl_index); |
| 17090 | const array_field_ty_decl = mod.declPtr(array_field_ty_decl_index); | 17073 | const array_field_ty_decl = mod.declPtr(array_field_ty_decl_index); |
| 17091 | break :t array_field_ty_decl.val.toType(); | 17074 | break :t array_field_ty_decl.val.toType(); |
| ... | @@ -17117,7 +17100,6 @@ fn zirTypeInfo(sema: *Sema, block: *Block, inst: Zir.Inst.Index) CompileError!Ai | ... | @@ -17117,7 +17100,6 @@ fn zirTypeInfo(sema: *Sema, block: *Block, inst: Zir.Inst.Index) CompileError!Ai |
| 17117 | type_info_ty.getNamespaceIndex(mod).unwrap().?, | 17100 | type_info_ty.getNamespaceIndex(mod).unwrap().?, |
| 17118 | try ip.getOrPutString(gpa, "Vector"), | 17101 | try ip.getOrPutString(gpa, "Vector"), |
| 17119 | )).?; | 17102 | )).?; |
| 17120 | try mod.declareDeclDependency(sema.owner_decl_index, vector_field_ty_decl_index); | | |
| 17121 | try sema.ensureDeclAnalyzed(vector_field_ty_decl_index); | 17103 | try sema.ensureDeclAnalyzed(vector_field_ty_decl_index); |
| 17122 | const vector_field_ty_decl = mod.declPtr(vector_field_ty_decl_index); | 17104 | const vector_field_ty_decl = mod.declPtr(vector_field_ty_decl_index); |
| 17123 | break :t vector_field_ty_decl.val.toType(); | 17105 | break :t vector_field_ty_decl.val.toType(); |
| ... | @@ -17147,7 +17129,6 @@ fn zirTypeInfo(sema: *Sema, block: *Block, inst: Zir.Inst.Index) CompileError!Ai | ... | @@ -17147,7 +17129,6 @@ fn zirTypeInfo(sema: *Sema, block: *Block, inst: Zir.Inst.Index) CompileError!Ai |
| 17147 | type_info_ty.getNamespaceIndex(mod).unwrap().?, | 17129 | type_info_ty.getNamespaceIndex(mod).unwrap().?, |
| 17148 | try ip.getOrPutString(gpa, "Optional"), | 17130 | try ip.getOrPutString(gpa, "Optional"), |
| 17149 | )).?; | 17131 | )).?; |
| 17150 | try mod.declareDeclDependency(sema.owner_decl_index, optional_field_ty_decl_index); | | |
| 17151 | try sema.ensureDeclAnalyzed(optional_field_ty_decl_index); | 17132 | try sema.ensureDeclAnalyzed(optional_field_ty_decl_index); |
| 17152 | const optional_field_ty_decl = mod.declPtr(optional_field_ty_decl_index); | 17133 | const optional_field_ty_decl = mod.declPtr(optional_field_ty_decl_index); |
| 17153 | break :t optional_field_ty_decl.val.toType(); | 17134 | break :t optional_field_ty_decl.val.toType(); |
| ... | @@ -17175,7 +17156,6 @@ fn zirTypeInfo(sema: *Sema, block: *Block, inst: Zir.Inst.Index) CompileError!Ai | ... | @@ -17175,7 +17156,6 @@ fn zirTypeInfo(sema: *Sema, block: *Block, inst: Zir.Inst.Index) CompileError!Ai |
| 17175 | type_info_ty.getNamespaceIndex(mod).unwrap().?, | 17156 | type_info_ty.getNamespaceIndex(mod).unwrap().?, |
| 17176 | try ip.getOrPutString(gpa, "Error"), | 17157 | try ip.getOrPutString(gpa, "Error"), |
| 17177 | )).?; | 17158 | )).?; |
| 17178 | try mod.declareDeclDependency(sema.owner_decl_index, set_field_ty_decl_index); | | |
| 17179 | try sema.ensureDeclAnalyzed(set_field_ty_decl_index); | 17159 | try sema.ensureDeclAnalyzed(set_field_ty_decl_index); |
| 17180 | const set_field_ty_decl = mod.declPtr(set_field_ty_decl_index); | 17160 | const set_field_ty_decl = mod.declPtr(set_field_ty_decl_index); |
| 17181 | break :t set_field_ty_decl.val.toType(); | 17161 | break :t set_field_ty_decl.val.toType(); |
| ... | @@ -17274,7 +17254,6 @@ fn zirTypeInfo(sema: *Sema, block: *Block, inst: Zir.Inst.Index) CompileError!Ai | ... | @@ -17274,7 +17254,6 @@ fn zirTypeInfo(sema: *Sema, block: *Block, inst: Zir.Inst.Index) CompileError!Ai |
| 17274 | type_info_ty.getNamespaceIndex(mod).unwrap().?, | 17254 | type_info_ty.getNamespaceIndex(mod).unwrap().?, |
| 17275 | try ip.getOrPutString(gpa, "ErrorUnion"), | 17255 | try ip.getOrPutString(gpa, "ErrorUnion"), |
| 17276 | )).?; | 17256 | )).?; |
| 17277 | try mod.declareDeclDependency(sema.owner_decl_index, error_union_field_ty_decl_index); | | |
| 17278 | try sema.ensureDeclAnalyzed(error_union_field_ty_decl_index); | 17257 | try sema.ensureDeclAnalyzed(error_union_field_ty_decl_index); |
| 17279 | const error_union_field_ty_decl = mod.declPtr(error_union_field_ty_decl_index); | 17258 | const error_union_field_ty_decl = mod.declPtr(error_union_field_ty_decl_index); |
| 17280 | break :t error_union_field_ty_decl.val.toType(); | 17259 | break :t error_union_field_ty_decl.val.toType(); |
| ... | @@ -17305,7 +17284,6 @@ fn zirTypeInfo(sema: *Sema, block: *Block, inst: Zir.Inst.Index) CompileError!Ai | ... | @@ -17305,7 +17284,6 @@ fn zirTypeInfo(sema: *Sema, block: *Block, inst: Zir.Inst.Index) CompileError!Ai |
| 17305 | type_info_ty.getNamespaceIndex(mod).unwrap().?, | 17284 | type_info_ty.getNamespaceIndex(mod).unwrap().?, |
| 17306 | try ip.getOrPutString(gpa, "EnumField"), | 17285 | try ip.getOrPutString(gpa, "EnumField"), |
| 17307 | )).?; | 17286 | )).?; |
| 17308 | try mod.declareDeclDependency(sema.owner_decl_index, enum_field_ty_decl_index); | | |
| 17309 | try sema.ensureDeclAnalyzed(enum_field_ty_decl_index); | 17287 | try sema.ensureDeclAnalyzed(enum_field_ty_decl_index); |
| 17310 | const enum_field_ty_decl = mod.declPtr(enum_field_ty_decl_index); | 17288 | const enum_field_ty_decl = mod.declPtr(enum_field_ty_decl_index); |
| 17311 | break :t enum_field_ty_decl.val.toType(); | 17289 | break :t enum_field_ty_decl.val.toType(); |
| ... | @@ -17390,7 +17368,6 @@ fn zirTypeInfo(sema: *Sema, block: *Block, inst: Zir.Inst.Index) CompileError!Ai | ... | @@ -17390,7 +17368,6 @@ fn zirTypeInfo(sema: *Sema, block: *Block, inst: Zir.Inst.Index) CompileError!Ai |
| 17390 | type_info_ty.getNamespaceIndex(mod).unwrap().?, | 17368 | type_info_ty.getNamespaceIndex(mod).unwrap().?, |
| 17391 | try ip.getOrPutString(gpa, "Enum"), | 17369 | try ip.getOrPutString(gpa, "Enum"), |
| 17392 | )).?; | 17370 | )).?; |
| 17393 | try mod.declareDeclDependency(sema.owner_decl_index, type_enum_ty_decl_index); | | |
| 17394 | try sema.ensureDeclAnalyzed(type_enum_ty_decl_index); | 17371 | try sema.ensureDeclAnalyzed(type_enum_ty_decl_index); |
| 17395 | const type_enum_ty_decl = mod.declPtr(type_enum_ty_decl_index); | 17372 | const type_enum_ty_decl = mod.declPtr(type_enum_ty_decl_index); |
| 17396 | break :t type_enum_ty_decl.val.toType(); | 17373 | break :t type_enum_ty_decl.val.toType(); |
| ... | @@ -17423,7 +17400,6 @@ fn zirTypeInfo(sema: *Sema, block: *Block, inst: Zir.Inst.Index) CompileError!Ai | ... | @@ -17423,7 +17400,6 @@ fn zirTypeInfo(sema: *Sema, block: *Block, inst: Zir.Inst.Index) CompileError!Ai |
| 17423 | type_info_ty.getNamespaceIndex(mod).unwrap().?, | 17400 | type_info_ty.getNamespaceIndex(mod).unwrap().?, |
| 17424 | try ip.getOrPutString(gpa, "Union"), | 17401 | try ip.getOrPutString(gpa, "Union"), |
| 17425 | )).?; | 17402 | )).?; |
| 17426 | try mod.declareDeclDependency(sema.owner_decl_index, type_union_ty_decl_index); | | |
| 17427 | try sema.ensureDeclAnalyzed(type_union_ty_decl_index); | 17403 | try sema.ensureDeclAnalyzed(type_union_ty_decl_index); |
| 17428 | const type_union_ty_decl = mod.declPtr(type_union_ty_decl_index); | 17404 | const type_union_ty_decl = mod.declPtr(type_union_ty_decl_index); |
| 17429 | break :t type_union_ty_decl.val.toType(); | 17405 | break :t type_union_ty_decl.val.toType(); |
| ... | @@ -17436,7 +17412,6 @@ fn zirTypeInfo(sema: *Sema, block: *Block, inst: Zir.Inst.Index) CompileError!Ai | ... | @@ -17436,7 +17412,6 @@ fn zirTypeInfo(sema: *Sema, block: *Block, inst: Zir.Inst.Index) CompileError!Ai |
| 17436 | type_info_ty.getNamespaceIndex(mod).unwrap().?, | 17412 | type_info_ty.getNamespaceIndex(mod).unwrap().?, |
| 17437 | try ip.getOrPutString(gpa, "UnionField"), | 17413 | try ip.getOrPutString(gpa, "UnionField"), |
| 17438 | )).?; | 17414 | )).?; |
| 17439 | try mod.declareDeclDependency(sema.owner_decl_index, union_field_ty_decl_index); | | |
| 17440 | try sema.ensureDeclAnalyzed(union_field_ty_decl_index); | 17415 | try sema.ensureDeclAnalyzed(union_field_ty_decl_index); |
| 17441 | const union_field_ty_decl = mod.declPtr(union_field_ty_decl_index); | 17416 | const union_field_ty_decl = mod.declPtr(union_field_ty_decl_index); |
| 17442 | break :t union_field_ty_decl.val.toType(); | 17417 | break :t union_field_ty_decl.val.toType(); |
| ... | @@ -17531,7 +17506,6 @@ fn zirTypeInfo(sema: *Sema, block: *Block, inst: Zir.Inst.Index) CompileError!Ai | ... | @@ -17531,7 +17506,6 @@ fn zirTypeInfo(sema: *Sema, block: *Block, inst: Zir.Inst.Index) CompileError!Ai |
| 17531 | (try sema.getBuiltinType("Type")).getNamespaceIndex(mod).unwrap().?, | 17506 | (try sema.getBuiltinType("Type")).getNamespaceIndex(mod).unwrap().?, |
| 17532 | try ip.getOrPutString(gpa, "ContainerLayout"), | 17507 | try ip.getOrPutString(gpa, "ContainerLayout"), |
| 17533 | )).?; | 17508 | )).?; |
| 17534 | try mod.declareDeclDependency(sema.owner_decl_index, decl_index); | | |
| 17535 | try sema.ensureDeclAnalyzed(decl_index); | 17509 | try sema.ensureDeclAnalyzed(decl_index); |
| 17536 | const decl = mod.declPtr(decl_index); | 17510 | const decl = mod.declPtr(decl_index); |
| 17537 | break :t decl.val.toType(); | 17511 | break :t decl.val.toType(); |
| ... | @@ -17565,7 +17539,6 @@ fn zirTypeInfo(sema: *Sema, block: *Block, inst: Zir.Inst.Index) CompileError!Ai | ... | @@ -17565,7 +17539,6 @@ fn zirTypeInfo(sema: *Sema, block: *Block, inst: Zir.Inst.Index) CompileError!Ai |
| 17565 | type_info_ty.getNamespaceIndex(mod).unwrap().?, | 17539 | type_info_ty.getNamespaceIndex(mod).unwrap().?, |
| 17566 | try ip.getOrPutString(gpa, "Struct"), | 17540 | try ip.getOrPutString(gpa, "Struct"), |
| 17567 | )).?; | 17541 | )).?; |
| 17568 | try mod.declareDeclDependency(sema.owner_decl_index, type_struct_ty_decl_index); | | |
| 17569 | try sema.ensureDeclAnalyzed(type_struct_ty_decl_index); | 17542 | try sema.ensureDeclAnalyzed(type_struct_ty_decl_index); |
| 17570 | const type_struct_ty_decl = mod.declPtr(type_struct_ty_decl_index); | 17543 | const type_struct_ty_decl = mod.declPtr(type_struct_ty_decl_index); |
| 17571 | break :t type_struct_ty_decl.val.toType(); | 17544 | break :t type_struct_ty_decl.val.toType(); |
| ... | @@ -17578,7 +17551,6 @@ fn zirTypeInfo(sema: *Sema, block: *Block, inst: Zir.Inst.Index) CompileError!Ai | ... | @@ -17578,7 +17551,6 @@ fn zirTypeInfo(sema: *Sema, block: *Block, inst: Zir.Inst.Index) CompileError!Ai |
| 17578 | type_info_ty.getNamespaceIndex(mod).unwrap().?, | 17551 | type_info_ty.getNamespaceIndex(mod).unwrap().?, |
| 17579 | try ip.getOrPutString(gpa, "StructField"), | 17552 | try ip.getOrPutString(gpa, "StructField"), |
| 17580 | )).?; | 17553 | )).?; |
| 17581 | try mod.declareDeclDependency(sema.owner_decl_index, struct_field_ty_decl_index); | | |
| 17582 | try sema.ensureDeclAnalyzed(struct_field_ty_decl_index); | 17554 | try sema.ensureDeclAnalyzed(struct_field_ty_decl_index); |
| 17583 | const struct_field_ty_decl = mod.declPtr(struct_field_ty_decl_index); | 17555 | const struct_field_ty_decl = mod.declPtr(struct_field_ty_decl_index); |
| 17584 | break :t struct_field_ty_decl.val.toType(); | 17556 | break :t struct_field_ty_decl.val.toType(); |
| ... | @@ -17751,7 +17723,6 @@ fn zirTypeInfo(sema: *Sema, block: *Block, inst: Zir.Inst.Index) CompileError!Ai | ... | @@ -17751,7 +17723,6 @@ fn zirTypeInfo(sema: *Sema, block: *Block, inst: Zir.Inst.Index) CompileError!Ai |
| 17751 | (try sema.getBuiltinType("Type")).getNamespaceIndex(mod).unwrap().?, | 17723 | (try sema.getBuiltinType("Type")).getNamespaceIndex(mod).unwrap().?, |
| 17752 | try ip.getOrPutString(gpa, "ContainerLayout"), | 17724 | try ip.getOrPutString(gpa, "ContainerLayout"), |
| 17753 | )).?; | 17725 | )).?; |
| 17754 | try mod.declareDeclDependency(sema.owner_decl_index, decl_index); | | |
| 17755 | try sema.ensureDeclAnalyzed(decl_index); | 17726 | try sema.ensureDeclAnalyzed(decl_index); |
| 17756 | const decl = mod.declPtr(decl_index); | 17727 | const decl = mod.declPtr(decl_index); |
| 17757 | break :t decl.val.toType(); | 17728 | break :t decl.val.toType(); |
| ... | @@ -17788,7 +17759,6 @@ fn zirTypeInfo(sema: *Sema, block: *Block, inst: Zir.Inst.Index) CompileError!Ai | ... | @@ -17788,7 +17759,6 @@ fn zirTypeInfo(sema: *Sema, block: *Block, inst: Zir.Inst.Index) CompileError!Ai |
| 17788 | type_info_ty.getNamespaceIndex(mod).unwrap().?, | 17759 | type_info_ty.getNamespaceIndex(mod).unwrap().?, |
| 17789 | try ip.getOrPutString(gpa, "Opaque"), | 17760 | try ip.getOrPutString(gpa, "Opaque"), |
| 17790 | )).?; | 17761 | )).?; |
| 17791 | try mod.declareDeclDependency(sema.owner_decl_index, type_opaque_ty_decl_index); | | |
| 17792 | try sema.ensureDeclAnalyzed(type_opaque_ty_decl_index); | 17762 | try sema.ensureDeclAnalyzed(type_opaque_ty_decl_index); |
| 17793 | const type_opaque_ty_decl = mod.declPtr(type_opaque_ty_decl_index); | 17763 | const type_opaque_ty_decl = mod.declPtr(type_opaque_ty_decl_index); |
| 17794 | break :t type_opaque_ty_decl.val.toType(); | 17764 | break :t type_opaque_ty_decl.val.toType(); |
| ... | @@ -17832,7 +17802,6 @@ fn typeInfoDecls( | ... | @@ -17832,7 +17802,6 @@ fn typeInfoDecls( |
| 17832 | type_info_ty.getNamespaceIndex(mod).unwrap().?, | 17802 | type_info_ty.getNamespaceIndex(mod).unwrap().?, |
| 17833 | try mod.intern_pool.getOrPutString(gpa, "Declaration"), | 17803 | try mod.intern_pool.getOrPutString(gpa, "Declaration"), |
| 17834 | )).?; | 17804 | )).?; |
| 17835 | try mod.declareDeclDependency(sema.owner_decl_index, declaration_ty_decl_index); | | |
| 17836 | try sema.ensureDeclAnalyzed(declaration_ty_decl_index); | 17805 | try sema.ensureDeclAnalyzed(declaration_ty_decl_index); |
| 17837 | const declaration_ty_decl = mod.declPtr(declaration_ty_decl_index); | 17806 | const declaration_ty_decl = mod.declPtr(declaration_ty_decl_index); |
| 17838 | break :t declaration_ty_decl.val.toType(); | 17807 | break :t declaration_ty_decl.val.toType(); |
| ... | @@ -25237,7 +25206,6 @@ fn zirBuiltinExtern( | ... | @@ -25237,7 +25206,6 @@ fn zirBuiltinExtern( |
| 25237 | new_decl.generation = mod.generation; | 25206 | new_decl.generation = mod.generation; |
| 25238 | } | 25207 | } |
| 25239 | | 25208 | |
| 25240 | try mod.declareDeclDependency(sema.owner_decl_index, new_decl_index); | | |
| 25241 | try sema.ensureDeclAnalyzed(new_decl_index); | 25209 | try sema.ensureDeclAnalyzed(new_decl_index); |
| 25242 | | 25210 | |
| 25243 | return Air.internedToRef((try mod.getCoerced((try mod.intern(.{ .ptr = .{ | 25211 | return Air.internedToRef((try mod.getCoerced((try mod.intern(.{ .ptr = .{ |
| ... | @@ -31640,7 +31608,6 @@ fn analyzeDeclRef(sema: *Sema, decl_index: Decl.Index) CompileError!Air.Inst.Ref | ... | @@ -31640,7 +31608,6 @@ fn analyzeDeclRef(sema: *Sema, decl_index: Decl.Index) CompileError!Air.Inst.Ref |
| 31640 | /// this function with `analyze_fn_body` set to true. | 31608 | /// this function with `analyze_fn_body` set to true. |
| 31641 | fn analyzeDeclRefInner(sema: *Sema, decl_index: Decl.Index, analyze_fn_body: bool) CompileError!Air.Inst.Ref { | 31609 | fn analyzeDeclRefInner(sema: *Sema, decl_index: Decl.Index, analyze_fn_body: bool) CompileError!Air.Inst.Ref { |
| 31642 | const mod = sema.mod; | 31610 | const mod = sema.mod; |
| 31643 | try mod.declareDeclDependency(sema.owner_decl_index, decl_index); | | |
| 31644 | try sema.ensureDeclAnalyzed(decl_index); | 31611 | try sema.ensureDeclAnalyzed(decl_index); |
| 31645 | | 31612 | |
| 31646 | const decl = mod.declPtr(decl_index); | 31613 | const decl = mod.declPtr(decl_index); |
| ... | @@ -36895,7 +36862,6 @@ fn analyzeComptimeAlloc( | ... | @@ -36895,7 +36862,6 @@ fn analyzeComptimeAlloc( |
| 36895 | decl.alignment = alignment; | 36862 | decl.alignment = alignment; |
| 36896 | | 36863 | |
| 36897 | try sema.comptime_mutable_decls.append(decl_index); | 36864 | try sema.comptime_mutable_decls.append(decl_index); |
| 36898 | try mod.declareDeclDependency(sema.owner_decl_index, decl_index); | | |
| 36899 | return Air.internedToRef((try mod.intern(.{ .ptr = .{ | 36865 | return Air.internedToRef((try mod.intern(.{ .ptr = .{ |
| 36900 | .ty = ptr_type.toIntern(), | 36866 | .ty = ptr_type.toIntern(), |
| 36901 | .addr = .{ .mut_decl = .{ | 36867 | .addr = .{ .mut_decl = .{ |