aboutsummaryrefslogtreecommitdiff
path: root/src/Module.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2022-03-22 15:42:09 -0700
committerAndrew Kelley <andrew@ziglang.org>2022-03-22 15:45:59 -0700
commit60d8c4739de14823c407245f01c9b7483f3b6e7f (patch)
tree8321a331d269b3ce4af0fdd88e99a6421f2a3b5d /src/Module.zig
parent593130ce0a4b06185fcb4806f8330857a1da9f92 (diff)
downloadzig-60d8c4739de14823c407245f01c9b7483f3b6e7f.tar.gz
zig-60d8c4739de14823c407245f01c9b7483f3b6e7f.zip
Sema: introduce a mechanism in Value to resolve types
This commit adds a new optional argument to several Value methods which provides the ability to resolve types if it comes to it. This prevents having duplicated logic inside both Sema and Value. With this commit, the "struct contains slice of itself" test is passing by exploiting the new lazy_align Value Tag.
Diffstat (limited to 'src/Module.zig')
-rw-r--r--src/Module.zig6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/Module.zig b/src/Module.zig
index 4164c2659c..7b27546f52 100644
--- a/src/Module.zig
+++ b/src/Module.zig
@@ -177,6 +177,12 @@ const MonomorphedFuncsContext = struct {
}
};
+pub const WipAnalysis = struct {
+ sema: *Sema,
+ block: *Sema.Block,
+ src: Module.LazySrcLoc,
+};
+
pub const MemoizedCallSet = std.HashMapUnmanaged(
MemoizedCall.Key,
MemoizedCall.Result,