Skip to content
This repository has been archived by the owner on Sep 27, 2024. It is now read-only.

Commit

Permalink
compiler: namespace type equivalence based on AST node + captures
Browse files Browse the repository at this point in the history
This implements the accepted proposal ziglang#18816. Namespace-owning types
(struct, enum, union, opaque) are no longer unique whenever analysed;
instead, their identity is determined based on their AST node and the
set of values they capture.

Reified types (`@Type`) are deduplicated based on the structure of the
type created. For instance, if two structs are created by the same
reification with identical fields, layout, etc, they will be the same
type.

This commit does not produce a working compiler; the next commit, adding
captures for decl references, is necessary. It felt appropriate to split
this up.

Resolves: ziglang#18816
  • Loading branch information
mlugg authored and RossComputerGuy committed Mar 20, 2024
1 parent cdad3c1 commit c3687e5
Show file tree
Hide file tree
Showing 5 changed files with 1,709 additions and 1,262 deletions.
Loading

0 comments on commit c3687e5

Please sign in to comment.