FIR2IR: cache functions and their parents properly
This commit is contained in:
+60
-85
@@ -62,7 +62,7 @@ class Fir2IrDeclarationStorage(
|
|||||||
|
|
||||||
private val typeParameterCacheForSetter = mutableMapOf<FirTypeParameter, IrTypeParameter>()
|
private val typeParameterCacheForSetter = mutableMapOf<FirTypeParameter, IrTypeParameter>()
|
||||||
|
|
||||||
private val functionCache = mutableMapOf<FirSimpleFunction, IrSimpleFunction>()
|
private val functionCache = mutableMapOf<FirFunction<*>, IrSimpleFunction>()
|
||||||
|
|
||||||
private val constructorCache = mutableMapOf<FirConstructor, IrConstructor>()
|
private val constructorCache = mutableMapOf<FirConstructor, IrConstructor>()
|
||||||
|
|
||||||
@@ -537,57 +537,60 @@ class Fir2IrDeclarationStorage(
|
|||||||
return this
|
return this
|
||||||
}
|
}
|
||||||
|
|
||||||
fun getIrFunction(
|
private fun getCachedIrFunction(function: FirFunction<*>): IrSimpleFunction? {
|
||||||
function: FirSimpleFunction,
|
return if (function !is FirSimpleFunction || function.visibility == Visibilities.LOCAL) {
|
||||||
|
localStorage.getLocalFunction(function)
|
||||||
|
} else {
|
||||||
|
functionCache[function]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun createIrFunction(
|
||||||
|
function: FirFunction<*>,
|
||||||
irParent: IrDeclarationParent?,
|
irParent: IrDeclarationParent?,
|
||||||
shouldLeaveScope: Boolean = true,
|
shouldLeaveScope: Boolean = true,
|
||||||
origin: IrDeclarationOrigin = IrDeclarationOrigin.DEFINED
|
origin: IrDeclarationOrigin = IrDeclarationOrigin.DEFINED
|
||||||
): IrSimpleFunction {
|
): IrSimpleFunction {
|
||||||
fun create(): IrSimpleFunction {
|
val simpleFunction = function as? FirSimpleFunction
|
||||||
val containerSource = function.containerSource
|
val containerSource = simpleFunction?.containerSource
|
||||||
val descriptor = containerSource?.let { WrappedFunctionDescriptorWithContainerSource(it) } ?: WrappedSimpleFunctionDescriptor()
|
val descriptor = containerSource?.let { WrappedFunctionDescriptorWithContainerSource(it) } ?: WrappedSimpleFunctionDescriptor()
|
||||||
val updatedOrigin = if (function.symbol.callableId.isKFunctionInvoke()) IrDeclarationOrigin.FAKE_OVERRIDE else origin
|
val isLambda = function.psi is KtFunctionLiteral
|
||||||
preCacheTypeParameters(function)
|
val updatedOrigin = when {
|
||||||
return function.convertWithOffsets { startOffset, endOffset ->
|
isLambda -> IrDeclarationOrigin.LOCAL_FUNCTION_FOR_LAMBDA
|
||||||
enterScope(descriptor)
|
function.symbol.callableId.isKFunctionInvoke() -> IrDeclarationOrigin.FAKE_OVERRIDE
|
||||||
val result = irSymbolTable.declareSimpleFunction(startOffset, endOffset, origin, descriptor) { symbol ->
|
else -> origin
|
||||||
IrFunctionImpl(
|
|
||||||
startOffset, endOffset, updatedOrigin, symbol,
|
|
||||||
function.name, function.visibility, function.modality!!,
|
|
||||||
function.returnTypeRef.toIrType(),
|
|
||||||
isInline = function.isInline,
|
|
||||||
isExternal = function.isExternal,
|
|
||||||
isTailrec = function.isTailRec,
|
|
||||||
isSuspend = function.isSuspend,
|
|
||||||
isExpect = function.isExpect,
|
|
||||||
isFakeOverride = updatedOrigin == IrDeclarationOrigin.FAKE_OVERRIDE,
|
|
||||||
isOperator = function.isOperator
|
|
||||||
)
|
|
||||||
}
|
|
||||||
result
|
|
||||||
}.bindAndDeclareParameters(function, descriptor, irParent, isStatic = function.isStatic)
|
|
||||||
}
|
}
|
||||||
|
preCacheTypeParameters(function)
|
||||||
|
val name = simpleFunction?.name
|
||||||
|
?: if (isLambda) Name.special("<anonymous>") else Name.special("<no name provided>")
|
||||||
|
val visibility = simpleFunction?.visibility ?: Visibilities.LOCAL
|
||||||
|
val created = function.convertWithOffsets { startOffset, endOffset ->
|
||||||
|
enterScope(descriptor)
|
||||||
|
val result = irSymbolTable.declareSimpleFunction(startOffset, endOffset, origin, descriptor) { symbol ->
|
||||||
|
IrFunctionImpl(
|
||||||
|
startOffset, endOffset, updatedOrigin, symbol,
|
||||||
|
name, visibility,
|
||||||
|
simpleFunction?.modality ?: Modality.FINAL,
|
||||||
|
function.returnTypeRef.toIrType(),
|
||||||
|
isInline = simpleFunction?.isInline == true,
|
||||||
|
isExternal = simpleFunction?.isExternal == true,
|
||||||
|
isTailrec = simpleFunction?.isTailRec == true,
|
||||||
|
isSuspend = simpleFunction?.isSuspend == true,
|
||||||
|
isExpect = simpleFunction?.isExpect == true,
|
||||||
|
isFakeOverride = updatedOrigin == IrDeclarationOrigin.FAKE_OVERRIDE,
|
||||||
|
isOperator = simpleFunction?.isOperator == true
|
||||||
|
)
|
||||||
|
}
|
||||||
|
result
|
||||||
|
}.bindAndDeclareParameters(function, descriptor, irParent, isStatic = simpleFunction?.isStatic == true)
|
||||||
|
|
||||||
if (function.visibility == Visibilities.LOCAL) {
|
|
||||||
val cached = localStorage.getLocalFunction(function)
|
|
||||||
if (cached != null) {
|
|
||||||
return if (shouldLeaveScope) cached else cached.enterLocalScope(function)
|
|
||||||
}
|
|
||||||
val created = create()
|
|
||||||
if (shouldLeaveScope) {
|
|
||||||
leaveScope(created.descriptor)
|
|
||||||
}
|
|
||||||
localStorage.putLocalFunction(function, created)
|
|
||||||
return created
|
|
||||||
}
|
|
||||||
val cached = functionCache[function]
|
|
||||||
if (cached != null) {
|
|
||||||
return if (shouldLeaveScope) cached else cached.enterLocalScope(function)
|
|
||||||
}
|
|
||||||
val created = create()
|
|
||||||
if (shouldLeaveScope) {
|
if (shouldLeaveScope) {
|
||||||
leaveScope(created.descriptor)
|
leaveScope(created.descriptor)
|
||||||
}
|
}
|
||||||
|
if (visibility == Visibilities.LOCAL) {
|
||||||
|
localStorage.putLocalFunction(function, created)
|
||||||
|
return created
|
||||||
|
}
|
||||||
if (function.symbol.callableId.isKFunctionInvoke()) {
|
if (function.symbol.callableId.isKFunctionInvoke()) {
|
||||||
(function.symbol.overriddenSymbol as? FirNamedFunctionSymbol)?.let {
|
(function.symbol.overriddenSymbol as? FirNamedFunctionSymbol)?.let {
|
||||||
created.overriddenSymbols += getIrFunctionSymbol(it) as IrSimpleFunctionSymbol
|
created.overriddenSymbols += getIrFunctionSymbol(it) as IrSimpleFunctionSymbol
|
||||||
@@ -597,38 +600,15 @@ class Fir2IrDeclarationStorage(
|
|||||||
return created
|
return created
|
||||||
}
|
}
|
||||||
|
|
||||||
fun getIrLocalFunction(
|
fun getIrFunction(
|
||||||
function: FirAnonymousFunction,
|
function: FirFunction<*>,
|
||||||
irParent: IrDeclarationParent? = null,
|
irParent: IrDeclarationParent?,
|
||||||
shouldLeaveScope: Boolean = true
|
shouldLeaveScope: Boolean = true,
|
||||||
|
origin: IrDeclarationOrigin = IrDeclarationOrigin.DEFINED
|
||||||
): IrSimpleFunction {
|
): IrSimpleFunction {
|
||||||
val descriptor = WrappedSimpleFunctionDescriptor()
|
return getCachedIrFunction(function)?.apply {
|
||||||
val isLambda = function.psi is KtFunctionLiteral
|
if (!shouldLeaveScope) enterLocalScope(function)
|
||||||
val origin = if (isLambda) IrDeclarationOrigin.LOCAL_FUNCTION_FOR_LAMBDA else IrDeclarationOrigin.DEFINED
|
} ?: createIrFunction(function, irParent, shouldLeaveScope, origin)
|
||||||
return function.convertWithOffsets { startOffset, endOffset ->
|
|
||||||
irSymbolTable.declareSimpleFunction(startOffset, endOffset, origin, descriptor) { symbol ->
|
|
||||||
IrFunctionImpl(
|
|
||||||
startOffset, endOffset, origin, symbol,
|
|
||||||
if (isLambda) Name.special("<anonymous>") else Name.special("<no name provided>"),
|
|
||||||
Visibilities.LOCAL, Modality.FINAL,
|
|
||||||
function.returnTypeRef.toIrType(),
|
|
||||||
isInline = false, isExternal = false, isTailrec = false,
|
|
||||||
// TODO: suspend lambda
|
|
||||||
isSuspend = false,
|
|
||||||
isExpect = false,
|
|
||||||
isFakeOverride = false,
|
|
||||||
isOperator = false
|
|
||||||
).apply {
|
|
||||||
enterScope(descriptor)
|
|
||||||
}
|
|
||||||
}.bindAndDeclareParameters(
|
|
||||||
function, descriptor, irParent = irParent, isStatic = false
|
|
||||||
).apply {
|
|
||||||
if (shouldLeaveScope) {
|
|
||||||
leaveScope(descriptor)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fun getIrConstructor(
|
fun getIrConstructor(
|
||||||
@@ -979,22 +959,17 @@ class Fir2IrDeclarationStorage(
|
|||||||
}
|
}
|
||||||
|
|
||||||
fun getIrFunctionSymbol(firFunctionSymbol: FirFunctionSymbol<*>): IrFunctionSymbol {
|
fun getIrFunctionSymbol(firFunctionSymbol: FirFunctionSymbol<*>): IrFunctionSymbol {
|
||||||
val firDeclaration = firFunctionSymbol.fir
|
return when (val firDeclaration = firFunctionSymbol.fir) {
|
||||||
val irParent = (firDeclaration as? FirCallableDeclaration<*>)?.let { findIrParent(it) }
|
is FirSimpleFunction, is FirAnonymousFunction -> {
|
||||||
return when (firDeclaration) {
|
getCachedIrFunction(firDeclaration)?.let { return irSymbolTable.referenceSimpleFunction(it.descriptor) }
|
||||||
is FirSimpleFunction -> {
|
val irParent = findIrParent(firDeclaration)
|
||||||
val irDeclaration = getIrFunction(firDeclaration, irParent).apply {
|
val irDeclaration = createIrFunction(firDeclaration, irParent).apply {
|
||||||
setAndModifyParent(irParent)
|
|
||||||
}
|
|
||||||
irSymbolTable.referenceSimpleFunction(irDeclaration.descriptor)
|
|
||||||
}
|
|
||||||
is FirAnonymousFunction -> {
|
|
||||||
val irDeclaration = getIrLocalFunction(firDeclaration, irParent).apply {
|
|
||||||
setAndModifyParent(irParent)
|
setAndModifyParent(irParent)
|
||||||
}
|
}
|
||||||
irSymbolTable.referenceSimpleFunction(irDeclaration.descriptor)
|
irSymbolTable.referenceSimpleFunction(irDeclaration.descriptor)
|
||||||
}
|
}
|
||||||
is FirConstructor -> {
|
is FirConstructor -> {
|
||||||
|
val irParent = findIrParent(firDeclaration)
|
||||||
val irDeclaration = getIrConstructor(firDeclaration, irParent).apply {
|
val irDeclaration = getIrConstructor(firDeclaration, irParent).apply {
|
||||||
setAndModifyParent(irParent)
|
setAndModifyParent(irParent)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -300,7 +300,7 @@ class Fir2IrVisitor(
|
|||||||
|
|
||||||
override fun visitAnonymousFunction(anonymousFunction: FirAnonymousFunction, data: Any?): IrElement {
|
override fun visitAnonymousFunction(anonymousFunction: FirAnonymousFunction, data: Any?): IrElement {
|
||||||
return anonymousFunction.convertWithOffsets { startOffset, endOffset ->
|
return anonymousFunction.convertWithOffsets { startOffset, endOffset ->
|
||||||
val irFunction = declarationStorage.getIrLocalFunction(anonymousFunction, conversionScope.parent(), shouldLeaveScope = false)
|
val irFunction = declarationStorage.getIrFunction(anonymousFunction, conversionScope.parent(), shouldLeaveScope = false)
|
||||||
conversionScope.withFunction(irFunction) {
|
conversionScope.withFunction(irFunction) {
|
||||||
setFunctionContent(irFunction.descriptor, anonymousFunction)
|
setFunctionContent(irFunction.descriptor, anonymousFunction)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
// IGNORE_BACKEND_FIR: JVM_IR
|
|
||||||
// KJS_WITH_FULL_RUNTIME
|
// KJS_WITH_FULL_RUNTIME
|
||||||
// WITH_RUNTIME
|
// WITH_RUNTIME
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
// IGNORE_BACKEND_FIR: JVM_IR
|
|
||||||
class Point(val x : Int, val y : Int)
|
class Point(val x : Int, val y : Int)
|
||||||
|
|
||||||
fun box() : String {
|
fun box() : String {
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
// IGNORE_BACKEND_FIR: JVM_IR
|
|
||||||
class A {
|
class A {
|
||||||
fun foo() {}
|
fun foo() {}
|
||||||
fun bar(f: A.() -> Unit = {}) {}
|
fun bar(f: A.() -> Unit = {}) {}
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
// !USE_EXPERIMENTAL: kotlin.contracts.ExperimentalContracts
|
// !USE_EXPERIMENTAL: kotlin.contracts.ExperimentalContracts
|
||||||
// IGNORE_BACKEND_FIR: JVM_IR
|
|
||||||
// IGNORE_BACKEND: NATIVE
|
// IGNORE_BACKEND: NATIVE
|
||||||
|
|
||||||
import kotlin.contracts.*
|
import kotlin.contracts.*
|
||||||
|
|||||||
-1
@@ -1,4 +1,3 @@
|
|||||||
// IGNORE_BACKEND_FIR: JVM_IR
|
|
||||||
fun zap(s: String) = s
|
fun zap(s: String) = s
|
||||||
|
|
||||||
inline fun tryZap(s1: String, s2: String, fn: String.(String) -> String) =
|
inline fun tryZap(s1: String, s2: String, fn: String.(String) -> String) =
|
||||||
|
|||||||
-1
@@ -1,4 +1,3 @@
|
|||||||
// IGNORE_BACKEND_FIR: JVM_IR
|
|
||||||
fun zap(s: String) = s
|
fun zap(s: String) = s
|
||||||
|
|
||||||
inline fun tryZap(string: String, fn: String.() -> String) =
|
inline fun tryZap(string: String, fn: String.() -> String) =
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
// IGNORE_BACKEND_FIR: JVM_IR
|
|
||||||
fun test1(f: (Int) -> Int) = f(1)
|
fun test1(f: (Int) -> Int) = f(1)
|
||||||
|
|
||||||
fun test2(f: Int.() -> Int) = 2.f()
|
fun test2(f: Int.() -> Int) = 2.f()
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
// IGNORE_BACKEND_FIR: JVM_IR
|
|
||||||
fun test(cl: Int.() -> Int):Int = 11.cl()
|
fun test(cl: Int.() -> Int):Int = 11.cl()
|
||||||
|
|
||||||
class Foo {
|
class Foo {
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
// IGNORE_BACKEND_FIR: JVM_IR
|
|
||||||
// IGNORE_BACKEND: JS_IR
|
// IGNORE_BACKEND: JS_IR
|
||||||
// TODO: muted automatically, investigate should it be ran for JS or not
|
// TODO: muted automatically, investigate should it be ran for JS or not
|
||||||
// IGNORE_BACKEND: JS, NATIVE
|
// IGNORE_BACKEND: JS, NATIVE
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
// IGNORE_BACKEND_FIR: JVM_IR
|
|
||||||
fun box() : String {
|
fun box() : String {
|
||||||
val y = 12
|
val y = 12
|
||||||
val op = { x:Int -> (x + y).toString() }
|
val op = { x:Int -> (x + y).toString() }
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
// IGNORE_BACKEND_FIR: JVM_IR
|
|
||||||
// TARGET_BACKEND: JVM
|
// TARGET_BACKEND: JVM
|
||||||
|
|
||||||
// FULL_JDK
|
// FULL_JDK
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
// IGNORE_BACKEND_FIR: JVM_IR
|
|
||||||
fun box(): String {
|
fun box(): String {
|
||||||
val f = fun (s: String): String = s
|
val f = fun (s: String): String = s
|
||||||
val g = f as String.() -> String
|
val g = f as String.() -> String
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
// IGNORE_BACKEND_FIR: JVM_IR
|
|
||||||
//KT-3450 get and invoke are not parsed in one expression
|
//KT-3450 get and invoke are not parsed in one expression
|
||||||
|
|
||||||
public class A(val s: String) {
|
public class A(val s: String) {
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
// IGNORE_BACKEND_FIR: JVM_IR
|
|
||||||
class Data
|
class Data
|
||||||
|
|
||||||
fun newInit(f: Data.() -> Data) = Data().f()
|
fun newInit(f: Data.() -> Data) = Data().f()
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
// IGNORE_BACKEND_FIR: JVM_IR
|
|
||||||
class Comment() {
|
class Comment() {
|
||||||
var article = ""
|
var article = ""
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
// IGNORE_BACKEND_FIR: JVM_IR
|
|
||||||
fun Any.with(operation : Any.() -> Any) = operation().toString()
|
fun Any.with(operation : Any.() -> Any) = operation().toString()
|
||||||
|
|
||||||
val f = { a : Int -> }
|
val f = { a : Int -> }
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
// IGNORE_BACKEND_FIR: JVM_IR
|
|
||||||
// WITH_RUNTIME
|
// WITH_RUNTIME
|
||||||
|
|
||||||
object ExtProvider {
|
object ExtProvider {
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
// !LANGUAGE: +NewInference
|
// !LANGUAGE: +NewInference
|
||||||
// !USE_EXPERIMENTAL: kotlin.Experimental
|
// !USE_EXPERIMENTAL: kotlin.Experimental
|
||||||
// IGNORE_BACKEND_FIR: JVM_IR
|
|
||||||
// WITH_RUNTIME
|
// WITH_RUNTIME
|
||||||
|
|
||||||
// ISSUE: KT-35684
|
// ISSUE: KT-35684
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
// !LANGUAGE: +NewInference
|
// !LANGUAGE: +NewInference
|
||||||
// WITH_RUNTIME
|
// WITH_RUNTIME
|
||||||
// KJS_WITH_FULL_RUNTIME
|
// KJS_WITH_FULL_RUNTIME
|
||||||
// IGNORE_BACKEND_FIR: JVM_IR
|
|
||||||
// WITH_REFLECT
|
// WITH_REFLECT
|
||||||
|
|
||||||
import kotlin.experimental.ExperimentalTypeInference
|
import kotlin.experimental.ExperimentalTypeInference
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
// IGNORE_BACKEND_FIR: JVM_IR
|
|
||||||
// TARGET_BACKEND: JVM
|
// TARGET_BACKEND: JVM
|
||||||
|
|
||||||
// WITH_RUNTIME
|
// WITH_RUNTIME
|
||||||
|
|||||||
-1
@@ -1,4 +1,3 @@
|
|||||||
// IGNORE_BACKEND_FIR: JVM_IR
|
|
||||||
class A(val result: String)
|
class A(val result: String)
|
||||||
|
|
||||||
fun a(body: A.() -> String): String {
|
fun a(body: A.() -> String): String {
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
// IGNORE_BACKEND_FIR: JVM_IR
|
|
||||||
// KJS_WITH_FULL_RUNTIME
|
// KJS_WITH_FULL_RUNTIME
|
||||||
// WITH_RUNTIME
|
// WITH_RUNTIME
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
// IGNORE_BACKEND_FIR: JVM_IR
|
|
||||||
// FILE: Outer.kt
|
// FILE: Outer.kt
|
||||||
|
|
||||||
package another
|
package another
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
// IGNORE_BACKEND_FIR: JVM_IR
|
|
||||||
fun f(b : Int.(Int)->Int) = 1?.b(1)
|
fun f(b : Int.(Int)->Int) = 1?.b(1)
|
||||||
|
|
||||||
fun box(): String {
|
fun box(): String {
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
// IGNORE_BACKEND_FIR: JVM_IR
|
|
||||||
fun f(b : Long.(Long)->Long) = 1L?.b(2L)
|
fun f(b : Long.(Long)->Long) = 1L?.b(2L)
|
||||||
|
|
||||||
fun box(): String {
|
fun box(): String {
|
||||||
|
|||||||
@@ -12,4 +12,4 @@ FILE fqName:<root> fileName:/extensionLambda.kt
|
|||||||
BLOCK_BODY
|
BLOCK_BODY
|
||||||
RETURN type=kotlin.Nothing from='local final fun <anonymous> (): kotlin.Int declared in <root>.test1'
|
RETURN type=kotlin.Nothing from='local final fun <anonymous> (): kotlin.Int declared in <root>.test1'
|
||||||
CALL 'public open fun <get-length> (): kotlin.Int declared in kotlin.String' type=kotlin.Int origin=GET_PROPERTY
|
CALL 'public open fun <get-length> (): kotlin.Int declared in kotlin.String' type=kotlin.Int origin=GET_PROPERTY
|
||||||
$this: GET_VAR '<this>: kotlin.String declared in special.<anonymous>' type=kotlin.String origin=null
|
$this: GET_VAR '<this>: kotlin.String declared in <root>.test1.<anonymous>' type=kotlin.String origin=null
|
||||||
|
|||||||
@@ -113,7 +113,7 @@ FILE fqName:<root> fileName:/multipleImplicitReceivers.kt
|
|||||||
BLOCK_BODY
|
BLOCK_BODY
|
||||||
RETURN type=kotlin.Nothing from='local final fun <anonymous> (): kotlin.Int declared in <root>.test.<anonymous>.<anonymous>'
|
RETURN type=kotlin.Nothing from='local final fun <anonymous> (): kotlin.Int declared in <root>.test.<anonymous>.<anonymous>'
|
||||||
CALL 'public open fun invoke (): kotlin.Int [operator] declared in <root>.IInvoke' type=kotlin.Int origin=null
|
CALL 'public open fun invoke (): kotlin.Int [operator] declared in <root>.IInvoke' type=kotlin.Int origin=null
|
||||||
$this: GET_VAR '<this>: <root>.IInvoke declared in special.<anonymous>' type=<root>.IInvoke origin=null
|
$this: GET_VAR '<this>: <root>.IInvoke declared in <root>.test.<anonymous>.<anonymous>.<anonymous>' type=<root>.IInvoke origin=null
|
||||||
$receiver: CALL 'public open fun <get-foo> (): <root>.B declared in <root>.IFoo' type=<root>.B origin=GET_PROPERTY
|
$receiver: CALL 'public open fun <get-foo> (): <root>.B declared in <root>.IFoo' type=<root>.B origin=GET_PROPERTY
|
||||||
$this: GET_VAR '<this>: <root>.IFoo declared in special.<anonymous>' type=<root>.IFoo origin=null
|
$this: GET_VAR '<this>: <root>.IFoo declared in <root>.test.<anonymous>.<anonymous>' type=<root>.IFoo origin=null
|
||||||
$receiver: GET_VAR '<this>: <root>.A declared in special.<anonymous>' type=<root>.A origin=null
|
$receiver: GET_VAR '<this>: <root>.A declared in <root>.test.<anonymous>' type=<root>.A origin=null
|
||||||
|
|||||||
+1
-1
@@ -28,7 +28,7 @@ FILE fqName:<root> fileName:/builtinMap.kt
|
|||||||
BLOCK_BODY
|
BLOCK_BODY
|
||||||
RETURN type=kotlin.Nothing from='local final fun <anonymous> (): kotlin.Unit declared in <root>.plus'
|
RETURN type=kotlin.Nothing from='local final fun <anonymous> (): kotlin.Unit declared in <root>.plus'
|
||||||
CALL 'public open fun put (p0: K of java.util.LinkedHashMap?, p1: V of java.util.LinkedHashMap?): V of java.util.LinkedHashMap? declared in java.util.LinkedHashMap' type=V1 of <root>.plus? origin=null
|
CALL 'public open fun put (p0: K of java.util.LinkedHashMap?, p1: V of java.util.LinkedHashMap?): V of java.util.LinkedHashMap? declared in java.util.LinkedHashMap' type=V1 of <root>.plus? origin=null
|
||||||
$this: GET_VAR '<this>: java.util.LinkedHashMap<K1 of <root>.plus?, V1 of <root>.plus?> declared in special.<anonymous>' type=java.util.LinkedHashMap<K1 of <root>.plus?, V1 of <root>.plus?> origin=null
|
$this: GET_VAR '<this>: java.util.LinkedHashMap<K1 of <root>.plus?, V1 of <root>.plus?> declared in <root>.plus.<anonymous>' type=java.util.LinkedHashMap<K1 of <root>.plus?, V1 of <root>.plus?> origin=null
|
||||||
p0: CALL 'public final fun <get-first> (): A of kotlin.Pair declared in kotlin.Pair' type=K1 of <root>.plus origin=GET_PROPERTY
|
p0: CALL 'public final fun <get-first> (): A of kotlin.Pair declared in kotlin.Pair' type=K1 of <root>.plus origin=GET_PROPERTY
|
||||||
$this: GET_VAR 'pair: kotlin.Pair<K1 of <root>.plus, V1 of <root>.plus> declared in <root>.plus' type=kotlin.Pair<K1 of <root>.plus, V1 of <root>.plus> origin=null
|
$this: GET_VAR 'pair: kotlin.Pair<K1 of <root>.plus, V1 of <root>.plus> declared in <root>.plus' type=kotlin.Pair<K1 of <root>.plus, V1 of <root>.plus> origin=null
|
||||||
p1: CALL 'public final fun <get-second> (): B of kotlin.Pair declared in kotlin.Pair' type=V1 of <root>.plus origin=GET_PROPERTY
|
p1: CALL 'public final fun <get-second> (): B of kotlin.Pair declared in kotlin.Pair' type=V1 of <root>.plus origin=GET_PROPERTY
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ FILE fqName:<root> fileName:/castsInsideCoroutineInference.kt
|
|||||||
$receiver: VALUE_PARAMETER name:<this> type:<root>.FlowCollector<R of <root>.scopedFlow>
|
$receiver: VALUE_PARAMETER name:<this> type:<root>.FlowCollector<R of <root>.scopedFlow>
|
||||||
BLOCK_BODY
|
BLOCK_BODY
|
||||||
VAR name:collector type:<root>.FlowCollector<R of <root>.scopedFlow> [val]
|
VAR name:collector type:<root>.FlowCollector<R of <root>.scopedFlow> [val]
|
||||||
GET_VAR '<this>: <root>.FlowCollector<R of <root>.scopedFlow> declared in special.<anonymous>' type=<root>.FlowCollector<R of <root>.scopedFlow> origin=null
|
GET_VAR '<this>: <root>.FlowCollector<R of <root>.scopedFlow> declared in <root>.scopedFlow.<anonymous>' type=<root>.FlowCollector<R of <root>.scopedFlow> origin=null
|
||||||
CALL 'public final fun flowScope <R> (block: kotlin.Function1<<root>.CoroutineScope, R of <root>.flowScope>): R of <root>.flowScope [suspend] declared in <root>' type=kotlin.Unit origin=null
|
CALL 'public final fun flowScope <R> (block: kotlin.Function1<<root>.CoroutineScope, R of <root>.flowScope>): R of <root>.flowScope [suspend] declared in <root>' type=kotlin.Unit origin=null
|
||||||
<R>: kotlin.Unit
|
<R>: kotlin.Unit
|
||||||
block: FUN_EXPR type=kotlin.Function1<<root>.CoroutineScope, kotlin.Unit> origin=LAMBDA
|
block: FUN_EXPR type=kotlin.Function1<<root>.CoroutineScope, kotlin.Unit> origin=LAMBDA
|
||||||
@@ -20,7 +20,7 @@ FILE fqName:<root> fileName:/castsInsideCoroutineInference.kt
|
|||||||
BLOCK_BODY
|
BLOCK_BODY
|
||||||
CALL 'public abstract fun invoke (p1: P1 of kotlin.Function2, p2: P2 of kotlin.Function2): R of kotlin.Function2 [operator] declared in kotlin.Function2' type=kotlin.Unit origin=INVOKE
|
CALL 'public abstract fun invoke (p1: P1 of kotlin.Function2, p2: P2 of kotlin.Function2): R of kotlin.Function2 [operator] declared in kotlin.Function2' type=kotlin.Unit origin=INVOKE
|
||||||
$this: GET_VAR 'block: kotlin.Function2<<root>.CoroutineScope, <root>.FlowCollector<R of <root>.scopedFlow>, kotlin.Unit> declared in <root>.scopedFlow' type=kotlin.Function2<<root>.CoroutineScope, <root>.FlowCollector<R of <root>.scopedFlow>, kotlin.Unit> origin=null
|
$this: GET_VAR 'block: kotlin.Function2<<root>.CoroutineScope, <root>.FlowCollector<R of <root>.scopedFlow>, kotlin.Unit> declared in <root>.scopedFlow' type=kotlin.Function2<<root>.CoroutineScope, <root>.FlowCollector<R of <root>.scopedFlow>, kotlin.Unit> origin=null
|
||||||
p1: GET_VAR '<this>: <root>.CoroutineScope declared in special.<anonymous>' type=<root>.CoroutineScope origin=null
|
p1: GET_VAR '<this>: <root>.CoroutineScope declared in <root>.scopedFlow.<anonymous>.<anonymous>' type=<root>.CoroutineScope origin=null
|
||||||
p2: GET_VAR 'val collector: <root>.FlowCollector<R of <root>.scopedFlow> [val] declared in <root>.scopedFlow.<anonymous>' type=<root>.FlowCollector<R of <root>.scopedFlow> origin=null
|
p2: GET_VAR 'val collector: <root>.FlowCollector<R of <root>.scopedFlow> [val] declared in <root>.scopedFlow.<anonymous>' type=<root>.FlowCollector<R of <root>.scopedFlow> origin=null
|
||||||
FUN name:onCompletion visibility:public modality:FINAL <T> ($receiver:<root>.Flow<T of <root>.onCompletion>, action:kotlin.Function2<<root>.FlowCollector<T of <root>.onCompletion>, kotlin.Throwable?, kotlin.Unit>) returnType:<root>.Flow<T of <root>.onCompletion>
|
FUN name:onCompletion visibility:public modality:FINAL <T> ($receiver:<root>.Flow<T of <root>.onCompletion>, action:kotlin.Function2<<root>.FlowCollector<T of <root>.onCompletion>, kotlin.Throwable?, kotlin.Unit>) returnType:<root>.Flow<T of <root>.onCompletion>
|
||||||
TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?]
|
TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?]
|
||||||
@@ -37,7 +37,7 @@ FILE fqName:<root> fileName:/castsInsideCoroutineInference.kt
|
|||||||
VAR name:safeCollector type:<root>.SafeCollector<T of <root>.onCompletion> [val]
|
VAR name:safeCollector type:<root>.SafeCollector<T of <root>.onCompletion> [val]
|
||||||
CONSTRUCTOR_CALL 'public constructor <init> (collector: <root>.FlowCollector<T of <root>.SafeCollector>) [primary] declared in <root>.SafeCollector' type=<root>.SafeCollector<T of <root>.onCompletion> origin=null
|
CONSTRUCTOR_CALL 'public constructor <init> (collector: <root>.FlowCollector<T of <root>.SafeCollector>) [primary] declared in <root>.SafeCollector' type=<root>.SafeCollector<T of <root>.onCompletion> origin=null
|
||||||
<class: T>: T of <root>.onCompletion
|
<class: T>: T of <root>.onCompletion
|
||||||
collector: GET_VAR '<this>: <root>.FlowCollector<T of <root>.onCompletion> declared in special.<anonymous>' type=<root>.FlowCollector<T of <root>.onCompletion> origin=null
|
collector: GET_VAR '<this>: <root>.FlowCollector<T of <root>.onCompletion> declared in <root>.onCompletion.<anonymous>' type=<root>.FlowCollector<T of <root>.onCompletion> origin=null
|
||||||
CALL 'public final fun invokeSafely <T> (action: kotlin.Function2<<root>.FlowCollector<T of <root>.invokeSafely>, kotlin.Throwable?, kotlin.Unit>): kotlin.Unit [suspend] declared in <root>' type=kotlin.Unit origin=null
|
CALL 'public final fun invokeSafely <T> (action: kotlin.Function2<<root>.FlowCollector<T of <root>.invokeSafely>, kotlin.Throwable?, kotlin.Unit>): kotlin.Unit [suspend] declared in <root>' type=kotlin.Unit origin=null
|
||||||
<T>: T of <root>.onCompletion
|
<T>: T of <root>.onCompletion
|
||||||
$receiver: GET_VAR 'val safeCollector: <root>.SafeCollector<T of <root>.onCompletion> [val] declared in <root>.onCompletion.<anonymous>' type=<root>.SafeCollector<T of <root>.onCompletion> origin=null
|
$receiver: GET_VAR 'val safeCollector: <root>.SafeCollector<T of <root>.onCompletion> [val] declared in <root>.onCompletion.<anonymous>' type=<root>.SafeCollector<T of <root>.onCompletion> origin=null
|
||||||
@@ -81,7 +81,7 @@ FILE fqName:<root> fileName:/castsInsideCoroutineInference.kt
|
|||||||
VAR name:channel type:<root>.ChannelCoroutine<kotlin.Any> [val]
|
VAR name:channel type:<root>.ChannelCoroutine<kotlin.Any> [val]
|
||||||
TYPE_OP type=<root>.ChannelCoroutine<kotlin.Any> origin=CAST typeOperand=<root>.ChannelCoroutine<kotlin.Any>
|
TYPE_OP type=<root>.ChannelCoroutine<kotlin.Any> origin=CAST typeOperand=<root>.ChannelCoroutine<kotlin.Any>
|
||||||
CALL 'public abstract fun <get-channel> (): <root>.SendChannel<E of <root>.ProducerScope> declared in <root>.ProducerScope' type=<root>.SendChannel<kotlin.Any> origin=GET_PROPERTY
|
CALL 'public abstract fun <get-channel> (): <root>.SendChannel<E of <root>.ProducerScope> declared in <root>.ProducerScope' type=<root>.SendChannel<kotlin.Any> origin=GET_PROPERTY
|
||||||
$this: GET_VAR '<this>: <root>.ProducerScope<kotlin.Any> declared in special.<anonymous>' type=<root>.ProducerScope<kotlin.Any> origin=null
|
$this: GET_VAR '<this>: <root>.ProducerScope<kotlin.Any> declared in <root>.asFairChannel.<anonymous>' type=<root>.ProducerScope<kotlin.Any> origin=null
|
||||||
CALL 'public abstract fun collect (collector: <root>.FlowCollector<T of <root>.Flow>): kotlin.Unit [suspend] declared in <root>.Flow' type=kotlin.Unit origin=null
|
CALL 'public abstract fun collect (collector: <root>.FlowCollector<T of <root>.Flow>): kotlin.Unit [suspend] declared in <root>.Flow' type=kotlin.Unit origin=null
|
||||||
$this: GET_VAR 'flow: <root>.Flow<*> declared in <root>.asFairChannel' type=<root>.Flow<*> origin=null
|
$this: GET_VAR 'flow: <root>.Flow<*> declared in <root>.asFairChannel' type=<root>.Flow<*> origin=null
|
||||||
collector: FUN_EXPR type=kotlin.Function1<kotlin.Any?, kotlin.Unit> origin=LAMBDA
|
collector: FUN_EXPR type=kotlin.Function1<kotlin.Any?, kotlin.Unit> origin=LAMBDA
|
||||||
@@ -125,7 +125,7 @@ FILE fqName:<root> fileName:/castsInsideCoroutineInference.kt
|
|||||||
RETURN type=kotlin.Nothing from='local final fun <anonymous> (value: kotlin.Any?): kotlin.Unit declared in <root>.asChannel.<anonymous>'
|
RETURN type=kotlin.Nothing from='local final fun <anonymous> (value: kotlin.Any?): kotlin.Unit declared in <root>.asChannel.<anonymous>'
|
||||||
CALL 'public abstract fun send (e: E of <root>.SendChannel): kotlin.Unit [suspend] declared in <root>.SendChannel' type=kotlin.Unit origin=null
|
CALL 'public abstract fun send (e: E of <root>.SendChannel): kotlin.Unit [suspend] declared in <root>.SendChannel' type=kotlin.Unit origin=null
|
||||||
$this: CALL 'public abstract fun <get-channel> (): <root>.SendChannel<E of <root>.ProducerScope> declared in <root>.ProducerScope' type=<root>.SendChannel<kotlin.Any> origin=GET_PROPERTY
|
$this: CALL 'public abstract fun <get-channel> (): <root>.SendChannel<E of <root>.ProducerScope> declared in <root>.ProducerScope' type=<root>.SendChannel<kotlin.Any> origin=GET_PROPERTY
|
||||||
$this: GET_VAR '<this>: <root>.ProducerScope<kotlin.Any> declared in special.<anonymous>' type=<root>.ProducerScope<kotlin.Any> origin=null
|
$this: GET_VAR '<this>: <root>.ProducerScope<kotlin.Any> declared in <root>.asChannel.<anonymous>' type=<root>.ProducerScope<kotlin.Any> origin=null
|
||||||
e: BLOCK type=kotlin.Any origin=ELVIS
|
e: BLOCK type=kotlin.Any origin=ELVIS
|
||||||
VAR IR_TEMPORARY_VARIABLE name:tmp_1 type:kotlin.Any? [val]
|
VAR IR_TEMPORARY_VARIABLE name:tmp_1 type:kotlin.Any? [val]
|
||||||
GET_VAR 'value: kotlin.Any? declared in <root>.asChannel.<anonymous>.<anonymous>' type=kotlin.Any? origin=null
|
GET_VAR 'value: kotlin.Any? declared in <root>.asChannel.<anonymous>.<anonymous>' type=kotlin.Any? origin=null
|
||||||
|
|||||||
Reference in New Issue
Block a user