abiBasic fix

This commit is contained in:
xushiwei
2024-05-24 07:51:41 +08:00
parent 1162a5f916
commit 88004cac76
12 changed files with 924 additions and 380 deletions

View File

@@ -36,7 +36,8 @@ func (b Builder) abiBasic(t *types.Basic) Expr {
g := b.Pkg.NewVarFrom(name, b.Prog.AbiTypePtrPtr())
return b.Load(g.Expr)
*/
return b.InlineCall(b.Pkg.rtFunc("Basic"), b.Prog.Val(int(t.Kind())))
kind := int(abi.BasicKind(t))
return b.InlineCall(b.Pkg.rtFunc("Basic"), b.Prog.Val(kind))
}
// abiStruct returns the abi type of the specified struct type.