All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.jetbrains.kotlin.ir.interpreter.builtins.IrBuiltInsMapGenerated.kt Maven / Gradle / Ivy

There is a newer version: 2.0.0
Show newest version
/*
 * Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package org.jetbrains.kotlin.ir.interpreter.builtins

import org.jetbrains.kotlin.ir.interpreter.internalName
import org.jetbrains.kotlin.ir.interpreter.state.*

/** This file is generated by org.jetbrains.kotlin.backend.common.interpreter.builtins.GenerateBuiltInsMap.generateMap(). DO NOT MODIFY MANUALLY */

@Suppress("DEPRECATION")
val unaryFunctions = mapOf>(
    unaryOperation("hashCode", "Boolean") { a -> a.hashCode() },
    unaryOperation("not", "Boolean") { a -> a.not() },
    unaryOperation("toString", "Boolean") { a -> a.toString() },
    unaryOperation("dec", "Char") { a -> a.dec() },
    unaryOperation("hashCode", "Char") { a -> a.hashCode() },
    unaryOperation("inc", "Char") { a -> a.inc() },
    unaryOperation("toByte", "Char") { a -> a.toByte() },
    unaryOperation("toChar", "Char") { a -> a.toChar() },
    unaryOperation("toDouble", "Char") { a -> a.toDouble() },
    unaryOperation("toFloat", "Char") { a -> a.toFloat() },
    unaryOperation("toInt", "Char") { a -> a.toInt() },
    unaryOperation("toLong", "Char") { a -> a.toLong() },
    unaryOperation("toShort", "Char") { a -> a.toShort() },
    unaryOperation("toString", "Char") { a -> a.toString() },
    unaryOperation("dec", "Byte") { a -> a.dec() },
    unaryOperation("hashCode", "Byte") { a -> a.hashCode() },
    unaryOperation("inc", "Byte") { a -> a.inc() },
    unaryOperation("toByte", "Byte") { a -> a.toByte() },
    unaryOperation("toChar", "Byte") { a -> a.toChar() },
    unaryOperation("toDouble", "Byte") { a -> a.toDouble() },
    unaryOperation("toFloat", "Byte") { a -> a.toFloat() },
    unaryOperation("toInt", "Byte") { a -> a.toInt() },
    unaryOperation("toLong", "Byte") { a -> a.toLong() },
    unaryOperation("toShort", "Byte") { a -> a.toShort() },
    unaryOperation("toString", "Byte") { a -> a.toString() },
    unaryOperation("unaryMinus", "Byte") { a -> a.unaryMinus() },
    unaryOperation("unaryPlus", "Byte") { a -> a.unaryPlus() },
    unaryOperation("dec", "Short") { a -> a.dec() },
    unaryOperation("hashCode", "Short") { a -> a.hashCode() },
    unaryOperation("inc", "Short") { a -> a.inc() },
    unaryOperation("toByte", "Short") { a -> a.toByte() },
    unaryOperation("toChar", "Short") { a -> a.toChar() },
    unaryOperation("toDouble", "Short") { a -> a.toDouble() },
    unaryOperation("toFloat", "Short") { a -> a.toFloat() },
    unaryOperation("toInt", "Short") { a -> a.toInt() },
    unaryOperation("toLong", "Short") { a -> a.toLong() },
    unaryOperation("toShort", "Short") { a -> a.toShort() },
    unaryOperation("toString", "Short") { a -> a.toString() },
    unaryOperation("unaryMinus", "Short") { a -> a.unaryMinus() },
    unaryOperation("unaryPlus", "Short") { a -> a.unaryPlus() },
    unaryOperation("dec", "Int") { a -> a.dec() },
    unaryOperation("hashCode", "Int") { a -> a.hashCode() },
    unaryOperation("inc", "Int") { a -> a.inc() },
    unaryOperation("inv", "Int") { a -> a.inv() },
    unaryOperation("toByte", "Int") { a -> a.toByte() },
    unaryOperation("toChar", "Int") { a -> a.toChar() },
    unaryOperation("toDouble", "Int") { a -> a.toDouble() },
    unaryOperation("toFloat", "Int") { a -> a.toFloat() },
    unaryOperation("toInt", "Int") { a -> a.toInt() },
    unaryOperation("toLong", "Int") { a -> a.toLong() },
    unaryOperation("toShort", "Int") { a -> a.toShort() },
    unaryOperation("toString", "Int") { a -> a.toString() },
    unaryOperation("unaryMinus", "Int") { a -> a.unaryMinus() },
    unaryOperation("unaryPlus", "Int") { a -> a.unaryPlus() },
    unaryOperation("dec", "Float") { a -> a.dec() },
    unaryOperation("hashCode", "Float") { a -> a.hashCode() },
    unaryOperation("inc", "Float") { a -> a.inc() },
    unaryOperation("toByte", "Float") { a -> a.toByte() },
    unaryOperation("toChar", "Float") { a -> a.toChar() },
    unaryOperation("toDouble", "Float") { a -> a.toDouble() },
    unaryOperation("toFloat", "Float") { a -> a.toFloat() },
    unaryOperation("toInt", "Float") { a -> a.toInt() },
    unaryOperation("toLong", "Float") { a -> a.toLong() },
    unaryOperation("toShort", "Float") { a -> a.toShort() },
    unaryOperation("toString", "Float") { a -> a.toString() },
    unaryOperation("unaryMinus", "Float") { a -> a.unaryMinus() },
    unaryOperation("unaryPlus", "Float") { a -> a.unaryPlus() },
    unaryOperation("dec", "Long") { a -> a.dec() },
    unaryOperation("hashCode", "Long") { a -> a.hashCode() },
    unaryOperation("inc", "Long") { a -> a.inc() },
    unaryOperation("inv", "Long") { a -> a.inv() },
    unaryOperation("toByte", "Long") { a -> a.toByte() },
    unaryOperation("toChar", "Long") { a -> a.toChar() },
    unaryOperation("toDouble", "Long") { a -> a.toDouble() },
    unaryOperation("toFloat", "Long") { a -> a.toFloat() },
    unaryOperation("toInt", "Long") { a -> a.toInt() },
    unaryOperation("toLong", "Long") { a -> a.toLong() },
    unaryOperation("toShort", "Long") { a -> a.toShort() },
    unaryOperation("toString", "Long") { a -> a.toString() },
    unaryOperation("unaryMinus", "Long") { a -> a.unaryMinus() },
    unaryOperation("unaryPlus", "Long") { a -> a.unaryPlus() },
    unaryOperation("dec", "Double") { a -> a.dec() },
    unaryOperation("hashCode", "Double") { a -> a.hashCode() },
    unaryOperation("inc", "Double") { a -> a.inc() },
    unaryOperation("toByte", "Double") { a -> a.toByte() },
    unaryOperation("toChar", "Double") { a -> a.toChar() },
    unaryOperation("toDouble", "Double") { a -> a.toDouble() },
    unaryOperation("toFloat", "Double") { a -> a.toFloat() },
    unaryOperation("toInt", "Double") { a -> a.toInt() },
    unaryOperation("toLong", "Double") { a -> a.toLong() },
    unaryOperation("toShort", "Double") { a -> a.toShort() },
    unaryOperation("toString", "Double") { a -> a.toString() },
    unaryOperation("unaryMinus", "Double") { a -> a.unaryMinus() },
    unaryOperation("unaryPlus", "Double") { a -> a.unaryPlus() },
    unaryOperation("length", "String") { a -> a.length },
    unaryOperation("hashCode", "String") { a -> a.hashCode() },
    unaryOperation("toString", "String") { a -> a.toString() },
    unaryOperation("size", "BooleanArray") { a -> a.size },
    unaryOperation("iterator", "BooleanArray") { a -> a.iterator() },
    unaryOperation("size", "CharArray") { a -> a.size },
    unaryOperation("iterator", "CharArray") { a -> a.iterator() },
    unaryOperation("size", "ByteArray") { a -> a.size },
    unaryOperation("iterator", "ByteArray") { a -> a.iterator() },
    unaryOperation("size", "ShortArray") { a -> a.size },
    unaryOperation("iterator", "ShortArray") { a -> a.iterator() },
    unaryOperation("size", "IntArray") { a -> a.size },
    unaryOperation("iterator", "IntArray") { a -> a.iterator() },
    unaryOperation("size", "FloatArray") { a -> a.size },
    unaryOperation("iterator", "FloatArray") { a -> a.iterator() },
    unaryOperation("size", "LongArray") { a -> a.size },
    unaryOperation("iterator", "LongArray") { a -> a.iterator() },
    unaryOperation("size", "DoubleArray") { a -> a.size },
    unaryOperation("iterator", "DoubleArray") { a -> a.iterator() },
    unaryOperation>("size", "Array") { a -> a.size },
    unaryOperation>("iterator", "Array") { a -> a.iterator() },
    unaryOperation("hashCode", "Any") { a -> a.hashCode() },
    unaryOperation("toString", "Any") { a -> a.defaultToString() },
    unaryOperation("CHECK_NOT_NULL", "T0?") { a -> a!! },
    unaryOperation("message", "Throwable") { a -> a.getMessage() },
    unaryOperation("cause", "Throwable") { a -> a.getCause() }
)

