feat: fasm stack codegen beta
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user