feat(py): Add Python tuple constructor helper

This commit is contained in:
AN Long
2024-08-14 21:39:20 +08:00
parent 9f1100b967
commit bbeceae42e
5 changed files with 62 additions and 2 deletions

View File

@@ -216,6 +216,7 @@ var llgoInstrs = map[string]int{
"funcAddr": llgoFuncAddr,
"pystr": llgoPyStr,
"pyList": llgoPyList,
"pyTuple": llgoPyTuple,
"sigjmpbuf": llgoSigjmpbuf,
"sigsetjmp": llgoSigsetjmp,
"siglongjmp": llgoSiglongjmp,
@@ -354,6 +355,9 @@ func (p *context) call(b llssa.Builder, act llssa.DoAction, call *ssa.CallCommon
case llgoPyList:
args := p.compileValues(b, args, fnHasVArg)
ret = b.PyList(args...)
case llgoPyTuple:
args := p.compileValues(b, args, fnHasVArg)
ret = b.PyTuple(args...)
case llgoPyStr:
ret = pystr(b, args)
case llgoCstr: