JS: disable TemporaryAssignmentElimination, fix KT-15512

This commit is contained in:
Alexey Andreev
2017-01-10 17:47:59 +03:00
parent 7d170c0fcd
commit 10a3fbf53f
9 changed files with 9 additions and 16 deletions
@@ -1,6 +1,6 @@
package foo
// CHECK_VARS_COUNT: function=test count=2
// CHECK_VARS_COUNT: function=test count=3
inline fun if1(f: (Int) -> Int, a: Int, b: Int, c: Int): Int {
val result = f(a)
@@ -1,7 +1,7 @@
package foo
// CHECK_CONTAINS_NO_CALLS: test except=SumHolder_getInstance
// CHECK_VARS_COUNT: function=test count=1
// CHECK_VARS_COUNT: function=test count=2
object SumHolder {
var sum = 0
@@ -1,7 +1,7 @@
package foo
// CHECK_CONTAINS_NO_CALLS: test
// CHECK_VARS_COUNT: function=test count=0
// CHECK_VARS_COUNT: function=test count=2
internal inline fun sign(x: Int): Int {
if (x < 0) return -1
@@ -1,7 +1,7 @@
package foo
// CHECK_CONTAINS_NO_CALLS: test
// CHECK_VARS_COUNT: function=test count=1
// CHECK_VARS_COUNT: function=test count=2
internal inline fun sum(x: Int, y: Int): Int {
if (x == 0 || y == 0) return 0
@@ -1,7 +1,7 @@
package foo
// CHECK_CONTAINS_NO_CALLS: test
// CHECK_VARS_COUNT: function=test count=1
// CHECK_VARS_COUNT: function=test count=2
internal inline fun sum(x: Int, y: Int): Int {
if (x == 0 || y == 0) return 0