IrOperator -> IrStatementOrigin

This commit is contained in:
Dmitry Petrov
2016-09-14 11:25:16 +03:00
committed by Dmitry Petrov
parent 5386d27284
commit a8a6477ce5
150 changed files with 2234 additions and 2297 deletions
+4 -4
View File
@@ -2,12 +2,12 @@ FILE /anonymousFunction.kt
PROPERTY public val anonymous: () -> kotlin.Unit
FIELD PROPERTY_BACKING_FIELD public val anonymous: () -> kotlin.Unit
EXPRESSION_BODY
BLOCK type=() -> kotlin.Unit operator=ANONYMOUS_FUNCTION
BLOCK type=() -> kotlin.Unit origin=ANONYMOUS_FUNCTION
FUN local final fun <no name provided>(): kotlin.Unit
BLOCK_BODY
CALL 'println(): Unit' type=kotlin.Unit operator=null
CALLABLE_REFERENCE '<no name provided>(): Unit' type=() -> kotlin.Unit operator=ANONYMOUS_FUNCTION
CALL 'println(): Unit' type=kotlin.Unit origin=null
CALLABLE_REFERENCE '<no name provided>(): Unit' type=() -> kotlin.Unit origin=ANONYMOUS_FUNCTION
FUN DEFAULT_PROPERTY_ACCESSOR public fun <get-anonymous>(): () -> kotlin.Unit
BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-anonymous>(): () -> Unit'
GET_BACKING_FIELD 'anonymous: () -> Unit' type=() -> kotlin.Unit operator=null
GET_BACKING_FIELD 'anonymous: () -> Unit' type=() -> kotlin.Unit origin=null
+4 -4
View File
@@ -2,12 +2,12 @@ FILE /extensionLambda.kt
FUN public fun test1(): kotlin.Int
BLOCK_BODY
RETURN type=kotlin.Nothing from='test1(): Int'
CALL 'run(String.() -> Int) on String: Int' type=kotlin.Int operator=null
CALL 'run(String.() -> Int) on String: Int' type=kotlin.Int origin=null
$receiver: CONST String type=kotlin.String value='42'
block: BLOCK type=kotlin.String.() -> kotlin.Int operator=LAMBDA
block: BLOCK type=kotlin.String.() -> kotlin.Int origin=LAMBDA
FUN LOCAL_FUNCTION_FOR_LAMBDA local final fun kotlin.String.<anonymous>(): kotlin.Int
BLOCK_BODY
RETURN type=kotlin.Nothing from='<anonymous>() on String: Int'
CALL '<get-length>(): Int' type=kotlin.Int operator=GET_PROPERTY
CALL '<get-length>(): Int' type=kotlin.Int origin=GET_PROPERTY
$this: $RECEIVER of '<anonymous>() on String: Int' type=kotlin.String
CALLABLE_REFERENCE '<anonymous>() on String: Int' type=kotlin.String.() -> kotlin.Int operator=LAMBDA
CALLABLE_REFERENCE '<anonymous>() on String: Int' type=kotlin.String.() -> kotlin.Int origin=LAMBDA
+6 -6
View File
@@ -2,25 +2,25 @@ FILE /justLambda.kt
PROPERTY public val test1: () -> kotlin.Int
FIELD PROPERTY_BACKING_FIELD public val test1: () -> kotlin.Int
EXPRESSION_BODY
BLOCK type=() -> kotlin.Int operator=LAMBDA
BLOCK type=() -> kotlin.Int origin=LAMBDA
FUN LOCAL_FUNCTION_FOR_LAMBDA local final fun <anonymous>(): kotlin.Int
BLOCK_BODY
RETURN type=kotlin.Nothing from='<anonymous>(): Int'
CONST Int type=kotlin.Int value='42'
CALLABLE_REFERENCE '<anonymous>(): Int' type=() -> kotlin.Int operator=LAMBDA
CALLABLE_REFERENCE '<anonymous>(): Int' type=() -> kotlin.Int origin=LAMBDA
FUN DEFAULT_PROPERTY_ACCESSOR public fun <get-test1>(): () -> kotlin.Int
BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-test1>(): () -> Int'
GET_BACKING_FIELD 'test1: () -> Int' type=() -> kotlin.Int operator=null
GET_BACKING_FIELD 'test1: () -> Int' type=() -> kotlin.Int origin=null
PROPERTY public val test2: () -> kotlin.Unit
FIELD PROPERTY_BACKING_FIELD public val test2: () -> kotlin.Unit
EXPRESSION_BODY
BLOCK type=() -> kotlin.Unit operator=LAMBDA
BLOCK type=() -> kotlin.Unit origin=LAMBDA
FUN LOCAL_FUNCTION_FOR_LAMBDA local final fun <anonymous>(): kotlin.Unit
BLOCK_BODY
RETURN type=kotlin.Nothing from='<anonymous>(): Unit'
CALLABLE_REFERENCE '<anonymous>(): Unit' type=() -> kotlin.Unit operator=LAMBDA
CALLABLE_REFERENCE '<anonymous>(): Unit' type=() -> kotlin.Unit origin=LAMBDA
FUN DEFAULT_PROPERTY_ACCESSOR public fun <get-test2>(): () -> kotlin.Unit
BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-test2>(): () -> Unit'
GET_BACKING_FIELD 'test2: () -> Unit' type=() -> kotlin.Unit operator=null
GET_BACKING_FIELD 'test2: () -> Unit' type=() -> kotlin.Unit origin=null
+7 -7
View File
@@ -5,11 +5,11 @@ FILE /localFunction.kt
CONST Int type=kotlin.Int value='0'
FUN local final fun local(): kotlin.Unit
BLOCK_BODY
BLOCK type=kotlin.Int operator=POSTFIX_INCR
BLOCK type=kotlin.Int origin=POSTFIX_INCR
VAR IR_TEMPORARY_VARIABLE val tmp0: kotlin.Int
GET_VAR 'x: Int' type=kotlin.Int operator=POSTFIX_INCR
SET_VAR 'x: Int' type=kotlin.Unit operator=POSTFIX_INCR
CALL 'inc(): Int' type=kotlin.Int operator=POSTFIX_INCR
$this: GET_VAR 'tmp0: Int' type=kotlin.Int operator=null
GET_VAR 'tmp0: Int' type=kotlin.Int operator=null
CALL 'local(): Unit' type=kotlin.Unit operator=null
GET_VAR 'x: Int' type=kotlin.Int origin=POSTFIX_INCR
SET_VAR 'x: Int' type=kotlin.Unit origin=POSTFIX_INCR
CALL 'inc(): Int' type=kotlin.Int origin=POSTFIX_INCR
$this: GET_VAR 'tmp0: Int' type=kotlin.Int origin=null
GET_VAR 'tmp0: Int' type=kotlin.Int origin=null
CALL 'local(): Unit' type=kotlin.Unit origin=null
@@ -22,29 +22,29 @@ FILE /multipleImplicitReceivers.kt
CONST Int type=kotlin.Int value='42'
FUN public fun test(fooImpl: IFoo, invokeImpl: IInvoke): kotlin.Unit
BLOCK_BODY
CALL 'with(A, A.() -> Int): Int' type=kotlin.Int operator=null
CALL 'with(A, A.() -> Int): Int' type=kotlin.Int origin=null
receiver: GET_OBJECT 'A' type=A
block: BLOCK type=A.() -> kotlin.Int operator=LAMBDA
block: BLOCK type=A.() -> kotlin.Int origin=LAMBDA
FUN LOCAL_FUNCTION_FOR_LAMBDA local final fun A.<anonymous>(): kotlin.Int
BLOCK_BODY
RETURN type=kotlin.Nothing from='<anonymous>() on A: Int'
CALL 'with(IFoo, IFoo.() -> Int): Int' type=kotlin.Int operator=null
receiver: GET_VAR 'value-parameter fooImpl: IFoo' type=IFoo operator=null
block: BLOCK type=IFoo.() -> kotlin.Int operator=LAMBDA
CALL 'with(IFoo, IFoo.() -> Int): Int' type=kotlin.Int origin=null
receiver: GET_VAR 'value-parameter fooImpl: IFoo' type=IFoo origin=null
block: BLOCK type=IFoo.() -> kotlin.Int origin=LAMBDA
FUN LOCAL_FUNCTION_FOR_LAMBDA local final fun IFoo.<anonymous>(): kotlin.Int
BLOCK_BODY
RETURN type=kotlin.Nothing from='<anonymous>() on IFoo: Int'
CALL 'with(IInvoke, IInvoke.() -> Int): Int' type=kotlin.Int operator=null
receiver: GET_VAR 'value-parameter invokeImpl: IInvoke' type=IInvoke operator=null
block: BLOCK type=IInvoke.() -> kotlin.Int operator=LAMBDA
CALL 'with(IInvoke, IInvoke.() -> Int): Int' type=kotlin.Int origin=null
receiver: GET_VAR 'value-parameter invokeImpl: IInvoke' type=IInvoke origin=null
block: BLOCK type=IInvoke.() -> kotlin.Int origin=LAMBDA
FUN LOCAL_FUNCTION_FOR_LAMBDA local final fun IInvoke.<anonymous>(): kotlin.Int
BLOCK_BODY
RETURN type=kotlin.Nothing from='<anonymous>() on IInvoke: Int'
CALL 'invoke() on B: Int' type=kotlin.Int operator=INVOKE
CALL 'invoke() on B: Int' type=kotlin.Int origin=INVOKE
$this: $RECEIVER of '<anonymous>() on IInvoke: Int' type=IInvoke
$receiver: CALL '<get-foo>() on A: B' type=B operator=GET_PROPERTY
$receiver: CALL '<get-foo>() on A: B' type=B origin=GET_PROPERTY
$this: $RECEIVER of '<anonymous>() on IFoo: Int' type=IFoo
$receiver: $RECEIVER of '<anonymous>() on A: Int' type=A
CALLABLE_REFERENCE '<anonymous>() on IInvoke: Int' type=IInvoke.() -> kotlin.Int operator=LAMBDA
CALLABLE_REFERENCE '<anonymous>() on IFoo: Int' type=IFoo.() -> kotlin.Int operator=LAMBDA
CALLABLE_REFERENCE '<anonymous>() on A: Int' type=A.() -> kotlin.Int operator=LAMBDA
CALLABLE_REFERENCE '<anonymous>() on IInvoke: Int' type=IInvoke.() -> kotlin.Int origin=LAMBDA
CALLABLE_REFERENCE '<anonymous>() on IFoo: Int' type=IFoo.() -> kotlin.Int origin=LAMBDA
CALLABLE_REFERENCE '<anonymous>() on A: Int' type=A.() -> kotlin.Int origin=LAMBDA
+27 -27
View File
@@ -1,57 +1,57 @@
FILE /nonLocalReturn.kt
FUN public fun test0(): kotlin.Unit
BLOCK_BODY
CALL 'run(() -> Nothing): Nothing' type=kotlin.Nothing operator=null
block: BLOCK type=() -> kotlin.Nothing operator=LAMBDA
CALL 'run(() -> Nothing): Nothing' type=kotlin.Nothing origin=null
block: BLOCK type=() -> kotlin.Nothing origin=LAMBDA
FUN LOCAL_FUNCTION_FOR_LAMBDA local final fun <anonymous>(): kotlin.Nothing
BLOCK_BODY
RETURN type=kotlin.Nothing from='test0(): Unit'
CALLABLE_REFERENCE '<anonymous>(): Nothing' type=() -> kotlin.Nothing operator=LAMBDA
CALLABLE_REFERENCE '<anonymous>(): Nothing' type=() -> kotlin.Nothing origin=LAMBDA
FUN public fun test1(): kotlin.Unit
BLOCK_BODY
CALL 'run(() -> Unit): Unit' type=kotlin.Unit operator=null
block: BLOCK type=() -> kotlin.Unit operator=LAMBDA
CALL 'run(() -> Unit): Unit' type=kotlin.Unit origin=null
block: BLOCK type=() -> kotlin.Unit origin=LAMBDA
FUN LOCAL_FUNCTION_FOR_LAMBDA local final fun <anonymous>(): kotlin.Unit
BLOCK_BODY
RETURN type=kotlin.Nothing from='<anonymous>(): Unit'
CALLABLE_REFERENCE '<anonymous>(): Unit' type=() -> kotlin.Unit operator=LAMBDA
CALLABLE_REFERENCE '<anonymous>(): Unit' type=() -> kotlin.Unit origin=LAMBDA
FUN public fun test2(): kotlin.Unit
BLOCK_BODY
CALL 'run(() -> Unit): Unit' type=kotlin.Unit operator=null
block: BLOCK type=() -> kotlin.Unit operator=LAMBDA
CALL 'run(() -> Unit): Unit' type=kotlin.Unit origin=null
block: BLOCK type=() -> kotlin.Unit origin=LAMBDA
FUN LOCAL_FUNCTION_FOR_LAMBDA local final fun <anonymous>(): kotlin.Unit
BLOCK_BODY
RETURN type=kotlin.Nothing from='<anonymous>(): Unit'
CALLABLE_REFERENCE '<anonymous>(): Unit' type=() -> kotlin.Unit operator=LAMBDA
CALLABLE_REFERENCE '<anonymous>(): Unit' type=() -> kotlin.Unit origin=LAMBDA
FUN public fun testLrmFoo1(ints: kotlin.collections.List<kotlin.Int>): kotlin.Unit
BLOCK_BODY
CALL 'forEach((Int) -> Unit) on Iterable<Int>: Unit' type=kotlin.Unit operator=null
$receiver: GET_VAR 'value-parameter ints: List<Int>' type=kotlin.collections.List<kotlin.Int> operator=null
action: BLOCK type=(kotlin.Int) -> kotlin.Unit operator=LAMBDA
CALL 'forEach((Int) -> Unit) on Iterable<Int>: Unit' type=kotlin.Unit origin=null
$receiver: GET_VAR 'value-parameter ints: List<Int>' type=kotlin.collections.List<kotlin.Int> origin=null
action: BLOCK type=(kotlin.Int) -> kotlin.Unit origin=LAMBDA
FUN LOCAL_FUNCTION_FOR_LAMBDA local final fun <anonymous>(it: kotlin.Int): kotlin.Unit
BLOCK_BODY
WHEN type=kotlin.Unit operator=IF
if: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean operator=EQEQ
arg0: GET_VAR 'value-parameter it: Int' type=kotlin.Int operator=null
WHEN type=kotlin.Unit origin=IF
if: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean origin=EQEQ
arg0: GET_VAR 'value-parameter it: Int' type=kotlin.Int origin=null
arg1: CONST Int type=kotlin.Int value='0'
then: RETURN type=kotlin.Nothing from='<anonymous>(Int): Unit'
RETURN type=kotlin.Nothing from='<anonymous>(Int): Unit'
CALL 'print(Int): Unit' type=kotlin.Unit operator=null
message: GET_VAR 'value-parameter it: Int' type=kotlin.Int operator=null
CALLABLE_REFERENCE '<anonymous>(Int): Unit' type=(kotlin.Int) -> kotlin.Unit operator=LAMBDA
CALL 'print(Int): Unit' type=kotlin.Unit origin=null
message: GET_VAR 'value-parameter it: Int' type=kotlin.Int origin=null
CALLABLE_REFERENCE '<anonymous>(Int): Unit' type=(kotlin.Int) -> kotlin.Unit origin=LAMBDA
FUN public fun testLrmFoo2(ints: kotlin.collections.List<kotlin.Int>): kotlin.Unit
BLOCK_BODY
CALL 'forEach((Int) -> Unit) on Iterable<Int>: Unit' type=kotlin.Unit operator=null
$receiver: GET_VAR 'value-parameter ints: List<Int>' type=kotlin.collections.List<kotlin.Int> operator=null
action: BLOCK type=(kotlin.Int) -> kotlin.Unit operator=LAMBDA
CALL 'forEach((Int) -> Unit) on Iterable<Int>: Unit' type=kotlin.Unit origin=null
$receiver: GET_VAR 'value-parameter ints: List<Int>' type=kotlin.collections.List<kotlin.Int> origin=null
action: BLOCK type=(kotlin.Int) -> kotlin.Unit origin=LAMBDA
FUN LOCAL_FUNCTION_FOR_LAMBDA local final fun <anonymous>(it: kotlin.Int): kotlin.Unit
BLOCK_BODY
WHEN type=kotlin.Unit operator=IF
if: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean operator=EQEQ
arg0: GET_VAR 'value-parameter it: Int' type=kotlin.Int operator=null
WHEN type=kotlin.Unit origin=IF
if: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean origin=EQEQ
arg0: GET_VAR 'value-parameter it: Int' type=kotlin.Int origin=null
arg1: CONST Int type=kotlin.Int value='0'
then: RETURN type=kotlin.Nothing from='<anonymous>(Int): Unit'
RETURN type=kotlin.Nothing from='<anonymous>(Int): Unit'
CALL 'print(Int): Unit' type=kotlin.Unit operator=null
message: GET_VAR 'value-parameter it: Int' type=kotlin.Int operator=null
CALLABLE_REFERENCE '<anonymous>(Int): Unit' type=(kotlin.Int) -> kotlin.Unit operator=LAMBDA
CALL 'print(Int): Unit' type=kotlin.Unit origin=null
message: GET_VAR 'value-parameter it: Int' type=kotlin.Int origin=null
CALLABLE_REFERENCE '<anonymous>(Int): Unit' type=(kotlin.Int) -> kotlin.Unit origin=LAMBDA
+6 -6
View File
@@ -2,13 +2,13 @@ FILE /samAdapter.kt
FUN public fun test1(): kotlin.Unit
BLOCK_BODY
VAR val hello: java.lang.Runnable
CALL 'Runnable(() -> Unit): Runnable' type=java.lang.Runnable operator=null
function: BLOCK type=() -> kotlin.Unit operator=LAMBDA
CALL 'Runnable(() -> Unit): Runnable' type=java.lang.Runnable origin=null
function: BLOCK type=() -> kotlin.Unit origin=LAMBDA
FUN LOCAL_FUNCTION_FOR_LAMBDA local final fun <anonymous>(): kotlin.Unit
BLOCK_BODY
RETURN type=kotlin.Nothing from='<anonymous>(): Unit'
CALL 'println(Any?): Unit' type=kotlin.Unit operator=null
CALL 'println(Any?): Unit' type=kotlin.Unit origin=null
message: CONST String type=kotlin.String value='Hello, world!'
CALLABLE_REFERENCE '<anonymous>(): Unit' type=() -> kotlin.Unit operator=LAMBDA
CALL 'run(): Unit' type=kotlin.Unit operator=null
$this: GET_VAR 'hello: Runnable' type=java.lang.Runnable operator=null
CALLABLE_REFERENCE '<anonymous>(): Unit' type=() -> kotlin.Unit origin=LAMBDA
CALL 'run(): Unit' type=kotlin.Unit origin=null
$this: GET_VAR 'hello: Runnable' type=java.lang.Runnable origin=null