Yan Zhulanow
34d1611ed4
Add Pill support to compiler and IDE modules
2018-03-02 03:15:17 +03:00
Ilmir Usmanov
07ec704228
Fix modifiers generation for companion objects
...
when language verion is 1.3
#KT-23002: Fixed
2018-03-01 20:03:26 +03:00
Anton Bannykh
4a5e9bbc7f
JS: remove -XtypedArraysEnabled flag (always true now)
2018-03-01 14:26:13 +03:00
Anton Bannykh
ed80252ba8
JS: fix double compareTo behaviour for NaN and +-0 (KT-22723)
2018-02-28 15:01:58 +03:00
Dmitry Petrov
8fbdf52d34
Chars are not promoted to Int on comparisons
2018-02-27 10:09:17 +03:00
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
00b23a0fe9
Rearrange kotlin-stdlib-js library sources
...
Move kotlin.* api inside kotlin directory.
Update copyright paths.
2018-02-26 17:11:08 +03:00
Ilmir Usmanov
9fdd34ce6e
Minor. Add regression test for KT-15930
...
#KT-15930: Obsolete
2018-02-21 19:32:50 +03:00
Anton Bannykh
eabe21726c
JS: improve switch elimination
2018-02-21 18:39:19 +03:00
gzoritchak
1c1fe10e12
Add samples for take* and drop* extensions (KT-20357)
...
- Add samples for take, takeLast, takeWhile, takeLastWhile
- Add samples for drop, dropLast, dropWhile, dropLastWhile
2018-02-20 19:24:27 +03:00
Mikhail Zarechenskiy
f23b5103ec
Avoid non-null assertions for inline classes based on nullable types
...
Note that there are more places where assertions for inline classes should refined:
- lateinit vars
- values that come from Java
- type casts (interfaces to inline class type)
2018-02-20 14:41:48 +03:00
Dmitry Savvinov
0929673576
Refactor DataFlowValueFactory into proper component
2018-02-20 13:11:33 +03:00
Mikhail Zarechenskiy
530dd01ca6
Fix unboxing values of inline class type from type parameters
2018-02-20 11:45:49 +03:00
Dmitry Petrov
99cea07bf4
Correctly map container element type in intrinsic for withIndex
...
In case of arrays, we couldn't distinguish array of boxed Ints
from array of primitive Ints.
#KT-22904 Fixed Target versions 1.2.40
2018-02-20 09:18:25 +03:00
Yuta Sakata
4926b5a4c0
Add samples for any, all and none
...
Rewrite samples to make them working on sample generator
Move location of the class that contains samples of Aggregates.kt
2018-02-19 18:44:28 +03:00
Igor Chevdar
a2897a29b5
Added tests on default arguments of fake overridden functions
2018-02-19 18:39:08 +03:00
gzoritchak
f790635b30
Add samples for joinTo
...
KT-20357
2018-02-18 20:12:05 +03:00
gzoritchak
40e3159463
Add samples for joinToString
...
KT-20357
2018-02-18 20:12:05 +03:00
Mikaël Peltier
9fb0f59813
KT-17110 Rewrite branches targeting other branches
...
- Rewrite branches targeting other branches to target directly the
final destination to avoid runtime performance penalties.
Fix of https://youtrack.jetbrains.com/issue/KT-17110
2018-02-16 15:15:52 +03:00
Dmitry Petrov
8bfbbe456f
Use NoScopeRecordCliBindingTrace for codegen tests
2018-02-15 16:40:26 +03:00
Mikaël Peltier
3c2f137fd5
Exclude tests from JS backend due to a bug into it
2018-02-15 12:41:33 +03:00
Mikaël Peltier
8676ca34d7
KT-22334 Specialized loops using range such as integer..array.size-1
...
- Into PrimitiveNumberRangeLiteralRangeValue modifies how bounded
value are created by checking if the high bound range can be modified
to be exclusive instead of inclusive such as the generated code will
be optimized.
- Add black box tests checking that the specialization does not fail
on any kind of arrays.
- Add a bytecode test checking that the code is correctly optimized.
Fix of https://youtrack.jetbrains.com/issue/KT-22334
2018-02-15 12:41:33 +03:00
Mikhail Zarechenskiy
e017e9cb5f
Support passing inline class values with spread operator
2018-02-13 13:16:45 +03:00
Mikhail Zarechenskiy
3919dc94e1
Box values of inline class types when passing to function as varargs
2018-02-13 13:16:44 +03:00
Mikhail Zarechenskiy
6687751cf5
Generate as check for inline classes using wrapper
...
Should be improved when inline class is based on non-null reference
2018-02-13 13:16:44 +03:00
Mikhail Zarechenskiy
a88dbefcd9
Generate is check for inline classes same as for primitives
...
Should be improved when inline class is based on non-null reference
2018-02-13 13:16:44 +03:00
Mikhail Zarechenskiy
d606e5bc89
Correct boxing for functional types containing inline classes
2018-02-13 13:16:43 +03:00
Mikhail Zarechenskiy
1d16d21dbb
Fix boxing for non-local and labeled returns with inline classes
2018-02-13 13:16:42 +03:00
Mikhail Zarechenskiy
80dd5c106e
Propagate KotlinType through call generator, fix boxing on arguments
2018-02-13 13:16:42 +03:00
Mikhail Zarechenskiy
22b9c25dd0
Add KotlinType info about this inside inline class
2018-02-13 13:16:41 +03:00
Mikhail Zarechenskiy
c86d3e354b
Skip call to the underlying value of inline class
2018-02-13 13:16:41 +03:00
Mikhail Zarechenskiy
ce601bebbe
Fix detection of erased this for inline class
2018-02-13 13:16:40 +03:00
Mikhail Zarechenskiy
b361d0e9c0
Add test and check that iterator over UInt folds to a simple for-loop
2018-02-13 13:16:40 +03:00
Mikhail Zarechenskiy
059f1e9eed
Support inline classes working with collection elements (get/set)
2018-02-13 13:16:39 +03:00
Mikhail Zarechenskiy
8015295059
Desugar constructor call of inline class to the underlying value
...
Also add information about KotlinType to the constant stack values
2018-02-13 13:16:39 +03:00
Dmitry Petrov
839ebba157
ProperNumberComparisons is disabled by default (until LDC decision)
2018-02-13 09:26:00 +03:00
Dmitry Petrov
a790195808
Implement "proper numeric comparisons" support in JVM BE
2018-02-13 09:25:40 +03:00
Anton Bannykh
cd3a797f2a
JS: fix corner case in when translation (fix crash in KT-22544)
2018-02-12 17:15:48 +03:00
Yanis Batura
9c8c1cdc18
Fix a couple of typos in docs and ReadMe
...
* Fix a couple of typos
- In the main ReadMe.md
- In onEach template's doc
* Update generated source code
2018-02-12 14:22:47 +03:00
Mikhail Zarechenskiy
913e4b42bb
Support inline classes as last expression in lambda
2018-02-09 05:06:32 +03:00
Mikhail Zarechenskiy
396cc7d02b
Support unboxing of inline classes in elvis
2018-02-09 05:06:31 +03:00
Mikhail Zarechenskiy
fefcddc803
Support boxing/unboxing for captured vars of inline class types
2018-02-09 05:06:29 +03:00
Mikhail Zarechenskiy
47aeeb36e4
Get accessors for companion object properties through wrapper class
2018-02-09 04:56:46 +03:00
Ilmir Usmanov
87bbac9d43
Take coroutineContext into account in RedundantSuspendModifierInspection
...
#KT-22651: Fixed
2018-02-08 19:34:20 +03:00
Alexander Udalov
890374a42a
Load module annotations for JVM and JS modules in compiler
...
#KT-22759 In Progress
2018-02-08 17:08:33 +01:00
Alexander Udalov
396a5ab352
JS: write/read module annotation FQ names to/from metadata
...
#KT-22759 In Progress
2018-02-08 17:07:23 +01:00
Mikaël Peltier
126afbb8ac
Avoid to generate unecessary checkcast
...
StackValue already avoid to generate checkcast from a type or an
array to java.lang.Object. Add a new case to avoid to generate a
checkcast from an array to an array of java.lang.Object when arrays
have the same dimensions.
#KT-22714 Fixed
2018-02-08 16:38:46 +01:00
Denis Zharkov
ef01f641f3
Imitate support for suspend modifier on parameterless lambdas
...
#KT-22766 In Progress
2018-02-08 17:47:37 +03:00
Alexander Udalov
80a7f92309
Extract logic to get function parameters for default value generation
...
For some reason, this logic was a bit different in JVM (FunctionCodegen)
and JS (FunctionBodyTranslator). For example, in JS the
EXPECTED_FUNCTION_SOURCE_WITH_DEFAULT_ARGUMENTS_NOT_FOUND diagnostic was
reported even in the case when no expected function was found for the
actual function at all, which made it quite difficult to write
multiplatform sources for JS stdlib where it both should be compiled as
a part of the multiplatform project, and by itself (suppressing
NO_ACTUAL_FOR_EXPECT): in the latter case, the new error must have been
suppressed everywhere as well
#KT-21913
2018-02-08 14:14:10 +01:00
Ilmir Usmanov
ad385f42a9
Fix continuaion retrieval on generated coroutineContext intrinsic code
...
Use fake continuation instead on real one in JVM BE.
Pass continuation parameter to closure generator in JS BE.
#KT-22577: Fixed
2018-02-06 21:14:37 +03:00