Index: mark unreachable

This commit is contained in:
xushiwei
2024-05-25 08:40:04 +08:00
parent 5eac8d860a
commit c7abc03fee
4 changed files with 71 additions and 54 deletions

View File

@@ -183,9 +183,12 @@ func (b Builder) Index(x, idx Expr, addr func(Expr) Expr) Expr {
if addr != nil {
ptr = addr(x)
} else {
size := SizeOf(prog, telem, t.Len())
ptr = b.Alloca(size)
b.Store(ptr, x)
/*
size := SizeOf(prog, telem, t.Len())
ptr = b.Alloca(size)
b.Store(ptr, x)
*/
panic("unreachable")
}
}
idx = b.checkIndex(idx)