llgo/ssa: abiMapOf

This commit is contained in:
xushiwei
2024-06-14 22:07:48 +08:00
parent 47b20b01d0
commit 33d73eaecd
5 changed files with 63 additions and 5 deletions

View File

@@ -365,7 +365,9 @@ func (b Builder) MapUpdate(m, k, v Expr) {
panic("TODO: not a map")
}
tabi := b.abiType(t.raw.Type)
ptr := b.InlineCall(b.Pkg.rtFunc("MapAssign"), tabi, m, k)
prog := b.Prog
ptrimpl := b.InlineCall(b.Pkg.rtFunc("MapAssign"), tabi, m, k).impl
ptr := Expr{ptrimpl, prog.Pointer(v.Type)}
b.Store(ptr, v) // TODO(xsw): indirect store
}