[LL API] Ignore local functions in 'CodeFragmentDeclarationCollector'
In the old JVM backend, local functions were compiled as JVM classes, so there were an instance to pass around. Today, they are compiled to static functions in the containing class/facade, and calls to them compile natively.
This commit is contained in:
-3
@@ -1,6 +1,3 @@
|
||||
LocalFunction[name: call; isMutated: false; displayText: call]
|
||||
fun call(a: R|kotlin/Int|, b: R|kotlin/String|): R|kotlin/Unit|
|
||||
R|(kotlin/Int, kotlin/String) -> kotlin/Unit|
|
||||
Local[name: x; isMutated: false; displayText: x]
|
||||
lval x: R|kotlin/Int|
|
||||
R|kotlin/Int|
|
||||
|
||||
+6
-5
@@ -22,10 +22,11 @@ MODULE_FRAGMENT name:<Sources of main>
|
||||
CONSTRUCTOR visibility:public <> () returnType:<root>.CodeFragment [primary]
|
||||
BLOCK_BODY
|
||||
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in kotlin.Any'
|
||||
FUN name:run visibility:public modality:FINAL <> (p0:kotlin.Function2<kotlin.Int, kotlin.String, kotlin.Unit>, p1:kotlin.Int, p2:kotlin.String) returnType:kotlin.Unit
|
||||
VALUE_PARAMETER name:p0 index:0 type:kotlin.Function2<kotlin.Int, kotlin.String, kotlin.Unit>
|
||||
VALUE_PARAMETER name:p1 index:1 type:kotlin.Int
|
||||
VALUE_PARAMETER name:p2 index:2 type:kotlin.String
|
||||
FUN name:run visibility:public modality:FINAL <> (p0:kotlin.Int, p1:kotlin.String) returnType:kotlin.Unit
|
||||
VALUE_PARAMETER name:p0 index:0 type:kotlin.Int
|
||||
VALUE_PARAMETER name:p1 index:1 type:kotlin.String
|
||||
EXPRESSION_BODY
|
||||
BLOCK type=kotlin.Unit origin=null
|
||||
GET_VAR 'p0: kotlin.Function2<kotlin.Int, kotlin.String, kotlin.Unit> declared in <root>.CodeFragment.run' type=kotlin.Function2<kotlin.Int, kotlin.String, kotlin.Unit> origin=null
|
||||
CALL 'local final fun call (a: kotlin.Int, b: kotlin.String): kotlin.Unit declared in <root>.test' type=kotlin.Unit origin=null
|
||||
a: GET_VAR 'p0: kotlin.Int declared in <root>.CodeFragment.run' type=kotlin.Int origin=null
|
||||
b: GET_VAR 'p1: kotlin.String declared in <root>.CodeFragment.run' type=kotlin.String origin=null
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
public final class CodeFragment {
|
||||
// source: 'fragment.kt'
|
||||
public method <init>(): void
|
||||
public final static method run(p0: kotlin.jvm.functions.Function2, p1: int, p2: java.lang.String): void
|
||||
public final static method run(p0: int, p1: java.lang.String): void
|
||||
}
|
||||
|
||||
public final class LocalFunctionKt
|
||||
Reference in New Issue
Block a user