diff options
| author | mlugg <mlugg@mlugg.co.uk> | 2023-10-24 04:36:35 +0100 |
|---|---|---|
| committer | mlugg <mlugg@mlugg.co.uk> | 2023-10-24 14:28:33 +0100 |
| commit | 20bb81166f36668413703e0d74b3e283c55ab8ca (patch) | |
| tree | d68649f59e0899fbc49e7f9a188d3738f0ca1a3f /src/type.zig | |
| parent | bb0419599aa93455f3ae0969f4bfd80204807596 (diff) | |
| download | zig-20bb81166f36668413703e0d74b3e283c55ab8ca.tar.gz zig-20bb81166f36668413703e0d74b3e283c55ab8ca.zip | |
InternPool: remove runtime_value representation
The main goal of this commit is to remove the `runtime_value` field from
`InternPool.Key` (and its associated representation), but there are a
few dominos. Specifically, this mostly eliminates the "maybe runtime"
concept from value resolution in Sema: so some resolution functions like
`resolveMaybeUndefValAllowVariablesMaybeRuntime` are gone. This required
a small change to struct/union/array initializers, to no longer
use `runtime_value` if a field was a `variable` - I'm not convinced this
case was even reachable, as `variable` should only ever exist as the
trivial value of a global runtime `var` decl.
Now, the only case in which a `Sema.resolveMaybeUndefVal`-esque function
can return the `variable` key is `resolveMaybeUndefValAllowVariables`,
which is directly called from `Sema.resolveInstValueAllowVariables`
(previously `Sema.resolveInstValue`), which is only used for resolving
the value of a Decl from `Module.semaDecl`.
While changing these functions, I also slightly reordered and
restructured some of them, and updated their doc comments.
Diffstat (limited to 'src/type.zig')
| -rw-r--r-- | src/type.zig | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/src/type.zig b/src/type.zig index 868c555143..812a753987 100644 --- a/src/type.zig +++ b/src/type.zig @@ -414,7 +414,6 @@ pub const Type = struct { // values, not types .undef, - .runtime_value, .simple_value, .variable, .extern_func, @@ -633,7 +632,6 @@ pub const Type = struct { // values, not types .undef, - .runtime_value, .simple_value, .variable, .extern_func, @@ -741,7 +739,6 @@ pub const Type = struct { // values, not types .undef, - .runtime_value, .simple_value, .variable, .extern_func, @@ -1103,7 +1100,6 @@ pub const Type = struct { // values, not types .undef, - .runtime_value, .simple_value, .variable, .extern_func, @@ -1461,7 +1457,6 @@ pub const Type = struct { // values, not types .undef, - .runtime_value, .simple_value, .variable, .extern_func, @@ -1681,7 +1676,6 @@ pub const Type = struct { // values, not types .undef, - .runtime_value, .simple_value, .variable, .extern_func, @@ -2217,7 +2211,6 @@ pub const Type = struct { // values, not types .undef, - .runtime_value, .simple_value, .variable, .extern_func, @@ -2560,7 +2553,6 @@ pub const Type = struct { // values, not types .undef, - .runtime_value, .simple_value, .variable, .extern_func, @@ -2754,7 +2746,6 @@ pub const Type = struct { // values, not types .undef, - .runtime_value, .simple_value, .variable, .extern_func, |
