0
Fork 0
mirror of https://codeberg.org/ziglang/zig synced 2026-11-18 07:05:05 +00:00

stage2: rework runtime, comptime, inline function calls

* ZIR function instructions encode the index of the block that
   contains the function instruction. This allows Zig to later scan the
   block and find the parameter instructions, which is needed for
   semantically analyzing function bodies.

 * Runtime function calls insert AIR arg instructions and then inserts
   Sema inst_map entries mapping the ZIR param instructions to them.

 * comptime/inline function call inserts Sema inst_map entries mapping
   the ZIR param instructions to the AIR callsite arguments.

With this commit we are back to the tests passing.
This commit is contained in:
Andrew Kelley 2021-08-03 17:29:59 -07:00
commit 609b84611d
5 changed files with 117 additions and 78 deletions