[JS IR BE] Add SIZE_BYTES and SIZE_BITS to Long and Char

This commit is contained in:
Svyatoslav Kuzmich
2019-04-11 14:34:32 +03:00
parent 3ae64061c1
commit d7be91e8a4
2 changed files with 24 additions and 0 deletions
@@ -97,6 +97,18 @@ public inline class Char internal constructor (val value: Int) : Comparable<Char
* The maximum value of a Unicode surrogate code unit.
*/
public const val MAX_SURROGATE: Char = MAX_LOW_SURROGATE
/**
* The number of bytes used to represent a Char in a binary form.
*/
@SinceKotlin("1.3")
public const val SIZE_BYTES: Int = 2
/**
* The number of bits used to represent a Char in a binary form.
*/
@SinceKotlin("1.3")
public const val SIZE_BITS: Int = 16
}
}
+12
View File
@@ -23,6 +23,18 @@ public class Long internal constructor(
* A constant holding the maximum value an instance of Long can have.
*/
public const val MAX_VALUE: Long = 9223372036854775807L
/**
* The number of bytes used to represent an instance of Long in a binary form.
*/
@SinceKotlin("1.3")
public const val SIZE_BYTES: Int = 8
/**
* The number of bits used to represent an instance of Long in a binary form.
*/
@SinceKotlin("1.3")
public const val SIZE_BITS: Int = 64
}
/**