Evaluate range classes in interpreter if constructor's body is missing

This commit is contained in:
Ivan Kylchik
2021-08-12 17:02:20 +03:00
committed by Space
parent ae9914afe0
commit a1b45755f1
5 changed files with 18 additions and 8 deletions
@@ -55,6 +55,8 @@ fun generateMap(): String {
val irNullCheck = irBuiltIns.checkNotNullSymbol.owner
this += Operation(irNullCheck.name.asString(), listOf("T0?"), customExpression = "a!!")
this += Operation("toString", listOf("Any?"), customExpression = "a?.toString() ?: \"null\"")
// TODO next operation can be dropped after serialization introduction
this += Operation("toString", listOf("Unit"), customExpression = "Unit.toString()")
})
generateInterpretBinaryFunction(p, getOperationMap(2) + getBinaryIrOperationMap(irBuiltIns) + getExtensionOperationMap())