Commit Graph

3270 Commits

Author SHA1 Message Date
Mikhail Glukhikh ffbd574a08 Use -opt-in instead of -Xopt-in in comments and scripts 2021-09-08 23:43:55 +03:00
Igor Laevsky 6ca965af6f WASM: Generate throw instruction instead of wasmThrow call 2021-09-08 19:56:33 +03:00
Abduqodiri Qurbonzoda 97eb28144f Introduce Common readln() and readlnOrNull() top-level functions #KT-48456 2021-09-05 15:31:11 +00:00
Mikhail Glukhikh ed035d99ab Migrate -Xopt-in to -opt-in in Gradle Kotlin scripts 2021-09-03 15:40:47 +03:00
Ilya Gorbunov 11314a5c4e Rename enabling old behavior property and make it cached in a field
Mention the property name in the note about conversion to set.

#KT-45438
2021-09-02 06:06:39 +03:00
Abduqodiri Qurbonzoda 94b371af5b Remove brittle ‘contains’ optimization in minus/removeAll/retainAll #KT-45438 2021-09-02 05:58:19 +03:00
Ilya Gorbunov fbc43cbebe Duration.toComponents: change the highest component type to Long 2021-09-02 02:44:16 +00:00
Abduqodiri Qurbonzoda d306c0e9ac Change JS CharSequence.isBlank() via checking all chars with isWhitespace 2021-09-02 01:38:04 +00:00
Abduqodiri Qurbonzoda 0faa83bacb Deprecate JS Array/PrimitiveArray.sort(comparison) functions 2021-09-02 01:38:03 +00:00
Abduqodiri Qurbonzoda a3eaa3e0f9 Change JS AbstractMutableCollection.toJSON() visibility modifier from open to protected 2021-09-02 01:38:03 +00:00
Abduqodiri Qurbonzoda a90117faa2 Change JS HashSet.createEntrySet() visibility modifier from protected to internal 2021-09-02 01:38:03 +00:00
Abduqodiri Qurbonzoda 921af8e98c Deprecate JS String match, matches and concat functions 2021-09-02 01:38:02 +00:00
Abduqodiri Qurbonzoda 3fefed5131 Remove deprecated JS Regex_0 and Regex_1 constructor functions 2021-09-02 01:38:02 +00:00
Abduqodiri Qurbonzoda 1008a88b43 Remove equals and hashCode implementation of JS AbstractMutableMap.values 2021-09-02 01:38:02 +00:00
Abduqodiri Qurbonzoda 407feb656e Make JS Regex.replace not inline #KT-27738 2021-09-02 01:38:01 +00:00
Abduqodiri Qurbonzoda 91aa956f34 Introduce JVM readln() and readlnOrNull() top-level functions #KT-48456 2021-09-02 01:00:34 +00:00
Ilya Gorbunov 0d58bb14b2 Duration: minor doc clarifications 2021-09-01 16:30:03 +00:00
Leonid Startsev 1932546a90 Support instantiation of annotations in JS
#KT-47700 Fixed
2021-09-01 11:13:55 +00:00
Alexander Udalov 0b11d4214c Make typeOf stable since 1.6
#KT-45396 Fixed
2021-08-30 19:36:32 +02:00
Alexander Udalov 98be418245 Uncomment new SinceKotlin and remove obsolete warning suppressions 2021-08-30 19:36:32 +02:00
Mads Ager a12b22c04d [JVM] Force lock object in JVM synchronized implementation into local.
This fixes a performance problem in the case where the lock object
is a capture and the monitor enter/exit happens directly on
field loads. When the locking happens on field loads instead of a
local, the JVM cannot prove that locking is balanced. That has
the consequence that the code is runs very slow (always in the
interpreter).

^KT-48367 Fixed.
2021-08-27 21:29:12 +02:00
Ilya Gorbunov 43a614ffcd Make builder collection implementations serializable KT-39328
Collections returned by collection builders are now serializable in
their read-only state.
The builder mutable collections inside collection builder lambda,
however, are not.
2021-08-24 23:13:57 +00:00
Steven Schäfer de9d2919a8 JVM Metadata: Add a bit to mark anonymous objects in inline functions
Anonymous objects in the scope of an inline functions are copied to
all call-sites. This makes them part of the public ABI of a Kotlin
library.

We introduce a flag to mark all classes in the scope of an inline
function. When compiling with assertions enabled, we check that
this flag is set whenever we inline an anonymous object from another
module.
2021-08-23 18:25:33 +02:00
Alexander Udalov 3bc0eaff59 Fix warnings in stdlib samples and test modules 2021-08-10 17:57:50 +02:00
Ilya Goncharov 766857881a [JS IR] Review remarks
- Use intrinsic on this
- Enqueue invoke for DCE
- Change transform
- Ignore instead of target backend

