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:
pyos
2020-03-26 15:46:18 +01:00
committed by max-kammerer
parent 5c27cf0c71
commit 4fe55d228f
11 changed files with 55 additions and 0 deletions
@@ -0,0 +1,3 @@
import inline1.*
fun f() = h()
@@ -0,0 +1,7 @@
package inline1
import inline2.*
fun g() = h()
inline fun h() = root { "OK" }
@@ -0,0 +1,7 @@
package inline1
import inline2.*
fun g() = h() + "!"
inline fun h() = root { "OK" }
@@ -0,0 +1,6 @@
================ Step #1 =================
Compiling files:
src/b.kt
End of files
Exit code: OK
------------------------------------------
@@ -0,0 +1,5 @@
package inline2
inline fun root(crossinline x: () -> String) = object {
fun run() = x()
}.run()
@@ -0,0 +1,3 @@
import inline1.*
fun f() = h()
@@ -0,0 +1,7 @@
package inline1
import inline2.*
fun g() = root()
inline fun h() = root()
@@ -0,0 +1,7 @@
package inline1
import inline2.*
fun g() = root() + "!"
inline fun h() = root()
@@ -0,0 +1,6 @@
================ Step #1 =================
Compiling files:
src/b.kt
End of files
Exit code: OK
------------------------------------------
@@ -0,0 +1,3 @@
package inline2
inline fun root() = "OK"