Commit Graph

83 Commits

Author SHA1 Message Date
Shagen Ogandzhanian 714b4f25c0 Introduce better typing for on[event-name] attributes from idl
see https://upsource.jetbrains.com/kotlin/review/KOTLIN-CR-2548
2018-12-14 13:17:41 +01:00
Shagen Ogandzhanian 44da3c89b7 Introduce PointerEvent-related definitions
* Resolves https://youtrack.jetbrains.com/issue/KT-23932
 * Backed by review https://upsource.jetbrains.com/kotlin/branch/KT-23932-POINTER-EVENT-FROM-REMOTE-IDL
2018-12-12 14:53:18 +01:00
Shagen Ogandzhanian 1f0bca12e1 Leave undefined values for undefined params in idl-generated code unassigned
https://upsource.jetbrains.com/kotlin/review/KOTLIN-CR-2535
2018-12-07 16:05:00 +01:00
Shagen Ogandzhanian 8294309e5b Skip assignment for null-value ArrayLike object in idl-based generated code 2018-12-04 12:44:43 +01:00
Roman Artemev c5922bf74b Refact stdlib generator, add support for different backends
[JS IR BE] Runtime fixes
 * Do not generate external declarations for IR BE
 * Move `arrayToString` helper function out of shared JS stdlib
 * Fix arrays type check for IR BE
2018-11-29 22:04:53 +03:00
Ilya Gorbunov 5c94ef229b Move release coroutines sources into the corresponding stdlib sourcesets 2018-11-28 06:05:03 +03:00
Ilya Gorbunov cff32e46bb Provide expect declarations for String.startsWith/endWith overloads
Mark the existing declarations as actual.
2018-11-22 19:17:24 +03:00
Ilya Gorbunov 7d3de70754 Correct replacement for js Math.log
The correspondent kotlin.math function is ln(x)

#KT-28251 Fixed
2018-11-17 00:20:54 +03:00
Ilya Gorbunov 5f4e8bf4fb Correct abstract mutable collections declarations in kotlin-stdlib-common
Add SinceKotlin(1.3) to the new and substantially changed common declarations

#KT-28091
2018-11-09 13:39:44 +03:00
Ilya Gorbunov c8caed5b6f Duplicate MutableList.add docs in AbstractMutableList.add
Because the documentation inheritance doesn't work as desired here.
2018-10-23 22:21:25 +03:00
Ilya Gorbunov 4a10d954fc Unify and improve Regex docs 2018-10-22 17:14:46 +03:00
Ilya Gorbunov 63c5e18149 capitalize/decapitalize docs in stdlib/js 2018-10-22 17:14:45 +03:00
Ilya Gorbunov ac5eeb885f Unify AbstractMutableMap JS docs 2018-10-22 17:14:45 +03:00
Ilya Gorbunov 7fc6f06b70 Correct parameter reference in copyInto docs 2018-10-22 17:14:44 +03:00
Ilya Gorbunov ebe9d59df7 Unify print/println/readLine docs 2018-10-22 17:14:44 +03:00
Ilya Gorbunov 406bd7c980 Minor: split math sources into regions 2018-10-22 17:14:44 +03:00
Roman Artemev c496d8ed50 Fix Char.toLowerCase/Char.toUpperCase extensions 2018-10-19 14:03:06 +03:00
Svyatoslav Kuzmich 5a057f8ca6 [JS IR BE] Support 'is Number' and 'is Comparable<>' 2018-10-14 23:53:03 +03:00
Alexander Udalov 55c8b35eee Remove unneeded default imports in stdlib and tests 2018-10-01 13:39:02 +02:00
Ilya Gorbunov 974837654e Remove workaround for complex default value in Array.copyInto
#KT-22818
2018-09-22 18:24:00 +03:00
Anton Bannykh 2e709a81fa [JS IR BE] Arrays, varargs 2018-09-18 14:36:20 +03:00
Ilya Gorbunov b1c2daf1fe Stdlib: fix name shadowing and names of overridden method parameters 2018-09-14 15:32:25 +03:00
Ilya Gorbunov bf4be12239 Stdlib: review and suppress warnings 2018-09-14 15:32:25 +03:00
Ilya Gorbunov 2d356b89b5 Specialize contentDeepEquals/HashCode/ToString for arrays of unsigned types
#KT-26388
2018-09-13 06:10:10 +03:00
Ilya Gorbunov 62ffacab09 Raise deprecation level for jsClass functions
Suppress error in tests

#KT-21703
2018-09-11 18:15:04 +03:00
Ilya Gorbunov 35f42c7d35 Raise deprecation level for kotlin.Synchronized and Volatile, remove replacements
They are js-only but not supposed to be used in Kotlin/JS code, so their
usages should be just removed.

