Commit Graph

158 Commits

Author SHA1 Message Date
Ilya Gorbunov 5c0cc5f799 Move deprecated kotlin-runtime and reduced runtime for tests into stdlib
Rename mock-runtime-for-test project to kotlin-stdlib:jvm-minimal-for-test
2018-02-26 17:11:11 +03:00
Ilya Gorbunov c796e5338b Move runtime.jvm sources to stdlib/jvm/runtime
Update path in kotlin-runtime
Update path in kotlin-mock-runtime-for-tests
2018-02-26 17:11:10 +03:00
Alexander Udalov 31e762c679 Move 1.3-specific part of stdlib to another source set 2018-02-15 13:14:37 +01:00
Alexander Udalov 0bf0a315ed Introduce Experimental and UseExperimental annotations
#KT-22759 In Progress
2018-02-08 17:07:21 +01:00
Ilya Gorbunov 479f293edc Expose internal getProgressionLastElement to public api
To be used in compiler loop optimizations.
#KT-18869 Fixed
2017-12-14 07:22:08 +03:00
Alexander Udalov 329fbd8fa8 Extract kotlin-reflect-api module out of kotlin-reflect
This is needed only for faster compilation of the Kotlin project itself
and has no effect on the public artifact
org.jetbrains.kotlin:kotlin-reflect.

The problem this is solving is the rebuild of the project once anything
has been changed in modules in 'core' (even inside function bodies, i.e.
a non-API change). Previously, changes in 'core' led to the compilation
of kotlin-reflect, which led to the rebuild of all modules depending on
kotlin-reflect directly or indirectly (which is almost all modules in
the project) because kotlin-reflect's artifacts are custom-built and the
changes can not be picked up incrementally. But 99.9% of the time the
initial changes in 'core' could not have any effect on the usages of
kotlin-reflect, because classes from those modules are moved to an
internal package in kotlin-reflect and thus are an internal
implementation detail.

Now, changes in 'core' still lead to the compilation of kotlin-reflect
and to the process of building the custom jar. But if a module depends
on kotlin-reflect-api, not kotlin-reflect, then the incremental
difference checker will detect that the module does not have to be
recompiled if there hasn't been any changes to the API of
kotlin-reflect-api. Which means that the module will not be rebuilt on
every change in 'core'.

This commit only introduces the new module. The dependencies
(kotlin-reflect -> kotlin-reflect-api) are replaced in the next commit.
2017-11-28 12:35:48 +01:00
Alexander Udalov 3e8b39af90 Move kotlin-reflect Gradle project to libraries/reflect/ 2017-11-28 12:33:21 +01:00
Ilya Gorbunov 9305903e6c Remove deprecated pairwise function
It was replaced with zipWithNext.
2017-11-07 18:59:33 +03:00
Ilmir Usmanov 817f79520a Implement coroutineContext intrinsic
This intrinsic allows coroutine to access its context without suspention
and, furthermore, disabling tail-call optimization.
KT-17609: Fixed
2017-11-02 12:45:24 +03:00
Ilya Gorbunov 3ab7946c4d Introduce apiVersionIsAtLeast function to branch in inlines
#KT-16028
2017-10-13 18:56:05 +03:00
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 6fc87c532e Restore dependency to build kotlin-runtime before BCV tests 2017-10-12 06:06:12 +03:00
Alexander Udalov d41c1d572b Remove deprecated API from package kotlin.reflect
This is needed to avoid the split package problem on Java 9 (KT-19258):
both kotlin-stdlib.jar and kotlin-reflect.jar export the package
kotlin.reflect
2017-10-11 19:23:40 +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
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 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 c2cee2e405 Update binary api dump, rearrage bignumbers tests 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 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
Ilya Gorbunov de004337a2 Pass arguments to bcv tests with system properties rather than env 2017-10-11 19:20:24 +03:00
Mikhail Zarechenskiy e9aad54664 Add intrinsics to mark and choose special api calls
#KT-20585 Fixed
2017-10-11 01:37:05 +03:00
Ilya Chernikov 95035b3d72 Fix various tests 2017-09-20 11:51:23 +02:00
Ilya Chernikov fd1b677904 Switch reflect to compiled core classes 2017-09-19 23:58:32 +02:00
Roman Elizarov 9f0810f723 Pull implementations up from AbstractCoroutineContextElemenet
Fixes KT-18671
2017-07-19 08:59:43 +03:00
Denis Zharkov 970dfd10d4 Update rendered public API for coroutines
suspendCoroutine is not public anymore as it's inline
and all inline suspend functions are treated as inline-only,
i.e. private in JVM
2017-05-23 18:45:33 +03:00
Denis Zharkov eedc35aefd Drop new coroutine-related API introduced in 1.1.4
See 49453ca705 for clarification

 #KT-17898 Fixed