val binaryFunctions = mapOf>(
    binaryOperation("and", "Boolean", "Boolean") { a, b -> a.and(b) },
    binaryOperation("compareTo", "Boolean", "Boolean") { a, b -> a.compareTo(b) },
    binaryOperation("equals", "Boolean", "Any?") { a, b -> a.equals(b) },
    binaryOperation("or", "Boolean", "Boolean") { a, b -> a.or(b) },
    binaryOperation("xor", "Boolean", "Boolean") { a, b -> a.xor(b) },
    binaryOperation("compareTo", "Char", "Char") { a, b -> a.compareTo(b) },
    binaryOperation("equals", "Char", "Any?") { a, b -> a.equals(b) },
    binaryOperation("minus", "Char", "Char") { a, b -> a.minus(b) },
    binaryOperation("minus", "Char", "Int") { a, b -> a.minus(b) },
    binaryOperation("plus", "Char", "Int") { a, b -> a.plus(b) },
    binaryOperation("rangeTo", "Char", "Char") { a, b -> a.rangeTo(b) },
    binaryOperation("compareTo", "Byte", "Byte") { a, b -> a.compareTo(b) },
    binaryOperation("compareTo", "Byte", "Double") { a, b -> a.compareTo(b) },
    binaryOperation("compareTo", "Byte", "Float") { a, b -> a.compareTo(b) },
    binaryOperation("compareTo", "Byte", "Int") { a, b -> a.compareTo(b) },
    binaryOperation("compareTo", "Byte", "Long") { a, b -> a.compareTo(b) },
    binaryOperation("compareTo", "Byte", "Short") { a, b -> a.compareTo(b) },
    binaryOperation("div", "Byte", "Byte") { a, b -> a.div(b) },
    binaryOperation("div", "Byte", "Double") { a, b -> a.div(b) },
    binaryOperation("div", "Byte", "Float") { a, b -> a.div(b) },
    binaryOperation("div", "Byte", "Int") { a, b -> a.div(b) },
    binaryOperation("div", "Byte", "Long") { a, b -> a.div(b) },
    binaryOperation("div", "Byte", "Short") { a, b -> a.div(b) },
    binaryOperation("equals", "Byte", "Any?") { a, b -> a.equals(b) },
    binaryOperation("minus", "Byte", "Byte") { a, b -> a.minus(b) },
    binaryOperation("minus", "Byte", "Double") { a, b -> a.minus(b) },
    binaryOperation("minus", "Byte", "Float") { a, b -> a.minus(b) },
    binaryOperation("minus", "Byte", "Int") { a, b -> a.minus(b) },
    binaryOperation("minus", "Byte", "Long") { a, b -> a.minus(b) },
    binaryOperation("minus", "Byte", "Short") { a, b -> a.minus(b) },
    binaryOperation("plus", "Byte", "Byte") { a, b -> a.plus(b) },
    binaryOperation("plus", "Byte", "Double") { a, b -> a.plus(b) },
    binaryOperation("plus", "Byte", "Float") { a, b -> a.plus(b) },
    binaryOperation("plus", "Byte", "Int") { a, b -> a.plus(b) },
    binaryOperation("plus", "Byte", "Long") { a, b -> a.plus(b) },
    binaryOperation("plus", "Byte", "Short") { a, b -> a.plus(b) },
    binaryOperation("rangeTo", "Byte", "Byte") { a, b -> a.rangeTo(b) },
    binaryOperation("rangeTo", "Byte", "Int") { a, b -> a.rangeTo(b) },
    binaryOperation("rangeTo", "Byte", "Long") { a, b -> a.rangeTo(b) },
    binaryOperation("rangeTo", "Byte", "Short") { a, b -> a.rangeTo(b) },
    binaryOperation("rem", "Byte", "Byte") { a, b -> a.rem(b) },
    binaryOperation("rem", "Byte", "Double") { a, b -> a.rem(b) },
    binaryOperation("rem", "Byte", "Float") { a, b -> a.rem(b) },
    binaryOperation("rem", "Byte", "Int") { a, b -> a.rem(b) },
    binaryOperation("rem", "Byte", "Long") { a, b -> a.rem(b) },
    binaryOperation("rem", "Byte", "Short") { a, b -> a.rem(b) },
    binaryOperation("times", "Byte", "Byte") { a, b -> a.times(b) },
    binaryOperation("times", "Byte", "Double") { a, b -> a.times(b) },
    binaryOperation("times", "Byte", "Float") { a, b -> a.times(b) },
    binaryOperation("times", "Byte", "Int") { a, b -> a.times(b) },
    binaryOperation("times", "Byte", "Long") { a, b -> a.times(b) },
    binaryOperation("times", "Byte", "Short") { a, b -> a.times(b) },
    binaryOperation("compareTo", "Short", "Byte") { a, b -> a.compareTo(b) },
    binaryOperation("compareTo", "Short", "Double") { a, b -> a.compareTo(b) },
    binaryOperation("compareTo", "Short", "Float") { a, b -> a.compareTo(b) },
    binaryOperation("compareTo", "Short", "Int") { a, b -> a.compareTo(b) },
    binaryOperation("compareTo", "Short", "Long") { a, b -> a.compareTo(b) },
    binaryOperation("compareTo", "Short", "Short") { a, b -> a.compareTo(b) },
    binaryOperation("div", "Short", "Byte") { a, b -> a.div(b) },
    binaryOperation("div", "Short", "Double") { a, b -> a.div(b) },
    binaryOperation("div", "Short", "Float") { a, b -> a.div(b) },
    binaryOperation("div", "Short", "Int") { a, b -> a.div(b) },
    binaryOperation("div", "Short", "Long") { a, b -> a.div(b) },
    binaryOperation("div", "Short", "Short") { a, b -> a.div(b) },
    binaryOperation("equals", "Short", "Any?") { a, b -> a.equals(b) },
    binaryOperation("minus", "Short", "Byte") { a, b -> a.minus(b) },
    binaryOperation("minus", "Short", "Double") { a, b -> a.minus(b) },
    binaryOperation("minus", "Short", "Float") { a, b -> a.minus(b) },
    binaryOperation("minus", "Short", "Int") { a, b -> a.minus(b) },
    binaryOperation("minus", "Short", "Long") { a, b -> a.minus(b) },
    binaryOperation("minus", "Short", "Short") { a, b -> a.minus(b) },
    binaryOperation("plus", "Short", "Byte") { a, b -> a.plus(b) },
    binaryOperation("plus", "Short", "Double") { a, b -> a.plus(b) },
    binaryOperation("plus", "Short", "Float") { a, b -> a.plus(b) },
    binaryOperation("plus", "Short", "Int") { a, b -> a.plus(b) },
    binaryOperation("plus", "Short", "Long") { a, b -> a.plus(b) },
    binaryOperation("plus", "Short", "Short") { a, b -> a.plus(b) },
    binaryOperation("rangeTo", "Short", "Byte") { a, b -> a.rangeTo(b) },
    binaryOperation("rangeTo", "Short", "Int") { a, b -> a.rangeTo(b) },
    binaryOperation("rangeTo", "Short", "Long") { a, b -> a.rangeTo(b) },
    binaryOperation("rangeTo", "Short", "Short") { a, b -> a.rangeTo(b) },
    binaryOperation("rem", "Short", "Byte") { a, b -> a.rem(b) },
    binaryOperation("rem", "Short", "Double") { a, b -> a.rem(b) },
    binaryOperation("rem", "Short", "Float") { a, b -> a.rem(b) },
    binaryOperation("rem", "Short", "Int") { a, b -> a.rem(b) },
    binaryOperation("rem", "Short", "Long") { a, b -> a.rem(b) },
    binaryOperation("rem", "Short", "Short") { a, b -> a.rem(b) },
    binaryOperation("times", "Short", "Byte") { a, b -> a.times(b) },
    binaryOperation("times", "Short", "Double") { a, b -> a.times(b) },
    binaryOperation("times", "Short", "Float") { a, b -> a.times(b) },
    binaryOperation("times", "Short", "Int") { a, b -> a.times(b) },
    binaryOperation("times", "Short", "Long") { a, b -> a.times(b) },
    binaryOperation("times", "Short", "Short") { a, b -> a.times(b) },
    binaryOperation("and", "Int", "Int") { a, b -> a.and(b) },
    binaryOperation("compareTo", "Int", "Byte") { a, b -> a.compareTo(b) },
    binaryOperation("compareTo", "Int", "Double") { a, b -> a.compareTo(b) },
    binaryOperation("compareTo", "Int", "Float") { a, b -> a.compareTo(b) },
    binaryOperation("compareTo", "Int", "Int") { a, b -> a.compareTo(b) },
    binaryOperation("compareTo", "Int", "Long") { a, b -> a.compareTo(b) },
    binaryOperation("compareTo", "Int", "Short") { a, b -> a.compareTo(b) },
    binaryOperation("div", "Int", "Byte") { a, b -> a.div(b) },
    binaryOperation("div", "Int", "Double") { a, b -> a.div(b) },
    binaryOperation("div", "Int", "Float") { a, b -> a.div(b) },
    binaryOperation("div", "Int", "Int") { a, b -> a.div(b) },
    binaryOperation("div", "Int", "Long") { a, b -> a.div(b) },
    binaryOperation("div", "Int", "Short") { a, b -> a.div(b) },
    binaryOperation("equals", "Int", "Any?") { a, b -> a.equals(b) },
    binaryOperation("minus", "Int", "Byte") { a, b -> a.minus(b) },
    binaryOperation("minus", "Int", "Double") { a, b -> a.minus(b) },
    binaryOperation("minus", "Int", "Float") { a, b -> a.minus(b) },
    binaryOperation("minus", "Int", "Int") { a, b -> a.minus(b) },
    binaryOperation("minus", "Int", "Long") { a, b -> a.minus(b) },
    binaryOperation("minus", "Int", "Short") { a, b -> a.minus(b) },
    binaryOperation("or", "Int", "Int") { a, b -> a.or(b) },
    binaryOperation("plus", "Int", "Byte") { a, b -> a.plus(b) },
    binaryOperation("plus", "Int", "Double") { a, b -> a.plus(b) },
    binaryOperation("plus", "Int", "Float") { a, b -> a.plus(b) },
    binaryOperation("plus", "Int", "Int") { a, b -> a.plus(b) },
    binaryOperation("plus", "Int", "Long") { a, b -> a.plus(b) },
    binaryOperation("plus", "Int", "Short") { a, b -> a.plus(b) },
    binaryOperation("rangeTo", "Int", "Byte") { a, b -> a.rangeTo(b) },
    binaryOperation("rangeTo", "Int", "Int") { a, b -> a.rangeTo(b) },
    binaryOperation("rangeTo", "Int", "Long") { a, b -> a.rangeTo(b) },
    binaryOperation("rangeTo", "Int", "Short") { a, b -> a.rangeTo(b) },
    binaryOperation("rem", "Int", "Byte") { a, b -> a.rem(b) },
    binaryOperation("rem", "Int", "Double") { a, b -> a.rem(b) },
    binaryOperation("rem", "Int", "Float") { a, b -> a.rem(b) },
    binaryOperation("rem", "Int", "Int") { a, b -> a.rem(b) },
    binaryOperation("rem", "Int", "Long") { a, b -> a.rem(b) },
    binaryOperation("rem", "Int", "Short") { a, b -> a.rem(b) },
    binaryOperation("shl", "Int", "Int") { a, b -> a.shl(b) },
    binaryOperation("shr", "Int", "Int") { a, b -> a.shr(b) },
    binaryOperation("times", "Int", "Byte") { a, b -> a.times(b) },
    binaryOperation("times", "Int", "Double") { a, b -> a.times(b) },
    binaryOperation("times", "Int", "Float") { a, b -> a.times(b) },
    binaryOperation("times", "Int", "Int") { a, b -> a.times(b) },
    binaryOperation("times", "Int", "Long") { a, b -> a.times(b) },
    binaryOperation("times", "Int", "Short") { a, b -> a.times(b) },
    binaryOperation("ushr", "Int", "Int") { a, b -> a.ushr(b) },
    binaryOperation("xor", "Int", "Int") { a, b -> a.xor(b) },
    binaryOperation("compareTo", "Float", "Byte") { a, b -> a.compareTo(b) },
    binaryOperation("compareTo", "Float", "Double") { a, b -> a.compareTo(b) },
    binaryOperation("compareTo", "Float", "Float") { a, b -> a.compareTo(b) },
    binaryOperation("compareTo", "Float", "Int") { a, b -> a.compareTo(b) },
    binaryOperation("compareTo", "Float", "Long") { a, b -> a.compareTo(b) },
    binaryOperation("compareTo", "Float", "Short") { a, b -> a.compareTo(b) },
    binaryOperation("div", "Float", "Byte") { a, b -> a.div(b) },
    binaryOperation("div", "Float", "Double") { a, b -> a.div(b) },
    binaryOperation("div", "Float", "Float") { a, b -> a.div(b) },
    binaryOperation("div", "Float", "Int") { a, b -> a.div(b) },
    binaryOperation("div", "Float", "Long") { a, b -> a.div(b) },
    binaryOperation("div", "Float", "Short") { a, b -> a.div(b) },
    binaryOperation("equals", "Float", "Any?") { a, b -> a.equals(b) },
    binaryOperation("minus", "Float", "Byte") { a, b -> a.minus(b) },
    binaryOperation("minus", "Float", "Double") { a, b -> a.minus(b) },
    binaryOperation("minus", "Float", "Float") { a, b -> a.minus(b) },
    binaryOperation("minus", "Float", "Int") { a, b -> a.minus(b) },
    binaryOperation("minus", "Float", "Long") { a, b -> a.minus(b) },
    binaryOperation("minus", "Float", "Short") { a, b -> a.minus(b) },
    binaryOperation("plus", "Float", "Byte") { a, b -> a.plus(b) },
    binaryOperation("plus", "Float", "Double") { a, b -> a.plus(b) },
    binaryOperation("plus", "Float", "Float") { a, b -> a.plus(b) },
    binaryOperation("plus", "Float", "Int") { a, b -> a.plus(b) },
    binaryOperation("plus", "Float", "Long") { a, b -> a.plus(b) },
    binaryOperation("plus", "Float", "Short") { a, b -> a.plus(b) },
    binaryOperation("rem", "Float", "Byte") { a, b -> a.rem(b) },
    binaryOperation("rem", "Float", "Double") { a, b -> a.rem(b) },
    binaryOperation("rem", "Float", "Float") { a, b -> a.rem(b) },
    binaryOperation("rem", "Float", "Int") { a, b -> a.rem(b) },
    binaryOperation("rem", "Float", "Long") { a, b -> a.rem(b) },
    binaryOperation("rem", "Float", "Short") { a, b -> a.rem(b) },
    binaryOperation("times", "Float", "Byte") { a, b -> a.times(b) },
    binaryOperation("times", "Float", "Double") { a, b -> a.times(b) },
    binaryOperation("times", "Float", "Float") { a, b -> a.times(b) },
    binaryOperation("times", "Float", "Int") { a, b -> a.times(b) },
    binaryOperation("times", "Float", "Long") { a, b -> a.times(b) },
    binaryOperation("times", "Float", "Short") { a, b -> a.times(b) },
    binaryOperation("and", "Long", "Long") { a, b -> a.and(b) },
    binaryOperation("compareTo", "Long", "Byte") { a, b -> a.compareTo(b) },
    binaryOperation("compareTo", "Long", "Double") { a, b -> a.compareTo(b) },
    binaryOperation("compareTo", "Long", "Float") { a, b -> a.compareTo(b) },
    binaryOperation("compareTo", "Long", "Int") { a, b -> a.compareTo(b) },
    binaryOperation("compareTo", "Long", "Long") { a, b -> a.compareTo(b) },
    binaryOperation("compareTo", "Long", "Short") { a, b -> a.compareTo(b) },
    binaryOperation("div", "Long", "Byte") { a, b -> a.div(b) },
    binaryOperation("div", "Long", "Double") { a, b -> a.div(b) },
    binaryOperation("div", "Long", "Float") { a, b -> a.div(b) },
    binaryOperation("div", "Long", "Int") { a, b -> a.div(b) },
    binaryOperation("div", "Long", "Long") { a, b -> a.div(b) },
    binaryOperation("div", "Long", "Short") { a, b -> a.div(b) },
    binaryOperation("equals", "Long", "Any?") { a, b -> a.equals(b) },
    binaryOperation("minus", "Long", "Byte") { a, b -> a.minus(b) },
    binaryOperation("minus", "Long", "Double") { a, b -> a.minus(b) },
    binaryOperation("minus", "Long", "Float") { a, b -> a.minus(b) },
    binaryOperation("minus", "Long", "Int") { a, b -> a.minus(b) },
    binaryOperation("minus", "Long", "Long") { a, b -> a.minus(b) },
    binaryOperation("minus", "Long", "Short") { a, b -> a.minus(b) },
    binaryOperation("or", "Long", "Long") { a, b -> a.or(b) },
    binaryOperation("plus", "Long", "Byte") { a, b -> a.plus(b) },
    binaryOperation("plus", "Long", "Double") { a, b -> a.plus(b) },
    binaryOperation("plus", "Long", "Float") { a, b -> a.plus(b) },
    binaryOperation("plus", "Long", "Int") { a, b -> a.plus(b) },
    binaryOperation("plus", "Long", "Long") { a, b -> a.plus(b) },
    binaryOperation("plus", "Long", "Short") { a, b -> a.plus(b) },
    binaryOperation("rangeTo", "Long", "Byte") { a, b -> a.rangeTo(b) },
    binaryOperation("rangeTo", "Long", "Int") { a, b -> a.rangeTo(b) },
    binaryOperation("rangeTo", "Long", "Long") { a, b -> a.rangeTo(b) },
    binaryOperation("rangeTo", "Long", "Short") { a, b -> a.rangeTo(b) },
    binaryOperation("rem", "Long", "Byte") { a, b -> a.rem(b) },
    binaryOperation("rem", "Long", "Double") { a, b -> a.rem(b) },
    binaryOperation("rem", "Long", "Float") { a, b -> a.rem(b) },
    binaryOperation("rem", "Long", "Int") { a, b -> a.rem(b) },
    binaryOperation("rem", "Long", "Long") { a, b -> a.rem(b) },
    binaryOperation("rem", "Long", "Short") { a, b -> a.rem(b) },
    binaryOperation("shl", "Long", "Int") { a, b -> a.shl(b) },
    binaryOperation("shr", "Long", "Int") { a, b -> a.shr(b) },
    binaryOperation("times", "Long", "Byte") { a, b -> a.times(b) },
    binaryOperation("times", "Long", "Double") { a, b -> a.times(b) },
    binaryOperation("times", "Long", "Float") { a, b -> a.times(b) },
    binaryOperation("times", "Long", "Int") { a, b -> a.times(b) },
    binaryOperation("times", "Long", "Long") { a, b -> a.times(b) },
    binaryOperation("times", "Long", "Short") { a, b -> a.times(b) },
    binaryOperation("ushr", "Long", "Int") { a, b -> a.ushr(b) },
    binaryOperation("xor", "Long", "Long") { a, b -> a.xor(b) },
    binaryOperation("compareTo", "Double", "Byte") { a, b -> a.compareTo(b) },
    binaryOperation("compareTo", "Double", "Double") { a, b -> a.compareTo(b) },
    binaryOperation("compareTo", "Double", "Float") { a, b -> a.compareTo(b) },
    binaryOperation("compareTo", "Double", "Int") { a, b -> a.compareTo(b) },
    binaryOperation("compareTo", "Double", "Long") { a, b -> a.compareTo(b) },
    binaryOperation("compareTo", "Double", "Short") { a, b -> a.compareTo(b) },
    binaryOperation("div", "Double", "Byte") { a, b -> a.div(b) },
    binaryOperation("div", "Double", "Double") { a, b -> a.div(b) },
    binaryOperation("div", "Double", "Float") { a, b -> a.div(b) },
    binaryOperation("div", "Double", "Int") { a, b -> a.div(b) },
    binaryOperation("div", "Double", "Long") { a, b -> a.div(b) },
    binaryOperation("div", "Double", "Short") { a, b -> a.div(b) },
    binaryOperation("equals", "Double", "Any?") { a, b -> a.equals(b) },
    binaryOperation("minus", "Double", "Byte") { a, b -> a.minus(b) },
    binaryOperation("minus", "Double", "Double") { a, b -> a.minus(b) },
    binaryOperation("minus", "Double", "Float") { a, b -> a.minus(b) },
    binaryOperation("minus", "Double", "Int") { a, b -> a.minus(b) },
    binaryOperation("minus", "Double", "Long") { a, b -> a.minus(b) },
    binaryOperation("minus", "Double", "Short") { a, b -> a.minus(b) },
    binaryOperation("plus", "Double", "Byte") { a, b -> a.plus(b) },
    binaryOperation("plus", "Double", "Double") { a, b -> a.plus(b) },
    binaryOperation("plus", "Double", "Float") { a, b -> a.plus(b) },
    binaryOperation("plus", "Double", "Int") { a, b -> a.plus(b) },
    binaryOperation("plus", "Double", "Long") { a, b -> a.plus(b) },
    binaryOperation("plus", "Double", "Short") { a, b -> a.plus(b) },
    binaryOperation("rem", "Double", "Byte") { a, b -> a.rem(b) },
    binaryOperation("rem", "Double", "Double") { a, b -> a.rem(b) },
    binaryOperation("rem", "Double", "Float") { a, b -> a.rem(b) },
    binaryOperation("rem", "Double", "Int") { a, b -> a.rem(b) },
    binaryOperation("rem", "Double", "Long") { a, b -> a.rem(b) },
    binaryOperation("rem", "Double", "Short") { a, b -> a.rem(b) },
    binaryOperation("times", "Double", "Byte") { a, b -> a.times(b) },
    binaryOperation("times", "Double", "Double") { a, b -> a.times(b) },
    binaryOperation("times", "Double", "Float") { a, b -> a.times(b) },
    binaryOperation("times", "Double", "Int") { a, b -> a.times(b) },
    binaryOperation("times", "Double", "Long") { a, b -> a.times(b) },
    binaryOperation("times", "Double", "Short") { a, b -> a.times(b) },
    binaryOperation("compareTo", "String", "String") { a, b -> a.compareTo(b) },
    binaryOperation("equals", "String", "Any?") { a, b -> a.equals(b) },
    binaryOperation("get", "String", "Int") { a, b -> a.get(b) },
    binaryOperation("plus", "String", "Any?") { a, b -> a.plus(b) },
    binaryOperation("get", "BooleanArray", "Int") { a, b -> a.get(b) },
    binaryOperation("get", "CharArray", "Int") { a, b -> a.get(b) },
    binaryOperation("get", "ByteArray", "Int") { a, b -> a.get(b) },
    binaryOperation("get", "ShortArray", "Int") { a, b -> a.get(b) },
    binaryOperation("get", "IntArray", "Int") { a, b -> a.get(b) },
    binaryOperation("get", "FloatArray", "Int") { a, b -> a.get(b) },
    binaryOperation("get", "LongArray", "Int") { a, b -> a.get(b) },
    binaryOperation("get", "DoubleArray", "Int") { a, b -> a.get(b) },
    binaryOperation, Int>("get", "Array", "Int") { a, b -> a.get(b) },
    binaryOperation("equals", "Any", "Any?") { a, b -> a.equals(b) },
    binaryOperation("less", "Char", "Char") { a, b -> a < b },
    binaryOperation("less", "Byte", "Byte") { a, b -> a < b },
    binaryOperation("less", "Short", "Short") { a, b -> a < b },
    binaryOperation("less", "Int", "Int") { a, b -> a < b },
    binaryOperation("less", "Float", "Float") { a, b -> a < b },
    binaryOperation("less", "Long", "Long") { a, b -> a < b },
    binaryOperation("less", "Double", "Double") { a, b -> a < b },
    binaryOperation("lessOrEqual", "Char", "Char") { a, b -> a <= b },
    binaryOperation("lessOrEqual", "Byte", "Byte") { a, b -> a <= b },
    binaryOperation("lessOrEqual", "Short", "Short") { a, b -> a <= b },
    binaryOperation("lessOrEqual", "Int", "Int") { a, b -> a <= b },
    binaryOperation("lessOrEqual", "Float", "Float") { a, b -> a <= b },
    binaryOperation("lessOrEqual", "Long", "Long") { a, b -> a <= b },
    binaryOperation("lessOrEqual", "Double", "Double") { a, b -> a <= b },
    binaryOperation("greater", "Char", "Char") { a, b -> a > b },
    binaryOperation("greater", "Byte", "Byte") { a, b -> a > b },
    binaryOperation("greater", "Short", "Short") { a, b -> a > b },
    binaryOperation("greater", "Int", "Int") { a, b -> a > b },
    binaryOperation("greater", "Float", "Float") { a, b -> a > b },
    binaryOperation("greater", "Long", "Long") { a, b -> a > b },
    binaryOperation("greater", "Double", "Double") { a, b -> a > b },
    binaryOperation("greaterOrEqual", "Char", "Char") { a, b -> a >= b },
    binaryOperation("greaterOrEqual", "Byte", "Byte") { a, b -> a >= b },
    binaryOperation("greaterOrEqual", "Short", "Short") { a, b -> a >= b },
    binaryOperation("greaterOrEqual", "Int", "Int") { a, b -> a >= b },
    binaryOperation("greaterOrEqual", "Float", "Float") { a, b -> a >= b },
    binaryOperation("greaterOrEqual", "Long", "Long") { a, b -> a >= b },
    binaryOperation("greaterOrEqual", "Double", "Double") { a, b -> a >= b },
    binaryOperation("EQEQ", "Any?", "Any?") { a, b -> a == b },
    binaryOperation("EQEQEQ", "Any?", "Any?") { a, b -> a === b },
    binaryOperation("ieee754equals", "Float?", "Float?") { a, b -> a == b },
    binaryOperation("ieee754equals", "Double?", "Double?") { a, b -> a == b },
    binaryOperation("ANDAND", "Boolean", "Boolean") { a, b -> a && b },
    binaryOperation("OROR", "Boolean", "Boolean") { a, b -> a || b }
)

