ssa: fix abiType & abiNamedOf

This commit is contained in:
visualfc
2024-06-25 12:11:51 +08:00
parent f41511047e
commit ef3619350d
10 changed files with 7115 additions and 885 deletions

View File

@@ -316,12 +316,13 @@ func (p Program) NewPackage(name, pkgPath string) Package {
pyobjs := make(map[string]PyObjRef)
pymods := make(map[string]Global)
strs := make(map[string]llvm.Value)
named := make(map[types.Type]Expr)
p.NeedRuntime = false
// Don't need reset p.needPyInit here
// p.needPyInit = false
ret := &aPackage{
mod: mod, vars: gbls, fns: fns, stubs: stubs,
pyobjs: pyobjs, pymods: pymods, strs: strs, Prog: p}
pyobjs: pyobjs, pymods: pymods, strs: strs, named: named, Prog: p}
ret.abi.Init(pkgPath)
return ret
}
@@ -565,6 +566,7 @@ type aPackage struct {
pyobjs map[string]PyObjRef
pymods map[string]Global
strs map[string]llvm.Value
named map[types.Type]Expr
afterb unsafe.Pointer
iRoutine int