mirror of
https://github.com/irmen/prog8.git
synced 2024-11-29 01:49:22 +00:00
4644c9b621
sometimes programs get smaller, sometimes bigger.
23 lines
604 B
Kotlin
23 lines
604 B
Kotlin
package prog8tests.vm.helpers
|
|
|
|
import prog8.code.core.DataType
|
|
import prog8.code.core.Encoding
|
|
import prog8.code.core.IMemSizer
|
|
import prog8.code.core.IStringEncoding
|
|
|
|
|
|
internal object DummyMemsizer : IMemSizer {
|
|
override fun memorySize(dt: DataType) = 0
|
|
override fun memorySize(arrayDt: DataType, numElements: Int) = 0
|
|
}
|
|
|
|
internal object DummyStringEncoder : IStringEncoding {
|
|
override fun encodeString(str: String, encoding: Encoding): List<UByte> {
|
|
return emptyList()
|
|
}
|
|
|
|
override fun decodeString(bytes: List<UByte>, encoding: Encoding): String {
|
|
return ""
|
|
}
|
|
}
|