diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2021-11-16 17:46:39 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2021-11-16 17:46:39 -0700 |
| commit | 09588c795c08064971f61ee147d06972f0add94e (patch) | |
| tree | d7d2af6503aea7aa499c1a5eabf3c2f5a3591d3a /src/value.zig | |
| parent | 68fe391de02fd4c99f39bd6e0af643e1e327e52a (diff) | |
| download | zig-09588c795c08064971f61ee147d06972f0add94e.tar.gz zig-09588c795c08064971f61ee147d06972f0add94e.zip | |
stage2: LLVM backend: memset to 0xaa for undefined stores
Also support `one` and `int_big_positive` tags for const pointers.
Diffstat (limited to 'src/value.zig')
| -rw-r--r-- | src/value.zig | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/value.zig b/src/value.zig index 4b571891f4..4eaa865149 100644 --- a/src/value.zig +++ b/src/value.zig @@ -1802,6 +1802,13 @@ pub const Value = extern union { return self.tag() == .undef; } + /// TODO: check for cases such as array that is not marked undef but all the element + /// values are marked undef, or struct that is not marked undef but all fields are marked + /// undef, etc. + pub fn isUndefDeep(self: Value) bool { + return self.isUndef(); + } + /// Asserts the value is not undefined and not unreachable. /// Integer value 0 is considered null because of C pointers. pub fn isNull(self: Value) bool { |
