| ... | @@ -176,6 +176,13 @@ pub const Decl = struct { | ... | @@ -176,6 +176,13 @@ pub const Decl = struct { |
| 176 | /// This is populated regardless of semantic analysis and code generation. | 176 | /// This is populated regardless of semantic analysis and code generation. |
| 177 | link: link.File.Elf.TextBlock = link.File.Elf.TextBlock.empty, | 177 | link: link.File.Elf.TextBlock = link.File.Elf.TextBlock.empty, |
| 178 | | 178 | |
| | 179 | /// Represents the function in the linked output file, if the `Decl` is a function. |
| | 180 | /// This is stored here and not in `Fn` because `Decl` survives across updates but |
| | 181 | /// `Fn` does not. |
| | 182 | /// TODO Look into making `Fn` a longer lived structure and moving this field there |
| | 183 | /// to save on memory usage. |
| | 184 | fn_link: link.File.Elf.SrcFn = link.File.Elf.SrcFn.empty, |
| | 185 | |
| 179 | contents_hash: std.zig.SrcHash, | 186 | contents_hash: std.zig.SrcHash, |
| 180 | | 187 | |
| 181 | /// The shallow set of other decls whose typed_value could possibly change if this Decl's | 188 | /// The shallow set of other decls whose typed_value could possibly change if this Decl's |
| ... | @@ -280,9 +287,6 @@ pub const Fn = struct { | ... | @@ -280,9 +287,6 @@ pub const Fn = struct { |
| 280 | }, | 287 | }, |
| 281 | owner_decl: *Decl, | 288 | owner_decl: *Decl, |
| 282 | | 289 | |
| 283 | /// Represents the function in the linked output file. | | |
| 284 | link: link.File.Elf.SrcFn = link.File.Elf.SrcFn.empty, | | |
| 285 | | | |
| 286 | /// This memory is temporary and points to stack memory for the duration | 290 | /// This memory is temporary and points to stack memory for the duration |
| 287 | /// of Fn analysis. | 291 | /// of Fn analysis. |
| 288 | pub const Analysis = struct { | 292 | pub const Analysis = struct { |