aboutsummaryrefslogtreecommitdiff
path: root/src/InternPool.zig
diff options
context:
space:
mode:
authormlugg <mlugg@mlugg.co.uk>2023-09-20 21:19:29 +0100
committerAndrew Kelley <andrew@ziglang.org>2023-09-21 14:48:40 -0700
commitada83fa55773c8f8ff1bc2643c6525c3dfe871bf (patch)
treede2c912fbe4f95d331b69b9c184e998b2d85ed08 /src/InternPool.zig
parent0182b7242e216ea6eabf465e32b7da60ad32ee2d (diff)
downloadzig-ada83fa55773c8f8ff1bc2643c6525c3dfe871bf.tar.gz
zig-ada83fa55773c8f8ff1bc2643c6525c3dfe871bf.zip
compiler: get codegen of behavior tests working on at least one backend
We're hitting false compile errors, but this is progress!
Diffstat (limited to 'src/InternPool.zig')
-rw-r--r--src/InternPool.zig6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/InternPool.zig b/src/InternPool.zig
index eef46c1917..141e48972c 100644
--- a/src/InternPool.zig
+++ b/src/InternPool.zig
@@ -527,6 +527,11 @@ pub const Key = union(enum) {
return false;
}
+ pub fn clearLayoutWip(s: @This(), ip: *InternPool) void {
+ if (s.layout == .Packed) return;
+ s.flagsPtr(ip).layout_wip = false;
+ }
+
pub fn setFullyResolved(s: @This(), ip: *InternPool) bool {
if (s.layout == .Packed) return true;
const flags_ptr = s.flagsPtr(ip);
@@ -612,6 +617,7 @@ pub const Key = union(enum) {
};
/// Iterates over non-comptime fields in the order they are laid out in memory at runtime.
+ /// May or may not include zero-bit fields.
/// Asserts the struct is not packed.
pub fn iterateRuntimeOrder(s: @This(), ip: *InternPool) RuntimeOrderIterator {
assert(s.layout != .Packed);