ssa: string range; string convert bytes/rune; op eql/less

This commit is contained in:
visualfc
2024-05-21 22:22:39 +08:00
parent b7f2bae2ef
commit 62915d5af5
9 changed files with 666 additions and 11 deletions

View File

@@ -714,6 +714,12 @@ func (p *context) compileInstrOrValue(b llssa.Builder, iv instrOrValue, asValue
case *ssa.Extract:
x := p.compileValue(b, v.Tuple)
ret = b.Extract(x, v.Index)
case *ssa.Range:
x := p.compileValue(b, v.X)
ret = b.Range(x)
case *ssa.Next:
iter := p.compileValue(b, v.Iter)
ret = b.Next(iter, v.IsString)
default:
panic(fmt.Sprintf("compileInstrAndValue: unknown instr - %T\n", iv))
}