[LL API] Support code fragment compilation
This commit is contained in:
+4
@@ -0,0 +1,4 @@
|
||||
ContextReceiver[name: Foo; isMutated: false; displayText: this@Foo]
|
||||
context(R|Foo|)
|
||||
fun call(): R|kotlin/Unit|
|
||||
R|Foo|
|
||||
+1
@@ -0,0 +1 @@
|
||||
foo
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
MODULE_FRAGMENT name:<Sources of main>
|
||||
FILE fqName:<root> fileName:/fragment.kt
|
||||
CLASS CLASS name:CodeFragment modality:FINAL visibility:public superTypes:[kotlin.Any]
|
||||
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.CodeFragment
|
||||
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:<root>.Foo) returnType:kotlin.String
|
||||
VALUE_PARAMETER name:p0 index:0 type:<root>.Foo
|
||||
EXPRESSION_BODY
|
||||
BLOCK type=kotlin.String origin=null
|
||||
CALL 'public final fun <get-foo> (): kotlin.String declared in <root>.Foo' type=kotlin.String origin=GET_PROPERTY
|
||||
$this: GET_VAR 'p0: <root>.Foo declared in <root>.CodeFragment.run' type=<root>.Foo origin=null
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
fun test() {
|
||||
call(Foo())
|
||||
}
|
||||
|
||||
context(Foo)
|
||||
fun call() {
|
||||
<caret>val x = 0
|
||||
}
|
||||
|
||||
class Foo {
|
||||
val foo: String = "foo"
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
public final class CodeFragment {
|
||||
// source: 'fragment.kt'
|
||||
public method <init>(): void
|
||||
public final static method run(p0: Foo): java.lang.String
|
||||
}
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
ContextReceiver[name: Foo; isMutated: false; displayText: this@Foo]
|
||||
context(R|Foo|)
|
||||
fun call(): R|kotlin/Unit|
|
||||
R|Foo|
|
||||
+1
@@ -0,0 +1 @@
|
||||
this@Foo.foo
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
MODULE_FRAGMENT name:<Sources of main>
|
||||
FILE fqName:<root> fileName:/fragment.kt
|
||||
CLASS CLASS name:CodeFragment modality:FINAL visibility:public superTypes:[kotlin.Any]
|
||||
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.CodeFragment
|
||||
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:<root>.Foo) returnType:kotlin.String
|
||||
VALUE_PARAMETER name:p0 index:0 type:<root>.Foo
|
||||
EXPRESSION_BODY
|
||||
BLOCK type=kotlin.String origin=null
|
||||
CALL 'public final fun <get-foo> (): kotlin.String declared in <root>.Foo' type=kotlin.String origin=GET_PROPERTY
|
||||
$this: GET_VAR 'p0: <root>.Foo declared in <root>.CodeFragment.run' type=<root>.Foo origin=null
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
fun test() {
|
||||
call(Foo())
|
||||
}
|
||||
|
||||
context(Foo)
|
||||
fun call() {
|
||||
<caret>val x = 0
|
||||
}
|
||||
|
||||
class Foo {
|
||||
val foo: String = "foo"
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
public final class CodeFragment {
|
||||
// source: 'fragment.kt'
|
||||
public method <init>(): void
|
||||
public final static method run(p0: Foo): java.lang.String
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
ExtensionReceiver[name: with; isMutated: false; displayText: this@with]
|
||||
with@fun R|kotlin/String|.<anonymous>(): R|kotlin/Unit| <inline=Inline, kind=EXACTLY_ONCE>
|
||||
R|kotlin/String|
|
||||
ExtensionReceiver[name: with; isMutated: false; displayText: this@with]
|
||||
with@fun R|Foo|.<anonymous>(): R|kotlin/Unit| <inline=Inline, kind=EXACTLY_ONCE>
|
||||
R|Foo|
|
||||
+1
@@ -0,0 +1 @@
|
||||
length + foo.length
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
MODULE_FRAGMENT name:<Sources of main>
|
||||
FILE fqName:<root> fileName:/fragment.kt
|
||||
CLASS CLASS name:CodeFragment modality:FINAL visibility:public superTypes:[kotlin.Any]
|
||||
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.CodeFragment
|
||||
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.String, p1:<root>.Foo) returnType:kotlin.Int
|
||||
VALUE_PARAMETER name:p0 index:0 type:kotlin.String
|
||||
VALUE_PARAMETER name:p1 index:1 type:<root>.Foo
|
||||
EXPRESSION_BODY
|
||||
BLOCK type=kotlin.Int origin=null
|
||||
CALL 'public final fun plus (other: kotlin.Int): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=PLUS
|
||||
$this: CALL 'public open fun <get-length> (): kotlin.Int declared in kotlin.String' type=kotlin.Int origin=GET_PROPERTY
|
||||
$this: GET_VAR 'p0: kotlin.String declared in <root>.CodeFragment.run' type=kotlin.String origin=null
|
||||
other: CALL 'public open fun <get-length> (): kotlin.Int declared in kotlin.String' type=kotlin.Int origin=GET_PROPERTY
|
||||
$this: CALL 'public final fun <get-foo> (): kotlin.String declared in <root>.Foo' type=kotlin.String origin=GET_PROPERTY
|
||||
$this: GET_VAR 'p1: <root>.Foo declared in <root>.CodeFragment.run' type=<root>.Foo origin=null
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
fun test() {
|
||||
with("Hello, world!") {
|
||||
with(Foo()) {
|
||||
<caret>val x = 0
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class Foo {
|
||||
val foo: String = "foo"
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
public final class CodeFragment {
|
||||
// source: 'fragment.kt'
|
||||
public method <init>(): void
|
||||
public final static method run(p0: java.lang.String, p1: Foo): int
|
||||
}
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
ExtensionReceiver[name: with; isMutated: false; displayText: this@with]
|
||||
with@fun R|kotlin/String|.<anonymous>(): R|kotlin/Unit| <inline=Inline, kind=EXACTLY_ONCE>
|
||||
R|kotlin/String|
|
||||
+1
@@ -0,0 +1 @@
|
||||
this@with.length
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
MODULE_FRAGMENT name:<Sources of main>
|
||||
FILE fqName:<root> fileName:/fragment.kt
|
||||
CLASS CLASS name:CodeFragment modality:FINAL visibility:public superTypes:[kotlin.Any]
|
||||
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.CodeFragment
|
||||
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.String) returnType:kotlin.Int
|
||||
VALUE_PARAMETER name:p0 index:0 type:kotlin.String
|
||||
EXPRESSION_BODY
|
||||
BLOCK type=kotlin.Int origin=null
|
||||
CALL 'public open fun <get-length> (): kotlin.Int declared in kotlin.String' type=kotlin.Int origin=GET_PROPERTY
|
||||
$this: GET_VAR 'p0: kotlin.String declared in <root>.CodeFragment.run' type=kotlin.String origin=null
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
fun test() {
|
||||
with("Hello, world!") {
|
||||
<caret>val x = 0
|
||||
}
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
public final class CodeFragment {
|
||||
// source: 'fragment.kt'
|
||||
public method <init>(): void
|
||||
public final static method run(p0: java.lang.String): int
|
||||
}
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
ExtensionReceiver[name: str; isMutated: false; displayText: this@str]
|
||||
str@fun R|kotlin/String|.<anonymous>(): R|kotlin/Unit| <inline=Inline, kind=EXACTLY_ONCE>
|
||||
R|kotlin/String|
|
||||
+1
@@ -0,0 +1 @@
|
||||
this@str.length
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
MODULE_FRAGMENT name:<Sources of main>
|
||||
FILE fqName:<root> fileName:/fragment.kt
|
||||
CLASS CLASS name:CodeFragment modality:FINAL visibility:public superTypes:[kotlin.Any]
|
||||
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.CodeFragment
|
||||
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.String) returnType:kotlin.Int
|
||||
VALUE_PARAMETER name:p0 index:0 type:kotlin.String
|
||||
EXPRESSION_BODY
|
||||
BLOCK type=kotlin.Int origin=null
|
||||
CALL 'public open fun <get-length> (): kotlin.Int declared in kotlin.String' type=kotlin.Int origin=GET_PROPERTY
|
||||
$this: GET_VAR 'p0: kotlin.String declared in <root>.CodeFragment.run' type=kotlin.String origin=null
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
fun test() {
|
||||
with("Hello, world!") str@{
|
||||
<caret>val x = 0
|
||||
}
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
public final class CodeFragment {
|
||||
// source: 'fragment.kt'
|
||||
public method <init>(): void
|
||||
public final static method run(p0: java.lang.String): int
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
Local[name: a; isMutated: false; displayText: a]
|
||||
a: R|kotlin/Int|
|
||||
R|kotlin/Int|
|
||||
Local[name: b; isMutated: false; displayText: b]
|
||||
b: R|kotlin/String|
|
||||
R|kotlin/String|
|
||||
+1
@@ -0,0 +1 @@
|
||||
a + b.length
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
MODULE_FRAGMENT name:<Sources of main>
|
||||
FILE fqName:<root> fileName:/fragment.kt
|
||||
CLASS CLASS name:CodeFragment modality:FINAL visibility:public superTypes:[kotlin.Any]
|
||||
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.CodeFragment
|
||||
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.Int, p1:kotlin.String) returnType:kotlin.Int
|
||||
VALUE_PARAMETER name:p0 index:0 type:kotlin.Int
|
||||
VALUE_PARAMETER name:p1 index:1 type:kotlin.String
|
||||
EXPRESSION_BODY
|
||||
BLOCK type=kotlin.Int origin=null
|
||||
CALL 'public final fun plus (other: kotlin.Int): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=PLUS
|
||||
$this: GET_VAR 'p0: kotlin.Int declared in <root>.CodeFragment.run' type=kotlin.Int origin=null
|
||||
other: CALL 'public open fun <get-length> (): kotlin.Int declared in kotlin.String' type=kotlin.Int origin=GET_PROPERTY
|
||||
$this: GET_VAR 'p1: kotlin.String declared in <root>.CodeFragment.run' type=kotlin.String origin=null
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
class Foo(a: Int, b: String) {
|
||||
init {
|
||||
<caret>val x = 0
|
||||
}
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
public final class CodeFragment {
|
||||
// source: 'fragment.kt'
|
||||
public method <init>(): void
|
||||
public final static method run(p0: int, p1: java.lang.String): int
|
||||
}
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
Local[name: x; isMutated: false; displayText: x]
|
||||
lval x: R|kotlin/Int|
|
||||
R|kotlin/Int|
|
||||
+1
@@ -0,0 +1 @@
|
||||
x
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
MODULE_FRAGMENT name:<Sources of main>
|
||||
FILE fqName:<root> fileName:/fragment.kt
|
||||
CLASS CLASS name:CodeFragment modality:FINAL visibility:public superTypes:[kotlin.Any]
|
||||
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.CodeFragment
|
||||
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.Int) returnType:kotlin.Int
|
||||
VALUE_PARAMETER name:p0 index:0 type:kotlin.Int
|
||||
EXPRESSION_BODY
|
||||
BLOCK type=kotlin.Int origin=null
|
||||
GET_VAR 'p0: kotlin.Int declared in <root>.CodeFragment.run' type=kotlin.Int origin=null
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
fun test() {
|
||||
val x = 0
|
||||
<caret>val y = 0
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
public final class CodeFragment {
|
||||
// source: 'fragment.kt'
|
||||
public method <init>(): void
|
||||
public final static method run(p0: int): int
|
||||
}
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
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|
|
||||
Local[name: y; isMutated: false; displayText: y]
|
||||
lval y: R|kotlin/String|
|
||||
R|kotlin/String|
|
||||
+1
@@ -0,0 +1 @@
|
||||
call(x, y)
|
||||
+31
@@ -0,0 +1,31 @@
|
||||
MODULE_FRAGMENT name:<Sources of main>
|
||||
FILE fqName:<root> fileName:/localFunction.kt
|
||||
FUN name:test visibility:public modality:FINAL <> () returnType:kotlin.Unit
|
||||
BLOCK_BODY
|
||||
FUN LOCAL_FUNCTION name:call visibility:local modality:FINAL <> (a:kotlin.Int, b:kotlin.String) returnType:kotlin.Unit
|
||||
VALUE_PARAMETER name:a index:0 type:kotlin.Int
|
||||
VALUE_PARAMETER name:b index:1 type:kotlin.String
|
||||
BLOCK_BODY
|
||||
CALL 'public final fun println (message: kotlin.Any?): kotlin.Unit [inline] declared in kotlin.io' type=kotlin.Unit origin=null
|
||||
message: CALL 'public final fun repeat (n: kotlin.Int): kotlin.String declared in kotlin.text' type=kotlin.String origin=null
|
||||
$receiver: GET_VAR 'b: kotlin.String declared in <root>.test.call' type=kotlin.String origin=null
|
||||
n: GET_VAR 'a: kotlin.Int declared in <root>.test.call' type=kotlin.Int origin=null
|
||||
VAR name:x type:kotlin.Int [val]
|
||||
CONST Int type=kotlin.Int value=2
|
||||
VAR name:y type:kotlin.String [val]
|
||||
CONST String type=kotlin.String value="foo"
|
||||
VAR name:z type:kotlin.Unit [val]
|
||||
GET_OBJECT 'CLASS IR_EXTERNAL_DECLARATION_STUB OBJECT name:Unit modality:FINAL visibility:public superTypes:[kotlin.Any]' type=kotlin.Unit
|
||||
FILE fqName:<root> fileName:/fragment.kt
|
||||
CLASS CLASS name:CodeFragment modality:FINAL visibility:public superTypes:[kotlin.Any]
|
||||
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.CodeFragment
|
||||
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
|
||||
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
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
fun test() {
|
||||
fun call(a: Int, b: String) {
|
||||
println(b.repeat(a))
|
||||
}
|
||||
|
||||
val x = 2
|
||||
val y = "foo"
|
||||
<caret>val z = Unit
|
||||
}
|
||||
+7
@@ -0,0 +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 class LocalFunctionKt
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
Local[name: x; isMutated: true; displayText: x]
|
||||
lvar x: R|kotlin/Int|
|
||||
R|kotlin/Int|
|
||||
+1
@@ -0,0 +1 @@
|
||||
x = 1
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
MODULE_FRAGMENT name:<Sources of main>
|
||||
FILE fqName:<root> fileName:/fragment.kt
|
||||
CLASS CLASS name:CodeFragment modality:FINAL visibility:public superTypes:[kotlin.Any]
|
||||
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.CodeFragment
|
||||
CONSTRUCTOR visibility:public <> () returnType:<root>.CodeFragment [primary]
|
||||
BLOCK_BODY
|
||||
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in kotlin.Any'
|
||||
FUN name:generated_for_debugger_fun visibility:public modality:FINAL <> (p0:kotlin.Int) returnType:kotlin.Unit
|
||||
VALUE_PARAMETER SHARED_VARIABLE_IN_EVALUATOR_FRAGMENT name:p0 index:0 type:kotlin.Int [assignable]
|
||||
EXPRESSION_BODY
|
||||
BLOCK type=kotlin.Unit origin=null
|
||||
SET_VAR 'p0: kotlin.Int [assignable] declared in <root>.CodeFragment.generated_for_debugger_fun' type=kotlin.Unit origin=null
|
||||
CONST Int type=kotlin.Int value=1
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
fun test() {
|
||||
var x = 0
|
||||
<caret>val y = 0
|
||||
}
|
||||
|
||||
// FragmentSharedVariablesLowering depends on a specific function name
|
||||
// CODE_FRAGMENT_METHOD_NAME: generated_for_debugger_fun
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
public final class CodeFragment {
|
||||
// source: 'fragment.kt'
|
||||
public method <init>(): void
|
||||
public final static method generated_for_debugger_fun(p0: kotlin.jvm.internal.Ref$IntRef): void
|
||||
public final inner class kotlin/jvm/internal/Ref$IntRef
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
ContainingClass[name: <this>; isMutated: false; displayText: this@Foo]
|
||||
class Foo : R|kotlin/Any|
|
||||
R|Foo|
|
||||
ContainingClass[name: <this>; isMutated: false; displayText: this@Bar]
|
||||
class Bar : R|kotlin/Any|
|
||||
R|Foo.Bar|
|
||||
+1
@@ -0,0 +1 @@
|
||||
callFoo(this@Foo) + callString(a) + callString(b)
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
MODULE_FRAGMENT name:<Sources of main>
|
||||
FILE fqName:<root> fileName:/fragment.kt
|
||||
CLASS CLASS name:CodeFragment modality:FINAL visibility:public superTypes:[kotlin.Any]
|
||||
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.CodeFragment
|
||||
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:<root>.Foo, p1:<root>.Foo.Bar) returnType:kotlin.Int
|
||||
VALUE_PARAMETER name:p0 index:0 type:<root>.Foo
|
||||
VALUE_PARAMETER name:p1 index:1 type:<root>.Foo.Bar
|
||||
EXPRESSION_BODY
|
||||
BLOCK type=kotlin.Int origin=null
|
||||
CALL 'public final fun plus (other: kotlin.Int): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=PLUS
|
||||
$this: CALL 'public final fun plus (other: kotlin.Int): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=PLUS
|
||||
$this: CALL 'public final fun callFoo (foo: <root>.Foo): kotlin.Int declared in <root>.NestedOuterClassKt' type=kotlin.Int origin=null
|
||||
foo: GET_VAR 'p0: <root>.Foo declared in <root>.CodeFragment.run' type=<root>.Foo origin=null
|
||||
other: CALL 'public final fun callString (string: kotlin.String): kotlin.Int declared in <root>.NestedOuterClassKt' type=kotlin.Int origin=null
|
||||
string: CALL 'private final fun <get-a> (): kotlin.String declared in <root>.Foo' type=kotlin.String origin=GET_PROPERTY
|
||||
$this: GET_VAR 'p0: <root>.Foo declared in <root>.CodeFragment.run' type=<root>.Foo origin=null
|
||||
other: CALL 'public final fun callString (string: kotlin.String): kotlin.Int declared in <root>.NestedOuterClassKt' type=kotlin.Int origin=null
|
||||
string: CALL 'private final fun <get-b> (): kotlin.String declared in <root>.Foo.Bar' type=kotlin.String origin=GET_PROPERTY
|
||||
$this: GET_VAR 'p1: <root>.Foo.Bar declared in <root>.CodeFragment.run' type=<root>.Foo.Bar origin=null
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
class Foo {
|
||||
private val a: String = "foo"
|
||||
|
||||
inner class Bar {
|
||||
private val b: String = "bar"
|
||||
|
||||
fun test() {
|
||||
<caret>val x = 0
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fun callFoo(foo: Foo): Int {
|
||||
return 0
|
||||
}
|
||||
|
||||
fun callString(string: String): Int {
|
||||
return 1
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
public final class CodeFragment {
|
||||
// source: 'fragment.kt'
|
||||
public method <init>(): void
|
||||
public final static method run(p0: Foo, p1: Foo$Bar): int
|
||||
public final inner class Foo$Bar
|
||||
}
|
||||
+1
@@ -0,0 +1 @@
|
||||
No captured values
|
||||
+1
@@ -0,0 +1 @@
|
||||
call()
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
MODULE_FRAGMENT name:<Sources of main>
|
||||
FILE fqName:<root> fileName:/fragment.kt
|
||||
CLASS CLASS name:CodeFragment modality:FINAL visibility:public superTypes:[kotlin.Any]
|
||||
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.CodeFragment
|
||||
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 <> () returnType:kotlin.Unit
|
||||
EXPRESSION_BODY
|
||||
BLOCK type=kotlin.Unit origin=null
|
||||
CALL 'public final fun call (): kotlin.Unit declared in <root>.Foo' type=kotlin.Unit origin=null
|
||||
$this: GET_OBJECT 'CLASS OBJECT name:Foo modality:FINAL visibility:public superTypes:[kotlin.Any]' type=<root>.Foo
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
object Foo {
|
||||
fun test() {
|
||||
<caret>val x = 0
|
||||
}
|
||||
|
||||
fun call() {}
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
public final class CodeFragment {
|
||||
// source: 'fragment.kt'
|
||||
public method <init>(): void
|
||||
public final static method run(): void
|
||||
}
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
ContainingClass[name: <this>; isMutated: false; displayText: this@Test]
|
||||
class Test : R|kotlin/Any|
|
||||
R|Test|
|
||||
+1
@@ -0,0 +1 @@
|
||||
a.length
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
MODULE_FRAGMENT name:<Sources of main>
|
||||
FILE fqName:<root> fileName:/fragment.kt
|
||||
CLASS CLASS name:CodeFragment modality:FINAL visibility:public superTypes:[kotlin.Any]
|
||||
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.CodeFragment
|
||||
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:<root>.Test) returnType:kotlin.Int
|
||||
VALUE_PARAMETER name:p0 index:0 type:<root>.Test
|
||||
EXPRESSION_BODY
|
||||
BLOCK type=kotlin.Int origin=null
|
||||
CALL 'public open fun <get-length> (): kotlin.Int declared in kotlin.String' type=kotlin.Int origin=GET_PROPERTY
|
||||
$this: CALL 'public final fun <get-a> (): kotlin.String declared in <root>.Test' type=kotlin.String origin=GET_PROPERTY
|
||||
$this: GET_VAR 'p0: <root>.Test declared in <root>.CodeFragment.run' type=<root>.Test origin=null
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
class Test {
|
||||
val a: String = "foo"
|
||||
|
||||
fun test() {
|
||||
<caret>val x = 0
|
||||
}
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
public final class CodeFragment {
|
||||
// source: 'fragment.kt'
|
||||
public method <init>(): void
|
||||
public final static method run(p0: Test): int
|
||||
}
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
ContainingClass[name: <this>; isMutated: false; displayText: this@Test]
|
||||
class Test : R|kotlin/Any|
|
||||
R|Test|
|
||||
+1
@@ -0,0 +1 @@
|
||||
a = "bar"
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
MODULE_FRAGMENT name:<Sources of main>
|
||||
FILE fqName:<root> fileName:/fragment.kt
|
||||
CLASS CLASS name:CodeFragment modality:FINAL visibility:public superTypes:[kotlin.Any]
|
||||
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.CodeFragment
|
||||
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:<root>.Test) returnType:kotlin.Unit
|
||||
VALUE_PARAMETER name:p0 index:0 type:<root>.Test
|
||||
EXPRESSION_BODY
|
||||
BLOCK type=kotlin.Unit origin=null
|
||||
CALL 'public final fun <set-a> (value: kotlin.String): kotlin.Unit declared in <root>.Test' type=kotlin.Unit origin=EQ
|
||||
$this: GET_VAR 'p0: <root>.Test declared in <root>.CodeFragment.run' type=<root>.Test origin=null
|
||||
value: CONST String type=kotlin.String value="bar"
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
class Test {
|
||||
var a: String = "foo"
|
||||
|
||||
fun test() {
|
||||
<caret>val x = 0
|
||||
}
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
public final class CodeFragment {
|
||||
// source: 'fragment.kt'
|
||||
public method <init>(): void
|
||||
public final static method run(p0: Test): void
|
||||
}
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
ContainingClass[name: <this>; isMutated: false; displayText: this@Test]
|
||||
class Test : R|kotlin/Any|
|
||||
R|Test|
|
||||
+1
@@ -0,0 +1 @@
|
||||
a = "bar"
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
MODULE_FRAGMENT name:<Sources of main>
|
||||
FILE fqName:<root> fileName:/fragment.kt
|
||||
CLASS CLASS name:CodeFragment modality:FINAL visibility:public superTypes:[kotlin.Any]
|
||||
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.CodeFragment
|
||||
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:<root>.Test) returnType:kotlin.Unit
|
||||
VALUE_PARAMETER name:p0 index:0 type:<root>.Test
|
||||
EXPRESSION_BODY
|
||||
BLOCK type=kotlin.Unit origin=null
|
||||
CALL 'private final fun <set-a> (value: kotlin.String): kotlin.Unit declared in <root>.Test' type=kotlin.Unit origin=EQ
|
||||
$this: GET_VAR 'p0: <root>.Test declared in <root>.CodeFragment.run' type=<root>.Test origin=null
|
||||
value: CONST String type=kotlin.String value="bar"
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
class Test {
|
||||
private var a: String = "foo"
|
||||
|
||||
fun test() {
|
||||
<caret>val x = 0
|
||||
}
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
public final class CodeFragment {
|
||||
// source: 'fragment.kt'
|
||||
public method <init>(): void
|
||||
public final static method run(p0: Test): void
|
||||
}
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
Local[name: foo; isMutated: false; displayText: foo]
|
||||
foo: R|Foo?|
|
||||
R|Foo?|
|
||||
+1
@@ -0,0 +1 @@
|
||||
foo?.call()
|
||||
+24
@@ -0,0 +1,24 @@
|
||||
MODULE_FRAGMENT name:<Sources of main>
|
||||
FILE fqName:<root> fileName:/fragment.kt
|
||||
CLASS CLASS name:CodeFragment modality:FINAL visibility:public superTypes:[kotlin.Any]
|
||||
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.CodeFragment
|
||||
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:<root>.Foo?) returnType:kotlin.Unit?
|
||||
VALUE_PARAMETER name:p0 index:0 type:<root>.Foo?
|
||||
EXPRESSION_BODY
|
||||
BLOCK type=kotlin.Unit? origin=null
|
||||
BLOCK type=kotlin.Unit? origin=SAFE_CALL
|
||||
VAR IR_TEMPORARY_VARIABLE name:tmp_0 type:<root>.Foo? [val]
|
||||
GET_VAR 'p0: <root>.Foo? declared in <root>.CodeFragment.run' type=<root>.Foo? origin=null
|
||||
WHEN type=kotlin.Unit? origin=null
|
||||
BRANCH
|
||||
if: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQ
|
||||
arg0: GET_VAR 'val tmp_0: <root>.Foo? [val] declared in <root>.CodeFragment.run' type=<root>.Foo? origin=null
|
||||
arg1: CONST Null type=kotlin.Nothing? value=null
|
||||
then: CONST Null type=kotlin.Nothing? value=null
|
||||
BRANCH
|
||||
if: CONST Boolean type=kotlin.Boolean value=true
|
||||
then: CALL 'public final fun call (): kotlin.Unit declared in <root>.Foo' type=kotlin.Unit origin=null
|
||||
$this: GET_VAR 'val tmp_0: <root>.Foo? [val] declared in <root>.CodeFragment.run' type=<root>.Foo? origin=null
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
fun test(foo: Foo?) {
|
||||
<caret>val x = 0
|
||||
}
|
||||
|
||||
class Foo {
|
||||
fun call() {}
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
public final class CodeFragment {
|
||||
// source: 'fragment.kt'
|
||||
public method <init>(): void
|
||||
public final static method run(p0: Foo): kotlin.Unit
|
||||
}
|
||||
Reference in New Issue
Block a user