Commit Graph

331 Commits

Author SHA1 Message Date
Ilya Matveev 6549dda5fb stdlib: Uncomment extensions with reified parameters 2017-04-18 12:48:07 +07:00
Ilya Matveev 6fc7c3495a stdlib: Add List and MutableList functions 2017-04-18 12:48:07 +07:00
Ilya Matveev 569fb7e013 stdlib: Don't suppress internal call error for mapCapacity
This patch removes @Suppress("NON_PUBLIC_CALL_FROM_PUBLIC_INLINE")
annotation from mapCapacity() calls since it is annotated with
@PublishedApi
2017-04-18 12:48:07 +07:00
Ilya Matveev 78d6611a46 stdlib: Return NaN from average() if the collection is empty 2017-04-18 12:48:07 +07:00
Ilya Matveev 286e81992a stdlib: Add missing extensions for collections 2017-04-18 12:48:07 +07:00
Nikolay Igotti bc2d635ce7 Optimize memory management (#480) 2017-04-13 15:26:51 +03:00
Ilya Matveev ec64fd0477 stdlib: Make toIndex exclusive in sortArrayWith method
This patch makes toIndex parameter exclusive in sortArrayWith method
in order to make this method corresponding to the other ones (e.g.
copyOfRange, Array.sortWith extension etc).
It also improves the external sortBy test in order to use it with
different sort algorithms.
2017-04-13 18:27:08 +07:00
Ilya Matveev 113b97dda3 stdlib: Add remaining extensions for arrays 2017-04-13 18:27:08 +07:00
Ilya Matveev 1e7a5d45e0 stdlib: Add sort functions for primitive arrays 2017-04-13 18:27:08 +07:00
Ilya Matveev bd27d68906 stdlib: Fix contentDeepToString 2017-04-13 18:27:08 +07:00
Ilya Matveev 230e3235af stdlib: Remove some inlines 2017-04-13 18:27:08 +07:00
Ilya Matveev 7d216dcb47 stdlib: Add deep array operations 2017-04-13 18:27:08 +07:00
Ilya Matveev 697cc88001 stdlib: Fix constructors for arrays 2017-04-13 18:27:08 +07:00
Ilya Matveev 0e302d26a8 stdlib: Add contentEquals extension for arrays 2017-04-13 18:27:08 +07:00
Ilya Matveev 01401cf799 stdlib: Add array constructors with initializers 2017-04-13 18:27:08 +07:00
Ilya Matveev f4c0efdbd8 stdlib: Add Array.average 2017-04-13 18:27:08 +07:00
Ilya Matveev 69d2cf5c47 stdlib: Add toList method for arrays of value types 2017-04-13 18:27:08 +07:00
Nikolay Igotti 2227415448 Remove remnants of concurrent memory model (#467) 2017-04-10 16:49:46 +03:00
Nikolay Igotti 322d634e4c Remove system locale dependencies (#464) 2017-04-10 15:22:54 +03:00
Nikolay Igotti 100e4df05d Concurrency prototype (#453)
* Concurrent executors

* Review feedback
2017-04-07 15:16:04 +03:00
Alexander Gorshenev 3efbf3ae27 Removed a fixme leftover.
We have a proper version in stdlib now.
2017-04-07 13:47:52 +03:00
Alexander Gorshenev b3bbd96bce Eliminated an "external inline" function from stdlib. 2017-04-05 12:09:43 +03:00
Igor Chevdar 05b6d8ab81 Synchronized Any?.plus with JVM Kotlin 2017-04-04 11:58:52 +03:00
Nikolay Igotti 074131f1ac Fix isw* function usage 2017-04-03 19:32:32 +03:00
Svyatoslav Scherbina a50b38da5a Implement StableObjPtr for Kotlin N 2017-04-03 15:03:26 +03:00
Igor Chevdar fb08c25633 Fixed some warnings in stdlib (#420) 2017-03-30 15:18:37 +03:00
Igor Chevdar 662abba4a7 Changed type of exception from CastClassException to TypeCastException
When converting from null to non-nullable type kotlin JVM throws TypeCastException
2017-03-30 11:05:30 +03:00
Nikolay Igotti 0cbd34086e Added JB copyright (#417) 2017-03-30 09:51:58 +03:00
Igor Chevdar d31a770e70 Implemented enumValueOf<>() and enumValues<>() 2017-03-29 15:58:36 +03:00
Nikolay Igotti b6e488b210 Remove early maps problems (#408) 2017-03-29 12:10:52 +03:00
SvyatoslavScherbina c4abb8f706 Implement varargs in interop for Kotlin N (#393)
* Implement CValues.equals and .hashCode

* Add trivial test for interop varargs

* Implement varargs in interop for Kotlin N

* Compile and link runtime with libffi

* Fix few places.
2017-03-27 16:44:24 +03:00
Igor Chevdar 6381b4d831 Default arguments lowering should not touch inline functions. 2017-03-27 12:41:51 +03:00
Nikolay Igotti 4a4225fd72 Fix char index search 2017-03-23 18:38:25 +03:00
Nikolay Igotti c55d0cd674 Simple CSV parser (#383) 2017-03-23 17:15:39 +03:00
Nikolay Igotti afcce921f2 Fix typo in string search 2017-03-23 17:04:18 +03:00
Nikolay Igotti b5c60e3082 Support data parsing operations (#380) 2017-03-23 12:54:24 +03:00
Igor Chevdar 8afa12684e Implemented StringBuilder.deleteCharAt 2017-03-22 22:25:24 +03:00
Igor Chevdar fc9638dbd4 Added ranges from Kotlin 1.1 2017-03-22 22:24:40 +03:00
Igor Chevdar 55d3b23cfe Implemented 'lateinit' properties
If property is lateinit, then on each access we need to test its value
and throw UninitializedPropertyAccessException if it is null.
2017-03-21 19:47:41 +03:00
Alexander Gorshenev 2d0aa9dcbb Introduced -nomain flag to disable generation of main(),
in assumption that it is provided by one of the libraries.
2017-03-21 18:05:03 +04:00
Igor Chevdar 1be913de63 Review fixes 2017-03-21 14:04:30 +03:00
Nikolay Igotti 73b1b18036 Provide entry point customization 2017-03-21 14:04:30 +03:00
Nikolay Igotti a15be29519 More of stdlib (#363) 2017-03-21 09:36:11 +03:00
Igor Chevdar 9c180ff4e1 Implemented equals(), hashCode(), toString() for K*Property<> 2017-03-20 16:21:58 +03:00
Nikolay Igotti 80041e6559 Sequences support improved (#358) 2017-03-20 11:52:52 +03:00
Svyatoslav Scherbina c9d8d4d57d Implement CValuesRef in interop
* Represent pointer parameters of C functions as `CValuesRef`.
* Represent struct value parameters as `CValue`.
* Implement some helper methods to make the new approach more useful.
* Migrate some code to new interop approach for pointers and values.

Also do not map to `String?`:
- pointers to 8-bit integers;
- pointers to non-const chars.
2017-03-20 15:52:23 +07:00
Nikolay Igotti 7a876a3ccd Provide entry point customization (#352) 2017-03-17 17:40:24 +03:00
Nikolay Igotti a2e8c7f638 Do not fail if locale is not supported 2017-03-16 18:02:55 +03:00
Nikolay Igotti e67d9d4065 Remove Cloneable interface (#347) 2017-03-15 16:20:50 +03:00
Vasily Levchenko 5215a9b60b STDLIB: added emptyArray() 2017-03-15 15:33:56 +03:00