@@ -1887,13 +1887,33 @@ open class KotlinFileExtractor(
18871887 }
18881888 }
18891889
1890+ fun unaryopReceiver (id : Label <out DbExpr >, receiver : IrExpression ? , receiverDescription : String ) {
1891+ val locId = tw.getLocation(c)
1892+ tw.writeHasLocation(id, locId)
1893+ tw.writeCallableEnclosingExpr(id, callable)
1894+ tw.writeStatementEnclosingExpr(id, enclosingStmt)
1895+
1896+ if (receiver == null ) {
1897+ logger.errorElement(" $receiverDescription not found" , c)
1898+ } else {
1899+ extractExpressionExpr(receiver, callable, id, 0 , enclosingStmt)
1900+ }
1901+ if (c.valueArgumentsCount > 0 ) {
1902+ logger.errorElement(" Extra arguments found" , c)
1903+ }
1904+ }
1905+
18901906 /* *
18911907 * Populate the lhs of a binary op from this call's dispatch receiver, and the rhs from its sole argument.
18921908 */
18931909 fun binopDisp (id : Label <out DbExpr >) {
18941910 binopReceiver(id, c.dispatchReceiver, " Dispatch receiver" )
18951911 }
18961912
1913+ fun unaryopDisp (id : Label <out DbExpr >) {
1914+ unaryopReceiver(id, c.dispatchReceiver, " Dispatch receiver" )
1915+ }
1916+
18971917 /* *
18981918 * Populate the lhs of a binary op from this call's extension receiver, and the rhs from its sole argument.
18991919 */
@@ -2003,6 +2023,13 @@ open class KotlinFileExtractor(
20032023 tw.writeExprsKotlinType(id, type.kotlinResult.id)
20042024 binOp(id, dr, callable, enclosingStmt)
20052025 }
2026+ isFunction(target, " kotlin" , " Boolean" , " not" ) -> {
2027+ val id = tw.getFreshIdLabel<DbLognotexpr >()
2028+ val type = useType(c.type)
2029+ tw.writeExprs_lognotexpr(id, type.javaResult.id, parent, idx)
2030+ tw.writeExprsKotlinType(id, type.kotlinResult.id)
2031+ unaryopDisp(id)
2032+ }
20062033 // We need to handle all the builtin operators defines in BuiltInOperatorNames in
20072034 // compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/IrBuiltIns.kt
20082035 // as they can't be extracted as external dependencies.
0 commit comments