Implement LambdaProxy class

This commit is contained in:
Ivan Kylchik
2020-08-30 17:03:05 +03:00
committed by TeamCityServer
parent 1d0acedc48
commit 96a090f2ab
12 changed files with 203 additions and 92 deletions
@@ -39,7 +39,7 @@ fun generateMap(): String {
p.println(File("license/COPYRIGHT.txt").readText())
p.println("package org.jetbrains.kotlin.ir.interpreter.builtins")
p.println()
p.println("import org.jetbrains.kotlin.ir.interpreter.IrInterpreter")
p.println("import org.jetbrains.kotlin.ir.interpreter.proxy.Proxy")
p.println()
p.println("/** This file is generated by org.jetbrains.kotlin.backend.common.interpreter.builtins.GenerateBuiltInsMap.generateMap(). DO NOT MODIFY MANUALLY */")
p.println()
@@ -150,7 +150,7 @@ private fun generateBinaryBody(
val methodName = "${function.name}"
val methodSymbol = getIrMethodSymbolByName(methodName)
val body = when (methodName) {
IrBuiltIns.OperatorNames.EQEQEQ -> "if (a is IrInterpreter.Proxy && b is IrInterpreter.Proxy) a.state === b.state else a === b"
IrBuiltIns.OperatorNames.EQEQEQ -> "if (a is Proxy && b is Proxy) a.state === b.state else a === b"
else -> "a $methodSymbol b"
}
" binaryOperation${parameters.first}(\"$methodName\", ${parameters.second}) { a, b -> $body }"