mirror of
https://github.com/irmen/prog8.git
synced 2024-06-13 09:29:34 +00:00
15 lines
380 B
Kotlin
15 lines
380 B
Kotlin
package prog8.codegen.target.cbm
|
|
|
|
import prog8.code.core.*
|
|
|
|
|
|
internal object CbmMemorySizer: IMemSizer {
|
|
override fun memorySize(dt: DataType): Int {
|
|
return when(dt) {
|
|
in ByteDatatypes -> 1
|
|
in WordDatatypes, in PassByReferenceDatatypes -> 2
|
|
DataType.FLOAT -> Mflpt5.FLOAT_MEM_SIZE
|
|
else -> Int.MIN_VALUE
|
|
}
|
|
}
|
|
} |