[FIR] Support CallsInPlace effects
This commit is contained in:
+11
-13
@@ -24,6 +24,7 @@ class ControlFlowGraphBuilder {
|
||||
|
||||
private val exitNodes: Stack<CFGNode<*>> = stackOf()
|
||||
|
||||
private val functionEnterNodes: SymbolBasedNodeStorage<FirFunction<*>, FunctionEnterNode> = SymbolBasedNodeStorage()
|
||||
private val functionExitNodes: SymbolBasedNodeStorage<FirFunction<*>, FunctionExitNode> = SymbolBasedNodeStorage()
|
||||
|
||||
private val whenExitNodes: NodeStorage<FirWhenExpression, WhenExitNode> = NodeStorage()
|
||||
@@ -86,17 +87,14 @@ class ControlFlowGraphBuilder {
|
||||
|
||||
@Suppress("NON_EXHAUSTIVE_WHEN")
|
||||
when (invocationKind) {
|
||||
InvocationKind.AT_LEAST_ONCE -> addEdge(exitNode, enterNode)
|
||||
InvocationKind.AT_MOST_ONCE -> addEdge(enterNode, exitNode)
|
||||
InvocationKind.UNKNOWN -> {
|
||||
addEdge(exitNode, enterNode)
|
||||
addEdge(enterNode, exitNode)
|
||||
}
|
||||
InvocationKind.AT_MOST_ONCE, InvocationKind.UNKNOWN -> addEdge(enterNode, exitNode)
|
||||
}
|
||||
|
||||
functionExitNodes.push(exitNode)
|
||||
if (!isInplace) {
|
||||
exitNodes.push(exitNode)
|
||||
} else {
|
||||
functionEnterNodes.push(enterNode)
|
||||
}
|
||||
levelCounter++
|
||||
return enterNode to previousNode
|
||||
@@ -105,12 +103,17 @@ class ControlFlowGraphBuilder {
|
||||
fun exitFunction(function: FirFunction<*>): Pair<FunctionExitNode, ControlFlowGraph?> {
|
||||
levelCounter--
|
||||
val exitNode = functionExitNodes.pop()
|
||||
val isInplace = function.isInplace()
|
||||
val invocationKind = function.invocationKind
|
||||
val isInplace = invocationKind != null
|
||||
if (!isInplace) {
|
||||
exitNodes.pop()
|
||||
}
|
||||
if (isInplace) {
|
||||
addNewSimpleNode(exitNode)
|
||||
val enterNode = functionEnterNodes.pop()
|
||||
when (invocationKind) {
|
||||
InvocationKind.AT_LEAST_ONCE, InvocationKind.UNKNOWN -> addEdge(exitNode, enterNode, propagateDeadness = false)
|
||||
}
|
||||
} else {
|
||||
addEdge(lastNodes.pop(), exitNode)
|
||||
lexicalScopes.pop()
|
||||
@@ -615,11 +618,6 @@ class ControlFlowGraphBuilder {
|
||||
get() = (this as? FirAnonymousFunction)?.invocationKind
|
||||
|
||||
private fun InvocationKind?.isInplace(): Boolean {
|
||||
return this != null && this != InvocationKind.UNKNOWN
|
||||
}
|
||||
|
||||
private fun FirFunction<*>.isInplace(): Boolean {
|
||||
val invocationKind = this.invocationKind
|
||||
return invocationKind != null && invocationKind != InvocationKind.UNKNOWN
|
||||
return this != null
|
||||
}
|
||||
}
|
||||
+2
@@ -15,6 +15,7 @@ import org.jetbrains.kotlin.fir.resolve.BodyResolveComponents
|
||||
import org.jetbrains.kotlin.fir.resolve.calls.*
|
||||
import org.jetbrains.kotlin.fir.resolve.substitution.ConeSubstitutor
|
||||
import org.jetbrains.kotlin.fir.resolve.transformers.FirCallCompletionResultsWriterTransformer
|
||||
import org.jetbrains.kotlin.fir.resolve.transformers.InvocationKindTransformer
|
||||
import org.jetbrains.kotlin.fir.resolve.transformers.MapArguments
|
||||
import org.jetbrains.kotlin.fir.resolve.transformers.StoreType
|
||||
import org.jetbrains.kotlin.fir.resolve.transformers.body.resolve.FirAbstractBodyResolveTransformer
|
||||
@@ -76,6 +77,7 @@ class FirCallCompleter(
|
||||
transformer.components.callResolver
|
||||
)
|
||||
|
||||
call.transformSingle(InvocationKindTransformer, null)
|
||||
completer.complete(candidate.system.asConstraintSystemCompleterContext(), completionMode, listOf(call), initialType) {
|
||||
analyzer.analyze(candidate.system.asPostponedArgumentsAnalyzerContext(), it)
|
||||
}
|
||||
|
||||
+71
-33
@@ -7,49 +7,87 @@ package org.jetbrains.kotlin.fir.resolve.transformers
|
||||
|
||||
import org.jetbrains.kotlin.contracts.description.InvocationKind
|
||||
import org.jetbrains.kotlin.fir.FirElement
|
||||
import org.jetbrains.kotlin.fir.contracts.description.ConeCallsEffectDeclaration
|
||||
import org.jetbrains.kotlin.fir.declarations.FirAnonymousFunction
|
||||
import org.jetbrains.kotlin.fir.declarations.FirDeclaration
|
||||
import org.jetbrains.kotlin.fir.expressions.FirFunctionCall
|
||||
import org.jetbrains.kotlin.fir.expressions.FirLambdaArgumentExpression
|
||||
import org.jetbrains.kotlin.fir.expressions.FirNamedArgumentExpression
|
||||
import org.jetbrains.kotlin.fir.expressions.FirStatement
|
||||
import org.jetbrains.kotlin.fir.declarations.FirSimpleFunction
|
||||
import org.jetbrains.kotlin.fir.declarations.isInline
|
||||
import org.jetbrains.kotlin.fir.expressions.*
|
||||
import org.jetbrains.kotlin.fir.resolve.calls.FirNamedReferenceWithCandidate
|
||||
import org.jetbrains.kotlin.fir.visitors.CompositeTransformResult
|
||||
import org.jetbrains.kotlin.fir.visitors.FirTransformer
|
||||
import org.jetbrains.kotlin.fir.visitors.compose
|
||||
|
||||
object InvocationKindTransformer : FirTransformer<InvocationKind?>() {
|
||||
override fun <E : FirElement> transformElement(element: E, data: InvocationKind?): CompositeTransformResult<E> {
|
||||
object InvocationKindTransformer : FirTransformer<Nothing?>() {
|
||||
private object ArgumentsTransformer : FirTransformer<Pair<Map<FirExpression, InvocationKind>, InvocationKind?>>() {
|
||||
override fun <E : FirElement> transformElement(element: E, data: Pair<Map<FirExpression, InvocationKind>, InvocationKind?>): CompositeTransformResult<E> {
|
||||
return element.compose()
|
||||
}
|
||||
|
||||
override fun transformAnonymousFunction(
|
||||
anonymousFunction: FirAnonymousFunction,
|
||||
data: Pair<Map<FirExpression, InvocationKind>, InvocationKind?>
|
||||
): CompositeTransformResult<FirStatement> {
|
||||
val kind = data.second ?: data.first[anonymousFunction]
|
||||
if (kind != null) {
|
||||
anonymousFunction.replaceInvocationKind(kind)
|
||||
}
|
||||
return anonymousFunction.compose()
|
||||
}
|
||||
|
||||
override fun transformLambdaArgumentExpression(
|
||||
lambdaArgumentExpression: FirLambdaArgumentExpression,
|
||||
data: Pair<Map<FirExpression, InvocationKind>, InvocationKind?>
|
||||
): CompositeTransformResult<FirStatement> {
|
||||
return data.first[lambdaArgumentExpression]?.let {
|
||||
(lambdaArgumentExpression.transformChildren(this, data.first to it) as FirStatement).compose()
|
||||
} ?: lambdaArgumentExpression.compose()
|
||||
}
|
||||
|
||||
override fun transformNamedArgumentExpression(
|
||||
namedArgumentExpression: FirNamedArgumentExpression,
|
||||
data: Pair<Map<FirExpression, InvocationKind>, InvocationKind?>
|
||||
): CompositeTransformResult<FirStatement> {
|
||||
return data.first[namedArgumentExpression]?.let {
|
||||
(namedArgumentExpression.transformChildren(this, data.first to it) as FirStatement).compose()
|
||||
} ?: namedArgumentExpression.compose()
|
||||
}
|
||||
}
|
||||
|
||||
override fun <E : FirElement> transformElement(element: E, data: Nothing?): CompositeTransformResult<E> {
|
||||
return element.compose()
|
||||
}
|
||||
|
||||
override fun transformAnonymousFunction(
|
||||
anonymousFunction: FirAnonymousFunction,
|
||||
data: InvocationKind?
|
||||
): CompositeTransformResult<FirStatement> {
|
||||
if (data != null) {
|
||||
anonymousFunction.replaceInvocationKind(data)
|
||||
override fun transformFunctionCall(functionCall: FirFunctionCall, data: Nothing?): CompositeTransformResult<FirStatement> {
|
||||
val calleeReference = functionCall.calleeReference as? FirNamedReferenceWithCandidate ?: return functionCall.compose()
|
||||
val argumentMapping = calleeReference.candidate.argumentMapping ?: return functionCall.compose()
|
||||
val function = calleeReference.candidateSymbol.fir as? FirSimpleFunction ?: return functionCall.compose()
|
||||
|
||||
val callsEffects = function.contractDescription.effects.filterIsInstance<ConeCallsEffectDeclaration>()
|
||||
|
||||
val isInline = function.isInline
|
||||
if (callsEffects.isEmpty() && !isInline) {
|
||||
return functionCall.compose()
|
||||
}
|
||||
return anonymousFunction.compose()
|
||||
}
|
||||
|
||||
override fun transformLambdaArgumentExpression(
|
||||
lambdaArgumentExpression: FirLambdaArgumentExpression,
|
||||
data: InvocationKind?
|
||||
): CompositeTransformResult<FirStatement> {
|
||||
lambdaArgumentExpression.transformChildren(this, data)
|
||||
return lambdaArgumentExpression.compose()
|
||||
}
|
||||
val reversedArgumentMapping = argumentMapping.entries.map { (argument, parameter) ->
|
||||
parameter to argument
|
||||
}.toMap()
|
||||
|
||||
override fun transformNamedArgumentExpression(
|
||||
namedArgumentExpression: FirNamedArgumentExpression,
|
||||
data: InvocationKind?
|
||||
): CompositeTransformResult<FirStatement> {
|
||||
namedArgumentExpression.transformChildren(this, data)
|
||||
return namedArgumentExpression.compose()
|
||||
}
|
||||
|
||||
override fun transformFunctionCall(functionCall: FirFunctionCall, data: InvocationKind?): CompositeTransformResult<FirStatement> {
|
||||
// TODO: add contracts handling and inline handling
|
||||
return (functionCall.transformChildren(this, InvocationKind.EXACTLY_ONCE) as FirFunctionCall).compose()
|
||||
val invocationKindMapping = mutableMapOf<FirExpression, InvocationKind>()
|
||||
for (effect in callsEffects) {
|
||||
// TODO: Support callsInPlace contracts on receivers
|
||||
val valueParameter = function.valueParameters.getOrNull(effect.valueParameterReference.parameterIndex) ?: continue
|
||||
val argument = reversedArgumentMapping[valueParameter] ?: continue
|
||||
invocationKindMapping[argument] = effect.kind
|
||||
}
|
||||
if (isInline) {
|
||||
for (argument in functionCall.arguments) {
|
||||
invocationKindMapping.putIfAbsent(argument, InvocationKind.UNKNOWN)
|
||||
}
|
||||
}
|
||||
if (invocationKindMapping.isEmpty()) {
|
||||
return functionCall.compose()
|
||||
}
|
||||
return functionCall.transformArguments(ArgumentsTransformer, invocationKindMapping to null).compose()
|
||||
}
|
||||
}
|
||||
+5
-4
@@ -6,8 +6,8 @@
|
||||
package org.jetbrains.kotlin.fir.resolve.transformers.body.resolve
|
||||
|
||||
import org.jetbrains.kotlin.contracts.description.InvocationKind
|
||||
import org.jetbrains.kotlin.fir.BuiltinTypes
|
||||
import org.jetbrains.kotlin.fir.FirCallResolver
|
||||
import org.jetbrains.kotlin.fir.*
|
||||
import org.jetbrains.kotlin.fir.declarations.FirAnonymousFunction
|
||||
import org.jetbrains.kotlin.fir.expressions.*
|
||||
import org.jetbrains.kotlin.fir.expressions.impl.FirExpressionWithSmartcastImpl
|
||||
import org.jetbrains.kotlin.fir.references.FirDelegateFieldReference
|
||||
@@ -34,6 +34,7 @@ import org.jetbrains.kotlin.fir.types.impl.FirErrorTypeRefImpl
|
||||
import org.jetbrains.kotlin.fir.types.impl.FirImplicitUnitTypeRef
|
||||
import org.jetbrains.kotlin.fir.types.impl.FirResolvedTypeRefImpl
|
||||
import org.jetbrains.kotlin.fir.visitors.CompositeTransformResult
|
||||
import org.jetbrains.kotlin.fir.visitors.FirTransformer
|
||||
import org.jetbrains.kotlin.fir.visitors.compose
|
||||
import org.jetbrains.kotlin.fir.visitors.transformSingle
|
||||
import org.jetbrains.kotlin.ir.expressions.IrConstKind
|
||||
@@ -126,12 +127,12 @@ class FirExpressionsResolveTransformer(transformer: FirBodyResolveTransformer) :
|
||||
}
|
||||
|
||||
override fun transformFunctionCall(functionCall: FirFunctionCall, data: Any?): CompositeTransformResult<FirStatement> {
|
||||
dataFlowAnalyzer.enterFunctionCall(functionCall)
|
||||
if (functionCall.calleeReference is FirResolvedNamedReference && functionCall.resultType is FirImplicitTypeRef) {
|
||||
storeTypeFromCallee(functionCall)
|
||||
}
|
||||
dataFlowAnalyzer.enterFunctionCall(functionCall)
|
||||
if (functionCall.calleeReference !is FirSimpleNamedReference) return functionCall.compose()
|
||||
functionCall.transform<FirFunctionCall, InvocationKind?>(InvocationKindTransformer, null)
|
||||
functionCall.transform<FirFunctionCall, Nothing?>(InvocationKindTransformer, null)
|
||||
val expectedTypeRef = data as FirTypeRef?
|
||||
val completeInference =
|
||||
try {
|
||||
|
||||
+2
-2
@@ -30,10 +30,10 @@ FILE: chooseCallableReferenceDependingOnInferredReceiver.kt
|
||||
^bar R|kotlin/TODO|()
|
||||
}
|
||||
public final fun test(): R|kotlin/Unit| {
|
||||
R|/myWith|<R|A|, R|kotlin/Unit|>(R|/A.A|(), <L> = myWith@fun <anonymous>(it: R|A|): R|kotlin/Unit| <kind=EXACTLY_ONCE> {
|
||||
R|/myWith|<R|A|, R|kotlin/Unit|>(R|/A.A|(), <L> = myWith@fun <anonymous>(it: R|A|): R|kotlin/Unit| <kind=UNKNOWN> {
|
||||
lval t1: <ERROR TYPE REF: Inapplicable(INAPPLICABLE): [/bar]> = <Inapplicable(INAPPLICABLE): [/bar]>#(::foo#)
|
||||
lval t2: <ERROR TYPE REF: Inapplicable(INAPPLICABLE): [/bar]> = <Inapplicable(INAPPLICABLE): [/bar]>#(::baz#)
|
||||
R|/myWith|<R|B|, R|kotlin/Unit|>(R|/B.B|(), <L> = myWith@fun <anonymous>(it: R|B|): R|kotlin/Unit| <kind=EXACTLY_ONCE> {
|
||||
R|/myWith|<R|B|, R|kotlin/Unit|>(R|/B.B|(), <L> = myWith@fun <anonymous>(it: R|B|): R|kotlin/Unit| <kind=UNKNOWN> {
|
||||
lval a: R|A| = <Inapplicable(INAPPLICABLE): [/bar]>#(::foo#)
|
||||
lval b: R|B| = <Inapplicable(INAPPLICABLE): [/bar]>#(::foo#)
|
||||
lval t3: <ERROR TYPE REF: Inapplicable(INAPPLICABLE): [/bar]> = <Inapplicable(INAPPLICABLE): [/bar]>#(::baz#)
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
FILE: main.kt
|
||||
public final fun main(): R|kotlin/Unit| {
|
||||
Q|JavaClass|.R|/JavaClass.foo1|(<L> = foo1@fun <anonymous>(): R|ft<kotlin/Int, kotlin/Int?>!| <kind=EXACTLY_ONCE> {
|
||||
Q|JavaClass|.R|/JavaClass.foo1|(<L> = foo1@fun <anonymous>(): R|ft<kotlin/Int, kotlin/Int?>!| {
|
||||
Int(123)
|
||||
}
|
||||
)
|
||||
Q|JavaClass|.R|/JavaClass.foo2|(<L> = foo2@fun <anonymous>(it: R|ft<kotlin/Int, kotlin/Int?>!|): R|ft<kotlin/String, kotlin/String?>!| <kind=EXACTLY_ONCE> {
|
||||
Q|JavaClass|.R|/JavaClass.foo2|(<L> = foo2@fun <anonymous>(it: R|ft<kotlin/Int, kotlin/Int?>!|): R|ft<kotlin/String, kotlin/String?>!| {
|
||||
R|<local>/it|.R|kotlin/Int.plus|(Int(2)).R|kotlin/Any.toString|()
|
||||
}
|
||||
)
|
||||
Q|JavaClass|.R|/JavaClass.foo2|(foo2@fun <anonymous>(it: R|ft<kotlin/Int, kotlin/Int?>!|): R|ft<kotlin/String, kotlin/String?>!| <kind=EXACTLY_ONCE> {
|
||||
Q|JavaClass|.R|/JavaClass.foo2|(foo2@fun <anonymous>(it: R|ft<kotlin/Int, kotlin/Int?>!|): R|ft<kotlin/String, kotlin/String?>!| {
|
||||
R|<local>/it|.R|kotlin/Int.plus|(Int(3)).R|kotlin/Any.toString|()
|
||||
}
|
||||
)
|
||||
@@ -17,7 +17,7 @@ FILE: main.kt
|
||||
}
|
||||
|
||||
Q|JavaClass|.R|/JavaClass.foo2|(R|<local>/y|)
|
||||
Q|JavaClass|.R|/JavaClass.foo3|<R|ft<kotlin/Int, kotlin/Int>|>(foo3@fun <anonymous>(it: R|ft<kotlin/Int, kotlin/Int>|): R|ft<kotlin/String, kotlin/String?>!| <kind=EXACTLY_ONCE> {
|
||||
Q|JavaClass|.R|/JavaClass.foo3|<R|ft<kotlin/Int, kotlin/Int>|>(foo3@fun <anonymous>(it: R|ft<kotlin/Int, kotlin/Int>|): R|ft<kotlin/String, kotlin/String?>!| {
|
||||
R|<local>/it|.R|kotlin/Int.plus|(Int(4)).R|kotlin/Any.toString|()
|
||||
}
|
||||
, Int(5))
|
||||
|
||||
+6
-6
@@ -1,16 +1,16 @@
|
||||
FILE: test.kt
|
||||
public final fun test(map: R|MyMap|): R|kotlin/Unit| {
|
||||
lval result: R|kotlin/String| = R|<local>/map|.R|kotlin/collections/getOrPut|<R|kotlin/String|, R|kotlin/String|>(String(key), <L> = getOrPut@fun <anonymous>(): R|kotlin/String| <kind=EXACTLY_ONCE> {
|
||||
lval result: R|kotlin/String| = R|<local>/map|.R|kotlin/collections/getOrPut|<R|kotlin/String|, R|kotlin/String|>(String(key), <L> = getOrPut@fun <anonymous>(): R|kotlin/String| <kind=UNKNOWN> {
|
||||
String(value)
|
||||
}
|
||||
)
|
||||
lval otherResult: R|kotlin/String| = R|<local>/map|.R|FakeOverride<kotlin/collections/Map.getOrDefault: R|kotlin/String|>|(String(key), String(value))
|
||||
lval anotherResult: <ERROR TYPE REF: Unresolved name: replace> = R|<local>/map|.<Unresolved name: replace>#(String(key), String(value))
|
||||
R|<local>/map|.R|kotlin/collections/forEach|<R|kotlin/String|, R|kotlin/String|>(<L> = forEach@fun <anonymous>(key: R|kotlin/collections/Map.Entry<kotlin/String, kotlin/String>|, value: R|kotlin/Any?|): R|kotlin/Unit| <kind=EXACTLY_ONCE> {
|
||||
R|<local>/map|.R|kotlin/collections/forEach|<R|kotlin/String|, R|kotlin/String|>(<L> = forEach@fun <anonymous>(key: R|kotlin/collections/Map.Entry<kotlin/String, kotlin/String>|, value: R|kotlin/Any?|): R|kotlin/Unit| <kind=UNKNOWN> {
|
||||
R|kotlin/io/println|(<strcat>(R|<local>/key|, String(: ), R|<local>/value|))
|
||||
}
|
||||
)
|
||||
R|<local>/map|.R|kotlin/collections/forEach|<R|kotlin/String|, R|kotlin/String|>(<L> = forEach@fun <anonymous>(<destruct>: R|kotlin/collections/Map.Entry<kotlin/String, kotlin/String>|): R|kotlin/Unit| <kind=EXACTLY_ONCE> {
|
||||
R|<local>/map|.R|kotlin/collections/forEach|<R|kotlin/String|, R|kotlin/String|>(<L> = forEach@fun <anonymous>(<destruct>: R|kotlin/collections/Map.Entry<kotlin/String, kotlin/String>|): R|kotlin/Unit| <kind=UNKNOWN> {
|
||||
lval key: R|kotlin/String| = R|<local>/<destruct>|.R|kotlin/collections/component1|<R|kotlin/String|, R|kotlin/String|>()
|
||||
lval value: R|kotlin/String| = R|<local>/<destruct>|.R|kotlin/collections/component2|<R|kotlin/String|, R|kotlin/String|>()
|
||||
R|kotlin/io/println|(<strcat>(R|<local>/key|, String(: ), R|<local>/value|))
|
||||
@@ -18,17 +18,17 @@ FILE: test.kt
|
||||
)
|
||||
}
|
||||
public final fun test(map: R|kotlin/collections/MutableMap<kotlin/String, kotlin/String>|): R|kotlin/Unit| {
|
||||
lval result: R|kotlin/String| = R|<local>/map|.R|kotlin/collections/getOrPut|<R|kotlin/String|, R|kotlin/String|>(String(key), <L> = getOrPut@fun <anonymous>(): R|kotlin/String| <kind=EXACTLY_ONCE> {
|
||||
lval result: R|kotlin/String| = R|<local>/map|.R|kotlin/collections/getOrPut|<R|kotlin/String|, R|kotlin/String|>(String(key), <L> = getOrPut@fun <anonymous>(): R|kotlin/String| <kind=UNKNOWN> {
|
||||
String(value)
|
||||
}
|
||||
)
|
||||
lval otherResult: R|kotlin/String| = R|<local>/map|.R|FakeOverride<kotlin/collections/Map.getOrDefault: R|kotlin/String|>|(String(key), String(value))
|
||||
lval anotherResult: <ERROR TYPE REF: Unresolved name: replace> = R|<local>/map|.<Unresolved name: replace>#(String(key), String(value))
|
||||
R|<local>/map|.R|kotlin/collections/forEach|<R|kotlin/String|, R|kotlin/String|>(<L> = forEach@fun <anonymous>(key: R|kotlin/collections/Map.Entry<kotlin/String, kotlin/String>|, value: R|kotlin/Any?|): R|kotlin/Unit| <kind=EXACTLY_ONCE> {
|
||||
R|<local>/map|.R|kotlin/collections/forEach|<R|kotlin/String|, R|kotlin/String|>(<L> = forEach@fun <anonymous>(key: R|kotlin/collections/Map.Entry<kotlin/String, kotlin/String>|, value: R|kotlin/Any?|): R|kotlin/Unit| <kind=UNKNOWN> {
|
||||
R|kotlin/io/println|(<strcat>(R|<local>/key|, String(: ), R|<local>/value|))
|
||||
}
|
||||
)
|
||||
R|<local>/map|.R|kotlin/collections/forEach|<R|kotlin/String|, R|kotlin/String|>(<L> = forEach@fun <anonymous>(<destruct>: R|kotlin/collections/Map.Entry<kotlin/String, kotlin/String>|): R|kotlin/Unit| <kind=EXACTLY_ONCE> {
|
||||
R|<local>/map|.R|kotlin/collections/forEach|<R|kotlin/String|, R|kotlin/String|>(<L> = forEach@fun <anonymous>(<destruct>: R|kotlin/collections/Map.Entry<kotlin/String, kotlin/String>|): R|kotlin/Unit| <kind=UNKNOWN> {
|
||||
lval key: R|kotlin/String| = R|<local>/<destruct>|.R|kotlin/collections/component1|<R|kotlin/String|, R|kotlin/String|>()
|
||||
lval value: R|kotlin/String| = R|<local>/<destruct>|.R|kotlin/collections/component2|<R|kotlin/String|, R|kotlin/String|>()
|
||||
R|kotlin/io/println|(<strcat>(R|<local>/key|, String(: ), R|<local>/value|))
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
FILE: main.kt
|
||||
public final fun main(): R|kotlin/Unit| {
|
||||
R|/MyFunction|<R|kotlin/Int|, R|kotlin/String|>(<L> = MyFunction@fun <anonymous>(x: R|kotlin/Int|): R|kotlin/String| <kind=EXACTLY_ONCE> {
|
||||
R|/MyFunction|<R|kotlin/Int|, R|kotlin/String|>(<L> = MyFunction@fun <anonymous>(x: R|kotlin/Int|): R|kotlin/String| {
|
||||
R|<local>/x|.R|kotlin/Int.toInt|().R|kotlin/Any.toString|()
|
||||
}
|
||||
)
|
||||
R|/MyFunction|<R|kotlin/Any?|, R|ft<kotlin/String, kotlin/String>|>(<L> = MyFunction@fun <anonymous>(x: R|kotlin/Int|): R|kotlin/String| <kind=EXACTLY_ONCE> {
|
||||
R|/MyFunction|<R|kotlin/Any?|, R|ft<kotlin/String, kotlin/String>|>(<L> = MyFunction@fun <anonymous>(x: R|kotlin/Int|): R|kotlin/String| {
|
||||
R|<local>/x|.R|kotlin/Any.toString|()
|
||||
}
|
||||
)
|
||||
R|/MyFunction|<R|kotlin/Any?|, R|ft<kotlin/String, kotlin/String>|>(<L> = MyFunction@fun <anonymous>(x: R|kotlin/Any?|): R|kotlin/String| <kind=EXACTLY_ONCE> {
|
||||
R|/MyFunction|<R|kotlin/Any?|, R|ft<kotlin/String, kotlin/String>|>(<L> = MyFunction@fun <anonymous>(x: R|kotlin/Any?|): R|kotlin/String| {
|
||||
String()
|
||||
}
|
||||
)
|
||||
|
||||
Vendored
+5
-5
@@ -6,23 +6,23 @@ FILE: main.kt
|
||||
public final fun <X, Y> foo3(f: R|MyFunction<X, Y>|, x: R|X|): R|kotlin/Unit| {
|
||||
}
|
||||
public final fun main(): R|kotlin/Unit| {
|
||||
R|/foo1|(R|/MyFunction|<R|kotlin/Int|, R|kotlin/String|>(<L> = MyFunction@fun <anonymous>(x: R|kotlin/Int|): R|kotlin/String| <kind=EXACTLY_ONCE> {
|
||||
R|/foo1|(R|/MyFunction|<R|kotlin/Int|, R|kotlin/String|>(<L> = MyFunction@fun <anonymous>(x: R|kotlin/Int|): R|kotlin/String| {
|
||||
R|<local>/x|.R|kotlin/Int.toInt|().R|kotlin/Any.toString|()
|
||||
}
|
||||
))
|
||||
R|/foo2|(R|/MyFunction|<R|kotlin/Number|, R|ft<kotlin/String, kotlin/String>|>(<L> = MyFunction@fun <anonymous>(x: R|kotlin/Number|): R|kotlin/String| <kind=EXACTLY_ONCE> {
|
||||
R|/foo2|(R|/MyFunction|<R|kotlin/Number|, R|ft<kotlin/String, kotlin/String>|>(<L> = MyFunction@fun <anonymous>(x: R|kotlin/Number|): R|kotlin/String| {
|
||||
R|<local>/x|.R|kotlin/Number.toInt|().R|kotlin/Any.toString|()
|
||||
}
|
||||
))
|
||||
R|/foo2|(R|/MyFunction|<R|kotlin/Number|, R|ft<kotlin/String, kotlin/String>|>(<L> = MyFunction@fun <anonymous>(x: R|kotlin/Int|): R|kotlin/String| <kind=EXACTLY_ONCE> {
|
||||
R|/foo2|(R|/MyFunction|<R|kotlin/Number|, R|ft<kotlin/String, kotlin/String>|>(<L> = MyFunction@fun <anonymous>(x: R|kotlin/Int|): R|kotlin/String| {
|
||||
R|<local>/x|.R|kotlin/Any.toString|()
|
||||
}
|
||||
))
|
||||
R|/foo3|<R|kotlin/Int|, R|ft<kotlin/String, kotlin/String>|>(R|/MyFunction|<R|kotlin/Int|, R|ft<kotlin/String, kotlin/String>|>(<L> = MyFunction@fun <anonymous>(x: R|kotlin/Int|): R|kotlin/String| <kind=EXACTLY_ONCE> {
|
||||
R|/foo3|<R|kotlin/Int|, R|ft<kotlin/String, kotlin/String>|>(R|/MyFunction|<R|kotlin/Int|, R|ft<kotlin/String, kotlin/String>|>(<L> = MyFunction@fun <anonymous>(x: R|kotlin/Int|): R|kotlin/String| {
|
||||
R|<local>/x|.R|kotlin/Int.plus|(Int(1)).R|kotlin/Any.toString|()
|
||||
}
|
||||
), Int(1))
|
||||
R|/foo3|<R|kotlin/Int|, R|ft<kotlin/String, kotlin/String>|>(R|/MyFunction|<R|kotlin/Int|, R|ft<kotlin/String, kotlin/String>|>(<L> = MyFunction@fun <anonymous>(x: R|kotlin/Number|): R|kotlin/String| <kind=EXACTLY_ONCE> {
|
||||
R|/foo3|<R|kotlin/Int|, R|ft<kotlin/String, kotlin/String>|>(R|/MyFunction|<R|kotlin/Int|, R|ft<kotlin/String, kotlin/String>|>(<L> = MyFunction@fun <anonymous>(x: R|kotlin/Number|): R|kotlin/String| {
|
||||
R|<local>/x|.R|kotlin/Number.toInt|().R|kotlin/Any.toString|()
|
||||
}
|
||||
), Int(2))
|
||||
|
||||
@@ -6,11 +6,11 @@ FILE: kotlinSam.kt
|
||||
public final fun foo(m: R|MyRunnable|): R|kotlin/Unit| {
|
||||
}
|
||||
public final fun main(): R|kotlin/Unit| {
|
||||
R|/foo|(R|/MyRunnable|(<L> = MyRunnable@fun <anonymous>(x: R|kotlin/Int|): R|kotlin/Boolean| <kind=EXACTLY_ONCE> {
|
||||
R|/foo|(R|/MyRunnable|(<L> = MyRunnable@fun <anonymous>(x: R|kotlin/Int|): R|kotlin/Boolean| {
|
||||
>(R|<local>/x|, Int(1))
|
||||
}
|
||||
))
|
||||
R|/foo|(R|/MyRunnable|(MyRunnable@fun <anonymous>(it: R|kotlin/Int|): R|kotlin/Boolean| <kind=EXACTLY_ONCE> {
|
||||
R|/foo|(R|/MyRunnable|(MyRunnable@fun <anonymous>(it: R|kotlin/Int|): R|kotlin/Boolean| {
|
||||
>(R|<local>/it|, Int(1))
|
||||
}
|
||||
))
|
||||
|
||||
+2
-2
@@ -5,11 +5,11 @@ FILE: main.kt
|
||||
^MyRunnable Int(1)
|
||||
}
|
||||
public final fun main(): R|kotlin/Unit| {
|
||||
<Inapplicable(INAPPLICABLE): [/foo]>#(R|/MyRunnable|(<L> = MyRunnable@fun <anonymous>(x: R|kotlin/Int|): R|kotlin/Boolean| <kind=EXACTLY_ONCE> {
|
||||
<Inapplicable(INAPPLICABLE): [/foo]>#(R|/MyRunnable|(<L> = MyRunnable@fun <anonymous>(x: R|kotlin/Int|): R|kotlin/Boolean| {
|
||||
>(R|<local>/x|, Int(1))
|
||||
}
|
||||
))
|
||||
<Inapplicable(INAPPLICABLE): [/foo]>#(R|/MyRunnable|(MyRunnable@fun <anonymous>(it: R|kotlin/Int|): R|kotlin/Boolean| <kind=EXACTLY_ONCE> {
|
||||
<Inapplicable(INAPPLICABLE): [/foo]>#(R|/MyRunnable|(MyRunnable@fun <anonymous>(it: R|kotlin/Int|): R|kotlin/Boolean| {
|
||||
>(R|<local>/it|, Int(1))
|
||||
}
|
||||
))
|
||||
|
||||
@@ -2,7 +2,7 @@ FILE: runnable.kt
|
||||
public final fun foo(runnable: R|java/lang/Runnable|): R|kotlin/Unit| {
|
||||
}
|
||||
public final fun main(): R|kotlin/Unit| {
|
||||
R|/foo|(R|java/lang/Runnable|(<L> = Runnable@fun <anonymous>(): R|kotlin/Unit| <kind=EXACTLY_ONCE> {
|
||||
R|/foo|(R|java/lang/Runnable|(<L> = Runnable@fun <anonymous>(): R|kotlin/Unit| {
|
||||
Unit
|
||||
}
|
||||
))
|
||||
|
||||
@@ -2,11 +2,11 @@ FILE: main.kt
|
||||
public final fun foo(m: R|MyRunnable|): R|kotlin/Unit| {
|
||||
}
|
||||
public final fun main(): R|kotlin/Unit| {
|
||||
R|/foo|(R|/MyRunnable|(<L> = MyRunnable@fun <anonymous>(x: R|kotlin/Int|): R|kotlin/Boolean| <kind=EXACTLY_ONCE> {
|
||||
R|/foo|(R|/MyRunnable|(<L> = MyRunnable@fun <anonymous>(x: R|kotlin/Int|): R|kotlin/Boolean| {
|
||||
>(R|<local>/x|, Int(1))
|
||||
}
|
||||
))
|
||||
R|/foo|(R|/MyRunnable|(MyRunnable@fun <anonymous>(it: R|kotlin/Int|): R|kotlin/Boolean| <kind=EXACTLY_ONCE> {
|
||||
R|/foo|(R|/MyRunnable|(MyRunnable@fun <anonymous>(it: R|kotlin/Int|): R|kotlin/Boolean| {
|
||||
>(R|<local>/it|, Int(1))
|
||||
}
|
||||
))
|
||||
|
||||
@@ -1,22 +1,22 @@
|
||||
FILE: main.kt
|
||||
public final fun main(): R|kotlin/Unit| {
|
||||
Q|JavaUsage|.R|/JavaUsage.foo1|(<L> = foo1@fun <anonymous>(x: R|ft<kotlin/Int, kotlin/Int?>!|): R|ft<kotlin/String, kotlin/String?>!| <kind=EXACTLY_ONCE> {
|
||||
Q|JavaUsage|.R|/JavaUsage.foo1|(<L> = foo1@fun <anonymous>(x: R|ft<kotlin/Int, kotlin/Int?>!|): R|ft<kotlin/String, kotlin/String?>!| {
|
||||
R|<local>/x|.R|kotlin/Int.toInt|().R|kotlin/Any.toString|()
|
||||
}
|
||||
)
|
||||
Q|JavaUsage|.R|/JavaUsage.foo2|(<L> = foo2@fun <anonymous>(x: R|ft<kotlin/Number, kotlin/Number?>!|): R|ft<kotlin/CharSequence, kotlin/CharSequence?>!| <kind=EXACTLY_ONCE> {
|
||||
Q|JavaUsage|.R|/JavaUsage.foo2|(<L> = foo2@fun <anonymous>(x: R|ft<kotlin/Number, kotlin/Number?>!|): R|ft<kotlin/CharSequence, kotlin/CharSequence?>!| {
|
||||
R|<local>/x|.R|kotlin/Number.toInt|().R|kotlin/Any.toString|()
|
||||
}
|
||||
)
|
||||
Q|JavaUsage|.R|/JavaUsage.foo2|(<L> = foo2@fun <anonymous>(x: R|kotlin/Int|): R|ft<kotlin/CharSequence, kotlin/CharSequence?>!| <kind=EXACTLY_ONCE> {
|
||||
Q|JavaUsage|.R|/JavaUsage.foo2|(<L> = foo2@fun <anonymous>(x: R|kotlin/Int|): R|ft<kotlin/CharSequence, kotlin/CharSequence?>!| {
|
||||
R|<local>/x|.R|kotlin/Any.toString|()
|
||||
}
|
||||
)
|
||||
Q|JavaUsage|.R|/JavaUsage.foo3|<R|ft<kotlin/Int, kotlin/Int>|, R|ft<kotlin/String, kotlin/String>|>(foo3@fun <anonymous>(x: R|ft<kotlin/Int, kotlin/Int>|): R|kotlin/Unit| <kind=EXACTLY_ONCE> {
|
||||
Q|JavaUsage|.R|/JavaUsage.foo3|<R|ft<kotlin/Int, kotlin/Int>|, R|ft<kotlin/String, kotlin/String>|>(foo3@fun <anonymous>(x: R|ft<kotlin/Int, kotlin/Int>|): R|kotlin/Unit| {
|
||||
R|<local>/x|.R|kotlin/Int.plus|(Int(1)).R|kotlin/Any.toString|()
|
||||
}
|
||||
, Int(1))
|
||||
Q|JavaUsage|.R|/JavaUsage.foo3|<R|ft<kotlin/Int, kotlin/Int>|, R|ft<kotlin/String, kotlin/String>|>(foo3@fun <anonymous>(x: R|kotlin/Number|): R|kotlin/Unit| <kind=EXACTLY_ONCE> {
|
||||
Q|JavaUsage|.R|/JavaUsage.foo3|<R|ft<kotlin/Int, kotlin/Int>|, R|ft<kotlin/String, kotlin/String>|>(foo3@fun <anonymous>(x: R|kotlin/Number|): R|kotlin/Unit| {
|
||||
R|<local>/x|.R|kotlin/Number.toInt|().R|kotlin/Any.toString|()
|
||||
}
|
||||
, Int(2))
|
||||
|
||||
@@ -33,22 +33,22 @@ FILE: kotlinSam.kt
|
||||
>(R|<local>/t|, Int(1))
|
||||
}
|
||||
|
||||
R|/foo1|(<L> = foo1@fun <anonymous>(x: R|kotlin/Int|): R|kotlin/Boolean| <kind=EXACTLY_ONCE> {
|
||||
R|/foo1|(<L> = foo1@fun <anonymous>(x: R|kotlin/Int|): R|kotlin/Boolean| {
|
||||
>(R|<local>/x|, Int(1))
|
||||
}
|
||||
)
|
||||
R|/foo1|(R|<local>/f|)
|
||||
R|/foo2|(<L> = foo2@fun <anonymous>(x: R|kotlin/Nothing|): kotlin/Boolean <kind=EXACTLY_ONCE> {
|
||||
R|/foo2|(<L> = foo2@fun <anonymous>(x: R|kotlin/Nothing|): kotlin/Boolean {
|
||||
>(R|<local>/x|, Int(1))
|
||||
}
|
||||
)
|
||||
<Inapplicable(INAPPLICABLE): [/foo2]>#(R|<local>/f|)
|
||||
<Ambiguity: foo3, [/foo3, /foo3]>#(<L> = foo3@fun <implicit>.<anonymous>(x: <implicit>): <implicit> <kind=EXACTLY_ONCE> {
|
||||
<Ambiguity: foo3, [/foo3, /foo3]>#(<L> = foo3@fun <implicit>.<anonymous>(x: <implicit>): <implicit> {
|
||||
>(x#, Int(1))
|
||||
}
|
||||
)
|
||||
R|/foo3|(R|<local>/f|)
|
||||
<Unresolved name: foo4>#(<L> = foo4@fun <implicit>.<anonymous>(x: <implicit>): <implicit> <kind=EXACTLY_ONCE> {
|
||||
<Unresolved name: foo4>#(<L> = foo4@fun <implicit>.<anonymous>(x: <implicit>): <implicit> {
|
||||
>(x#, Int(1))
|
||||
}
|
||||
)
|
||||
|
||||
+2
-2
@@ -2,11 +2,11 @@ FILE: main.kt
|
||||
public final fun foo(m: R|MyRunnable|): R|kotlin/Unit| {
|
||||
}
|
||||
public final fun main(): R|kotlin/Unit| {
|
||||
Q|JavaUsage|.R|/JavaUsage.foo|(<L> = foo@fun <anonymous>(x: R|kotlin/Nothing|): kotlin/Boolean <kind=EXACTLY_ONCE> {
|
||||
Q|JavaUsage|.R|/JavaUsage.foo|(<L> = foo@fun <anonymous>(x: R|kotlin/Nothing|): kotlin/Boolean {
|
||||
>(R|<local>/x|, Int(1))
|
||||
}
|
||||
)
|
||||
Q|JavaUsage|.R|/JavaUsage.foo|(foo@fun <anonymous>(): kotlin/Boolean <kind=EXACTLY_ONCE> {
|
||||
Q|JavaUsage|.R|/JavaUsage.foo|(foo@fun <anonymous>(): kotlin/Boolean {
|
||||
>(<Unresolved name: it>#, Int(1))
|
||||
}
|
||||
)
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
FILE: main.kt
|
||||
public final fun main(): R|kotlin/Unit| {
|
||||
Q|JavaClass|.R|/JavaClass.foo|(<L> = foo@fun <anonymous>(): R|kotlin/Unit| <kind=EXACTLY_ONCE> {
|
||||
Q|JavaClass|.R|/JavaClass.foo|(<L> = foo@fun <anonymous>(): R|kotlin/Unit| {
|
||||
String()
|
||||
}
|
||||
)
|
||||
R|/JavaClass.JavaClass|().R|/JavaClass.bar|(<L> = bar@fun <anonymous>(): R|kotlin/Unit| <kind=EXACTLY_ONCE> {
|
||||
R|/JavaClass.JavaClass|().R|/JavaClass.bar|(<L> = bar@fun <anonymous>(): R|kotlin/Unit| {
|
||||
String()
|
||||
}
|
||||
)
|
||||
|
||||
@@ -2,11 +2,11 @@ FILE: main.kt
|
||||
public final fun foo(m: R|MyRunnable|): R|kotlin/Unit| {
|
||||
}
|
||||
public final fun main(): R|kotlin/Unit| {
|
||||
Q|JavaUsage|.R|/JavaUsage.foo|(<L> = foo@fun <anonymous>(x: R|kotlin/Int|): R|kotlin/Boolean| <kind=EXACTLY_ONCE> {
|
||||
Q|JavaUsage|.R|/JavaUsage.foo|(<L> = foo@fun <anonymous>(x: R|kotlin/Int|): R|kotlin/Boolean| {
|
||||
>(R|<local>/x|, Int(1))
|
||||
}
|
||||
)
|
||||
Q|JavaUsage|.R|/JavaUsage.foo|(foo@fun <anonymous>(it: R|kotlin/Int|): R|kotlin/Boolean| <kind=EXACTLY_ONCE> {
|
||||
Q|JavaUsage|.R|/JavaUsage.foo|(foo@fun <anonymous>(it: R|kotlin/Int|): R|kotlin/Boolean| {
|
||||
>(R|<local>/it|, Int(1))
|
||||
}
|
||||
)
|
||||
|
||||
+2
-2
@@ -2,11 +2,11 @@ FILE: main.kt
|
||||
public final fun foo(m: R|MyRunnable|): R|kotlin/Unit| {
|
||||
}
|
||||
public final fun main(): R|kotlin/Unit| {
|
||||
Q|JavaUsage|.R|/JavaUsage.foo|(<L> = foo@fun <anonymous>(x: R|kotlin/Int|): R|ft<kotlin/Boolean, kotlin/Boolean?>!| <kind=EXACTLY_ONCE> {
|
||||
Q|JavaUsage|.R|/JavaUsage.foo|(<L> = foo@fun <anonymous>(x: R|kotlin/Int|): R|ft<kotlin/Boolean, kotlin/Boolean?>!| {
|
||||
>(R|<local>/x|, Int(1))
|
||||
}
|
||||
)
|
||||
Q|JavaUsage|.R|/JavaUsage.foo|(foo@fun <anonymous>(it: R|kotlin/Int|): R|ft<kotlin/Boolean, kotlin/Boolean?>!| <kind=EXACTLY_ONCE> {
|
||||
Q|JavaUsage|.R|/JavaUsage.foo|(foo@fun <anonymous>(it: R|kotlin/Int|): R|ft<kotlin/Boolean, kotlin/Boolean?>!| {
|
||||
>(R|<local>/it|, Int(1))
|
||||
}
|
||||
)
|
||||
|
||||
@@ -2,11 +2,11 @@ FILE: main.kt
|
||||
public final fun foo(m: R|MyRunnable|): R|kotlin/Unit| {
|
||||
}
|
||||
public final fun main(): R|kotlin/Unit| {
|
||||
Q|JavaUsage|.R|/JavaUsage.foo|(<L> = foo@fun <anonymous>(x: R|kotlin/Int|): R|kotlin/Boolean| <kind=EXACTLY_ONCE> {
|
||||
Q|JavaUsage|.R|/JavaUsage.foo|(<L> = foo@fun <anonymous>(x: R|kotlin/Int|): R|kotlin/Boolean| {
|
||||
>(R|<local>/x|, Int(1))
|
||||
}
|
||||
)
|
||||
Q|JavaUsage|.R|/JavaUsage.foo|(foo@fun <anonymous>(it: R|kotlin/Int|): R|kotlin/Boolean| <kind=EXACTLY_ONCE> {
|
||||
Q|JavaUsage|.R|/JavaUsage.foo|(foo@fun <anonymous>(it: R|kotlin/Int|): R|kotlin/Boolean| {
|
||||
>(R|<local>/it|, Int(1))
|
||||
}
|
||||
)
|
||||
|
||||
+17
-17
@@ -6,70 +6,70 @@ FILE: lambda.kt
|
||||
public final fun baz(f: R|kotlin/Function0<kotlin/Unit>|, other: R|kotlin/Boolean| = Boolean(true)): R|kotlin/Unit| {
|
||||
}
|
||||
public final fun test(): R|kotlin/Unit| {
|
||||
R|/foo|(<L> = foo@fun <anonymous>(): R|kotlin/Unit| <kind=EXACTLY_ONCE> {
|
||||
R|/foo|(<L> = foo@fun <anonymous>(): R|kotlin/Unit| {
|
||||
Unit
|
||||
}
|
||||
)
|
||||
R|/foo|(<L> = foo@fun <anonymous>(): R|kotlin/Unit| <kind=EXACTLY_ONCE> {
|
||||
R|/foo|(<L> = foo@fun <anonymous>(): R|kotlin/Unit| {
|
||||
Unit
|
||||
}
|
||||
)
|
||||
R|/foo|(foo@fun <anonymous>(): R|kotlin/Unit| <kind=EXACTLY_ONCE> {
|
||||
R|/foo|(foo@fun <anonymous>(): R|kotlin/Unit| {
|
||||
Unit
|
||||
}
|
||||
)
|
||||
<Inapplicable(PARAMETER_MAPPING_ERROR): [/foo]>#(Int(1), <L> = foo@fun <implicit>.<anonymous>(): <implicit> <kind=EXACTLY_ONCE> {
|
||||
<Inapplicable(PARAMETER_MAPPING_ERROR): [/foo]>#(Int(1), <L> = foo@fun <implicit>.<anonymous>(): <implicit> {
|
||||
Unit
|
||||
}
|
||||
)
|
||||
<Inapplicable(PARAMETER_MAPPING_ERROR): [/foo]>#(f = foo@fun <implicit>.<anonymous>(): <implicit> <kind=EXACTLY_ONCE> {
|
||||
<Inapplicable(PARAMETER_MAPPING_ERROR): [/foo]>#(f = foo@fun <implicit>.<anonymous>(): <implicit> {
|
||||
Unit
|
||||
}
|
||||
, <L> = foo@fun <implicit>.<anonymous>(): <implicit> <kind=EXACTLY_ONCE> {
|
||||
, <L> = foo@fun <implicit>.<anonymous>(): <implicit> {
|
||||
Unit
|
||||
}
|
||||
)
|
||||
R|/bar|(Int(1), <L> = bar@fun <anonymous>(): R|kotlin/Unit| <kind=EXACTLY_ONCE> {
|
||||
R|/bar|(Int(1), <L> = bar@fun <anonymous>(): R|kotlin/Unit| {
|
||||
Unit
|
||||
}
|
||||
)
|
||||
R|/bar|(x = Int(1), <L> = bar@fun <anonymous>(): R|kotlin/Unit| <kind=EXACTLY_ONCE> {
|
||||
R|/bar|(x = Int(1), <L> = bar@fun <anonymous>(): R|kotlin/Unit| {
|
||||
Unit
|
||||
}
|
||||
)
|
||||
R|/bar|(Int(1), bar@fun <anonymous>(): R|kotlin/Unit| <kind=EXACTLY_ONCE> {
|
||||
R|/bar|(Int(1), bar@fun <anonymous>(): R|kotlin/Unit| {
|
||||
Unit
|
||||
}
|
||||
)
|
||||
R|/bar|(x = Int(1), f = bar@fun <anonymous>(): R|kotlin/Unit| <kind=EXACTLY_ONCE> {
|
||||
R|/bar|(x = Int(1), f = bar@fun <anonymous>(): R|kotlin/Unit| {
|
||||
Unit
|
||||
}
|
||||
)
|
||||
<Inapplicable(PARAMETER_MAPPING_ERROR): [/bar]>#(<L> = bar@fun <implicit>.<anonymous>(): <implicit> <kind=EXACTLY_ONCE> {
|
||||
<Inapplicable(PARAMETER_MAPPING_ERROR): [/bar]>#(<L> = bar@fun <implicit>.<anonymous>(): <implicit> {
|
||||
Unit
|
||||
}
|
||||
)
|
||||
<Inapplicable(PARAMETER_MAPPING_ERROR): [/bar]>#(bar@fun <implicit>.<anonymous>(): <implicit> <kind=EXACTLY_ONCE> {
|
||||
<Inapplicable(PARAMETER_MAPPING_ERROR): [/bar]>#(bar@fun <implicit>.<anonymous>(): <implicit> {
|
||||
Unit
|
||||
}
|
||||
)
|
||||
R|/baz|(other = Boolean(false), f = baz@fun <anonymous>(): R|kotlin/Unit| <kind=EXACTLY_ONCE> {
|
||||
R|/baz|(other = Boolean(false), f = baz@fun <anonymous>(): R|kotlin/Unit| {
|
||||
Unit
|
||||
}
|
||||
)
|
||||
R|/baz|(baz@fun <anonymous>(): R|kotlin/Unit| <kind=EXACTLY_ONCE> {
|
||||
R|/baz|(baz@fun <anonymous>(): R|kotlin/Unit| {
|
||||
Unit
|
||||
}
|
||||
, Boolean(false))
|
||||
<Inapplicable(PARAMETER_MAPPING_ERROR): [/baz]>#(<L> = baz@fun <implicit>.<anonymous>(): <implicit> <kind=EXACTLY_ONCE> {
|
||||
<Inapplicable(PARAMETER_MAPPING_ERROR): [/baz]>#(<L> = baz@fun <implicit>.<anonymous>(): <implicit> {
|
||||
Unit
|
||||
}
|
||||
)
|
||||
<Inapplicable(PARAMETER_MAPPING_ERROR): [/baz]>#(<L> = baz@fun <implicit>.<anonymous>(): <implicit> <kind=EXACTLY_ONCE> {
|
||||
<Inapplicable(PARAMETER_MAPPING_ERROR): [/baz]>#(<L> = baz@fun <implicit>.<anonymous>(): <implicit> {
|
||||
Unit
|
||||
}
|
||||
)
|
||||
<Inapplicable(PARAMETER_MAPPING_ERROR): [/baz]>#(other = Boolean(false), <L> = baz@fun <implicit>.<anonymous>(): <implicit> <kind=EXACTLY_ONCE> {
|
||||
<Inapplicable(PARAMETER_MAPPING_ERROR): [/baz]>#(other = Boolean(false), <L> = baz@fun <implicit>.<anonymous>(): <implicit> {
|
||||
Unit
|
||||
}
|
||||
)
|
||||
|
||||
+1
-1
@@ -27,7 +27,7 @@ digraph complex_kt {
|
||||
11 [label="Access variable <Unresolved name: HttpRequests>#"];
|
||||
12 [label="Access variable R|<local>/url|"];
|
||||
13 [label="Function call: <Unresolved name: HttpRequests>#.<Unresolved name: request>#(R|<local>/url|)"];
|
||||
14 [label="Function call: <Unresolved name: HttpRequests>#.<Unresolved name: request>#(R|<local>/url|).<Unresolved name: connect>#(<L> = connect@fun <implicit>.<anonymous>(): <implicit> <kind=EXACTLY_ONCE> {
|
||||
14 [label="Function call: <Unresolved name: HttpRequests>#.<Unresolved name: request>#(R|<local>/url|).<Unresolved name: connect>#(<L> = connect@fun <implicit>.<anonymous>(): <implicit> {
|
||||
GsonBuilder#().create#().fromJson#(it#.inputStream#.reader#(), <getClass>(Array#<R|class error: Symbol not found, for `PluginDTO`|>()).java#)
|
||||
}
|
||||
)"];
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@ FILE: complex.kt
|
||||
@R|kotlin/jvm/Throws|(<getClass>(<Unresolved name: IOException>#), <getClass>(<Unresolved name: ResponseParseException>#)) public final fun fetchPluginReleaseDate(pluginId: R|class error: Symbol not found, for `PluginId`|, version: R|kotlin/String|, channel: R|kotlin/String?|): R|class error: Symbol not found, for `LocalDate?`| {
|
||||
lval url: R|kotlin/String| = <strcat>(String(https://plugins.jetbrains.com/api/plugins/), R|<local>/pluginId|.<Unresolved name: idString>#, String(/updates?version=), R|<local>/version|)
|
||||
lval pluginDTOs: R|kotlin/Array<class error: Symbol not found, for `PluginDTO`>| = try {
|
||||
<Unresolved name: HttpRequests>#.<Unresolved name: request>#(R|<local>/url|).<Unresolved name: connect>#(<L> = connect@fun <implicit>.<anonymous>(): <implicit> <kind=EXACTLY_ONCE> {
|
||||
<Unresolved name: HttpRequests>#.<Unresolved name: request>#(R|<local>/url|).<Unresolved name: connect>#(<L> = connect@fun <implicit>.<anonymous>(): <implicit> {
|
||||
GsonBuilder#().create#().fromJson#(it#.inputStream#.reader#(), <getClass>(Array#<R|class error: Symbol not found, for `PluginDTO`|>()).java#)
|
||||
}
|
||||
)
|
||||
|
||||
+3
-3
@@ -391,7 +391,7 @@ digraph jumps_kt {
|
||||
}
|
||||
131 [label="Exit function anonymousFunction"];
|
||||
}
|
||||
132 [label="Function call: R|/run|(<L> = run@fun <anonymous>(): R|kotlin/Unit| <kind=EXACTLY_ONCE> {
|
||||
132 [label="Function call: R|/run|(<L> = run@fun <anonymous>(): R|kotlin/Unit| <kind=UNKNOWN> {
|
||||
^@run Unit
|
||||
}
|
||||
)"];
|
||||
@@ -402,13 +402,13 @@ digraph jumps_kt {
|
||||
|
||||
124 -> {125};
|
||||
125 -> {126};
|
||||
126 -> {127};
|
||||
126 -> {131 127};
|
||||
127 -> {128};
|
||||
128 -> {131};
|
||||
128 -> {129} [style=dotted];
|
||||
129 -> {130} [style=dotted];
|
||||
130 -> {131} [style=dotted];
|
||||
131 -> {132};
|
||||
131 -> {126 132};
|
||||
132 -> {133};
|
||||
133 -> {134};
|
||||
|
||||
|
||||
+1
-1
@@ -40,7 +40,7 @@ fun test_5(b: Boolean) {
|
||||
}
|
||||
}
|
||||
|
||||
fun run(block: () -> Unit) {
|
||||
inline fun run(block: () -> Unit) {
|
||||
block()
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -50,11 +50,11 @@ FILE: jumps.kt
|
||||
}
|
||||
|
||||
}
|
||||
public final fun run(block: R|kotlin/Function0<kotlin/Unit>|): R|kotlin/Unit| {
|
||||
public final inline fun run(block: R|kotlin/Function0<kotlin/Unit>|): R|kotlin/Unit| {
|
||||
R|<local>/block|.R|FakeOverride<kotlin/Function0.invoke: R|kotlin/Unit|>|()
|
||||
}
|
||||
public final fun test_6(): R|kotlin/Unit| {
|
||||
R|/run|(<L> = run@fun <anonymous>(): R|kotlin/Unit| <kind=EXACTLY_ONCE> {
|
||||
R|/run|(<L> = run@fun <anonymous>(): R|kotlin/Unit| <kind=UNKNOWN> {
|
||||
^@run Unit
|
||||
}
|
||||
)
|
||||
|
||||
+23
-21
@@ -53,7 +53,7 @@ digraph lambdas_kt {
|
||||
}
|
||||
20 [label="Exit function anonymousFunction"];
|
||||
}
|
||||
21 [label="Function call: R|/run|(<L> = run@fun <anonymous>(): R|kotlin/Unit| <kind=EXACTLY_ONCE> {
|
||||
21 [label="Function call: R|/run|(<L> = run@fun <anonymous>(): R|kotlin/Unit| <kind=UNKNOWN> {
|
||||
R|<local>/x|.R|kotlin/Int.inc|()
|
||||
}
|
||||
)"];
|
||||
@@ -77,12 +77,12 @@ digraph lambdas_kt {
|
||||
12 -> {24};
|
||||
13 -> {14};
|
||||
14 -> {15};
|
||||
15 -> {16};
|
||||
15 -> {20 16};
|
||||
16 -> {17};
|
||||
17 -> {18};
|
||||
18 -> {19};
|
||||
19 -> {20};
|
||||
20 -> {21};
|
||||
20 -> {15 21};
|
||||
21 -> {22};
|
||||
22 -> {23};
|
||||
23 -> {24};
|
||||
@@ -197,16 +197,16 @@ digraph lambdas_kt {
|
||||
63 [label="Stub" style="filled" fillcolor=gray];
|
||||
64 [label="Exit block" style="filled" fillcolor=gray];
|
||||
}
|
||||
65 [label="Exit function anonymousFunction" style="filled" fillcolor=gray];
|
||||
65 [label="Exit function anonymousFunction"];
|
||||
}
|
||||
66 [label="Function call: R|/getInt|(<L> = getInt@fun <anonymous>(): R|kotlin/Unit| <kind=EXACTLY_ONCE> {
|
||||
66 [label="Function call: R|/getInt|(<L> = getInt@fun <anonymous>(): R|kotlin/Unit| <kind=UNKNOWN> {
|
||||
^test_3 Int(1)
|
||||
}
|
||||
)" style="filled" fillcolor=gray];
|
||||
67 [label="Jump: ^test_3 R|/getInt|(<L> = getInt@fun <anonymous>(): R|kotlin/Unit| <kind=EXACTLY_ONCE> {
|
||||
)"];
|
||||
67 [label="Jump: ^test_3 R|/getInt|(<L> = getInt@fun <anonymous>(): R|kotlin/Unit| <kind=UNKNOWN> {
|
||||
^test_3 Int(1)
|
||||
}
|
||||
)" style="filled" fillcolor=gray];
|
||||
)"];
|
||||
68 [label="Stub" style="filled" fillcolor=gray];
|
||||
69 [label="Exit block" style="filled" fillcolor=gray];
|
||||
}
|
||||
@@ -215,16 +215,17 @@ digraph lambdas_kt {
|
||||
|
||||
57 -> {58};
|
||||
58 -> {59};
|
||||
59 -> {60};
|
||||
59 -> {65 60};
|
||||
60 -> {61};
|
||||
61 -> {62};
|
||||
62 -> {70};
|
||||
62 -> {63} [style=dotted];
|
||||
63 -> {64} [style=dotted];
|
||||
64 -> {65} [style=dotted];
|
||||
65 -> {66} [style=dotted];
|
||||
66 -> {67} [style=dotted];
|
||||
67 -> {70 68} [style=dotted];
|
||||
65 -> {59 66};
|
||||
66 -> {67};
|
||||
67 -> {70};
|
||||
67 -> {68} [style=dotted];
|
||||
68 -> {69} [style=dotted];
|
||||
69 -> {70} [style=dotted];
|
||||
|
||||
@@ -245,16 +246,16 @@ digraph lambdas_kt {
|
||||
77 [label="Stub" style="filled" fillcolor=gray];
|
||||
78 [label="Exit block" style="filled" fillcolor=gray];
|
||||
}
|
||||
79 [label="Exit function anonymousFunction" style="filled" fillcolor=gray];
|
||||
79 [label="Exit function anonymousFunction"];
|
||||
}
|
||||
80 [label="Function call: R|/getInt|(block = getInt@fun <anonymous>(): R|kotlin/Unit| <kind=EXACTLY_ONCE> {
|
||||
80 [label="Function call: R|/getInt|(block = getInt@fun <anonymous>(): R|kotlin/Unit| <kind=UNKNOWN> {
|
||||
^test_4 Int(1)
|
||||
}
|
||||
)" style="filled" fillcolor=gray];
|
||||
81 [label="Jump: ^test_4 R|/getInt|(block = getInt@fun <anonymous>(): R|kotlin/Unit| <kind=EXACTLY_ONCE> {
|
||||
)"];
|
||||
81 [label="Jump: ^test_4 R|/getInt|(block = getInt@fun <anonymous>(): R|kotlin/Unit| <kind=UNKNOWN> {
|
||||
^test_4 Int(1)
|
||||
}
|
||||
)" style="filled" fillcolor=gray];
|
||||
)"];
|
||||
82 [label="Stub" style="filled" fillcolor=gray];
|
||||
83 [label="Exit block" style="filled" fillcolor=gray];
|
||||
}
|
||||
@@ -263,16 +264,17 @@ digraph lambdas_kt {
|
||||
|
||||
71 -> {72};
|
||||
72 -> {73};
|
||||
73 -> {74};
|
||||
73 -> {79 74};
|
||||
74 -> {75};
|
||||
75 -> {76};
|
||||
76 -> {84};
|
||||
76 -> {77} [style=dotted];
|
||||
77 -> {78} [style=dotted];
|
||||
78 -> {79} [style=dotted];
|
||||
79 -> {80} [style=dotted];
|
||||
80 -> {81} [style=dotted];
|
||||
81 -> {84 82} [style=dotted];
|
||||
79 -> {73 80};
|
||||
80 -> {81};
|
||||
81 -> {84};
|
||||
81 -> {82} [style=dotted];
|
||||
82 -> {83} [style=dotted];
|
||||
83 -> {84} [style=dotted];
|
||||
|
||||
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
fun run(block: () -> Unit) {
|
||||
inline fun run(block: () -> Unit) {
|
||||
block()
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ fun test_2(x: Any?) {
|
||||
}
|
||||
|
||||
|
||||
fun getInt(block: () -> Unit): Int {
|
||||
inline fun getInt(block: () -> Unit): Int {
|
||||
block()
|
||||
return 1
|
||||
}
|
||||
|
||||
+5
-5
@@ -1,11 +1,11 @@
|
||||
FILE: lambdas.kt
|
||||
public final fun run(block: R|kotlin/Function0<kotlin/Unit>|): R|kotlin/Unit| {
|
||||
public final inline fun run(block: R|kotlin/Function0<kotlin/Unit>|): R|kotlin/Unit| {
|
||||
R|<local>/block|.R|FakeOverride<kotlin/Function0.invoke: R|kotlin/Unit|>|()
|
||||
}
|
||||
public final fun test_1(x: R|kotlin/Any?|): R|kotlin/Unit| {
|
||||
when () {
|
||||
(R|<local>/x| is R|kotlin/Int|) -> {
|
||||
R|/run|(<L> = run@fun <anonymous>(): R|kotlin/Unit| <kind=EXACTLY_ONCE> {
|
||||
R|/run|(<L> = run@fun <anonymous>(): R|kotlin/Unit| <kind=UNKNOWN> {
|
||||
R|<local>/x|.R|kotlin/Int.inc|()
|
||||
}
|
||||
)
|
||||
@@ -24,18 +24,18 @@ FILE: lambdas.kt
|
||||
}
|
||||
|
||||
}
|
||||
public final fun getInt(block: R|kotlin/Function0<kotlin/Unit>|): R|kotlin/Int| {
|
||||
public final inline fun getInt(block: R|kotlin/Function0<kotlin/Unit>|): R|kotlin/Int| {
|
||||
R|<local>/block|.R|FakeOverride<kotlin/Function0.invoke: R|kotlin/Unit|>|()
|
||||
^getInt Int(1)
|
||||
}
|
||||
public final fun test_3(): R|kotlin/Int| {
|
||||
^test_3 R|/getInt|(<L> = getInt@fun <anonymous>(): R|kotlin/Unit| <kind=EXACTLY_ONCE> {
|
||||
^test_3 R|/getInt|(<L> = getInt@fun <anonymous>(): R|kotlin/Unit| <kind=UNKNOWN> {
|
||||
^test_3 Int(1)
|
||||
}
|
||||
)
|
||||
}
|
||||
public final fun test_4(): R|kotlin/Int| {
|
||||
^test_4 R|/getInt|(block = getInt@fun <anonymous>(): R|kotlin/Unit| <kind=EXACTLY_ONCE> {
|
||||
^test_4 R|/getInt|(block = getInt@fun <anonymous>(): R|kotlin/Unit| <kind=UNKNOWN> {
|
||||
^test_4 Int(1)
|
||||
}
|
||||
)
|
||||
|
||||
@@ -164,9 +164,9 @@ digraph propertiesAndInitBlocks_kt {
|
||||
50 [label="Stub" style="filled" fillcolor=gray];
|
||||
51 [label="Exit block" style="filled" fillcolor=gray];
|
||||
}
|
||||
52 [label="Exit function anonymousFunction" style="filled" fillcolor=gray];
|
||||
52 [label="Exit function anonymousFunction"];
|
||||
}
|
||||
53 [label="Function call: R|/run|(<L> = run@fun <anonymous>(): R|kotlin/Unit| <kind=EXACTLY_ONCE> {
|
||||
53 [label="Function call: R|/run|(<L> = run@fun <anonymous>(): R|kotlin/Unit| <kind=UNKNOWN> {
|
||||
local final fun foo(): R|kotlin/Unit| {
|
||||
lval c: R|kotlin/Int| = Int(1).R|kotlin/Int.plus|(Int(1))
|
||||
throw R|java/lang/Exception.Exception|()
|
||||
@@ -186,20 +186,20 @@ digraph propertiesAndInitBlocks_kt {
|
||||
|
||||
throw R|java/lang/Exception.Exception|()
|
||||
}
|
||||
)" style="filled" fillcolor=gray];
|
||||
)"];
|
||||
54 [label="Exit property" style="filled" fillcolor=red];
|
||||
}
|
||||
|
||||
45 -> {46};
|
||||
46 -> {47};
|
||||
46 -> {52 47};
|
||||
47 -> {48};
|
||||
48 -> {49};
|
||||
49 -> {54};
|
||||
49 -> {50} [style=dotted];
|
||||
50 -> {51} [style=dotted];
|
||||
51 -> {52} [style=dotted];
|
||||
52 -> {53} [style=dotted];
|
||||
53 -> {54} [style=dotted];
|
||||
52 -> {46 53};
|
||||
53 -> {54};
|
||||
|
||||
subgraph cluster_18 {
|
||||
color=red
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
fun run(block: () -> Unit) {
|
||||
inline fun run(block: () -> Unit) {
|
||||
block()
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
FILE: propertiesAndInitBlocks.kt
|
||||
public final fun run(block: R|kotlin/Function0<kotlin/Unit>|): R|kotlin/Unit| {
|
||||
public final inline fun run(block: R|kotlin/Function0<kotlin/Unit>|): R|kotlin/Unit| {
|
||||
R|<local>/block|.R|FakeOverride<kotlin/Function0.invoke: R|kotlin/Unit|>|()
|
||||
}
|
||||
public final val x1: R|kotlin/Int| = Int(1)
|
||||
@@ -11,7 +11,7 @@ FILE: propertiesAndInitBlocks.kt
|
||||
public set(value: R|kotlin/Int|): R|kotlin/Unit| {
|
||||
F|/x2| = Int(1)
|
||||
}
|
||||
public final val x3: R|kotlin/Unit| = R|/run|(<L> = run@fun <anonymous>(): R|kotlin/Unit| <kind=EXACTLY_ONCE> {
|
||||
public final val x3: R|kotlin/Unit| = R|/run|(<L> = run@fun <anonymous>(): R|kotlin/Unit| <kind=UNKNOWN> {
|
||||
local final fun foo(): R|kotlin/Unit| {
|
||||
lval c: R|kotlin/Int| = Int(1).R|kotlin/Int.plus|(Int(1))
|
||||
throw R|java/lang/Exception.Exception|()
|
||||
|
||||
+1
-1
@@ -19,7 +19,7 @@ FILE: extensionPropertyInLambda.kt
|
||||
public final fun use(f: R|kotlin/Function0<kotlin/String>|): R|kotlin/Unit| {
|
||||
}
|
||||
public final fun test1(): R|kotlin/Unit| {
|
||||
R|/use|(<L> = use@fun <anonymous>(): R|kotlin/String| <kind=EXACTLY_ONCE> {
|
||||
R|/use|(<L> = use@fun <anonymous>(): R|kotlin/String| {
|
||||
R|/C.C|<R|kotlin/String|>(String(abc)).R|/y|
|
||||
}
|
||||
)
|
||||
|
||||
@@ -8,19 +8,19 @@ FILE: lambda.kt
|
||||
public final fun multipleArgs(block: R|kotlin/Function2<kotlin/String, kotlin/String, kotlin/String>|): R|kotlin/Unit| {
|
||||
}
|
||||
public final fun main(): R|kotlin/Unit| {
|
||||
R|/foo|(<L> = foo@fun <anonymous>(): R|kotlin/Unit| <kind=EXACTLY_ONCE> {
|
||||
R|/foo|(<L> = foo@fun <anonymous>(): R|kotlin/Unit| {
|
||||
String(This is test)
|
||||
}
|
||||
)
|
||||
R|/bar|(<L> = bar@fun <anonymous>(): R|kotlin/String| <kind=EXACTLY_ONCE> {
|
||||
R|/bar|(<L> = bar@fun <anonymous>(): R|kotlin/String| {
|
||||
String(This is also test)
|
||||
}
|
||||
)
|
||||
R|/itIs|(<L> = itIs@fun <anonymous>(it: R|kotlin/String|): R|kotlin/String| <kind=EXACTLY_ONCE> {
|
||||
R|/itIs|(<L> = itIs@fun <anonymous>(it: R|kotlin/String|): R|kotlin/String| {
|
||||
<strcat>(String(this is ), R|<local>/it|, String( test))
|
||||
}
|
||||
)
|
||||
R|/multipleArgs|(<L> = multipleArgs@fun <anonymous>(a: R|kotlin/String|, b: R|kotlin/String|): R|kotlin/String| <kind=EXACTLY_ONCE> {
|
||||
R|/multipleArgs|(<L> = multipleArgs@fun <anonymous>(a: R|kotlin/String|, b: R|kotlin/String|): R|kotlin/String| {
|
||||
<strcat>(String(This is test of ), R|<local>/a|, String(, ), R|<local>/b|)
|
||||
}
|
||||
)
|
||||
|
||||
+2
-2
@@ -7,7 +7,7 @@ FILE: localObject.kt
|
||||
|
||||
}
|
||||
public final fun tesLambda(x: R|kotlin/Int|): R|kotlin/Int| {
|
||||
^tesLambda R|/run|<R|kotlin/Int|>(<L> = run@fun <anonymous>(): R|kotlin/Int| <kind=EXACTLY_ONCE> {
|
||||
^tesLambda R|/run|<R|kotlin/Int|>(<L> = run@fun <anonymous>(): R|kotlin/Int| {
|
||||
lval obj: R|Foo| = object : R|Foo| {
|
||||
private constructor(): R|kotlin/Any| {
|
||||
super<R|kotlin/Any|>()
|
||||
@@ -64,7 +64,7 @@ FILE: localObject.kt
|
||||
Int(1)
|
||||
}
|
||||
|
||||
public final val z: R|kotlin/Int| = R|/run|<R|kotlin/Int|>(<L> = run@fun <anonymous>(): R|kotlin/Int| <kind=EXACTLY_ONCE> {
|
||||
public final val z: R|kotlin/Int| = R|/run|<R|kotlin/Int|>(<L> = run@fun <anonymous>(): R|kotlin/Int| {
|
||||
lval obj: R|Foo| = object : R|Foo| {
|
||||
private constructor(): R|kotlin/Any| {
|
||||
super<R|kotlin/Any|>()
|
||||
|
||||
@@ -69,7 +69,7 @@ digraph inPlaceLambdas_kt {
|
||||
}
|
||||
24 [label="Exit function anonymousFunction"];
|
||||
}
|
||||
25 [label="Function call: R|/run|(<L> = run@fun <anonymous>(): R|kotlin/Unit| <kind=EXACTLY_ONCE> {
|
||||
25 [label="Function call: R|/run|(<L> = run@fun <anonymous>(): R|kotlin/Unit| <kind=UNKNOWN> {
|
||||
R|<local>/x|.R|/A.foo|()
|
||||
}
|
||||
)"];
|
||||
@@ -93,12 +93,12 @@ digraph inPlaceLambdas_kt {
|
||||
16 -> {28};
|
||||
17 -> {18};
|
||||
18 -> {19};
|
||||
19 -> {20};
|
||||
19 -> {24 20};
|
||||
20 -> {21};
|
||||
21 -> {22};
|
||||
22 -> {23};
|
||||
23 -> {24};
|
||||
24 -> {25};
|
||||
24 -> {19 25};
|
||||
25 -> {26};
|
||||
26 -> {27};
|
||||
27 -> {28};
|
||||
@@ -123,7 +123,7 @@ digraph inPlaceLambdas_kt {
|
||||
}
|
||||
38 [label="Exit function anonymousFunction"];
|
||||
}
|
||||
39 [label="Function call: R|/run|(<L> = run@fun <anonymous>(): R|kotlin/Unit| <kind=EXACTLY_ONCE> {
|
||||
39 [label="Function call: R|/run|(<L> = run@fun <anonymous>(): R|kotlin/Unit| <kind=UNKNOWN> {
|
||||
(R|<local>/x| as R|B|)
|
||||
}
|
||||
)"];
|
||||
@@ -136,12 +136,12 @@ digraph inPlaceLambdas_kt {
|
||||
|
||||
31 -> {32};
|
||||
32 -> {33};
|
||||
33 -> {34};
|
||||
33 -> {38 34};
|
||||
34 -> {35};
|
||||
35 -> {36};
|
||||
36 -> {37};
|
||||
37 -> {38};
|
||||
38 -> {39};
|
||||
38 -> {33 39};
|
||||
39 -> {40};
|
||||
40 -> {41};
|
||||
41 -> {42};
|
||||
@@ -182,7 +182,7 @@ digraph inPlaceLambdas_kt {
|
||||
}
|
||||
61 [label="Exit function anonymousFunction"];
|
||||
}
|
||||
62 [label="Function call: R|/run|(<L> = run@fun <anonymous>(): R|kotlin/Unit| <kind=EXACTLY_ONCE> {
|
||||
62 [label="Function call: R|/run|(<L> = run@fun <anonymous>(): R|kotlin/Unit| <kind=UNKNOWN> {
|
||||
R|<local>/x|.R|/A.foo|()
|
||||
(R|<local>/x| as R|B|)
|
||||
}
|
||||
@@ -209,14 +209,14 @@ digraph inPlaceLambdas_kt {
|
||||
51 -> {67};
|
||||
52 -> {53};
|
||||
53 -> {54};
|
||||
54 -> {55};
|
||||
54 -> {61 55};
|
||||
55 -> {56};
|
||||
56 -> {57};
|
||||
57 -> {58};
|
||||
58 -> {59};
|
||||
59 -> {60};
|
||||
60 -> {61};
|
||||
61 -> {62};
|
||||
61 -> {54 62};
|
||||
62 -> {63};
|
||||
63 -> {64};
|
||||
64 -> {65};
|
||||
|
||||
@@ -7,7 +7,7 @@ interface B {
|
||||
}
|
||||
|
||||
|
||||
fun run(block: () -> Unit) {
|
||||
inline fun run(block: () -> Unit) {
|
||||
block()
|
||||
}
|
||||
|
||||
|
||||
@@ -7,13 +7,13 @@ FILE: inPlaceLambdas.kt
|
||||
public abstract fun bar(): R|kotlin/Unit|
|
||||
|
||||
}
|
||||
public final fun run(block: R|kotlin/Function0<kotlin/Unit>|): R|kotlin/Unit| {
|
||||
public final inline fun run(block: R|kotlin/Function0<kotlin/Unit>|): R|kotlin/Unit| {
|
||||
R|<local>/block|.R|FakeOverride<kotlin/Function0.invoke: R|kotlin/Unit|>|()
|
||||
}
|
||||
public final fun test_1(x: R|kotlin/Any?|): R|kotlin/Unit| {
|
||||
when () {
|
||||
(R|<local>/x| is R|A|) -> {
|
||||
R|/run|(<L> = run@fun <anonymous>(): R|kotlin/Unit| <kind=EXACTLY_ONCE> {
|
||||
R|/run|(<L> = run@fun <anonymous>(): R|kotlin/Unit| <kind=UNKNOWN> {
|
||||
R|<local>/x|.R|/A.foo|()
|
||||
}
|
||||
)
|
||||
@@ -22,7 +22,7 @@ FILE: inPlaceLambdas.kt
|
||||
|
||||
}
|
||||
public final fun test_2(x: R|kotlin/Any?|): R|kotlin/Unit| {
|
||||
R|/run|(<L> = run@fun <anonymous>(): R|kotlin/Unit| <kind=EXACTLY_ONCE> {
|
||||
R|/run|(<L> = run@fun <anonymous>(): R|kotlin/Unit| <kind=UNKNOWN> {
|
||||
(R|<local>/x| as R|B|)
|
||||
}
|
||||
)
|
||||
@@ -31,7 +31,7 @@ FILE: inPlaceLambdas.kt
|
||||
public final fun test_3(x: R|kotlin/Any?|): R|kotlin/Unit| {
|
||||
when () {
|
||||
(R|<local>/x| is R|A|) -> {
|
||||
R|/run|(<L> = run@fun <anonymous>(): R|kotlin/Unit| <kind=EXACTLY_ONCE> {
|
||||
R|/run|(<L> = run@fun <anonymous>(): R|kotlin/Unit| <kind=UNKNOWN> {
|
||||
R|<local>/x|.R|/A.foo|()
|
||||
(R|<local>/x| as R|B|)
|
||||
}
|
||||
|
||||
@@ -34,7 +34,7 @@ FILE: components.kt
|
||||
lval <destruct>: R|D| = R|<local>/list|.R|kotlin/collections/first|<R|D|>()
|
||||
lval x: R|kotlin/Int| = R|<local>/<destruct>|.R|/D.component1|()
|
||||
lval y: R|kotlin/String| = R|<local>/<destruct>|.R|/D.component2|()
|
||||
R|<local>/list|.R|kotlin/collections/forEach|<R|D|>(<L> = forEach@fun <anonymous>(<destruct>: R|D|): R|kotlin/Unit| <kind=EXACTLY_ONCE> {
|
||||
R|<local>/list|.R|kotlin/collections/forEach|<R|D|>(<L> = forEach@fun <anonymous>(<destruct>: R|D|): R|kotlin/Unit| <kind=UNKNOWN> {
|
||||
lval x: R|kotlin/Int| = R|<local>/<destruct>|.R|/D.component1|()
|
||||
lval y: R|kotlin/String| = R|<local>/<destruct>|.R|/D.component2|()
|
||||
R|kotlin/io/println|(R|<local>/x|)
|
||||
|
||||
@@ -0,0 +1,399 @@
|
||||
digraph callsInPlace_kt {
|
||||
graph [splines=ortho nodesep=3]
|
||||
node [shape=box penwidth=2]
|
||||
edge [penwidth=2]
|
||||
|
||||
subgraph cluster_0 {
|
||||
color=red
|
||||
0 [label="Enter function test" style="filled" fillcolor=red];
|
||||
subgraph cluster_1 {
|
||||
color=blue
|
||||
1 [label="Enter block"];
|
||||
2 [label="Variable declaration: lval x: R|kotlin/Int|"];
|
||||
subgraph cluster_2 {
|
||||
color=blue
|
||||
3 [label="Enter function anonymousFunction"];
|
||||
subgraph cluster_3 {
|
||||
color=blue
|
||||
4 [label="Enter block"];
|
||||
5 [label="Const: Int(1)"];
|
||||
6 [label="Assignmenet: R|<local>/x|"];
|
||||
7 [label="Exit block"];
|
||||
}
|
||||
8 [label="Exit function anonymousFunction"];
|
||||
}
|
||||
9 [label="Function call: R|kotlin/run|<R|kotlin/Unit|>(<L> = run@fun <anonymous>(): R|kotlin/Unit| <kind=EXACTLY_ONCE> {
|
||||
R|<local>/x| = Int(1)
|
||||
}
|
||||
)"];
|
||||
10 [label="Access variable R|<local>/x|"];
|
||||
11 [label="Function call: R|<local>/x|.R|kotlin/Int.inc|()"];
|
||||
12 [label="Exit block"];
|
||||
}
|
||||
13 [label="Exit function test" style="filled" fillcolor=red];
|
||||
}
|
||||
|
||||
0 -> {1};
|
||||
1 -> {2};
|
||||
2 -> {3};
|
||||
3 -> {4};
|
||||
4 -> {5};
|
||||
5 -> {6};
|
||||
6 -> {7};
|
||||
7 -> {8};
|
||||
8 -> {9};
|
||||
9 -> {10};
|
||||
10 -> {11};
|
||||
11 -> {12};
|
||||
12 -> {13};
|
||||
|
||||
subgraph cluster_4 {
|
||||
color=red
|
||||
14 [label="Enter function test_2" style="filled" fillcolor=red];
|
||||
subgraph cluster_5 {
|
||||
color=blue
|
||||
15 [label="Enter block"];
|
||||
16 [label="Const: Int(10)"];
|
||||
subgraph cluster_6 {
|
||||
color=blue
|
||||
17 [label="Enter function anonymousFunction"];
|
||||
subgraph cluster_7 {
|
||||
color=blue
|
||||
18 [label="Enter block"];
|
||||
19 [label="Const: String(test_2)"];
|
||||
20 [label="Exit block"];
|
||||
}
|
||||
21 [label="Exit function anonymousFunction"];
|
||||
}
|
||||
22 [label="Function call: R|kotlin/repeat|(Int(10), <L> = repeat@fun <anonymous>(it: R|kotlin/Int|): R|kotlin/Unit| <kind=UNKNOWN> {
|
||||
String(test_2)
|
||||
}
|
||||
)"];
|
||||
23 [label="Exit block"];
|
||||
}
|
||||
24 [label="Exit function test_2" style="filled" fillcolor=red];
|
||||
}
|
||||
|
||||
14 -> {15};
|
||||
15 -> {16};
|
||||
16 -> {17};
|
||||
17 -> {21 18};
|
||||
18 -> {19};
|
||||
19 -> {20};
|
||||
20 -> {21};
|
||||
21 -> {17 22};
|
||||
22 -> {23};
|
||||
23 -> {24};
|
||||
|
||||
subgraph cluster_8 {
|
||||
color=red
|
||||
25 [label="Enter function test_3" style="filled" fillcolor=red];
|
||||
subgraph cluster_9 {
|
||||
color=blue
|
||||
26 [label="Enter block"];
|
||||
27 [label="Const: Int(10)"];
|
||||
subgraph cluster_10 {
|
||||
color=blue
|
||||
28 [label="Enter function anonymousFunction"];
|
||||
subgraph cluster_11 {
|
||||
color=blue
|
||||
29 [label="Enter block"];
|
||||
30 [label="Const: String(test_3)"];
|
||||
31 [label="Exit block"];
|
||||
}
|
||||
32 [label="Exit function anonymousFunction"];
|
||||
}
|
||||
33 [label="Function call: R|kotlin/repeat|(action = repeat@fun <anonymous>(it: R|kotlin/Int|): R|kotlin/Unit| <kind=UNKNOWN> {
|
||||
String(test_3)
|
||||
}
|
||||
, times = Int(10))"];
|
||||
34 [label="Exit block"];
|
||||
}
|
||||
35 [label="Exit function test_3" style="filled" fillcolor=red];
|
||||
}
|
||||
|
||||
25 -> {26};
|
||||
26 -> {27};
|
||||
27 -> {28};
|
||||
28 -> {32 29};
|
||||
29 -> {30};
|
||||
30 -> {31};
|
||||
31 -> {32};
|
||||
32 -> {28 33};
|
||||
33 -> {34};
|
||||
34 -> {35};
|
||||
|
||||
subgraph cluster_12 {
|
||||
color=red
|
||||
36 [label="Enter function test_4" style="filled" fillcolor=red];
|
||||
subgraph cluster_13 {
|
||||
color=blue
|
||||
37 [label="Enter block"];
|
||||
38 [label="Const: Int(1)"];
|
||||
subgraph cluster_14 {
|
||||
color=blue
|
||||
39 [label="Enter function anonymousFunction"];
|
||||
subgraph cluster_15 {
|
||||
color=blue
|
||||
40 [label="Enter block"];
|
||||
41 [label="Const: String(test_4)"];
|
||||
42 [label="Access variable R|<local>/it|"];
|
||||
43 [label="Const: Int(0)"];
|
||||
44 [label="Operator >"];
|
||||
45 [label="Exit block"];
|
||||
}
|
||||
46 [label="Exit function anonymousFunction"];
|
||||
}
|
||||
47 [label="Function call: Int(1).R|kotlin/takeUnless|<R|kotlin/Int|>(<L> = takeUnless@fun <anonymous>(it: R|kotlin/Int|): R|kotlin/Boolean| <kind=EXACTLY_ONCE> {
|
||||
String(test_4)
|
||||
>(R|<local>/it|, Int(0))
|
||||
}
|
||||
)"];
|
||||
48 [label="Exit block"];
|
||||
}
|
||||
49 [label="Exit function test_4" style="filled" fillcolor=red];
|
||||
}
|
||||
|
||||
36 -> {37};
|
||||
37 -> {38};
|
||||
38 -> {39};
|
||||
39 -> {40};
|
||||
40 -> {41};
|
||||
41 -> {42};
|
||||
42 -> {43};
|
||||
43 -> {44};
|
||||
44 -> {45};
|
||||
45 -> {46};
|
||||
46 -> {47};
|
||||
47 -> {48};
|
||||
48 -> {49};
|
||||
|
||||
subgraph cluster_16 {
|
||||
color=red
|
||||
50 [label="Enter function test_5" style="filled" fillcolor=red];
|
||||
subgraph cluster_17 {
|
||||
color=blue
|
||||
51 [label="Enter block"];
|
||||
52 [label="Const: Int(1)"];
|
||||
subgraph cluster_18 {
|
||||
color=blue
|
||||
53 [label="Enter function anonymousFunction"];
|
||||
subgraph cluster_19 {
|
||||
color=blue
|
||||
54 [label="Enter block"];
|
||||
55 [label="Const: String(test_5)"];
|
||||
56 [label="Access variable R|<local>/it|"];
|
||||
57 [label="Const: Int(0)"];
|
||||
58 [label="Operator >"];
|
||||
59 [label="Exit block"];
|
||||
}
|
||||
60 [label="Exit function anonymousFunction"];
|
||||
}
|
||||
61 [label="Function call: Int(1).R|kotlin/takeUnless|<R|kotlin/Int|>(predicate = takeUnless@fun <anonymous>(it: R|kotlin/Int|): R|kotlin/Boolean| <kind=EXACTLY_ONCE> {
|
||||
String(test_5)
|
||||
>(R|<local>/it|, Int(0))
|
||||
}
|
||||
)"];
|
||||
62 [label="Exit block"];
|
||||
}
|
||||
63 [label="Exit function test_5" style="filled" fillcolor=red];
|
||||
}
|
||||
|
||||
50 -> {51};
|
||||
51 -> {52};
|
||||
52 -> {53};
|
||||
53 -> {54};
|
||||
54 -> {55};
|
||||
55 -> {56};
|
||||
56 -> {57};
|
||||
57 -> {58};
|
||||
58 -> {59};
|
||||
59 -> {60};
|
||||
60 -> {61};
|
||||
61 -> {62};
|
||||
62 -> {63};
|
||||
|
||||
subgraph cluster_20 {
|
||||
color=red
|
||||
64 [label="Enter function myRun" style="filled" fillcolor=red];
|
||||
subgraph cluster_21 {
|
||||
color=blue
|
||||
65 [label="Enter block"];
|
||||
66 [label="Function call: R|<local>/block1|.R|FakeOverride<kotlin/Function0.invoke: R|kotlin/Unit|>|()"];
|
||||
67 [label="Function call: R|<local>/block2|.R|FakeOverride<kotlin/Function0.invoke: R|kotlin/Unit|>|()"];
|
||||
68 [label="Exit block"];
|
||||
}
|
||||
69 [label="Exit function myRun" style="filled" fillcolor=red];
|
||||
}
|
||||
|
||||
64 -> {65};
|
||||
65 -> {66};
|
||||
66 -> {67};
|
||||
67 -> {68};
|
||||
68 -> {69};
|
||||
|
||||
subgraph cluster_22 {
|
||||
color=red
|
||||
70 [label="Enter function test_6" style="filled" fillcolor=red];
|
||||
subgraph cluster_23 {
|
||||
color=blue
|
||||
71 [label="Enter block"];
|
||||
subgraph cluster_24 {
|
||||
color=blue
|
||||
72 [label="Enter function anonymousFunction"];
|
||||
subgraph cluster_25 {
|
||||
color=blue
|
||||
73 [label="Enter block"];
|
||||
74 [label="Const: String(test_6_1)"];
|
||||
75 [label="Exit block"];
|
||||
}
|
||||
76 [label="Exit function anonymousFunction"];
|
||||
}
|
||||
subgraph cluster_26 {
|
||||
color=blue
|
||||
77 [label="Enter function anonymousFunction"];
|
||||
subgraph cluster_27 {
|
||||
color=blue
|
||||
78 [label="Enter block"];
|
||||
79 [label="Const: String(test_6_2)"];
|
||||
80 [label="Exit block"];
|
||||
}
|
||||
81 [label="Exit function anonymousFunction"];
|
||||
}
|
||||
82 [label="Function call: R|/myRun|(myRun@fun <anonymous>(): R|kotlin/Unit| <kind=UNKNOWN> {
|
||||
String(test_6_1)
|
||||
}
|
||||
, <L> = myRun@fun <anonymous>(): R|kotlin/Unit| <kind=UNKNOWN> {
|
||||
String(test_6_2)
|
||||
}
|
||||
)"];
|
||||
83 [label="Exit block"];
|
||||
}
|
||||
84 [label="Exit function test_6" style="filled" fillcolor=red];
|
||||
}
|
||||
|
||||
70 -> {71};
|
||||
71 -> {72};
|
||||
72 -> {76 73};
|
||||
73 -> {74};
|
||||
74 -> {75};
|
||||
75 -> {76};
|
||||
76 -> {72 77};
|
||||
77 -> {81 78};
|
||||
78 -> {79};
|
||||
79 -> {80};
|
||||
80 -> {81};
|
||||
81 -> {77 82};
|
||||
82 -> {83};
|
||||
83 -> {84};
|
||||
|
||||
subgraph cluster_28 {
|
||||
color=red
|
||||
85 [label="Enter function test_7" style="filled" fillcolor=red];
|
||||
subgraph cluster_29 {
|
||||
color=blue
|
||||
86 [label="Enter block"];
|
||||
subgraph cluster_30 {
|
||||
color=blue
|
||||
87 [label="Enter function anonymousFunction"];
|
||||
subgraph cluster_31 {
|
||||
color=blue
|
||||
88 [label="Enter block"];
|
||||
89 [label="Const: String(test_7_2)"];
|
||||
90 [label="Exit block"];
|
||||
}
|
||||
91 [label="Exit function anonymousFunction"];
|
||||
}
|
||||
subgraph cluster_32 {
|
||||
color=blue
|
||||
92 [label="Enter function anonymousFunction"];
|
||||
subgraph cluster_33 {
|
||||
color=blue
|
||||
93 [label="Enter block"];
|
||||
94 [label="Const: String(test_7_1)"];
|
||||
95 [label="Exit block"];
|
||||
}
|
||||
96 [label="Exit function anonymousFunction"];
|
||||
}
|
||||
97 [label="Function call: R|/myRun|(block2 = myRun@fun <anonymous>(): R|kotlin/Unit| <kind=UNKNOWN> {
|
||||
String(test_7_2)
|
||||
}
|
||||
, block1 = myRun@fun <anonymous>(): R|kotlin/Unit| <kind=UNKNOWN> {
|
||||
String(test_7_1)
|
||||
}
|
||||
)"];
|
||||
98 [label="Exit block"];
|
||||
}
|
||||
99 [label="Exit function test_7" style="filled" fillcolor=red];
|
||||
}
|
||||
|
||||
85 -> {86};
|
||||
86 -> {87};
|
||||
87 -> {91 88};
|
||||
88 -> {89};
|
||||
89 -> {90};
|
||||
90 -> {91};
|
||||
91 -> {87 92};
|
||||
92 -> {96 93};
|
||||
93 -> {94};
|
||||
94 -> {95};
|
||||
95 -> {96};
|
||||
96 -> {92 97};
|
||||
97 -> {98};
|
||||
98 -> {99};
|
||||
|
||||
subgraph cluster_34 {
|
||||
color=red
|
||||
100 [label="Enter function myDummyRun" style="filled" fillcolor=red];
|
||||
subgraph cluster_35 {
|
||||
color=blue
|
||||
101 [label="Enter block"];
|
||||
102 [label="Function call: R|<local>/block|.R|FakeOverride<kotlin/Function0.invoke: R|kotlin/Unit|>|()"];
|
||||
103 [label="Exit block"];
|
||||
}
|
||||
104 [label="Exit function myDummyRun" style="filled" fillcolor=red];
|
||||
}
|
||||
|
||||
100 -> {101};
|
||||
101 -> {102};
|
||||
102 -> {103};
|
||||
103 -> {104};
|
||||
|
||||
subgraph cluster_36 {
|
||||
color=red
|
||||
105 [label="Enter function test_8" style="filled" fillcolor=red];
|
||||
subgraph cluster_37 {
|
||||
color=blue
|
||||
106 [label="Enter block"];
|
||||
107 [label="Function call: R|/myDummyRun|(<L> = myDummyRun@fun <anonymous>(): R|kotlin/Unit| {
|
||||
String(test_8)
|
||||
}
|
||||
)"];
|
||||
108 [label="Exit block"];
|
||||
}
|
||||
109 [label="Exit function test_8" style="filled" fillcolor=red];
|
||||
}
|
||||
|
||||
105 -> {106};
|
||||
106 -> {107};
|
||||
107 -> {108};
|
||||
108 -> {109};
|
||||
|
||||
subgraph cluster_38 {
|
||||
color=red
|
||||
110 [label="Enter function anonymousFunction" style="filled" fillcolor=red];
|
||||
subgraph cluster_39 {
|
||||
color=blue
|
||||
111 [label="Enter block"];
|
||||
112 [label="Const: String(test_8)"];
|
||||
113 [label="Exit block"];
|
||||
}
|
||||
114 [label="Exit function anonymousFunction" style="filled" fillcolor=red];
|
||||
}
|
||||
|
||||
110 -> {111};
|
||||
111 -> {112};
|
||||
112 -> {113};
|
||||
113 -> {114};
|
||||
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
fun test() {
|
||||
val x: Int
|
||||
run {
|
||||
x = 1
|
||||
}
|
||||
x.inc()
|
||||
}
|
||||
|
||||
fun test_2() {
|
||||
repeat(10) {
|
||||
"test_2"
|
||||
}
|
||||
}
|
||||
|
||||
fun test_3() {
|
||||
repeat(action = { "test_3" }, times = 10)
|
||||
}
|
||||
|
||||
fun test_4() {
|
||||
1.takeUnless {
|
||||
"test_4"
|
||||
it > 0
|
||||
}
|
||||
}
|
||||
|
||||
fun test_5() {
|
||||
1.takeUnless(predicate = {
|
||||
"test_5"
|
||||
it > 0
|
||||
})
|
||||
}
|
||||
|
||||
inline fun myRun(block1: () -> Unit, block2: () -> Unit) {
|
||||
block1()
|
||||
block2()
|
||||
}
|
||||
|
||||
fun test_6() {
|
||||
myRun({ "test_6_1" }) { "test_6_2" }
|
||||
}
|
||||
|
||||
fun test_7() {
|
||||
myRun(block2 = { "test_7_2" }, block1 = { "test_7_1" })
|
||||
}
|
||||
|
||||
fun myDummyRun(block: () -> Unit) {
|
||||
block()
|
||||
}
|
||||
|
||||
fun test_8() {
|
||||
myDummyRun { "test_8" }
|
||||
}
|
||||
@@ -0,0 +1,66 @@
|
||||
FILE: callsInPlace.kt
|
||||
public final fun test(): R|kotlin/Unit| {
|
||||
lval x: R|kotlin/Int|
|
||||
R|kotlin/run|<R|kotlin/Unit|>(<L> = run@fun <anonymous>(): R|kotlin/Unit| <kind=EXACTLY_ONCE> {
|
||||
R|<local>/x| = Int(1)
|
||||
}
|
||||
)
|
||||
R|<local>/x|.R|kotlin/Int.inc|()
|
||||
}
|
||||
public final fun test_2(): R|kotlin/Unit| {
|
||||
R|kotlin/repeat|(Int(10), <L> = repeat@fun <anonymous>(it: R|kotlin/Int|): R|kotlin/Unit| <kind=UNKNOWN> {
|
||||
String(test_2)
|
||||
}
|
||||
)
|
||||
}
|
||||
public final fun test_3(): R|kotlin/Unit| {
|
||||
R|kotlin/repeat|(action = repeat@fun <anonymous>(it: R|kotlin/Int|): R|kotlin/Unit| <kind=UNKNOWN> {
|
||||
String(test_3)
|
||||
}
|
||||
, times = Int(10))
|
||||
}
|
||||
public final fun test_4(): R|kotlin/Unit| {
|
||||
Int(1).R|kotlin/takeUnless|<R|kotlin/Int|>(<L> = takeUnless@fun <anonymous>(it: R|kotlin/Int|): R|kotlin/Boolean| <kind=EXACTLY_ONCE> {
|
||||
String(test_4)
|
||||
>(R|<local>/it|, Int(0))
|
||||
}
|
||||
)
|
||||
}
|
||||
public final fun test_5(): R|kotlin/Unit| {
|
||||
Int(1).R|kotlin/takeUnless|<R|kotlin/Int|>(predicate = takeUnless@fun <anonymous>(it: R|kotlin/Int|): R|kotlin/Boolean| <kind=EXACTLY_ONCE> {
|
||||
String(test_5)
|
||||
>(R|<local>/it|, Int(0))
|
||||
}
|
||||
)
|
||||
}
|
||||
public final inline fun myRun(block1: R|kotlin/Function0<kotlin/Unit>|, block2: R|kotlin/Function0<kotlin/Unit>|): R|kotlin/Unit| {
|
||||
R|<local>/block1|.R|FakeOverride<kotlin/Function0.invoke: R|kotlin/Unit|>|()
|
||||
R|<local>/block2|.R|FakeOverride<kotlin/Function0.invoke: R|kotlin/Unit|>|()
|
||||
}
|
||||
public final fun test_6(): R|kotlin/Unit| {
|
||||
R|/myRun|(myRun@fun <anonymous>(): R|kotlin/Unit| <kind=UNKNOWN> {
|
||||
String(test_6_1)
|
||||
}
|
||||
, <L> = myRun@fun <anonymous>(): R|kotlin/Unit| <kind=UNKNOWN> {
|
||||
String(test_6_2)
|
||||
}
|
||||
)
|
||||
}
|
||||
public final fun test_7(): R|kotlin/Unit| {
|
||||
R|/myRun|(block2 = myRun@fun <anonymous>(): R|kotlin/Unit| <kind=UNKNOWN> {
|
||||
String(test_7_2)
|
||||
}
|
||||
, block1 = myRun@fun <anonymous>(): R|kotlin/Unit| <kind=UNKNOWN> {
|
||||
String(test_7_1)
|
||||
}
|
||||
)
|
||||
}
|
||||
public final fun myDummyRun(block: R|kotlin/Function0<kotlin/Unit>|): R|kotlin/Unit| {
|
||||
R|<local>/block|.R|FakeOverride<kotlin/Function0.invoke: R|kotlin/Unit|>|()
|
||||
}
|
||||
public final fun test_8(): R|kotlin/Unit| {
|
||||
R|/myDummyRun|(<L> = myDummyRun@fun <anonymous>(): R|kotlin/Unit| {
|
||||
String(test_8)
|
||||
}
|
||||
)
|
||||
}
|
||||
@@ -1,11 +1,11 @@
|
||||
FILE: mapList.kt
|
||||
public final fun main(): R|kotlin/Unit| {
|
||||
lval x: R|kotlin/collections/List<kotlin/Int>| = R|kotlin/collections/emptyList|<R|kotlin/Int|>()
|
||||
lval u: R|kotlin/collections/List<kotlin/Int>| = R|<local>/x|.R|kotlin/collections/map|<R|kotlin/Int|, R|kotlin/Int|>(<L> = map@fun <anonymous>(it: R|kotlin/Int|): R|kotlin/Int| <kind=EXACTLY_ONCE> {
|
||||
lval u: R|kotlin/collections/List<kotlin/Int>| = R|<local>/x|.R|kotlin/collections/map|<R|kotlin/Int|, R|kotlin/Int|>(<L> = map@fun <anonymous>(it: R|kotlin/Int|): R|kotlin/Int| <kind=UNKNOWN> {
|
||||
R|<local>/it|.R|kotlin/Int.plus|(R|<local>/it|)
|
||||
}
|
||||
)
|
||||
R|<local>/u|.R|/applyX|<R|kotlin/collections/List<kotlin/Int>|>(<L> = applyX@fun R|kotlin/collections/List<kotlin/Int>|.<anonymous>(it: R|kotlin/collections/List<kotlin/Int>|): R|kotlin/Unit| <kind=EXACTLY_ONCE> {
|
||||
R|<local>/u|.R|/applyX|<R|kotlin/collections/List<kotlin/Int>|>(<L> = applyX@fun R|kotlin/collections/List<kotlin/Int>|.<anonymous>(it: R|kotlin/collections/List<kotlin/Int>|): R|kotlin/Unit| <kind=UNKNOWN> {
|
||||
this@R|special/anonymous|.R|FakeOverride<kotlin/collections/List.contains: R|kotlin/Boolean|>|(Int(1))
|
||||
this@R|kotlin/collections/List|.R|FakeOverride<kotlin/collections/List.contains: R|kotlin/Boolean|>|(Int(1))
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
FILE: simpleLazy.kt
|
||||
public final val x: R|kotlin/String|by R|kotlin/lazy|<R|kotlin/String|>(<L> = lazy@fun <anonymous>(): R|kotlin/String| <kind=EXACTLY_ONCE> {
|
||||
public final val x: R|kotlin/String|by R|kotlin/lazy|<R|kotlin/String|>(<L> = lazy@fun <anonymous>(): R|kotlin/String| {
|
||||
String(Hello)
|
||||
}
|
||||
)
|
||||
@@ -8,7 +8,7 @@ FILE: simpleLazy.kt
|
||||
}
|
||||
public final fun foo(): R|kotlin/Unit| {
|
||||
R|/x|.R|kotlin/String.length|
|
||||
lval y: R|kotlin/String|by R|kotlin/lazy|<R|kotlin/String|>(<L> = lazy@fun <anonymous>(): R|kotlin/String| <kind=EXACTLY_ONCE> {
|
||||
lval y: R|kotlin/String|by R|kotlin/lazy|<R|kotlin/String|>(<L> = lazy@fun <anonymous>(): R|kotlin/String| {
|
||||
String(Bye)
|
||||
}
|
||||
)
|
||||
|
||||
@@ -19,24 +19,24 @@ FILE: topLevelResolve.kt
|
||||
^id R|<local>/arg|
|
||||
}
|
||||
public final fun testMap(): R|kotlin/Unit| {
|
||||
lval first: R|kotlin/collections/List<kotlin/Int>| = R|kotlin/collections/listOf|<R|kotlin/Int|>(Int(1), Int(2), Int(3)).R|kotlin/collections/map|<R|kotlin/Int|, R|kotlin/Int|>(<L> = map@fun <anonymous>(it: R|kotlin/Int|): R|kotlin/Int| <kind=EXACTLY_ONCE> {
|
||||
lval first: R|kotlin/collections/List<kotlin/Int>| = R|kotlin/collections/listOf|<R|kotlin/Int|>(Int(1), Int(2), Int(3)).R|kotlin/collections/map|<R|kotlin/Int|, R|kotlin/Int|>(<L> = map@fun <anonymous>(it: R|kotlin/Int|): R|kotlin/Int| <kind=UNKNOWN> {
|
||||
R|<local>/it|.R|kotlin/Int.times|(Int(2))
|
||||
}
|
||||
)
|
||||
lval second: R|kotlin/collections/List<kotlin/Int>| = R|kotlin/intArrayOf|(Int(4), Int(5), Int(6)).R|kotlin/collections/map|<R|kotlin/Int|>(<L> = map@fun <anonymous>(it: R|kotlin/Int|): R|kotlin/Int| <kind=EXACTLY_ONCE> {
|
||||
lval second: R|kotlin/collections/List<kotlin/Int>| = R|kotlin/intArrayOf|(Int(4), Int(5), Int(6)).R|kotlin/collections/map|<R|kotlin/Int|>(<L> = map@fun <anonymous>(it: R|kotlin/Int|): R|kotlin/Int| <kind=UNKNOWN> {
|
||||
R|<local>/it|.R|kotlin/Int.times|(Int(2))
|
||||
}
|
||||
)
|
||||
lval withId: R|kotlin/collections/List<kotlin/Int>| = R|kotlin/collections/listOf|<R|kotlin/Int|>(Int(1), Int(2), Int(3)).R|kotlin/collections/map|<R|kotlin/Int|, R|kotlin/Int|>(<L> = map@fun <anonymous>(it: R|kotlin/Int|): R|kotlin/Int| <kind=EXACTLY_ONCE> {
|
||||
lval withId: R|kotlin/collections/List<kotlin/Int>| = R|kotlin/collections/listOf|<R|kotlin/Int|>(Int(1), Int(2), Int(3)).R|kotlin/collections/map|<R|kotlin/Int|, R|kotlin/Int|>(<L> = map@fun <anonymous>(it: R|kotlin/Int|): R|kotlin/Int| <kind=UNKNOWN> {
|
||||
R|/id|<R|kotlin/Int|>(R|<local>/it|)
|
||||
}
|
||||
)
|
||||
lval stringToInt: R|kotlin/collections/List<kotlin/Int>| = R|kotlin/collections/listOf|<R|kotlin/String|>(String(alpha), String(omega)).R|kotlin/collections/map|<R|kotlin/String|, R|kotlin/Int|>(<L> = map@fun <anonymous>(it: R|kotlin/String|): R|kotlin/Int| <kind=EXACTLY_ONCE> {
|
||||
lval stringToInt: R|kotlin/collections/List<kotlin/Int>| = R|kotlin/collections/listOf|<R|kotlin/String|>(String(alpha), String(omega)).R|kotlin/collections/map|<R|kotlin/String|, R|kotlin/Int|>(<L> = map@fun <anonymous>(it: R|kotlin/String|): R|kotlin/Int| <kind=UNKNOWN> {
|
||||
R|<local>/it|.R|kotlin/String.length|
|
||||
}
|
||||
)
|
||||
lval viaWith: R|kotlin/collections/List<kotlin/Int>| = R|kotlin/with|<R|kotlin/collections/List<kotlin/Int>|, R|kotlin/collections/List<kotlin/Int>|>(R|kotlin/collections/listOf|<R|kotlin/Int|>(Int(42)), <L> = with@fun R|kotlin/collections/List<kotlin/Int>|.<anonymous>(it: R|kotlin/collections/List<kotlin/Int>|): R|kotlin/collections/List<kotlin/Int>| <kind=EXACTLY_ONCE> {
|
||||
this@R|special/anonymous|.R|kotlin/collections/map|<R|kotlin/Int|, R|kotlin/Int|>(<L> = map@fun <anonymous>(it: R|kotlin/Int|): R|kotlin/Int| <kind=EXACTLY_ONCE> {
|
||||
this@R|special/anonymous|.R|kotlin/collections/map|<R|kotlin/Int|, R|kotlin/Int|>(<L> = map@fun <anonymous>(it: R|kotlin/Int|): R|kotlin/Int| <kind=UNKNOWN> {
|
||||
R|<local>/it|.R|kotlin/Int.times|(R|<local>/it|)
|
||||
}
|
||||
)
|
||||
|
||||
@@ -19,7 +19,7 @@ FILE: whenAsReceiver.kt
|
||||
Null(null)
|
||||
}
|
||||
}
|
||||
?.<Inapplicable(WRONG_RECEIVER): [/also]>#(<L> = also@fun <implicit>.<anonymous>(): <implicit> <kind=EXACTLY_ONCE> {
|
||||
?.<Inapplicable(WRONG_RECEIVER): [/also]>#(<L> = also@fun <implicit>.<anonymous>(): <implicit> {
|
||||
Int(1)
|
||||
}
|
||||
)
|
||||
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
/*
|
||||
* 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.fir
|
||||
|
||||
import org.jetbrains.kotlin.cli.jvm.compiler.KotlinCoreEnvironment
|
||||
import org.jetbrains.kotlin.test.ConfigurationKind
|
||||
import org.jetbrains.kotlin.test.TestJdkKind
|
||||
|
||||
abstract class AbstractFirCfgBuildingWithStdlibTest : AbstractFirCfgBuildingTest() {
|
||||
override fun createEnvironment(): KotlinCoreEnvironment {
|
||||
return createEnvironmentWithJdk(ConfigurationKind.ALL, TestJdkKind.FULL_JDK)
|
||||
}
|
||||
}
|
||||
Generated
+35
@@ -0,0 +1,35 @@
|
||||
/*
|
||||
* 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.fir;
|
||||
|
||||
import com.intellij.testFramework.TestDataPath;
|
||||
import org.jetbrains.kotlin.test.JUnit3RunnerWithInners;
|
||||
import org.jetbrains.kotlin.test.KotlinTestUtils;
|
||||
import org.jetbrains.kotlin.test.TestMetadata;
|
||||
import org.junit.runner.RunWith;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
/** This class is generated by {@link org.jetbrains.kotlin.generators.tests.TestsPackage}. DO NOT MODIFY MANUALLY */
|
||||
@SuppressWarnings("all")
|
||||
@TestMetadata("compiler/fir/resolve/testData/resolve/stdlib/contracts")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public class FirCfgBuildingWithStdlibTestGenerated extends AbstractFirCfgBuildingWithStdlibTest {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInContracts() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/fir/resolve/testData/resolve/stdlib/contracts"), Pattern.compile("^([^.]+)\\.kt$"), true);
|
||||
}
|
||||
|
||||
@TestMetadata("callsInPlace.kt")
|
||||
public void testCallsInPlace() throws Exception {
|
||||
runTest("compiler/fir/resolve/testData/resolve/stdlib/contracts/callsInPlace.kt");
|
||||
}
|
||||
}
|
||||
Generated
+1
-1
@@ -25,7 +25,7 @@ public class FirResolveTestCaseWithStdlibGenerated extends AbstractFirResolveTes
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInStdlib() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/fir/resolve/testData/resolve/stdlib"), Pattern.compile("^([^.]+)\\.kt$"), true);
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/fir/resolve/testData/resolve/stdlib"), Pattern.compile("^([^.]+)\\.kt$"), true, "contracts");
|
||||
}
|
||||
|
||||
@TestMetadata("arrayFirstOrNull.kt")
|
||||
|
||||
@@ -506,14 +506,18 @@ fun main(args: Array<String>) {
|
||||
model("resolve", pattern = KT_WITHOUT_DOTS_IN_NAME, excludeDirs = listOf("stdlib", "cfg", "smartcasts"))
|
||||
}
|
||||
|
||||
testClass<AbstractFirResolveTestCaseWithStdlib> {
|
||||
model("resolve/stdlib", pattern = KT_WITHOUT_DOTS_IN_NAME)
|
||||
}
|
||||
|
||||
testClass<AbstractFirCfgBuildingTest> {
|
||||
model("resolve/cfg", pattern = KT_WITHOUT_DOTS_IN_NAME)
|
||||
model("resolve/smartcasts", pattern = KT_WITHOUT_DOTS_IN_NAME)
|
||||
}
|
||||
|
||||
testClass<AbstractFirResolveTestCaseWithStdlib> {
|
||||
model("resolve/stdlib", pattern = KT_WITHOUT_DOTS_IN_NAME, excludeDirs = listOf("contracts"))
|
||||
}
|
||||
|
||||
testClass<AbstractFirCfgBuildingWithStdlibTest> {
|
||||
model("resolve/stdlib/contracts", pattern = KT_WITHOUT_DOTS_IN_NAME)
|
||||
}
|
||||
}
|
||||
|
||||
testGroup("compiler/fir/resolve/tests", "compiler/testData") {
|
||||
|
||||
Reference in New Issue
Block a user