Minor: move callable reference IR tests to a separate directory
This commit is contained in:
+74
@@ -0,0 +1,74 @@
|
||||
FILE fqName:<root> fileName:/withVarargViewedAsArray.kt
|
||||
FUN name:sum visibility:public modality:FINAL <> (args:kotlin.IntArray) returnType:kotlin.Int
|
||||
VALUE_PARAMETER name:args index:0 type:kotlin.IntArray
|
||||
BLOCK_BODY
|
||||
VAR name:result type:kotlin.Int [var]
|
||||
CONST Int type=kotlin.Int value=0
|
||||
VAR IR_TEMPORARY_VARIABLE name:tmp_0 type:kotlin.IntArray [val]
|
||||
GET_VAR 'args: kotlin.IntArray declared in <root>.sum' type=kotlin.IntArray origin=null
|
||||
VAR IR_TEMPORARY_VARIABLE name:tmp_1 type:kotlin.collections.IntIterator [val]
|
||||
CALL 'public final fun iterator (): kotlin.collections.IntIterator [operator] declared in kotlin.IntArray' type=kotlin.collections.IntIterator origin=null
|
||||
$this: GET_VAR 'val tmp_0: kotlin.IntArray [val] declared in <root>.sum' type=kotlin.IntArray origin=null
|
||||
WHILE label=null origin=FOR_LOOP_INNER_WHILE
|
||||
condition: CALL 'public abstract fun hasNext (): kotlin.Boolean [operator] declared in kotlin.collections.Iterator' type=kotlin.Boolean origin=null
|
||||
$this: GET_VAR 'val tmp_1: kotlin.collections.IntIterator [val] declared in <root>.sum' type=kotlin.collections.IntIterator origin=null
|
||||
body: BLOCK type=kotlin.Unit origin=null
|
||||
VAR name:arg type:kotlin.Int [val]
|
||||
CALL 'public final fun next (): kotlin.Int [operator] declared in kotlin.collections.IntIterator' type=kotlin.Int origin=null
|
||||
$this: GET_VAR 'val tmp_1: kotlin.collections.IntIterator [val] declared in <root>.sum' type=kotlin.collections.IntIterator origin=null
|
||||
SET_VAR 'var result: kotlin.Int [var] declared in <root>.sum' type=kotlin.Int origin=null
|
||||
CALL 'public final fun plus (other: kotlin.Int): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=null
|
||||
$this: GET_VAR 'var result: kotlin.Int [var] declared in <root>.sum' type=kotlin.Int origin=null
|
||||
other: GET_VAR 'val arg: kotlin.Int [val] declared in <root>.sum' type=kotlin.Int origin=null
|
||||
RETURN type=kotlin.Nothing from='public final fun sum (args: kotlin.IntArray): kotlin.Int declared in <root>'
|
||||
GET_VAR 'var result: kotlin.Int [var] declared in <root>.sum' type=kotlin.Int origin=null
|
||||
FUN name:nsum visibility:public modality:FINAL <> (args:kotlin.Array<kotlin.Number>) returnType:kotlin.Int
|
||||
VALUE_PARAMETER name:args index:0 type:kotlin.Array<kotlin.Number>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public final fun nsum (args: kotlin.Array<kotlin.Number>): kotlin.Int declared in <root>'
|
||||
CALL 'public final fun sum (args: kotlin.IntArray): kotlin.Int declared in <root>' type=kotlin.Int origin=null
|
||||
args: CONSTRUCTOR_CALL 'public constructor <init> (size: kotlin.Int, init: kotlin.Function1<kotlin.Int, kotlin.Int>) declared in kotlin.IntArray' type=kotlin.IntArray origin=null
|
||||
size: CALL 'public final fun <get-size> (): kotlin.Int declared in kotlin.Array' type=kotlin.Int origin=null
|
||||
$this: GET_VAR 'args: kotlin.Array<kotlin.Number> declared in <root>.nsum' type=kotlin.Array<kotlin.Number> origin=null
|
||||
init: FUN_EXPR type=kotlin.Function1<kotlin.Int, kotlin.Int> origin=LAMBDA
|
||||
FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> (it:kotlin.Int) returnType:kotlin.Int
|
||||
VALUE_PARAMETER name:it index:0 type:kotlin.Int
|
||||
BLOCK_BODY
|
||||
CALL 'public abstract fun toInt (): kotlin.Int declared in kotlin.Number' type=kotlin.Int origin=null
|
||||
$this: CALL 'public final fun get (index: kotlin.Int): kotlin.Number [operator] declared in kotlin.Array' type=kotlin.Number origin=null
|
||||
$this: GET_VAR 'args: kotlin.Array<kotlin.Number> declared in <root>.nsum' type=kotlin.Array<kotlin.Number> origin=null
|
||||
index: GET_VAR 'it: kotlin.Int declared in <root>.nsum.<anonymous>' type=kotlin.Int origin=null
|
||||
FUN name:zap visibility:public modality:FINAL <> (b:kotlin.Array<kotlin.String>, k:kotlin.Int) returnType:kotlin.Unit
|
||||
VALUE_PARAMETER name:b index:0 type:kotlin.Array<kotlin.String>
|
||||
VALUE_PARAMETER name:k index:1 type:kotlin.Int
|
||||
EXPRESSION_BODY
|
||||
CONST Int type=kotlin.Int value=42
|
||||
BLOCK_BODY
|
||||
FUN name:usePlainArgs visibility:public modality:FINAL <> (fn:kotlin.Function2<kotlin.Int, kotlin.Int, kotlin.Int>) returnType:kotlin.Unit
|
||||
VALUE_PARAMETER name:fn index:0 type:kotlin.Function2<kotlin.Int, kotlin.Int, kotlin.Int>
|
||||
BLOCK_BODY
|
||||
FUN name:usePrimitiveArray visibility:public modality:FINAL <> (fn:kotlin.Function1<kotlin.IntArray, kotlin.Int>) returnType:kotlin.Unit
|
||||
VALUE_PARAMETER name:fn index:0 type:kotlin.Function1<kotlin.IntArray, kotlin.Int>
|
||||
BLOCK_BODY
|
||||
FUN name:useArray visibility:public modality:FINAL <> (fn:kotlin.Function1<kotlin.Array<kotlin.Int>, kotlin.Int>) returnType:kotlin.Unit
|
||||
VALUE_PARAMETER name:fn index:0 type:kotlin.Function1<kotlin.Array<kotlin.Int>, kotlin.Int>
|
||||
BLOCK_BODY
|
||||
FUN name:useStringArray visibility:public modality:FINAL <> (fn:kotlin.Function1<kotlin.Array<kotlin.String>, kotlin.Unit>) returnType:kotlin.Unit
|
||||
VALUE_PARAMETER name:fn index:0 type:kotlin.Function1<kotlin.Array<kotlin.String>, kotlin.Unit>
|
||||
BLOCK_BODY
|
||||
FUN name:testPlainArgs visibility:public modality:FINAL <> () returnType:kotlin.Unit
|
||||
BLOCK_BODY
|
||||
ERROR_CALL 'Unresolved reference: <Inapplicable(INAPPLICABLE): [/usePlainArgs]>#' type=IrErrorType
|
||||
FUNCTION_REFERENCE 'public final fun sum (args: kotlin.IntArray): kotlin.Int declared in <root>' type=kotlin.reflect.KFunction1<kotlin.IntArray, kotlin.Int> origin=null
|
||||
FUN name:testPrimitiveArrayAsVararg visibility:public modality:FINAL <> () returnType:kotlin.Unit
|
||||
BLOCK_BODY
|
||||
CALL 'public final fun usePrimitiveArray (fn: kotlin.Function1<kotlin.IntArray, kotlin.Int>): kotlin.Unit declared in <root>' type=kotlin.Unit origin=null
|
||||
fn: FUNCTION_REFERENCE 'public final fun sum (args: kotlin.IntArray): kotlin.Int declared in <root>' type=kotlin.reflect.KFunction1<kotlin.IntArray, kotlin.Int> origin=null
|
||||
FUN name:testArrayAsVararg visibility:public modality:FINAL <> () returnType:kotlin.Unit
|
||||
BLOCK_BODY
|
||||
ERROR_CALL 'Unresolved reference: <Inapplicable(INAPPLICABLE): [/useArray]>#' type=IrErrorType
|
||||
FUNCTION_REFERENCE 'public final fun nsum (args: kotlin.Array<kotlin.Number>): kotlin.Int declared in <root>' type=kotlin.reflect.KFunction1<kotlin.Array<kotlin.Number>, kotlin.Int> origin=null
|
||||
FUN name:testArrayAndDefaults visibility:public modality:FINAL <> () returnType:kotlin.Unit
|
||||
BLOCK_BODY
|
||||
ERROR_CALL 'Unresolved reference: <Inapplicable(INAPPLICABLE): [/useStringArray]>#' type=IrErrorType
|
||||
FUNCTION_REFERENCE 'public final fun zap (b: kotlin.Array<kotlin.String>, k: kotlin.Int): kotlin.Unit declared in <root>' type=kotlin.reflect.KFunction2<kotlin.Array<kotlin.String>, kotlin.Int, kotlin.Unit> origin=null
|
||||
Reference in New Issue
Block a user