JVM_IR: delay writes to the source map until generateMethod
`generateMethodNode` should not have any side effects for the output to
be stable under incremental compilation.
Original commit: 9ed73439f8
This commit is contained in:
+3
@@ -0,0 +1,3 @@
|
|||||||
|
import inline1.*
|
||||||
|
|
||||||
|
fun f() = h()
|
||||||
+7
@@ -0,0 +1,7 @@
|
|||||||
|
package inline1
|
||||||
|
|
||||||
|
import inline2.*
|
||||||
|
|
||||||
|
fun g() = h()
|
||||||
|
|
||||||
|
inline fun h() = root { "OK" }
|
||||||
+7
@@ -0,0 +1,7 @@
|
|||||||
|
package inline1
|
||||||
|
|
||||||
|
import inline2.*
|
||||||
|
|
||||||
|
fun g() = h() + "!"
|
||||||
|
|
||||||
|
inline fun h() = root { "OK" }
|
||||||
+6
@@ -0,0 +1,6 @@
|
|||||||
|
================ Step #1 =================
|
||||||
|
Compiling files:
|
||||||
|
src/b.kt
|
||||||
|
End of files
|
||||||
|
Exit code: OK
|
||||||
|
------------------------------------------
|
||||||
+5
@@ -0,0 +1,5 @@
|
|||||||
|
package inline2
|
||||||
|
|
||||||
|
inline fun root(crossinline x: () -> String) = object {
|
||||||
|
fun run() = x()
|
||||||
|
}.run()
|
||||||
+1
@@ -0,0 +1 @@
|
|||||||
|
// IGNORE_BACKEND: JVM
|
||||||
+3
@@ -0,0 +1,3 @@
|
|||||||
|
import inline1.*
|
||||||
|
|
||||||
|
fun f() = h()
|
||||||
+7
@@ -0,0 +1,7 @@
|
|||||||
|
package inline1
|
||||||
|
|
||||||
|
import inline2.*
|
||||||
|
|
||||||
|
fun g() = root()
|
||||||
|
|
||||||
|
inline fun h() = root()
|
||||||
+7
@@ -0,0 +1,7 @@
|
|||||||
|
package inline1
|
||||||
|
|
||||||
|
import inline2.*
|
||||||
|
|
||||||
|
fun g() = root() + "!"
|
||||||
|
|
||||||
|
inline fun h() = root()
|
||||||
+6
@@ -0,0 +1,6 @@
|
|||||||
|
================ Step #1 =================
|
||||||
|
Compiling files:
|
||||||
|
src/b.kt
|
||||||
|
End of files
|
||||||
|
Exit code: OK
|
||||||
|
------------------------------------------
|
||||||
+3
@@ -0,0 +1,3 @@
|
|||||||
|
package inline2
|
||||||
|
|
||||||
|
inline fun root() = "OK"
|
||||||
Reference in New Issue
Block a user