IR: move KotlnMangler to ir.tree module

This commit is contained in:
Georgy Bronnikov
2019-11-11 12:39:56 +03:00
parent 92ebb092a2
commit 76016b1a3c
7 changed files with 31 additions and 18 deletions
@@ -0,0 +1,26 @@
/*
* Copyright 2010-2019 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/
package org.jetbrains.kotlin.ir.util
import org.jetbrains.kotlin.ir.declarations.IrDeclaration
import org.jetbrains.kotlin.ir.declarations.IrFunction
import org.jetbrains.kotlin.ir.types.IrType
import org.jetbrains.kotlin.name.Name
interface KotlinMangler {
val String.hashMangle: Long
val IrDeclaration.hashedMangle: Long
fun IrDeclaration.isExported(): Boolean
val IrFunction.functionName: String
val IrType.isInlined: Boolean
val Long.isSpecial: Boolean
companion object {
private val FUNCTION_PREFIX = "<BUILT-IN-FUNCTION>"
fun functionClassSymbolName(name: Name) = "ktype:$FUNCTION_PREFIX$name"
fun functionInvokeSymbolName(name: Name) = "kfun:$FUNCTION_PREFIX$name.invoke"
}
}