val ternaryFunctions = mapOf>(
    ternaryOperation("subSequence", "String", "Int", "Int") { a, b, c -> a.subSequence(b, c) },
    ternaryOperation("set", "BooleanArray", "Int", "Boolean") { a, b, c -> a.set(b, c) },
    ternaryOperation("set", "CharArray", "Int", "Char") { a, b, c -> a.set(b, c) },
    ternaryOperation("set", "ByteArray", "Int", "Byte") { a, b, c -> a.set(b, c) },
    ternaryOperation("set", "ShortArray", "Int", "Short") { a, b, c -> a.set(b, c) },
    ternaryOperation("set", "IntArray", "Int", "Int") { a, b, c -> a.set(b, c) },
    ternaryOperation("set", "FloatArray", "Int", "Float") { a, b, c -> a.set(b, c) },
    ternaryOperation("set", "LongArray", "Int", "Long") { a, b, c -> a.set(b, c) },
    ternaryOperation("set", "DoubleArray", "Int", "Double") { a, b, c -> a.set(b, c) },
    ternaryOperation, Int, Any?>("set", "Array", "Int", "T") { a, b, c -> a.set(b, c) }
)

private fun Any.defaultToString(): String {
    return when (this) {
        is Lambda -> this.toString()
        is State -> "${this.irClass.internalName()}@" + System.identityHashCode(this).toString(16).padStart(8, '0')
        else -> this.toString().replaceAfter("@", System.identityHashCode(this).toString(16).padStart(8, '0'))
    }
}





© 2015 - 2024 Weber Informatics LLC | Privacy Policy