Dmitry Petrov
75ad20f823
Build compiler, plugin & stdlib with constructor call normalization
...
Required as a workaround for Proguard bug
https://sourceforge.net/p/proguard/bugs/664/
When processing bytecode generated by Kotlin compiler for constructor
call with stack spilling during arguments evaluation, ProGuard performs
an equivalent transformation for the bytecode, but emits invalid stack
frame information.
In JVM 1.6, such invalid stack frames are ignored and re-evaluated by
JVM during bytecode verification.
In JVM 1.8, such invalid stack frames cause VerifyError.
2017-10-12 10:59:57 +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
Anton Bannykh
ac508a510e
JS: Support isInitialized intrisic for lateinit properties
2017-10-11 19:23:49 +03:00
Alexander Udalov
2a8be2cdb4
Move internal declarations in kotlin-stdlib-jdk7/8 to other packages
...
- in kotlin-stdlib-jdk7, package kotlin.internal -> kotlin.internal.jdk7
- in kotlin-stdlib-jdk8, package kotlin.internal -> kotlin.internal.jdk8
2017-10-11 19:23:32 +03:00
Alexander Udalov
537a0ce315
Restore kotlin-stdlib-jre7/8 libraries
2017-10-11 19:23:30 +03:00
Alexander Udalov
e253acd5fd
Introduce kotlin-stdlib-jdk7/8 libraries, deprecate kotlin-stdlib-jre7/8
...
The idea is to keep all declarations in the same packages from Kotlin's
point of view, but use JvmPackageName annotation to move them to another
JVM package, to avoid the split package problem which is otherwise
unsolvable when using module path on Java 9 (KT-19258).
In this commit, kotlin-stdlib-jre7/8 are moved to kotlin-stdlib-jdk7/8
and in the subsequent commit, -jre7/8 are restored. This is done in
order to make Git recognize this as a file move to preserve history.
Include new stdlib-jdkN artifacts in manifest version tests.
2017-10-11 19:20:24 +03:00
Alexander Udalov
2fc3f4d07b
Update copyrights in kotlin-stdlib-jre7/8 sources
2017-10-11 19:20:24 +03:00
Alexander Udalov
00be512532
Revert "Temporarily remove isInitialized and tests, but keep the implementation"
...
This reverts commit 234148518e .
2017-10-11 19:20:24 +03:00
Ilya Gorbunov
0454bd9e28
Detect endianness when reinterpreting Float64 as two Int32
...
#KT-18264
Use Int32Array instead of Uint32Array since ints are required to be singed.
2017-10-11 19:20:24 +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
480d4a0093
Make withSign(NaN) behave as in JVM
...
#KT-4900
Where only the sign of the result is undefined, but the absolute value is unchanged.
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
86b23ffe49
Integer math functions and tests for them
...
#KT-4900
2017-10-11 19:20:24 +03:00
Ilya Gorbunov
a832db48f6
Float Math API
...
#KT-4900
2017-10-11 19:20:24 +03:00
Ilya Gorbunov
f3ea499d2c
JVM-specific math functions and tests
...
#KT-4900
2017-10-11 19:20:24 +03:00
Ilya Gorbunov
7e48f8b180
Provide Double and Float bit conversion functions as extensions
...
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
6373ac7ef0
Rename log to ln, log1p to ln1p, keep pow only as extension
...
#KT-4900
2017-10-11 19:20:24 +03:00
Ilya Gorbunov
805d1c90b7
Rename sgn to sign, add docs and tests
...
#KT-4900
2017-10-11 19:20:24 +03:00
Ilya Gorbunov
d0b12e3872
Use HALF_EVEN rounding mode for round()
...
Add docs and tests for rounding.
#KT-4900
2017-10-11 19:20:24 +03:00
Ilya Gorbunov
5e9e6d5951
Common math tests and document for trigonometric functions and powers.
...
#KT-4900
2017-10-11 19:20:24 +03:00
Ilya Gorbunov
a375bafa21
Draft common math API with top-level functions and constants in kotlin.math package
...
#KT-4900
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
c2cee2e405
Update binary api dump, rearrage bignumbers tests
2017-10-11 19:20:24 +03:00
Ilya Gorbunov
b89e5b2708
Add missing api: radix overloads, mathContext and scale overloads, orNull overloads
...
Move string-to-number conversions and their tests near to existing ones
Add documentation and copyrights.
2017-10-11 19:20:24 +03:00
voddan
e86e080088
KEEP-49: extending Kotlin API for BigInteger and BigDecimal
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
bb22d6647b
Introduce MutableList.fill and shuffle/shuffled extensions for JVM only
...
'shuffle' and 'fill' are inline only, but 'shuffled' is not.
#KT-8823 Fixed
#KT-9010 Fixed
2017-10-11 19:20:24 +03:00
Ilya Gorbunov
16d3d2f764
Make Regex class serializable on JVM
...
#KT-16447 Fixed
Refactor helper functions for serialization tests.
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
b94fd36d75
Minor refactoring in RingBuffer
2017-10-11 19:20:24 +03:00
Ilya Gorbunov
3f23742298
Optimize 'windowed' and 'chunked' for char sequences, iterables and sequences
2017-10-11 19:20:24 +03:00
Ilya Gorbunov
18c7a01ab5
Add tests for windowed and chunked, fix precondition checks
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
Sergey Mashkov
6ae85f5108
Sliding window implementation helper utilities
2017-10-11 19:20:24 +03:00
Ilya Gorbunov
c815ccfd6a
Introduce 'pairwise' function, KEEP-11
2017-10-11 19:20:24 +03:00
Ilya Gorbunov
03dcae5010
Attach method counting tasks to check rather than assemble stage
2017-10-11 19:19:08 +03:00
Dmitry Savvinov
2c0ef592e6
Effects: add DSL for declaration of contracts
...
- Introduce DSL for declaration of contracts. Functions and classes in
this DSL do not bear any computational semantics: in fact, they all do
not exist on runtime. Whole work of extracting semantics from such calls
is done by special parts of compiler
- To make distinguishing those declarations more robust and
convenient, introduce internal annotation @ContractsDSL
- Turn off InlineChecker inside contracts DSL. We do this, because some
functions from DSL should take any possible lambda, so we can't write
any type besides 'Function<R>'. However, InlineChecker will complain if
we will pass inlined lambda in such function -- though, this is false
positive because we know that functions from contracts DSL will never be
executed
- Change testData on HierarchyTestWithLib, where new enum from
kotlin.internal changed expected output
==========
Effect System introduction: 7/18
2017-10-11 13:34:54 +03:00
Ilya Gorbunov
968c9c2034
Set LATEST_STABLE language version and current version of stdlib to 1.2
2017-10-11 08:50:30 +03:00
Ilya Gorbunov
39c8bae134
Minor: move extra property initialization
2017-10-10 21:00:30 +03:00
Ilya Gorbunov
fe9ef04cae
Make a task to count dex methods in kotlin-stdlib and kotlin-reflect
2017-10-10 14:48:20 +03:00
Alexander Udalov
a96861c353
Support version kind for RequireKotlin
...
#KT-20584 Fixed
2017-10-10 13:21:49 +02:00
Alexander Udalov
4532f7556c
Introduce internal RequireKotlin annotation
2017-10-10 13:19:18 +02:00