feat: fasm stack codegen beta

This commit is contained in:
2026-01-05 19:36:48 +01:00
parent 2312129148
commit 806e20d9b1
4 changed files with 150 additions and 1 deletions

View File

@@ -56,7 +56,7 @@ namespace IR
argRegs.Push(arg);
}
// TODO: gather return type of the function
auto dst = AllocateNamed<Instruction>(new ValueHandle::Type {ValueHandle::Type::Kind::Void});
auto dst = AllocateNamed<Instruction>(new ValueHandle::Type {ValueHandle::Type::Kind::Int});
m_ops->Push(new CallOp(dst, fn->name(), argRegs.view()));
return dst;
}

View File

@@ -82,6 +82,9 @@ namespace IR
return sb.view();
}
public:
const ValueHandle::Type *Type() const { return m_typ; }
private:
ValueHandle::Type *m_typ;
};
@@ -103,6 +106,9 @@ namespace IR
return sb.view();
}
public:
const Pointer* Ptr() const { return m_ptr; }
private:
Pointer* m_ptr;
};