More efficient Char(Int) in common, JS, and JS-IR

This commit is contained in:
Ilya Gorbunov
2021-04-12 16:55:36 +03:00
parent 8041c3aa1d
commit ce7092a638
2 changed files with 3 additions and 3 deletions
@@ -1,5 +1,5 @@
/*
* Copyright 2010-2018 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/
@@ -27,4 +27,4 @@ internal fun doubleToInt(a: Double): Int = when {
else -> jsBitwiseOr(a, 0)
}
internal fun numberToChar(a: dynamic) = Char(numberToInt(a) and 0xFFFF)
internal fun numberToChar(a: dynamic) = Char(numberToInt(a).toUShort())