From 60d8c4739de14823c407245f01c9b7483f3b6e7f Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Tue, 22 Mar 2022 15:42:09 -0700 Subject: 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. --- src/Module.zig | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/Module.zig') 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, -- cgit v1.2.3