runtime.MakeSmallMap

This commit is contained in:
xushiwei
2024-05-01 07:37:38 +08:00
parent ed8ffb228b
commit 673b9d9a5c
6 changed files with 67 additions and 3 deletions

View File

@@ -489,6 +489,10 @@ func (p *context) compileInstr(b llssa.Builder, instr ssa.Instruction) {
elseb := fn.Block(succs[1].Index)
b.If(cond, thenb, elseb)
case *ssa.MapUpdate:
m := p.compileValue(b, v.Map)
key := p.compileValue(b, v.Key)
val := p.compileValue(b, v.Value)
b.MapUpdate(m, key, val)
case *ssa.Panic:
arg := p.compileValue(b, v.X).Do()
b.Panic(arg)