From 09588c795c08064971f61ee147d06972f0add94e Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Tue, 16 Nov 2021 17:46:39 -0700 Subject: stage2: LLVM backend: memset to 0xaa for undefined stores Also support `one` and `int_big_positive` tags for const pointers. --- src/value.zig | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/value.zig') 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 { -- cgit v1.2.3