diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2023-05-07 22:25:50 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2023-06-10 20:42:30 -0700 |
| commit | 8587e510e46f98e321fbad30bb235e5eed33f1ba (patch) | |
| tree | 5eb31158113d74473f3f895ec76eaaab1cc59efd /src/value.zig | |
| parent | 3116477dcc5e85d8fe7b2be2f332796e1425f956 (diff) | |
| download | zig-8587e510e46f98e321fbad30bb235e5eed33f1ba.tar.gz zig-8587e510e46f98e321fbad30bb235e5eed33f1ba.zip | |
stage2: more InternPool related fixes
* make Sema.zirPtrType coerce the sentinel value against the element
type
* fix lazyAbiAlignment wrong result type
* typeHasOnePossibleValue no longer tries to create interned enum tag
value with integer zero, instead uses enum_field_index
* Type.ptr avoids trying to store typed null values into the intern
pool
Diffstat (limited to 'src/value.zig')
| -rw-r--r-- | src/value.zig | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/value.zig b/src/value.zig index 5372677543..855e769767 100644 --- a/src/value.zig +++ b/src/value.zig @@ -2637,6 +2637,14 @@ pub const Value = struct { } } + pub fn isLazyAlign(val: Value) bool { + return val.ip_index == .none and val.tag() == .lazy_align; + } + + pub fn isLazySize(val: Value) bool { + return val.ip_index == .none and val.tag() == .lazy_size; + } + pub fn isRuntimeValue(val: Value) bool { return val.ip_index == .none and val.tag() == .runtime_value; } |
