From 3b6ca1d35b950d67fff5964f0063dadf01f30e2d Mon Sep 17 00:00:00 2001 From: Jacob Young Date: Sun, 28 May 2023 02:41:22 -0400 Subject: Module: move memoized data to the intern pool This avoids memory management bugs with the previous implementation. --- src/type.zig | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) (limited to 'src/type.zig') diff --git a/src/type.zig b/src/type.zig index 0e30debf0a..bc2ce6fc7e 100644 --- a/src/type.zig +++ b/src/type.zig @@ -400,6 +400,9 @@ pub const Type = struct { .opt, .aggregate, .un, + // memoization, not types + .memoized_decl, + .memoized_call, => unreachable, } } @@ -613,6 +616,9 @@ pub const Type = struct { .opt, .aggregate, .un, + // memoization, not types + .memoized_decl, + .memoized_call, => unreachable, }, }; @@ -719,6 +725,9 @@ pub const Type = struct { .opt, .aggregate, .un, + // memoization, not types + .memoized_decl, + .memoized_call, => unreachable, }; } @@ -1050,6 +1059,9 @@ pub const Type = struct { .opt, .aggregate, .un, + // memoization, not types + .memoized_decl, + .memoized_call, => unreachable, }, } @@ -1464,6 +1476,9 @@ pub const Type = struct { .opt, .aggregate, .un, + // memoization, not types + .memoized_decl, + .memoized_call, => unreachable, }, } @@ -1695,6 +1710,9 @@ pub const Type = struct { .opt, .aggregate, .un, + // memoization, not types + .memoized_decl, + .memoized_call, => unreachable, } } @@ -2250,6 +2268,9 @@ pub const Type = struct { .opt, .aggregate, .un, + // memoization, not types + .memoized_decl, + .memoized_call, => unreachable, }, }; @@ -2586,6 +2607,9 @@ pub const Type = struct { .opt, .aggregate, .un, + // memoization, not types + .memoized_decl, + .memoized_call, => unreachable, }, }; @@ -2728,6 +2752,9 @@ pub const Type = struct { .opt, .aggregate, .un, + // memoization, not types + .memoized_decl, + .memoized_call, => unreachable, }, }; -- cgit v1.2.3