#KT-21703
2018-09-11 18:15:03 +03:00
Ilya Gorbunov 010b36be1f Raise deprecation level for kotlin.js.Math functions
#KT-21703
2018-09-11 18:15:03 +03:00
Ilya Gorbunov fbd2322ffa Add replacement information for deprecated JQuery members
#KT-21703
2018-09-11 18:15:03 +03:00
Ilya Gorbunov c3f654a71c Stdlib/JS: drop deprecated CharSequence.size
#KT-21703
2018-09-11 18:15:03 +03:00
Ilya Gorbunov e22ca022d4 Switch sourcesets of experimental and release coroutines
- Move experimental coroutines out of the main source root.
- Include experimental coroutines into the coroutines source set.
- Include release coroutines into the main source set.
2018-09-07 01:03:53 +03:00
Ilya Gorbunov 623adbfe4a Do not use JVM-specific annotations in pure-JS generated sources 2018-08-31 04:17:42 +03:00
Ilya Gorbunov 0c89996e34 Introduce platform specific annotations as optional in common stdlib
#KT-24478
2018-08-31 04:17:42 +03:00
Ilya Gorbunov b0bcd78e38 Optimize copying for typed arrays in JS 2018-08-30 16:21:24 +03:00
Ilya Gorbunov ea37a65178 copyInto: copying elements between two arrays
#KT-25874 Fixed
2018-08-30 16:21:20 +03:00
Dmitry Savvinov accbd07b2e Publish ContractsDsl
- Mark @ContractsDsl as @Experimental
- Move Contracts DSL out from 'internal' package
- Change visibility of ContractsDsl from 'internal' to 'public'

^KT-25274 Fixed
^KT-25495 Fixed
2018-08-30 16:19:51 +03:00
Ilya Gorbunov 2530a8e98c Provide unsigned string to number conversion in arbitrary base
#KT-26161
2018-08-30 14:58:35 +03:00
Ilya Gorbunov 4df665bc78 Generate extensions for unsigned arrays and provide tests for them
- contentEquals, contentToString, contentHashCode
- as[Signed]Array, as[Unsigned]Array
- to[Signed]Array, to[Unsigned]Array
- toTypedArray
- copyOf(), copyOf(newSize), copyOfRange(...)
2018-08-30 14:58:26 +03:00
Ilya Gorbunov 357c5be4fb Make sure index and count do not overflow for long sequences
Throw an exception immediately before an overflow becomes observable.
Place check to prevent negative index from indexOf, indexOfFirst.
Do not insert overflow checks for arrays, lists, maps and char sequences.

#KT-16097
2018-08-30 14:57:05 +03:00
Ilya Gorbunov 2df78fc81a Introduce common ArithmeticException
Make divisionByZero test still fail in JS after introducing ArithmeticException
2018-08-30 14:56:59 +03:00
Ilya Gorbunov c26b202907 Make StringBuilder.clear extension inline in JS
#KT-18910
2018-08-30 14:56:34 +03:00
Ilya Gorbunov 85af1f5d38 Improve argument validation in copyOfRange
Make copyOfRange implementation non-inline in order not to expose
copyOfRangeToIndexCheck implementation detail.

It will be possible to make the function non-inline itself later without
that JvmName trick, when apiVersion 1.2 support is discontinued.

#KT-19489
2018-08-30 14:56:29 +03:00
Ilya Gorbunov 58a3b64baf Add argument validation in copyOf(newSize) in JS
#KT-19489
2018-08-30 14:56:27 +03:00
Alexander Udalov cbc92bc9a1 Add KClass.sealedSubclasses to get direct subclasses of sealed class
#KT-14657 Fixed
2018-08-30 14:56:21 +03:00
Ilya Gorbunov db7f4bb402 Deprecate js Math.random and provide replacement with Random.nextDouble
#KT-23564 Fixed
2018-08-30 14:52:47 +03:00
Ilya Gorbunov 35c927214d More efficient double generation in JS 2018-08-30 14:50:50 +03:00
Ilya Gorbunov ed1f869354 Add xorwow random implementation test and fix implementation 2018-08-30 14:50:46 +03:00
Ilya Gorbunov fa33b1b5a9 Random docs and API refinement
KT-17261
2018-08-30 14:50:40 +03:00
Ilya Gorbunov 7e4528e217 Common shuffle/shuffled with the specified random source
KT-17261, KT-9010
2018-08-30 14:50:38 +03:00
Ilya Gorbunov cc031e3a40 Provide common Random API
#KT-17261
2018-08-30 14:50:36 +03:00
Ilya Gorbunov bbee18b84d Introduce StringBuilder.clear() extension
#KT-18910 Fixed
2018-08-30 14:50:29 +03:00