compiler: get codegen of behavior tests working on at least one backend

We're hitting false compile errors, but this is progress!
This commit is contained in:
mlugg
2023-09-20 21:19:29 +01:00
committed by Andrew Kelley
parent 0182b7242e
commit ada83fa557
4 changed files with 53 additions and 23 deletions

View File

@@ -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);