[JS BE] Fix DCE to let it remove constant properties

This commit is contained in:
Roman Artemev
2019-12-07 02:01:11 +03:00
committed by romanart
parent 2c94f590ca
commit 9871f8c579
3 changed files with 12 additions and 8 deletions
+5 -5
View File
@@ -358,18 +358,18 @@ internal fun fromNumber(value: Double): Long {
}
}
private val TWO_PWR_16_DBL_ = (1 shl 16).toDouble()
private const val TWO_PWR_16_DBL_ = (1 shl 16).toDouble()
private val TWO_PWR_24_DBL_ = (1 shl 24).toDouble()
private const val TWO_PWR_24_DBL_ = (1 shl 24).toDouble()
//private val TWO_PWR_32_DBL_ = TWO_PWR_16_DBL_ * TWO_PWR_16_DBL_
private val TWO_PWR_32_DBL_ = (1 shl 16).toDouble() * (1 shl 16).toDouble()
private const val TWO_PWR_32_DBL_ = (1 shl 16).toDouble() * (1 shl 16).toDouble()
//private val TWO_PWR_64_DBL_ = TWO_PWR_32_DBL_ * TWO_PWR_32_DBL_
private val TWO_PWR_64_DBL_ = ((1 shl 16).toDouble() * (1 shl 16).toDouble()) * ((1 shl 16).toDouble() * (1 shl 16).toDouble())
private const val TWO_PWR_64_DBL_ = ((1 shl 16).toDouble() * (1 shl 16).toDouble()) * ((1 shl 16).toDouble() * (1 shl 16).toDouble())
//private val TWO_PWR_63_DBL_ = TWO_PWR_64_DBL_ / 2
private val TWO_PWR_63_DBL_ = (((1 shl 16).toDouble() * (1 shl 16).toDouble()) * ((1 shl 16).toDouble() * (1 shl 16).toDouble())) / 2
private const val TWO_PWR_63_DBL_ = (((1 shl 16).toDouble() * (1 shl 16).toDouble()) * ((1 shl 16).toDouble() * (1 shl 16).toDouble())) / 2
private val ZERO = fromInt(0)