Commit Graph

91 Commits

Author SHA1 Message Date
Ilya Gorbunov 6197c5bf7f Add sample for coerceIn with floating point range
#KT-20357
2018-01-11 09:05:28 +03:00
Ilya Gorbunov 8fc83e3ff5 Add samples for coerceIn, coerceAtLeast, coerceAtMost for comparable types
#KT-20357
2018-01-11 09:05:28 +03:00
shiraji 17573a3c21 Add samples for coerceIn
#KT-20357
2018-01-11 09:05:28 +03:00
shiraji 4559da9848 Add samples for coerceAtMost
#KT-20357
2018-01-11 09:05:28 +03:00
shiraji db607e231c Add samples for coerceAtLeast
#KT-20357
2018-01-11 09:05:27 +03:00
Jake Wharton 11696ac4c0 Implement String.toBoolean() for JS.
#KT-16348
2018-01-10 15:32:49 +03:00
Ilya Gorbunov 4e26ca5659 Add missing exception constructors to common and JS declarations
Add test to validate exception properties after calling various constructors.

Make NumberFormatException a descendant of IllegalArgumentException in all platforms.

#KT-21861 Fixed
#KT-21191 Fixed
2017-12-29 21:16:17 +03:00
Ilya Gorbunov b6595d661d Improve expect declarations in kotlin.text
- Replace overloads with default parameters in expect declarations by suppressing errors
- Remove meaningless inline modifier
2017-12-27 21:55:24 +03:00
Ilya Gorbunov 824b506abe Remove inheritance between LinkedHashSet/Map and HashSet/Map 2017-12-27 21:55:24 +03:00
Ilya Gorbunov c5c6eed170 Make common ArrayList declaration not open and implementing RandomAccess 2017-12-27 21:55:24 +03:00
Ilya Gorbunov fb13347864 Extract kotlin.collections expect classes into separate files
Add missing expect declarations for AbstractMutableMap/Set.
2017-12-27 21:55:24 +03:00
Ilya Gorbunov 93ef16deaf Move expect declarations to the appropriate packages
So that they match actual declarations in Kotlin/JVM stdlib.
2017-12-27 21:55:24 +03:00
Ilya Gorbunov 10639eaf6a Add pattern and options properties to common Regex
And add a test that accesses them and checks they work as expected.
2017-12-26 05:40:37 +03:00
Ilya Gorbunov ecd42f14b3 Compile common stdlib tests against common stdlib
Declare platform-specific test utilities as expect.
2017-12-26 04:55:40 +03:00
Ilya Gorbunov bd4d847943 Fix unresolved references in the api docs
These were mostly incorrect parameter names and external api links.
2017-11-28 18:41:17 +03:00
Ilya Gorbunov dcd0a94d76 Minor: fix extra space in return type of chunked and windowed 2017-11-15 09:17:42 +03:00
Ilya Gorbunov 9305903e6c Remove deprecated pairwise function
It was replaced with zipWithNext.
2017-11-07 18:59:33 +03:00
Ilya Gorbunov ace9d0da94 Finalize math function parameter names
#KT-4900
2017-10-25 21:30:03 +03:00
Ilya Gorbunov 84c0e8dfb4 Enable coroutines in kotlin-stdlib-common 2017-10-24 20:35:43 +03:00
Ilya Gorbunov 781ca6d2b5 Inline swap function, do not use deprecated floor. 2017-10-12 06:06:26 +03:00
Pap Lorinc e640867238 Provide java.util.Collections#shuffle as extensions for collections in JS
#KT-2460
2017-10-12 06:06:26 +03:00
Ilya Gorbunov aab604d154 Improve math docs
Add links from log to ln, log2, log10.
Format lists in docs so that they are pretty in quick doc window.
2017-10-12 05:58:04 +03:00
Ilya Gorbunov aa3bfc55c3 Implement in JS nextUp(), nextDown(), nextTowards() and ulp extensions
#KT-4900
2017-10-11 19:20:24 +03:00
Ilya Gorbunov 132f2f88c2 Provide Double and Float bit conversion functions as extensions in JS and Common
Instance extension: Double/Float.toBits/toRawBits
Companion extension: Double/Float.Companion.fromBits

#KT-18264 Fixed
2017-10-11 19:20:24 +03:00
Ilya Gorbunov 044ccf1532 Introduce inverse hyperbolic functions
#KT-4900

Improve accuracy of JS polyfills of hyperbolic functions and expm1/log1p
2017-10-11 19:20:24 +03:00
Ilya Gorbunov 5bfa9b248e Minor fixes in logarithm functions docs 2017-10-11 19:20:24 +03:00
Ilya Gorbunov 57f5791e70 Annotate new API with SinceKotlin, provide common headers
#KT-4900

Also update binary API dump.
2017-10-11 19:20:24 +03:00
Ilya Gorbunov 559255f38e windowed function: add default parameters, drop or keep partial windows, KEEP-11
Make step default to 1.
Add partialWindows boolean parameter defaulting to false to control
whether to keep partial windows in the end.
2017-10-11 19:20:24 +03:00
Ilya Gorbunov c04b0072af Rename pairwise to zipWithNext, KEEP-11 2017-10-11 19:20:24 +03:00
Ilya Gorbunov a8fef3a385 Provide MutableList.fill for JS, annotate new API with @SinceKotlin
#KT-8823 #KT-9010
2017-10-11 19:20:24 +03:00
Ilya Gorbunov 99bd54116e Docs and samples for 'windowed' function 2017-10-11 19:20:24 +03:00
Ilya Gorbunov b2f2e3537b Docs and samples for 'chunked' function 2017-10-11 19:20:24 +03:00
Ilya Gorbunov e418f61f0c Docs and samples for 'pairwise' function 2017-10-11 19:20:24 +03:00
Ilya Gorbunov a3a1c391cc Generate 'chunked' and 'windowed' signatures and delegating implementations
Add implementations of windowed.
2017-10-11 19:20:24 +03:00
Ilya Gorbunov c815ccfd6a Introduce 'pairwise' function, KEEP-11 2017-10-11 19:20:24 +03:00
Mikhail Zarechenskiy 1845a87813 Provide no-arg constructors for common expected annotations in stdlib
This is needed because we treat `expect` classes as not having implicit default constructors (see more in KT-15522, f3344ec)
2017-10-09 18:50:38 +03:00
Ilya Gorbunov 0898897057 Remove crossinline restriction from synchronized in js and common
#KT-20596 Fixed
2017-10-04 19:15:33 +03:00
Simon Ogorodnik 3262ac0129 Fix compileJava not found when running idea:test 2017-09-20 11:51:27 +02:00
Ilya Chernikov 6b22282ad4 Change previous gradle build for compatibility with the centralized build
incompatible with the main build yet
2017-09-19 21:37:07 +02:00
Stanislav Erokhin 481cbd0850 Migrate header to expect in libraries projects 2017-09-16 19:47:45 +03:00
Stanislav Erokhin 7cd5eeb24d Regenerate common stdlib: use 'expect' instead 'header' 2017-09-16 19:47:44 +03:00
Alexander Udalov d1cff41ce0 Treat nested class of header class as header
Note that the quick fix to implement header class works incorrectly when
that class has nested classes at the moment; this should be fixed
separately

 #KT-15494 Fixed
 #KT-18573 Fixed
2017-08-25 15:40:37 +03:00
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