working on runtime API; ci skip
All checks were successful
Test / build (push) Has been skipped
Build / build (push) Has been skipped

This commit is contained in:
2026-02-02 17:25:31 +01:00
parent 1974afd6d7
commit 61513f20d5
2 changed files with 51 additions and 43 deletions

View File

@@ -519,6 +519,20 @@ pub fn resolveLaneBitWidth(target_type: TypeData, rt: *const Runtime) RuntimeErr
};
}
pub fn resolveSign(target_type: TypeData, rt: *const Runtime) RuntimeError!enum { signed, unsigned } {
return sw: switch (target_type) {
.Int => |i| if (i.is_signed) .signed else .unsigned,
.Vector => |v| continue :sw (try rt.results[v.components_type_word].getVariant()).Type,
.Vector4i32 => .signed,
.Vector3i32 => .signed,
.Vector2i32 => .signed,
.Vector4u32 => .unsigned,
.Vector3u32 => .unsigned,
.Vector2u32 => .unsigned,
else => .unsinged,
};
}
pub fn resolveType(self: *const Self, results: []const Self) *const Self {
return if (self.variant) |variant|
switch (variant) {