llgo/ssa: Builtin

This commit is contained in:
xushiwei
2024-06-01 17:18:17 +08:00
parent 881574ed39
commit 45734c0b5c
3 changed files with 25 additions and 7 deletions

View File

@@ -571,10 +571,9 @@ func (p *context) call(b llssa.Builder, act llssa.DoAction, call *ssa.CallCommon
if fn == "ssa:wrapnilchk" { // TODO(xsw): check nil ptr
arg := args[0]
ret = p.compileValue(b, arg)
// log.Println("wrapnilchk:", ret.TypeOf())
} else {
args := p.compileValues(b, args, kind)
ret = b.BuiltinDo(act, fn, args...)
ret = b.Do(act, llssa.Builtin(fn), args...)
}
case *ssa.Function:
aFn, pyFn, ftype := p.compileFunction(cv)