mirror of
https://github.com/curioustorvald/tsvm.git
synced 2026-03-07 19:51:51 +09:00
more minor fixes on things
This commit is contained in:
@@ -83,12 +83,11 @@ internal class UnsafePtr(pointer: Long, allocSize: Long) {
|
||||
}
|
||||
|
||||
private inline fun checkNullPtr(index: Long) { // ignore what IDEA says and do inline this
|
||||
// commenting out because of the suspected (or minor?) performance impact.
|
||||
// You may break the glass and use this tool when some fucking incomprehensible bugs ("vittujen vitun bugit")
|
||||
// appear (e.g. getting garbage values when it fucking shouldn't)
|
||||
assert(!destroyed) { throw NullPointerException("The pointer is already destroyed ($this)") }
|
||||
//// commenting out because of the suspected (or minor?) performance impact.
|
||||
//// You may break the glass and use this tool when some fucking incomprehensible bugs ("vittujen vitun bugit")
|
||||
//// appear (e.g. getting garbage values when it fucking shouldn't)
|
||||
|
||||
// OOB Check: debugging purposes only -- comment out for the production
|
||||
//assert(!destroyed) { throw NullPointerException("The pointer is already destroyed ($this)") }
|
||||
//if (index !in 0 until size) throw IndexOutOfBoundsException("Index: $index; alloc size: $size")
|
||||
}
|
||||
|
||||
|
||||
@@ -31,6 +31,9 @@ data class AdapterConfig(
|
||||
val paletteShader: String = DRAW_SHADER_FRAG
|
||||
)
|
||||
|
||||
/**
|
||||
* NOTE: if TTY size is greater than 80*32, SEGFAULT will occur because text buffer is fixed in size
|
||||
*/
|
||||
open class GraphicsAdapter(val vm: VM, val config: AdapterConfig) :
|
||||
GlassTty(config.textRows, config.textCols), PeriBase {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user