Make IrExpression.type nullable.

This commit is contained in:
Dmitry Petrov
2016-08-12 19:58:26 +03:00
committed by Dmitry Petrov
parent 030111b130
commit 55eb79febf
26 changed files with 96 additions and 89 deletions
+8 -8
View File
@@ -17,16 +17,16 @@ IrFile /callWithReorderedArguments.kt
IrFunction public fun test(): kotlin.Unit
IrExpressionBody
BLOCK type=kotlin.Unit
CALL .foo
a: CALL .noReorder1
b: CALL .noReorder2
CALL .foo type=kotlin.Unit operator=
a: CALL .noReorder1 type=kotlin.Int operator=
b: CALL .noReorder2 type=kotlin.Int operator=
BLOCK type=kotlin.Unit
LOCAL tmp0
IrLocalVariable val tmp0: kotlin.Int
CALL .reordered1
CALL .reordered1 type=kotlin.Int operator=
LOCAL tmp1
IrLocalVariable val tmp1: kotlin.Int
CALL .reordered2
CALL .foo
a: GET_VAR tmp1
b: GET_VAR tmp0
CALL .reordered2 type=kotlin.Int operator=
CALL .foo type=kotlin.Unit operator=
a: GET_VAR tmp1 type=kotlin.Int
b: GET_VAR tmp0 type=kotlin.Int
+12 -12
View File
@@ -1,24 +1,24 @@
IrFile /calls.kt
IrFunction public fun foo(/*0*/ x: kotlin.Int, /*1*/ y: kotlin.Int): kotlin.Int
IrExpressionBody
GET_VAR x
GET_VAR x type=kotlin.Int
IrFunction public fun bar(/*0*/ x: kotlin.Int): kotlin.Int
IrExpressionBody
CALL .foo
x: GET_VAR x
CALL .foo type=kotlin.Int operator=
x: GET_VAR x type=kotlin.Int
y: LITERAL Int type=kotlin.Int value='1'
IrFunction public fun qux(/*0*/ x: kotlin.Int): kotlin.Int
IrExpressionBody
CALL .foo
x: CALL .foo
x: GET_VAR x
y: GET_VAR x
y: GET_VAR x
CALL .foo type=kotlin.Int operator=
x: CALL .foo type=kotlin.Int operator=
x: GET_VAR x type=kotlin.Int
y: GET_VAR x type=kotlin.Int
y: GET_VAR x type=kotlin.Int
IrFunction public fun kotlin.Int.ext1(): kotlin.Int
IrExpressionBody
$RECEIVER of: ext1
$RECEIVER of: ext1 type=kotlin.Int
IrFunction public fun kotlin.Int.ext2(/*0*/ x: kotlin.Int): kotlin.Int
IrExpressionBody
CALL .foo
x: $RECEIVER of: ext2
y: GET_VAR x
CALL .foo type=kotlin.Int operator=
x: $RECEIVER of: ext2 type=kotlin.Int
y: GET_VAR x type=kotlin.Int
+4 -4
View File
@@ -1,9 +1,9 @@
IrFile /dotQualified.kt
IrFunction public fun length(/*0*/ s: kotlin.String): kotlin.Int
IrExpressionBody
GET_PROPERTY .length
$this: GET_VAR s
GET_PROPERTY .length type=kotlin.Int
$this: GET_VAR s type=kotlin.String
IrFunction public fun lengthN(/*0*/ s: kotlin.String?): kotlin.Int?
IrExpressionBody
GET_PROPERTY ?.length
$this: GET_VAR s
GET_PROPERTY ?.length type=kotlin.Int?
$this: GET_VAR s type=kotlin.String?
@@ -5,5 +5,5 @@ IrFile /extensionPropertyGetterCall.kt
LITERAL String type=kotlin.String value='OK'
IrFunction public fun kotlin.String.test5(): kotlin.String
IrExpressionBody
GET_PROPERTY .okext
$receiver: $RECEIVER of: test5
GET_PROPERTY .okext type=kotlin.String
$receiver: $RECEIVER of: test5 type=kotlin.String
+10 -8
View File
@@ -4,31 +4,33 @@ IrFile /references.kt
LITERAL String type=kotlin.String value='OK'
IrProperty public val ok2: kotlin.String = "OK" getter=null setter=null
IrExpressionBody
GET_PROPERTY .ok
GET_PROPERTY .ok type=kotlin.String
IrProperty public val ok3: kotlin.String getter=<get-ok3> setter=null
IrPropertyGetter public fun <get-ok3>(): kotlin.String property=ok3
IrExpressionBody
LITERAL String type=kotlin.String value='OK'
IrFunction public fun test1(): kotlin.String
IrExpressionBody
GET_PROPERTY .ok
GET_PROPERTY .ok type=kotlin.String
IrFunction public fun test2(/*0*/ x: kotlin.String): kotlin.String
IrExpressionBody
GET_VAR x
GET_VAR x type=kotlin.String
IrFunction public fun test3(): kotlin.String
IrExpressionBody
BLOCK type=kotlin.Nothing
DUMMY KtProperty
LOCAL x
IrLocalVariable val x: kotlin.String = "OK"
LITERAL String type=kotlin.String value='OK'
RETURN type=kotlin.Nothing
GET_VAR x
GET_VAR x type=kotlin.String
IrFunction public fun test4(): kotlin.String
IrExpressionBody
GET_PROPERTY .ok3
GET_PROPERTY .ok3 type=kotlin.String
IrProperty public val kotlin.String.okext: kotlin.String getter=<get-okext> setter=null
IrPropertyGetter public fun kotlin.String.<get-okext>(): kotlin.String property=okext
IrExpressionBody
LITERAL String type=kotlin.String value='OK'
IrFunction public fun kotlin.String.test5(): kotlin.String
IrExpressionBody
GET_PROPERTY .okext
$receiver: $RECEIVER of: test5
GET_PROPERTY .okext type=kotlin.String
$receiver: $RECEIVER of: test5 type=kotlin.String