Ilya Gorbunov
4423ef9087
Minor: remove unused template for Map.random()
2018-09-21 18:28:44 +03:00
Mikhail Zarechenskiy
bc6e091004
Migration change: temporarily specify type explicitly
...
Because of introduction of `BuilderInference` annotation.
Change it back after bootstrap
2018-09-18 18:55:26 +03:00
Ilya Gorbunov
aac96c476a
Rename sequence and iterator builder functions and their scope class
...
This introduces new functions instead of the existing sequence builders:
- `sequence` instead of `buildSequence`
- `iterator` instead of `buildIterator`
- `SequenceScope` instead of `SequenceBuilder`
The old functions were deprecated with error and made inline-only, and `SequenceBuilder` has been
made a deprecated typealias to `SequenceScope`.
Move sequence builders to `SequencesKt` facade class.
Replace sequence builder usages in stdlib and samples.
#KT-26678
2018-09-16 23:30:35 +03:00
Ilya Gorbunov
2d356b89b5
Specialize contentDeepEquals/HashCode/ToString for arrays of unsigned types
...
#KT-26388
2018-09-13 06:10:10 +03:00
Ilya Gorbunov
010b36be1f
Raise deprecation level for kotlin.js.Math functions
...
#KT-21703
2018-09-11 18:15:03 +03:00
Ilya Gorbunov
1eda3805ec
Introduce overloads to check for T? element contained in iterable range in a constant time
...
#KT-18483
2018-09-11 17:06:42 +03:00
Ilya Gorbunov
48add96e79
Deprecate mixed Int/FP contains operator for ranges
...
#KT-22423
2018-09-11 05:40:15 +03:00
Ilya Gorbunov
e22ca022d4
Switch sourcesets of experimental and release coroutines
...
- Move experimental coroutines out of the main source root.
- Include experimental coroutines into the coroutines source set.
- Include release coroutines into the main source set.
2018-09-07 01:03:53 +03:00
Ilya Gorbunov
3e38bbcb07
Update generator template to match manually edited _URanges.kt file
2018-09-04 17:39:51 +03:00
Ilya Gorbunov
623adbfe4a
Do not use JVM-specific annotations in pure-JS generated sources
2018-08-31 04:17:42 +03:00
Ilya Gorbunov
009980944b
Refine the exception type of EmptyRange.random()
...
Make it the same type as in case of an empty collection, so that
`emptyRange.random()` throws the same exception as `emptyRange.toList().random()`.
#KT-15539
2018-08-30 16:21:36 +03:00
Ilya Gorbunov
ea2c33a532
Extension random() to select random element from a collection
...
Fixes #KT-15539
2018-08-30 16:21:27 +03:00
Ilya Gorbunov
ea37a65178
copyInto: copying elements between two arrays
...
#KT-25874 Fixed
2018-08-30 16:21:20 +03:00
Ilya Gorbunov
4df665bc78
Generate extensions for unsigned arrays and provide tests for them
...
- contentEquals, contentToString, contentHashCode
- as[Signed]Array, as[Unsigned]Array
- to[Signed]Array, to[Unsigned]Array
- toTypedArray
- copyOf(), copyOf(newSize), copyOfRange(...)
2018-08-30 14:58:26 +03:00
Ilya Gorbunov
3d2eb36486
Generate until, downTo, step, reversed functions for unsigned ranges/progressions
2018-08-30 14:58:20 +03:00
Ilya Gorbunov
add0894f54
Support unsigned types and array specializations in stdlib generator
2018-08-30 14:58:18 +03:00
Ilya Gorbunov
f367322084
Introduce associateWith and associateWithTo functions
...
#KT-13814
2018-08-30 14:58:14 +03:00
Ilya Gorbunov
751e844258
Support having primary type parameter other than T in generated code
...
With some limitations: the primary parameter cannot have constraints for now.
2018-08-30 14:58:11 +03:00
Ilya Gorbunov
357c5be4fb
Make sure index and count do not overflow for long sequences
...
Throw an exception immediately before an overflow becomes observable.
Place check to prevent negative index from indexOf, indexOfFirst.
Do not insert overflow checks for arrays, lists, maps and char sequences.
#KT-16097
2018-08-30 14:57:05 +03:00
Ilya Gorbunov
85af1f5d38
Improve argument validation in copyOfRange
...
Make copyOfRange implementation non-inline in order not to expose
copyOfRangeToIndexCheck implementation detail.
It will be possible to make the function non-inline itself later without
that JvmName trick, when apiVersion 1.2 support is discontinued.
#KT-19489
2018-08-30 14:56:29 +03:00
Ilya Gorbunov
58a3b64baf
Add argument validation in copyOf(newSize) in JS
...
#KT-19489
2018-08-30 14:56:27 +03:00
Ilya Gorbunov
418db53ba4
Array.copyOf docs: do not use 'primitive default' term, rewrite description
...
#KT-22298
2018-05-25 21:52:36 +03:00
Valeriy Zhirnov
9239de9a02
KT-22298 Improve docs for Array.copyOf(newSize: Int)
...
Signed-off-by: Valeriy Zhirnov <neonailol@gmail.com >
2018-05-25 21:52:36 +03:00
Ilya Gorbunov
ffc975550f
Add/update copyrights in kotlin-stdlib-gen
2018-04-26 21:57:50 +03:00
Ilya Gorbunov
502418e690
Put copyrights to the generated standard library sources
...
Read copyright template from .idea/copyright/apache.xml profile
2018-04-26 21:57:50 +03:00
Ilya Gorbunov
2c74b91de4
Remove JvmVersion annotation and its usages
2018-04-23 19:05:13 +03:00
Ilya Gorbunov
c239d346f7
Correctly indent upper bound separator in the generated stdlib code
2018-04-20 23:14:57 +03:00
Ilya Gorbunov
5381d0ed58
Move sequence operation classification higher than sample
...
Otherwise it gets eaten by that @sample tag.
2018-04-20 22:40:35 +03:00
Ilya Gorbunov
908d2d6975
Introduce kotlin-stdlib-generator dsl block for specifying sample reference
2018-04-20 22:40:35 +03:00
Ilya Gorbunov
c5aed06110
Clarify docs for downTo and until
2018-04-20 05:25:31 +03:00
Ilya Gorbunov
501d969a38
Improve docs wording of zip function
2018-04-20 02:44:48 +03:00
Ilya Gorbunov
0eae27e03f
Add samples for zip on sequences and strings
2018-04-20 02:00:36 +03:00
TakuyaKodama
2d4e591b5d
Add samples for zip on arrays and collections
...
Write the sample references in the template and run the generator
2018-04-20 02:00:36 +03:00
Ilya Gorbunov
0e4925a20f
Remove UNUSED_PARAMETER warning suppression from actual declarations
2018-04-12 17:53:00 +03:00
Ilya Gorbunov
f7b2eba680
Do not mix expect/non-expect overloads of minOf/maxOf
...
Workaround for KT-22520
2018-04-12 17:53:00 +03:00
Ilya Gorbunov
912c69aaa3
Suppress expect-actual mismatch for relaxed array extensions
...
Due to KT-21937
2018-04-12 17:53:00 +03:00
Ilya Gorbunov
69ebb3bfb0
Switch to the new stdlib source generation scheme
...
Remove old generated sources for stdlib-jvm and stdlib-js
2018-04-12 17:53:00 +03:00
Ilya Gorbunov
70236d4824
Build standard library for JVM from a single source set
...
Add explicit imports for kotlin.* and kotlin.text.* to prevent typealiases
conflicting with their aliased types from default imports.
2018-04-12 17:53:00 +03:00
Ilya Gorbunov
bb04198f7e
kotlin-stdlib-gen: add dsl option for multiple suppressed diagnostics
2018-03-23 04:23:25 +03:00
gzoritchak
1c1fe10e12
Add samples for take* and drop* extensions (KT-20357)
...
- Add samples for take, takeLast, takeWhile, takeLastWhile
- Add samples for drop, dropLast, dropWhile, dropLastWhile
2018-02-20 19:24:27 +03:00
Yuta Sakata
4926b5a4c0
Add samples for any, all and none
...
Rewrite samples to make them working on sample generator
Move location of the class that contains samples of Aggregates.kt
2018-02-19 18:44:28 +03:00
Ilya Gorbunov
6d035f1d28
Fix unresolved references to SortedSet in docs
2018-02-19 15:25:03 +03:00
gzoritchak
f790635b30
Add samples for joinTo
...
KT-20357
2018-02-18 20:12:05 +03:00
gzoritchak
40e3159463
Add samples for joinToString
...
KT-20357
2018-02-18 20:12:05 +03:00
Yanis Batura
9c8c1cdc18
Fix a couple of typos in docs and ReadMe
...
* Fix a couple of typos
- In the main ReadMe.md
- In onEach template's doc
* Update generated source code
2018-02-12 14:22:47 +03:00
Ilya Gorbunov
8f78d73cd7
Use fqnames for SortedSet and TreeSet from java.util
...
Remove internal typealiases for SortedSet and TreeSet
2018-02-02 17:56:56 +03:00
Ilya Gorbunov
b456c52902
Import kotlin.coroutines.experimental for generated sequences on all platforms
...
This will add import to common generated sources
2018-02-02 17:56:56 +03:00
Ilya Gorbunov
233376eef0
Improve min/max specialization for longs and 3-arg overloads in JS
2018-01-25 21:41:18 +03:00
Ilya Gorbunov
32b68ae1d5
Rearrange platform specialized functions
...
Place them according to their operation to ArrayOps and Filtering.
2018-01-24 02:10:05 +03:00
Ilya Gorbunov
eda8bbacb3
Remove obsolete JvmVersion annotation from generated functions
...
These functions are already generated in jvm-only file
2018-01-24 02:10:01 +03:00