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
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
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
Dat Trieu
38d26b1d92
KT-16602: Provide samples for sorting API usage
2019-07-12 21:32:03 +03:00
Abduqodiri Qurbonzoda
96dcafdf35
Document order of array elements initialization (KT-32353)
2019-07-11 21:18:47 +03:00
Roman Artemev
d4fb76c1da
[JS IR BE] Fix overriding property of Throwable
2019-07-09 10:40:01 +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
Vyacheslav Gerasimov
db3b01d2d4
Build: Centralize compiler dist build logic in :kotlin-compiler project
2019-06-27 17:56:48 +03:00
AJ Alt
ed96197d6b
Always use LF line endings in generated stdlib code
...
The code generation uses a mixture of literal `\n` characters and `appendln`. The latter insert `\r\n` on Windows by default, causing generated files to contain a mixture of line endings.
This commit sets the `line.separator` system property for the generator to `\n` so that `appendln` will never insert `\r` characters. As an additional measure, `.gitattributes` files were added to checkout generated stdlib files always with LF line endings.
2019-06-27 03:02:10 +03:00
Roman Artemev
97203973ac
[JS IR BE] Fix coroutine context
2019-06-24 20:14:19 +03:00
Ilya Gorbunov
eae1813ead
stdlib-js(-v1/-ir): rename source files to avoid duplicates in sources
...
Prohibit having duplicates in sources jar and rename those source files,
that clash with the same named source files coming from
the common js source root.
Relates to KT-31965
2019-06-18 20:03:04 +03:00
Ilya Gorbunov
5bafba6bff
stdlib-js-ir: preserve source directory structure of common js sources
2019-06-18 19:58:47 +03:00
Ilya Gorbunov
16111ab79f
Opt-in for Experimental/UseExperimental annotation usage in tests
2019-06-18 04:02:34 +03:00
Roman Artemev
1f70284b18
[JS IR BE] Fix charSequenceLength function for JS IR
2019-06-17 18:10:53 +03:00
Svyatoslav Kuzmich
a3677d6fc0
[JS IR RUNTIME] Fix types in kotlin.js.captureStack
2019-05-24 11:50:47 +03:00
Roman Artemev
9c7d47789c
[JS IR BE] Implement type check for SuspendFunctionN
2019-05-22 15:18:13 +03:00
Svyatoslav Kuzmich
b8bbcb3f93
[JS IR BE] Copy type metadata for Boolean, Char and Long varargs
2019-05-21 19:19:31 +03:00
Svyatoslav Kuzmich
23a214710b
[JS IR BE] Add Unit return type to function signature
2019-05-15 14:09:02 +03:00
pyos
683f8417d3
Add a common JVM/JS lowering for Array(size, function)
...
and remove the hack from JVM_IR codegen that replaces this call with
hardcoded inline function bytecode.
(cherry picked from commit 4a29e3cfcf )
2019-05-09 11:54:18 +02:00
max-kammerer
e74e0ea013
Revert "Add a common JVM/JS lowering for Array(size, function)"
...
This reverts commit 4a29e3cfcf .
2019-05-09 11:49:34 +02:00
pyos
4a29e3cfcf
Add a common JVM/JS lowering for Array(size, function)
...
and remove the hack from JVM_IR codegen that replaces this call with
hardcoded inline function bytecode.
2019-05-09 08:03:18 +02:00
Svyatoslav Kuzmich
e3bcabeae3
[JS IR] stdlib: Fix bugs in Long.toString(radix)
2019-05-07 21:49:12 +03:00
Svyatoslav Kuzmich
bc29a5b15c
[JS IR] stdlib: port methods that use bit representation of numbers
...
- Port part of 'misc.js' from current backend to 'bitUtils.kt' in IR backend
- Enable toBits, toRawBits, fromBits extension function on Double and Float
- Enable Double.withSign
- Refactor getNumberHashCode using new utils
2019-05-07 21:49:12 +03:00
Svyatoslav Kuzmich
362fbc8770
[JS IR] stdlib: Use comparator in CharArray.sort
...
CharArray is represented as a regular JS Array. Its default sort order is based
on string representation of elements.
2019-05-07 21:48:50 +03:00
Svyatoslav Kuzmich
179acf0789
[JS IR] stdlib: generate type-safe contentToString for primitive arrays
...
Avoid casting 'primitive' arrays to Array<*> because they fail on runtime
2019-05-07 21:48:50 +03:00
Svyatoslav Kuzmich
7687985442
[JS IR] Stdlib: use total-order comparasion for content equals
2019-05-07 21:48:50 +03:00
Svyatoslav Kuzmich
3a506a372b
[JS IR] stdlib: Use Nothing in return type of THROW helpers
...
Backend generated calls to those helpers inside expression which
resuleted in invalid type casts in IR (in dead code).
2019-05-07 21:48:50 +03:00
Abduqodiri Qurbonzoda
81d2d3cb6a
Implement String to/from CharArray conversion (KT-29265)
2019-05-06 15:54:28 +03:00
Svyatoslav Kuzmich
87415cb769
[JS IR] Help IDEA: Copy stdlib sources instead of sharing
2019-05-01 00:28:36 +03:00
Yanis Batura
a51b7fb8d0
Fix typos
2019-04-30 18:42:07 +03:00
Svyatoslav Kuzmich
379cb08226
[JS] Reduce usage of 'js' function in stdlib
...
Function 'kotlin.js.js' is to be redesigned in JS IR backend,
partially because it is a hard feature to support.
Current implementation is unstable and can cause problems around
inlining and name generator. Luckily most of its use-cases
can be covered by simpler features like dynamic expressions and
external declarations.
Thus we are reducing it's usage in stdlib to make IR backend more
stable in current state. JavaScript features that can't be covered by dynamic expression are
implemented in 'jsOperators.kt' file respectively for each backend:
- 'internal inline' function which calls 'js' function inside for current
pre-IR backend
- 'internal' function with '_hack' parameters for JS IR backend which will be
later intinsicified in a compiler
2019-04-30 15:27:19 +03:00
Svyatoslav Kuzmich
13b332e99e
Build scripts for JS IR versions of stdlib and kotlin.tests
2019-04-26 20:14:12 +03:00
Svyatoslav Kuzmich
09d7f4015b
Move test.kt stubs to smallRuntime
...
We already use kotlin.test with fullRuntime klib.
2019-04-24 13:06:59 +03:00
Svyatoslav Kuzmich
b0bd5802bb
Remove optionalExpectation hacks
...
Add common sources to Generate IR Runtime
2019-04-24 13:06:58 +03:00
nikita.movshin
deb416484c
Update copyright. Fix 2 lines comments after rebase
...
Change the copyright from "JetBrains s.r.o." to
"JetBrains s.r.o. and Kotlin Project contributors"
2019-04-23 20:15:03 +03:00
nikita.movshin
abb7d3ab46
Update copyright.
...
Change the copyright from "JetBrains s.r.o." to
"JetBrains s.r.o. and Kotlin Project contributors"
Update 2 lines comment
2019-04-23 20:09:27 +03:00
nikita.movshin
65244b4bea
Update copyright.
...
Change the copyright from "JetBrains s.r.o." to
"JetBrains s.r.o. and Kotlin Project contributors"
Update only 2 lines copyright.
2019-04-23 20:09:22 +03:00
Svyatoslav Kuzmich
b1d303b027
Reorganize stdlib-js sources specific to the current JS backend
...
Move kotlin-stdlib-js project and the sources specific to the current backend to 'stdlib/js-v1' directory,
but leave sources that can be shared with the new IR backend in the common 'stdlib/js' location
with exception for 'stdlib/js/src/generated', which is used exclusively for current backend.
This simplifies sourceset configuration when building stdlib with the new backend.
2019-04-22 20:30:57 +03:00