wasm
This commit is contained in:
@@ -195,6 +195,10 @@ pub const Builder = struct {
|
||||
if (self.func == null) return .s64;
|
||||
const func = self.currentFunc();
|
||||
const ref_idx = @intFromEnum(ref);
|
||||
// Check function parameters first (refs 0..N-1)
|
||||
if (ref_idx < func.params.len) {
|
||||
return func.params[ref_idx].ty;
|
||||
}
|
||||
for (func.blocks.items) |*block| {
|
||||
const first = block.first_ref;
|
||||
if (ref_idx >= first and ref_idx < first + @as(u32, @intCast(block.insts.items.len))) {
|
||||
|
||||
Reference in New Issue
Block a user