2017-05-22 14:51:04 +03:00
Denis Zharkov 57cb556efd Update rendered public API in coroutines package
- suspendCoroutine is not public anymore, since all of the
inline functions are generated as private
- `label` is public to allow update it from the named functions
2017-05-16 11:38:59 +03:00
Ilya Gorbunov 180233b78e binary-compatibility-validator: use project version to disambiguate artifacts 2017-05-05 18:01:02 +03:00
Ilya Gorbunov 723642c9d4 binary-compatibility-validator: depend on required artifacts to ensure they are built.
Read dumped declarations lazily in order not to fail on class initialization.
2017-04-17 15:17:02 +03:00
Ilya Gorbunov 94895c4e4d Clean warnings in binary-compatibility-validator cases 2017-04-17 14:50:07 +03:00
Alexander Udalov 10f2e9d33a Revert usages of -X arguments to old form in some places
We use the old compiler in Gradle build and in GradleFacetImportTest, so
some changes in f4b6db4 should not have been made yet
2017-04-17 11:33:58 +03:00
Alexander Udalov f4b6db4dc0 Change format of -X arguments to require value after '='
Report a warning when an argument is passed in the old form (with the
whitespace)

 #KT-17264 Fixed
2017-04-14 20:07:54 +03:00
Ilya Gorbunov 5aabcb6ea3 Update build instructions in ReadMe to include gradle build step.
Also update links and overall readme structure.
2017-04-08 08:37:12 +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 02293dab9e Add public api dumps for kotlin-reflect and kotlin-stdlib-jre7/8 2017-04-06 20:32:37 +03:00
Ilya Gorbunov 3db1613167 Setup dist task to assemble libs for compiler distribution.
Produce special stdlib artifact with annotations for dist.
Put js outputs to dist, they're required for JS backend tests.

Use kotlin-compiler for maven, which has all required dependencies bundled.
Clean local directory repository on clean.

Change paths in tests to compiled artifacts.
2017-04-06 20:32:37 +03:00
Ilya Gorbunov e090a44b71 Migrate binary-compatibility-validator tests to gradle. 2017-04-06 20:32:37 +03:00
Ilya Gorbunov c0c01d6e49 Drop HIDDEN deprecations from kotlin-stdlib. 2017-02-22 17:28:02 +03:00
Alexander Udalov 1ee2053a16 Make callable references Serializable on JVM
#KT-11254 Fixed
2017-02-16 18:00:18 +03:00
Alexander Udalov 46bd64f59a Rename FunctionImpl -> FunctionBase, restore abstract class FunctionImpl
This fixes the IncompatibleClassChangeError which happens when kotlin-reflect
1.0.x and kotlin-stdlib 1.1.x are in the classpath

 #KT-16358 In Progress
2017-02-15 20:43:25 +03:00
Alexander Udalov 8e3cb912c7 Make Ref classes for shared vars Serializable
#KT-14566 Fixed
2017-02-15 10:46:48 +03:00
Ilya Gorbunov 03cdc20d64 Update public API dump: new coroutine builder intrinsics 2017-02-07 14:42:00 +03:00
Denis Zharkov 52f1194247 Update public API dump: areEqual helpers for ieee 754 comparisons 2017-02-07 14:41:58 +03:00
Ilya Gorbunov d4d647ab00 Remove public synthetic annotation holder methods from public API dump. 2017-02-07 14:41:56 +03:00
Ilya Gorbunov 970490e097 Revert "Update rendered public API". This reverts commit a10c6f00f9.
Revert "Update stdlib reference and binary compatibility test data". This reverts commit 2d02e5106f.
2017-02-07 14:41:31 +03:00