Defer resolving the eval blocks and value blocks of generics and specifics until we've finished other resolution work. (#4202)

This avoids import cycles, and reduces the number of temporary vectors
we build (and potentially throw away on retry). Import the self specific
when importing a generic, now that there's no risk that will introduce
cycles.

Note that we could take the same approach to import classes, interfaces,
and so on, instead of the current third phase of resolution for those
instructions, but in this PR I'm just addressing the import cycle I'm
currently seeing in a work-in-progress PR.
This commit is contained in:
Richard Smith authored and GitHub committed 2024-08-09 00:21:24 +00:00
1 parent 0ac47114ac
commit b2a13afb73
33 files changed
+444 -105

No files matched your search

@@ -222,3 +222,7 @@ var arr: [i32; 1 + 2] = (3, 4, 3 + 4);
// CHECK:STDOUT: return
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @Op.2(constants.%Self) {
// CHECK:STDOUT: %Self => constants.%Self
// CHECK:STDOUT: }
// CHECK:STDOUT: