diff options
| author | 2022-08-24 19:52:42 +0200 | |
|---|---|---|
| committer | 2022-08-24 19:52:42 +0200 | |
| commit | 4f479ac68028a89c8e545f72335642c42a5c4efe (patch) | |
| tree | fb07ab4811c58f133edc6bcc7171f71945496d20 /src/env.cff | |
| parent | 12e1b45da9b79247f4655332c298c08a2ad5c9b4 (diff) | |
slice and stuff
Diffstat (limited to 'src/env.cff')
| -rw-r--r-- | src/env.cff | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/env.cff b/src/env.cff index 6bc24fe..04dc81d 100644 --- a/src/env.cff +++ b/src/env.cff @@ -32,12 +32,20 @@ extern fn envput_alloc(env *Env, alloc *Allocator, decl Decl, old **const Decl) switch { case old.u.#tag == :Fn and decl.u.#tag == :Fn and decl.u.Fn.ty == old.u.Fn.ty and (old.u.Fn.body->empty() or decl.u.Fn.body->empty()); + case old.u.#tag == :Ty and decl.u.#tag == :Ty and old.u.Ty == decl.u.Ty; + case old.u.#tag == :Def and decl.u.#tag == :Def and memcmp(&old.u.Def, &decl.u.Def, sizeof(old.u.Def)) == 0; + + case old.u.#tag == :Static and decl.u.#tag == :Static + and memcmp(&old.u.Static, &decl.u.Static, sizeof(old.u.Static)) == 0; + case old.u.#tag == :Macro and decl.u.#tag == :Macro and memcmp(&old.u.Macro, &decl.u.Macro, sizeof(old.u.Macro)) == 0; + case decl.u.#tag == :Let; + case env != old.myenv; case else; |