@@ -1557,6 +1557,13 @@ open class KotlinFileExtractor(
15571557 tw.writeExprs_neexpr(id, type.javaResult.id, type.kotlinResult.id, parent, idx)
15581558 binop(id, dr, callable)
15591559 }
1560+ c.origin == EXCLEQ && isFunction(" kotlin" , " Boolean" , " not" ) && c.valueArgumentsCount == 0 && dr != null && dr is IrCall && isBuiltinCall(dr, " ieee754equals" ) -> {
1561+ val id = tw.getFreshIdLabel<DbNeexpr >()
1562+ val type = useType(c.type)
1563+ // TODO: Is this consistent with Java?
1564+ tw.writeExprs_neexpr(id, type.javaResult.id, type.kotlinResult.id, parent, idx)
1565+ binop(id, dr, callable)
1566+ }
15601567 // We need to handle all the builtin operators defines in BuiltInOperatorNames in
15611568 // compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/IrBuiltIns.kt
15621569 // as they can't be extracted as external dependencies.
@@ -1615,6 +1622,34 @@ open class KotlinFileExtractor(
16151622 tw.writeExprs_eqexpr(id, type.javaResult.id, type.kotlinResult.id, parent, idx)
16161623 binop(id, c, callable)
16171624 }
1625+ isBuiltinCall(c, " ieee754equals" ) -> {
1626+ if (c.origin != EQEQ ) {
1627+ logger.warnElement(Severity .ErrorSevere , " Unexpected origin for ieee754equals: ${c.origin} " , c)
1628+ }
1629+ // TODO: Is this consistent with Java?
1630+ val id = tw.getFreshIdLabel<DbEqexpr >()
1631+ val type = useType(c.type)
1632+ tw.writeExprs_eqexpr(id, type.javaResult.id, type.kotlinResult.id, parent, idx)
1633+ binop(id, c, callable)
1634+ }
1635+ isBuiltinCall(c, " THROW_CCE" ) -> {
1636+ logger.warnElement(Severity .ErrorSevere , " Unhandled builtin" , c)
1637+ }
1638+ isBuiltinCall(c, " THROW_ISE" ) -> {
1639+ logger.warnElement(Severity .ErrorSevere , " Unhandled builtin" , c)
1640+ }
1641+ isBuiltinCall(c, " noWhenBranchMatchedException" ) -> {
1642+ logger.warnElement(Severity .ErrorSevere , " Unhandled builtin" , c)
1643+ }
1644+ isBuiltinCall(c, " illegalArgumentException" ) -> {
1645+ logger.warnElement(Severity .ErrorSevere , " Unhandled builtin" , c)
1646+ }
1647+ isBuiltinCall(c, " ANDAND" ) -> {
1648+ logger.warnElement(Severity .ErrorSevere , " Unhandled builtin" , c)
1649+ }
1650+ isBuiltinCall(c, " OROR" ) -> {
1651+ logger.warnElement(Severity .ErrorSevere , " Unhandled builtin" , c)
1652+ }
16181653 else -> {
16191654 val id = tw.getFreshIdLabel<DbMethodaccess >()
16201655 val type = useType(c.type)
0 commit comments