Abduqodiri Qurbonzoda
f01420332f
Avoid division in string-to-number conversions (KT-26309)
2019-09-15 21:08:23 +03:00
Abduqodiri Qurbonzoda
11f3c4b03f
Clarify the error message when File.copyTo fails (KT-27545)
2019-09-13 21:29:13 +03:00
Ilya Gorbunov
7ff01b02a9
Make ExperimentalTime annotation documented
2019-08-22 21:29:18 +03:00
Ilya Gorbunov
2c79b1f89e
Minor: fix incorrect reference in kdoc
2019-08-22 21:29:18 +03:00
Svyatoslav Kuzmich
6e6ffa12a6
[WASM] Initial infrastructure
...
- New module ":compiler:backend.wasm"
- Initial compiler infra (driver, phaser, context)
- Subset of Wasm AST
- Skeleton of IR -> Wasm AST
- Wasm AST -> WAT transformer
- Testing infra
- SpiderMonkey jsshell tool
2019-08-22 15:59:54 +03:00
Svyatoslav Kuzmich
812083ee05
[WASM] Initial runtime library
...
Add directory libraries/stdlib/wasm as a placeholder for WASM runtime library
Copy built-ins from core/builtins
Add ExcludeFromCodegen annotation for internal needs
2019-08-22 15:59:49 +03:00
Ilya Chernikov
0f41dc814f
Switch many common tasks defined in buildSrc to lazy creation
...
also refactor some locally defined tasks to the creation avoidance API
2019-08-21 20:20:08 +02:00
Yanis Batura
e9e3df23fc
Fix typos and improve grammar in stdlib readmes ( #2527 )
...
* Fix typos in the main ReadMe.md
* Fix typos in the stdlib samples ReadMe.md
Co-Authored-By: ilya-g <ilya.gorbunov@jetbrains.com >
2019-08-16 19:56:56 +03:00
Ilya Gorbunov
fba22606e6
Introduce erroneous operators ClockMark.minus/compareTo(ClockMark)
...
To provide a better diagnostic message on their misuse.
2019-08-16 15:29:17 +03:00
Ilya Gorbunov
ac07cb686b
Change status of ExperimentalTime API to a more risky one
2019-08-16 15:29:17 +03:00
Ilya Gorbunov
a985402507
Introduce ClockMark.hasPassedNow, hasNotPassedNow functions
...
Makes it more clear to use them than comparing elapsed with Duration.ZERO.
2019-08-16 15:29:16 +03:00
Ilya Gorbunov
44195d436e
Rename: Clock.markNow, ClockMark.elapsedNow
...
Add "Now" suffix to the names of functions that depend on the current
time moment.
2019-08-16 15:29:16 +03:00
Ilya Gorbunov
a493d46a6e
Make effectively private properties actually private to avoid accessors
2019-08-16 15:29:16 +03:00
Ilya Gorbunov
f889d25287
Introduce TestClock.plusAssign(Duration) and hide implementation details
...
TestClock.plusAssign(Duration) is for advancing TestClock time.
Hide reading value, do not allow to provide initial reading,
fix clock unit to nanoseconds at construction time.
2019-08-16 15:28:45 +03:00
Ilya Gorbunov
4de9361c37
Introduce Duration.isPositive method
2019-08-16 15:25:57 +03:00
Abduqodiri Qurbonzoda
63895483fd
Fix take method from iterating one extra element (KT-32024)
2019-08-15 01:01:36 +03:00
Abduqodiri Qurbonzoda
01a613dca4
Add tests for floating-point to integral conversion
2019-08-15 00:57:27 +03:00
Abduqodiri Qurbonzoda
432828a2db
Clarify floating-point to integral conversion rounding behaviour
2019-08-15 00:57:27 +03:00
Dmitry Petrov
a9c961931c
JS_IR: Support 'CHECK_NOT_NULL' intrinsic
2019-08-14 11:16:11 +03:00
Alexander Udalov
2baddb029c
Use Intrinsics.checkNotNullParameter to throw NPE in parameter null checks
...
Similarly to previous commits, this method was unused, so we're changing
its semantics in API version >= 1.4.
#KT-22275 In Progress
2019-08-12 16:09:23 +02:00
Alexander Udalov
480313210a
Use Intrinsics.checkNotNullExpressionValue to throw NPE in Java null checks
...
Similarly to previous commit, this method was unused since its
introduction before 1.0, so we're changing its semantics to throw NPE
and starting to use it with API version >= 1.4.
#KT-22275 In Progress
2019-08-12 16:09:23 +02:00
Alexander Udalov
a7c8fdcbe2
Use Intrinsics.checkNotNull and throw NPE in !! operator generation
...
This method was introduced in c204e8fc67 "just in case" and was never
used. Therefore we're free to change its semantics and use it in all new
generated code (with API version >= 1.4), without even worrying that the
newly used API will leak from inline functions in stdlib when used with
an older API version. Since we agreed to change the type of thrown
exceptions to java.lang.NPE in KT-22275, invoke a new method
throwJavaNpe now which throws that exception instead of KNPE.
Note that the additional method that takes an exception message is still
unused and exists just in case we need to use it in the future. The new
method throwJavaNpe is public also "just in case" we need to invoke it
in the future; currently it's not invoked from the bytecode.
#KT-22275 In Progress
2019-08-12 16:09:23 +02:00
Abduqodiri Qurbonzoda
84971d2003
Mention union in intersect documentation and vice versa (KT-26212)
2019-08-12 01:15:20 +03:00
Ilya Gorbunov
ebb59d51d2
Fix incorrect Double.toLong conversion for infinite values in JS
...
#KT-33225 Fixed
2019-08-09 11:49:28 +03:00
Ilya Gorbunov
65b0a5f903
Unify withIndex docs wording
2019-08-01 19:55:36 +03:00
Ilya Gorbunov
3751a8a797
Common Array.fill for unsigned arrays, improve docs, native impl name
...
KT-32359
2019-08-01 19:02:39 +03:00
Jake Wharton
1a6069382e
Provide Array.fill in common stdlib
...
KT-32359
2019-08-01 19:02:38 +03:00
Ilya Gorbunov
695d657ca8
Random.nextLong: use progression properties consistently
...
Apply inspection suggestion that helps to reduce boxing.
2019-07-31 21:53:16 +03:00
Ilya Gorbunov
945e058586
Document return value of removeAll and retainAll with predicate
...
#KT-32532 Fixed
2019-07-17 14:27:26 +03:00
Ilya Gorbunov
4fc942c5e9
KT-16602: Improve mutable sorting samples, fix sample references
2019-07-12 21:34:54 +03:00
Dat Trieu
38d26b1d92
KT-16602: Provide samples for sorting API usage
2019-07-12 21:32:03 +03:00
keijumt
3f5d64e635
Add sample of hashMapOf
2019-07-12 17:10:15 +03:00
Pavel Semyonov
2577dfa06a
docs: added KDoc for Comparator, fixed KDoc for comparison binarySearch()
2019-07-12 16:08:37 +03:00
Abduqodiri Qurbonzoda
96dcafdf35
Document order of array elements initialization (KT-32353)
2019-07-11 21:18:47 +03:00
Ilya Gorbunov
7d14fb756d
Make Duration storageUnit inline val to avoid state initialization
...
Avoid state initialization in JS and Native
2019-07-09 20:39:28 +03:00
Roman Artemev
d4fb76c1da
[JS IR BE] Fix overriding property of Throwable
2019-07-09 10:40:01 +03:00
Ilya Gorbunov
7573fcde53
Demote new experimental capitalize overloads in overload resolution
...
Revert "Fix method reference ambiguity in test after introducing 'capitalize' overload"
This reverts commit fe9bd9ee
2019-07-09 03:39:25 +03:00
Ilya Gorbunov
686bcb830e
Bit query and bit rotation functions for UInt, ULong, UShort, UByte
...
#KT-12749
2019-07-08 19:09:32 +03:00
Ilya Gorbunov
39bdf34b9f
Use common implementation of fastLog2 based on countLeadingZeroBits
2019-07-08 19:09:32 +03:00
Ilya Gorbunov
f8724654a1
Bit query and bit rotation functions for Int, Long, Short, Byte
...
#KT-12749
2019-07-08 19:09:32 +03:00
Ilya Gorbunov
32fc131d62
Rename jvm actuals from Numbers to NumbersJVM
...
Rename multifile facade to from MathKt to NumbersKt to avoid confusion
with kotlin.math.MathKt
2019-07-08 19:09:32 +03:00
Svyatoslav Kuzmich
675f01ee80
[JS IR BE] Set Throwable subtype name in extendThrowable function
2019-07-05 19:31:23 +03:00
Svyatoslav Kuzmich
a2625c7bc8
[JS IR BE] Don't render null messages in Throwable
...
Set message property to 'undefined' to make Error.prototype.toString
skip it
2019-07-04 18:33:23 +03:00
Svyatoslav Kuzmich
94aebd0101
[JS IR BE] Proper support for String and Any constructors
...
Remove workarounds from codegen
2019-07-04 17:03:47 +03:00
Svyatoslav Kuzmich
918d470e1b
[JS IR BE] Simplify throwable lowering.
...
- Make kotlin.Throwable class extenral
- Add runtime function 'extendThrowable' to use instead of delegating
constructors to Throwable
2019-07-03 20:37:48 +03:00
Svyatoslav Kuzmich
69962cbf8c
[JS IR BE] Add JsExport annotations
2019-07-01 18:55:41 +03:00
Sergey Rostov
f35680e823
Build: cleanup stdlib/jps-build/build.gradle.kts
2019-06-27 17:56:52 +03:00
Vyacheslav Gerasimov
72be81ba46
Build: Add JPS artifact for dist
2019-06-27 17:56:49 +03:00
Vyacheslav Gerasimov
db3b01d2d4
Build: Centralize compiler dist build logic in :kotlin-compiler project
2019-06-27 17:56:48 +03:00
Ilya Gorbunov
d58c8c68d5
Fix replacement for deprecated Math.pow #KT-32083
2019-06-27 05:22:25 +03:00