Ilya Gorbunov
7e2c365b79
Generate docs for floorDiv and mod and improve docs for div and rem
...
Refactor operator documentation generation for primitives and unsigned
types so that it is easier to specialize it.
Manually sync docs of numeric types in js-ir stdlib.
KT-26234
2021-03-05 07:32:16 +03:00
Ilya Gorbunov
50d4979531
Floor division and remainder for numeric types KT-26234
...
- floorDiv/mod for unsigned types
- floorDiv/mod for signed types
- mod for floating point types
- mod return type: same as divisor for integer types
- Update JS API dump
- Avoid triggering division overflow in tests due to K/N
- Workaround failing test in JS-legacy
2021-03-05 07:32:16 +03:00
Ilmir Usmanov
d67e4f0c48
Rename inline class -> @JvmInline value class in stdlib and compiler
2021-02-25 16:06:51 +01:00
Ilya Gorbunov
87e130e77a
Remove obsolete diagnostics suppression
...
The diagnostic NON_PUBLIC_PRIMARY_CONSTRUCTOR_OF_INLINE_CLASS is now
obsolete because internal constructors of inline classes became allowed.
2021-02-03 18:23:53 +03:00
Alexander Udalov
acd29481bd
Regenerate sources of builtins and stdlib
2021-01-03 22:31:06 +01:00
Abduqodiri Qurbonzoda
36e6247125
Add more details about bit shift operations #KT-41112
2020-09-16 04:05:12 +03:00
Alexander Udalov
da6d904c6e
Suppress code warnings in kotlin-stdlib
2020-08-20 20:30:34 +02:00
Abduqodiri Qurbonzoda
f6a739bbc5
Promote bit query api to stable
2020-06-01 22:18:55 +03:00
Alexander Udalov
795d6ab407
Migrate UseExperimental->OptIn in project sources
2020-03-10 12:07:14 +01:00
Alexander Udalov
514bf3eec0
Deprecate Experimental/UseExperimental in favor of RequiresOptIn/OptIn
2020-01-14 21:04:44 +01:00
Alexander Udalov
8f94a2bb75
Rename UseExperimental->OptIn, Experimental->RequiresOptIn in stdlib kdocs
2020-01-14 21:04:42 +01:00
Alexander Udalov
e0b9ffa780
Regenerate builtins sources
2020-01-03 13:09:43 +01:00
Alexander Udalov
cdbabf224f
Introduce RequiresOptIn and OptIn annotations
...
RequiresOptIn should be used now instead of Experimental, OptIn instead
of UseExperimental. See https://github.com/Kotlin/KEEP/pull/201 .
This change adds the new declarations only to the stdlib, and supports
them in the compiler. Because of the way compiler loads annotations, we
need to bootstrap it first before deprecating the old annotations and
updating tests.
#KT-34647 Fixed
2019-12-17 18:17:48 +01:00
Abduqodiri Qurbonzoda
2819ab4ae9
Avoid division in string-to-unsigned conversions (KT-26309)
2019-09-20 01:08:33 +03:00
Abduqodiri Qurbonzoda
432828a2db
Clarify floating-point to integral conversion rounding behaviour
2019-08-15 00:57:27 +03:00
Abduqodiri Qurbonzoda
96dcafdf35
Document order of array elements initialization (KT-32353)
2019-07-11 21:18:47 +03:00
Ilya Gorbunov
686bcb830e
Bit query and bit rotation functions for UInt, ULong, UShort, UByte
...
#KT-12749
2019-07-08 19:09:32 +03:00
Ilya Gorbunov
a1979677d0
Docs: mark all experimental annotations as MustBeDocumented
...
So that they are shown in the docs of annotated experimental API
2019-06-15 16:37:45 +03:00
nikita.movshin
abb7d3ab46
Update copyright.
...
Change the copyright from "JetBrains s.r.o." to
"JetBrains s.r.o. and Kotlin Project contributors"
Update 2 lines comment
2019-04-23 20:09:27 +03:00
nikita.movshin
65244b4bea
Update copyright.
...
Change the copyright from "JetBrains s.r.o." to
"JetBrains s.r.o. and Kotlin Project contributors"
Update only 2 lines copyright.
2019-04-23 20:09:22 +03:00
Abduqodiri Qurbonzoda
636ed025da
Replace "binary representation of" with "bits of"
2019-03-22 21:18:27 +03:00
Abduqodiri Qurbonzoda
814d6cf39c
Document Array and String get() function behavior (KT-30141)
2019-03-15 17:40:19 +03:00
Abduqodiri Qurbonzoda
82002e5e73
Remove implementations of conversions from UByte/UShort to Float/Double
2019-03-12 02:56:44 +03:00
Abduqodiri Qurbonzoda
be6c2d8c7d
Implement min max minOf maxOf functions for unsigned types (KT-30035)
2019-03-08 23:34:36 +03:00
Abduqodiri Qurbonzoda
fc85781bfc
Implement asList, slice & sliceArray extension functions for UArrays
2019-03-08 23:34:34 +03:00
Abduqodiri Qurbonzoda
3af6b36401
Write docs for unsigned types conversions
2019-03-05 17:34:15 +03:00
Abduqodiri Qurbonzoda
ae47130c8e
Implement UArray.contains(element) workaround for JS
2019-02-25 21:58:53 +03:00
Abduqodiri Qurbonzoda
c1b523ddef
Fix UArray.containsAll(Collection<Any?>)
2019-02-25 21:58:53 +03:00
Abduqodiri Qurbonzoda
1b6b44c805
Implement conversion between floating point numbers and unsigned integers
...
KT-27108
2019-02-25 21:58:03 +03:00
Mikhael Bogdanov
dfee1787e5
Regenerate builtins
2019-01-02 14:47:48 +01:00
Ilya Gorbunov
f2a51f96a5
Improve documentation of experimental annotations
2018-09-26 18:15:52 +03:00
Ilya Gorbunov
1d7ee22bdc
Simplify comparisons for small unsigned types that can fit in Int
...
UByte and UShort can be extended to Int exactly and then compared as ints
2018-09-18 22:25:36 +03:00
Ilya Gorbunov
af29dced98
Make overridden compareTo in unsigned types inline only
2018-09-18 22:25:36 +03:00
Ilya Gorbunov
9e0708e85a
Make most of unsigned operations inline only
2018-09-18 22:25:36 +03:00
Ilya Gorbunov
d793221a7b
Extract unsigned type related extensions to separate classes
...
- Rename class with unsigned number to string conversions to UStringsKt
- Extract Random unsigned extensions to URandomKt
2018-09-18 22:25:36 +03:00
Ilya Gorbunov
82d35cfa26
Change signed to unsigned widening conversions to sign-extending
...
e.g. `Byte.toUInt()` now returns `UInt.MAX_VALUE` for Byte value of -1 instead of 0xFFu.
#KT-26594 Fixed
2018-09-06 21:25:42 +03:00
Ilya Gorbunov
f5df53b7a7
Detect UInt/ULong parsing overflow after digit addition instead of before
...
#KT-26161
2018-08-30 14:58:39 +03:00
Ilya Gorbunov
d99f97ad96
Support '+' in front of parsed unsigned string values
...
#KT-26161
2018-08-30 14:58:37 +03:00
Ilya Gorbunov
2530a8e98c
Provide unsigned string to number conversion in arbitrary base
...
#KT-26161
2018-08-30 14:58:35 +03:00
Ilya Gorbunov
c1d1a7108f
Provide unsigned number to string conversion in arbitrary base
...
#KT-26161
2018-08-30 14:58:33 +03:00
Ilya Gorbunov
47162590eb
Add a credit for Guava implementation of unsigned division and remainder
2018-08-30 14:58:30 +03:00
Ilya Gorbunov
6360cc3cb5
Unsigned arrays: expose storage field as internal PublishedApi
...
To be able to write basic extensions that access storage array.
2018-08-30 14:58:24 +03:00
Ilya Gorbunov
76ff4c9b2f
Remove custom hashCode and equals from unsigned types
...
The generated ones are ok now (on JVM)
2018-08-30 14:58:16 +03:00
Ilya Gorbunov
a0b0994651
Make unsigned array constructor-like functions inline-only
2018-08-30 14:56:53 +03:00
Ilya Gorbunov
f9479d12f9
Add missing unsigned array constructors (from size)
...
#KT-25961 Fixed
2018-08-30 14:56:51 +03:00
Ilya Gorbunov
e18bebf12a
Fix plain wrong unsigned rem implementation
2018-08-30 14:56:10 +03:00
Ilya Gorbunov
7dc6c3d7ce
Prohibit MIN_VALUE step for unsigned progressions
2018-08-30 14:56:04 +03:00
Ilya Gorbunov
1792a77a47
Generate hashCode and equals for unsigned types
2018-08-30 14:52:51 +03:00
Ilya Gorbunov
e2310343d4
Opt-in to use unsigned types in various internal utils
2018-08-30 14:52:49 +03:00
Ilya Gorbunov
0c50014e7a
Introduce SIZE_BYTES and SIZE_BITS constants for all integral types
...
#KT-8247 Fixed
2018-08-30 14:51:10 +03:00