mirror of
https://github.com/irmen/prog8.git
synced 2026-04-22 08:16:49 +00:00
remove last trace of getTempVar (arry index expression)
tiny optimization
This commit is contained in:
@@ -76,6 +76,13 @@ enum class RegisterOrPair {
|
||||
|
||||
companion object {
|
||||
val names by lazy { values().map { it.toString()} }
|
||||
fun fromCpuRegister(cpu: CpuRegister): RegisterOrPair {
|
||||
return when(cpu) {
|
||||
CpuRegister.A -> A
|
||||
CpuRegister.X -> X
|
||||
CpuRegister.Y -> Y
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fun asCpuRegister(): CpuRegister = when(this) {
|
||||
|
||||
Reference in New Issue
Block a user