diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2023-09-14 19:59:58 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2023-09-15 00:55:07 -0700 |
| commit | 8592c5cdac41e4e04034e4f9a0fd8cb51e8c4257 (patch) | |
| tree | c7c69a498e603d5038c23ca1f925be53788b672d /src/type.zig | |
| parent | 4f952c7e0e36dab15f9359f55eb8714f8fe92bcf (diff) | |
| download | zig-8592c5cdac41e4e04034e4f9a0fd8cb51e8c4257.tar.gz zig-8592c5cdac41e4e04034e4f9a0fd8cb51e8c4257.zip | |
compiler: rework capture scopes in-memory layout
* Use 32-bit integers instead of pointers for compactness and
serialization friendliness.
* Use a separate hash map for runtime and comptime capture scopes,
avoiding the 1-bit union tag.
* Use a compact array representation instead of a tree of hash maps.
* Eliminate the only instance of ref-counting in the compiler, instead
relying on garbage collection (not implemented yet but is the plan for
almost all long-lived objects related to incremental compilation).
Because a code modification may need to access capture scope data, this
makes capture scope data long-lived state. My goal is to get incremental
compilation state serialization down to a single pwritev syscall, by
unifying the on-disk representation with the in-memory representation.
This commit eliminates the last remaining pointer field of
`Module.Decl`.
Diffstat (limited to 'src/type.zig')
0 files changed, 0 insertions, 0 deletions
