Commit Graph

49 Commits

Author SHA1 Message Date
Ilya Gorbunov ef72371fd7 Add samples for contentToString and contentDeepToString array operations 2017-05-03 17:44:30 +03:00
Ilya Gorbunov f22375601b Remove unneeded suppressions 2017-04-18 12:47:11 +03:00
Ilya Gorbunov 8f452ed046 Cleanup warnings in stdlib and generated code 2017-04-18 12:47:04 +03:00
Alexander Udalov 7fe9b99087 Support different target platforms for modules in AnalyzerFacade
Instead of reusing the same AnalyzerFacade that is used for resolution
of a module to resolve its dependencies, analyze each dependency
module/library with a facade depending on its target platform. Introduce
and use CommonLibraryDetectionUtil in addition to
KotlinJavaScriptLibraryDetectionUtil, to detect common libraries (with
.kotlin_metadata files).

Note that before multi-platform projects, this was not needed because
there were only two platforms (JVM and JS), and JVM module had only JVM
modules/libraries as dependencies, JS module had only JS
modules/libraries as dependencies. Now, for example, a JVM module can
have a common module/library as a dependency, and it would be incorrect
to analyze that dependency with JvmAnalyzerFacade because that facade
does not know anything about .kotlin_metadata files.

The changes in Dsl.kt and KotlinCacheServiceImpl.kt are needed because
PsiElement.getJavaDescriptorResolver, called from some IDE code, started
to fail on a common module, because the container for a common module
does not have the JavaDescriptorResolver
2017-04-14 00:44:00 +03:00
Ilya Gorbunov 337fd4e180 Drop poms that are no longer required. Drop separate unit test modules for stdlib js. 2017-04-08 08:28:50 +03:00
Ilya Gorbunov 0b2cadc638 Provide a method for common publishing configuration. 2017-04-06 20:32:37 +03:00
Ilya Gorbunov 92ef26606b Refactor build to make manifest specification less error-prone.
Use legacy implementation title in manifest of JS stdlib for now.

Change the way common jvm project configurations is applied.
Add missing artifacts to common libraries.
2017-04-06 20:32:37 +03:00
Ilya Gorbunov 65a800840c Use single task for empty javadocs. 2017-04-06 20:32:37 +03:00
Ilya Gorbunov 609355a311 Provide kotlin.AssertionError in kotlin-stdlib-common
Remove related workarounds from kotlin-test-common
2017-04-06 20:32:37 +03:00
Ilya Gorbunov 0e1fc0cff2 Rewrite preprocessor task in gradle without ant 2017-04-06 20:32:37 +03:00
Ilya Gorbunov 846b74885c Remove some configuration duplication by using 'tasks.withType()'
Setup common options of java and kotlin compiler tasks.
2017-04-06 20:32:37 +03:00
Ilya Gorbunov 08fa304b6f Build common standard library headers and kotlin-test (common and jvm) as multiplatform projects. 2017-04-06 20:32:37 +03:00
Ilya Chernikov c2c051cfe8 Prepare gradle config for building libs - bootstrap and runtime
Use external gradle plugin (1.1-M04) with compiler.jar from dist
Add empty build scripts for other projects that needs to be built with gradle
2017-04-06 20:32:37 +03:00
Ilya Gorbunov c98c2d9931 Remove 'nearly_stateless' category, do not mention statefulness for terminal operations.
#KT-16994
2017-03-24 19:06:06 +03:00
Ilya Gorbunov 4018db680e Sequence operation classification regarding their statefulness and laziness.
#KT-16994 Fixed
2017-03-24 19:06:06 +03:00
Ilya Gorbunov 61e8848aa2 Add samples for sequence building API. 2017-03-07 13:32:39 +03:00
Ilya Gorbunov a04e6de047 Add groupingBy and eachCount sample. 2017-03-07 13:31:44 +03:00
Denis Zharkov 9697196473 Put startCoroutineUninterceptedOrReturn header to common stdlib 2017-02-07 11:08:27 +03:00
Denis Zharkov 4f6a77cf38 Introduce createCoroutineUnchecked intrinsic
Also use it for buildSequence implenentation

 #KT-16155 Fixed
2017-02-07 11:08:27 +03:00
Denis Zharkov 6dde567be4 Optimize startCoroutine impls, move them to common stdlib
Do not wrap initial continuation for startCoroutine in SafeContinuation

