runtime: MakeMap

This commit is contained in:
xushiwei
2024-05-01 07:26:51 +08:00
parent d3fddfb634
commit ed8ffb228b
14 changed files with 1901 additions and 6 deletions

View File

@@ -126,4 +126,20 @@ func (b Builder) If(cond Expr, thenb, elseb BasicBlock) {
b.impl.CreateCondBr(cond.impl, thenb.impl, elseb.impl)
}
// The MapUpdate instruction updates the association of Map[Key] to
// Value.
//
// Pos() returns the ast.KeyValueExpr.Colon or ast.IndexExpr.Lbrack,
// if explicit in the source.
//
// Example printed form:
//
// t0[t1] = t2
func (b Builder) MapUpdate(m, k, v Expr) {
if debugInstr {
log.Printf("MapUpdate %v[%v] = %v\n", m.impl, k.impl, v.impl)
}
panic("todo")
}
// -----------------------------------------------------------------------------