less debug noise
open ObjDynamic found a pfoblem with dynamic, see todo in OOTest.kt
This commit is contained in:
1 parent
5d4d548275
commit
ba725fc9ed
3 files changed
+56
-9
No files matched your search
@@ -47,10 +47,7 @@ class ObjDynamicContext(val delegate: ObjDynamic) : Obj() {
|
||||
}
|
||||
}
|
||||
|
||||
class ObjDynamic : Obj() {
|
||||
|
||||
internal var readCallback: Statement? = null
|
||||
internal var writeCallback: Statement? = null
|
||||
open class ObjDynamic(var readCallback: Statement? = null,var writeCallback: Statement? = null) : Obj() {
|
||||
|
||||
override suspend fun readField(scope: Scope, name: String): ObjRecord {
|
||||
return readCallback?.execute(scope.createChildScope(Arguments(ObjString(name))))?.let {
|
||||
|
||||
@@ -91,14 +91,15 @@ open class LynonDecoder(val bin: BitInput, val settings: LynonSettings = LynonSe
|
||||
val type = LynonType.entries[getBitsAsInt(4)]
|
||||
val list = mutableListOf<Obj>()
|
||||
val objClass = if (type == LynonType.Other)
|
||||
decodeClassObj(scope).also { println("detected class obj: $it") }
|
||||
decodeClassObj(scope)//.also { println("detected class obj: $it") }
|
||||
else type.objClass
|
||||
val size = fixedSize ?: bin.unpackUnsigned().toInt()
|
||||
println("detected homogenous list type $type, $size items")
|
||||
// println("detected homogenous list type $type, $size items")
|
||||
for (i in 0..<size) {
|
||||
list += decodeObject(scope, objClass, type).also {
|
||||
println("decoded: $it")
|
||||
}
|
||||
list += decodeObject(scope, objClass, type)
|
||||
//.also {
|
||||
// println("decoded: $it")
|
||||
// }
|
||||
}
|
||||
list
|
||||
} else {
|
||||
|
||||
Reference in new issue
Block a user