^KT-46204 fixed
2021-08-10 07:24:51 +00:00
Ilya Goncharov a28138eb72 [JS IR] Change js function on Kotlin code
^KT-46204 fixed
2021-08-10 07:24:49 +00:00
Ilya Goncharov 627af332b1 [JS IR] Use PublishedApi for intrinsic
^KT-46204 fixed
2021-08-10 07:24:48 +00:00
Ilya Goncharov e6af3ff6a8 [JS IR] Rename and doc new intrinsics, add new intrinsic to call suspend fun as supertype
^KT-46204 fixed
2021-08-10 07:24:48 +00:00
Ilya Goncharov a70fc99130 [JS IR] Add intrinsic to call suspend functions as super type
^KT-46204 fixed
2021-08-10 07:24:47 +00:00
Ilya Goncharov 755f847ab9 [JS IR] Use invoke for coroutines in runtime
^KT-46204 fixed
2021-08-10 07:24:46 +00:00
Ilya Goncharov 3c9dcdbbee [JS IR] Generate suspend function as invoke
[JS IR] Fix type check utils to work with array of arities

[JS IR] Store multiple arities for suspend functional interface implementers

^KT-46204 fixed
2021-08-10 07:24:46 +00:00
Igor Laevsky 5db8ec6551 WASM: Don't use intrinsics to specify NaN's 2021-08-06 17:34:21 +03:00
Alexander Udalov 0925e1b497 Enable JVM IR for stdlib/reflect/test libraries
Changes in Gradle integration tests are needed because:
- in new-mpp-android, kotlin-stdlib-jdk8 is used, and JVM IR generates
  JDK 8-specific bytecode (invokedynamic). D8 needs to be configured to
  desugar it with source/target versions set to 1.8, otherwise it
  reports an error.
- in AndroidExtensionsManyVariants and AndroidIcepickProject, D8 fails
  with assertions enabled if AGP < 4.0.0 is used because of
  https://issuetracker.google.com/issues/148661132. The tests which use
  old AGP versions are probably not relevant anymore anyway.

Changes in kotlin-stdlib-runtime-merged.txt are caused by a slightly
different generation scheme of collection subclasses in JVM IR, and are
harmless.

(Previous attempt was at 15e978dbd311c2ba78ec32b394c21acde9811ccb.)
2021-08-05 12:36:35 +02:00
Abduqodiri Qurbonzoda 29ac9b33ca Add Duration.parse/parseIsoString samples 2021-08-05 10:32:33 +00:00
Abduqodiri Qurbonzoda 5004735366 Add Regex matchAt samples 2021-08-05 10:32:32 +00:00
Abduqodiri Qurbonzoda d7b10f31b4 Add Regex splitToSequence samples 2021-08-05 10:32:32 +00:00
Igor Laevsky d8569b6a03 WASM: NFC. Remove dead code 2021-08-04 16:23:38 +03:00
Igor Laevsky af865544ff WASM: Implement string hashcode 2021-08-04 16:23:38 +03:00
Igor Laevsky 80140207b5 WASM: Properly handle nullable exported strings 2021-08-04 16:23:36 +03:00
Igor Laevsky 468fe4196d WASM: Implement string.compareTo and string.subSequence 2021-08-04 16:23:35 +03:00
Igor Laevsky 0eba74a9d2 WASM: Impelment float to string conversion operations 2021-08-04 16:23:32 +03:00
Igor Laevsky f34a079699 WASM: Implement integer to string conversion operations 2021-08-04 16:23:32 +03:00
Igor Laevsky 2538caa84f WASM: NFC. Rename string import/export functions 2021-08-04 16:23:31 +03:00
Igor Laevsky ebde1e5491 WASM: Crude println implementation with the wasm-native strings 2021-08-04 16:23:30 +03:00
Igor Laevsky fc0ae851a2 WASM: Don't special case string equality, it now goes through normal .equals method 2021-08-04 16:23:29 +03:00
Igor Laevsky d90e3618f9 WASM: NFC. Rename WasmReinterpret into WasmNoOpCast. 2021-08-04 16:23:28 +03:00
Igor Laevsky 0f84525bdc WASM: Implement wasm-native strings part 1
There are several changes here but they all required for at least one test to pass.
- Implemented String class and several utility functions using built-in CharArray
- Added new constant memory segment to hold string literals and required funcs to work with them
- Added very crude mostly incorrect rudimentary ability to pass strings back to javascript
2021-08-04 16:23:28 +03:00
Igor Laevsky 9ccdffe8ad WASM: NFC. Rename WasmPrimitive into WasmAutoboxed and add few comments. 2021-08-04 16:23:27 +03:00
Alexander Udalov 3636118743 Introduce typealias JvmRepeatable for j.l.a.Repeatable
#KT-12794 Fixed
2021-07-30 19:53:44 +02:00
Alexander Udalov 0a6d010d1c Support new repeatable annotations in kotlin-reflect
- Unwrap Kotlin-repeatable annotations (with implicit container)
- Introduce `KAnnotatedElement.findAnnotations` to find instances of
  repeated annotations

 #KT-12794
2021-07-30 19:53:33 +02:00