IR: first somewhat meaningful expression IR generation
This commit is contained in:
committed by
Dmitry Petrov
parent
ad405f26fd
commit
7879fb7084
Vendored
+3
@@ -0,0 +1,3 @@
|
||||
fun box(): String = "OK"
|
||||
|
||||
// IR_FILE_TXT boxOk.txt
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
IrFile /boxOk.kt
|
||||
IrFunction public fun box(): kotlin.String
|
||||
??? IrDummyBody
|
||||
Vendored
+2
-2
@@ -1,4 +1,4 @@
|
||||
fun testFun() {}
|
||||
fun testFun(): String { return "OK" }
|
||||
val testSimpleVal = 1
|
||||
val testValWithGetter: Int get() = 42
|
||||
var testSimpleVar = 2
|
||||
@@ -10,8 +10,8 @@ var testVarWithAccessors: Int
|
||||
// 1 IrProperty public val testSimpleVal
|
||||
// 1 IrProperty public val testValWithGetter
|
||||
// 2 IrPropertyGetter
|
||||
// 1 IrPropertySetter
|
||||
// 1 IrProperty public var testSimpleVar
|
||||
// 1 IrProperty public var testVarWithAccessors
|
||||
// 1 IrPropertyGetter
|
||||
|
||||
// IR_FILE_TXT smoke.txt
|
||||
+13
-7
@@ -1,15 +1,21 @@
|
||||
IrFile /smoke.kt
|
||||
IrFunction public fun testFun(): kotlin.Unit
|
||||
??? IrDummyBody
|
||||
IrFunction public fun testFun(): kotlin.String
|
||||
IrBlockExpression type=kotlin.Nothing
|
||||
IrReturnExpression type=kotlin.Nothing
|
||||
IrStringLiteral OK
|
||||
IrProperty public val testSimpleVal: kotlin.Int = 1
|
||||
??? IrDummyBody
|
||||
IrReturnExpression type=kotlin.Int
|
||||
IrIntLiteral type=kotlin.Int value=1
|
||||
IrProperty public val testValWithGetter: kotlin.Int
|
||||
IrPropertyGetter public fun <get-testValWithGetter>(): kotlin.Int
|
||||
??? IrDummyBody
|
||||
IrReturnExpression type=kotlin.Int
|
||||
IrIntLiteral type=kotlin.Int value=42
|
||||
IrProperty public var testSimpleVar: kotlin.Int
|
||||
??? IrDummyBody
|
||||
IrReturnExpression type=kotlin.Int
|
||||
IrIntLiteral type=kotlin.Int value=2
|
||||
IrProperty public var testVarWithAccessors: kotlin.Int
|
||||
IrPropertyGetter public fun <get-testVarWithAccessors>(): kotlin.Int
|
||||
??? IrDummyBody
|
||||
IrReturnExpression type=kotlin.Int
|
||||
IrIntLiteral type=kotlin.Int value=42
|
||||
IrPropertySetter public fun <set-testVarWithAccessors>(/*0*/ v: kotlin.Int): kotlin.Unit
|
||||
??? IrDummyBody
|
||||
IrBlockExpression type=kotlin.Unit
|
||||
|
||||
Reference in New Issue
Block a user