This changes leaves only internal declarations and intrinsics as platform
dependent parts of the coroutine library, the rest parts (public API)
is implemented through them in common module
2017-02-07 11:07:04 +03:00
Denis Zharkov a65d86293b Improve coroutines library layout
- Split CoroutinesLibrary into common and JVM parts
- Get rid of startCoroutine duplications
- Make suspendCoroutine implementation to be platform independent
2017-02-07 11:07:04 +03:00
Denis Zharkov 8fa8ba7055 Move coroutine-related runtime parts to kotlin.coroutines.experimental package
#KT-15975 Fixed
2017-01-27 23:24:13 +03:00
Ilya Gorbunov 661ff81e67 Specify names for parameters of functional types with two or more parameters to ease lambda completion.
#KT-13826
2017-01-27 14:46:29 +03:00
Ilya Gorbunov 288e0b3c7e Allow to use Regex matches CharSequence and CharSequence matches Regex in infix form
#KT-14279
2017-01-25 21:31:42 +03:00
Ilya Gorbunov 4e5e14c9a0 Provide string-to-number conversions in JS and common stdlib.
Relates to #KT-8286
#KT-4497 Fixed
2017-01-24 07:20:57 +03:00
Alexander Udalov fc637eb420 Change runtime component from "Core" to "Main"
This is needed to allow the old compiler have the new runtime libraries in the
classpath. See the previous commit for a more elaborate explanation
2017-01-21 12:57:15 +03:00
Ilya Gorbunov a429992e81 Do not generate headers for JS-only functions. 2017-01-18 22:16:49 +03:00
Ilya Gorbunov 3225ec8935 Provide headers for coroutine building blocks 2017-01-14 20:14:00 +03:00
Ilya Gorbunov 80f2efb625 joinTo/joinToString: Do not call toString on elements that are already CharSequence or Char.
#KT-15557
2017-01-13 19:49:57 +03:00
Ilya Gorbunov 0c27e07e8c Improve headers of Appendable and StringBuilder 2017-01-13 19:41:59 +03:00
Ilya Gorbunov afdc7b94da Add headers for print and println.
#KT-15458 fixed
2017-01-13 19:41:59 +03:00
Ilya Gorbunov be95f66b13 Minor: remove unnecessary header. 2017-01-13 19:41:59 +03:00
Ilya Gorbunov cdfb72ab76 Provide protected toArray implementation in AbstractCollection.
Relates to #KT-13898
2017-01-13 19:38:28 +03:00
Ilya Gorbunov 6273ab5d43 Hold back eachSumOf for a while: fixups.
Remove unneeded import.
2017-01-11 20:04:00 +03:00
Ilya Gorbunov 2a2b417025 KEEP-23 implement group and fold operations
Docs for group-and-fold operations

Fix implementation for countEach and sumEachBy

countEach and sumEachBy implementations for JS

Rename keySelector to keyOf

Generate additional sources for groupingBy + headers

Rename countEach and sumEachBy to eachCount and eachSumOf.
2017-01-11 16:49:45 +03:00
Ilya Gorbunov 3bf38e62c8 Add a note about NaN propagation for floating point specializations. 2017-01-11 14:45:21 +03:00
Ilya Gorbunov 0bf2ba8701 Introduce new overloads of max and min to fix NaN propagation behavior on JVM. 2017-01-11 14:45:18 +03:00
Ilya Gorbunov 844c68286a Refactor: replace Math.min with minOf in common code.
Add temporary import of kotlin.comparisons where required.
2017-01-11 14:42:36 +03:00
Ilya Gorbunov 51c24a0c3c Introduce minOf/maxOf in kotlin.comparisons. #KT-7417 2017-01-11 14:42:36 +03:00
Alexander Udalov c4f731b987 Write Kotlin-Version to runtime artifacts built with Maven
Add a test that checks that Kotlin-Version and Kotlin-Runtime-Component have
been written to all relevant runtime libraries
2016-12-26 17:46:36 +03:00
Ilya Gorbunov 05dcaccf09 Do not require array extensions being reified to create new array.
#KT-15377
2016-12-24 01:55:33 +03:00
Ilya Gorbunov c6a812b11c Fix some API holes in headers 2016-12-20 14:02:01 +03:00
Ilya Gorbunov 2209631f1a Add SinceKotlin to new coerceIn method. 2016-12-19 18:36:52 +03:00
Ilya Gorbunov 10f8e70322 Rename ClosedComparableRange to ClosedFloatingPointRange 2016-12-19 18:36:52 +03:00
Ilya Gorbunov b2ccea87f3 Temporary workaround to generate functions with optional parameters with bodies in common code. 2016-12-16 04:36:30 +03:00
Ilya Gorbunov b72e5c038d Generate common headers to common/src/generated 2016-12-16 04:36:29 +03:00
Ilya Gorbunov 4f2593fb99 Add preprocessed JVM stdlib sources as common sources 2016-12-16 04:36:27 +03:00
Ilya Gorbunov 88a14056b7 Add hand-written headers for common stdlib 2016-12-16 04:36:25 +03:00
Ilya Gorbunov d381b56d47 Add module for common stdlib 2016-12-16 04:36:23 +03:00