Ilya Chernikov
61dfb75e0e
Implement Gradle Kotlin DSL build
2017-09-19 21:37:06 +02:00
Alexey Andreev
c5e5a43f68
JS: fix unit materialization in case of null check and elvis operator
...
See KT-20287
2017-09-19 15:30:55 +03:00
Alexey Andreev
b4c622d433
JS: optimize destructuring declaration when possible
...
See KT-8285
2017-09-19 15:30:26 +03:00
Alexey Andreev
d312996f3a
JS: generate import statement for COROUTINE_SUSPENDED property
...
This makes code with lots of corutines more feasible for uglification
2017-09-18 13:13:40 +03:00
Alexey Andreev
9771a3c66e
JS: prove that KT-8282 is no more reproducible
2017-09-18 13:13:00 +03:00
Alexey Andreev
aa35d4ed36
JS: prove that KT-8315 is no more reproducible
2017-09-18 13:13:00 +03:00
Alexey Andreev
6ba0ac1238
JS: prove that KT-7011 is no more reproducible
2017-09-18 13:12:59 +03:00
Alexey Andreev
a66cd8b309
Fix name clash in JS implementation of multiplatform extension property
...
See KT-18756
2017-09-18 13:10:51 +03:00
Mikhail Glukhikh
2d0ac0011a
Migration to expect/actual: ExpectedActualDeclarationChecker
2017-09-15 18:26:23 +03:00
Stanislav Erokhin
e86d2f00ff
Rename isImpl to isActual in descriptors
2017-09-15 18:25:49 +03:00
Stanislav Erokhin
c8ee424f67
Rename isHeader to isExpect in descriptors
2017-09-15 18:25:41 +03:00
Anton Bannykh
373bd5ff17
JS: throw exception on access to an uninitialized local variable (KT-20248 fixed)
2017-09-15 14:46:26 +03:00
Anton Bannykh
74bda80ec2
JS: added forgotten JsLegacyPrimitiveArraysBoxTestGenerated.java
2017-09-14 18:55:12 +03:00
Mikhail Zarechenskiy
68259f7939
Allow assigning array to vararg in named form in annotations
...
See more in KT-20171
2017-09-14 18:27:41 +03:00
Dmitry Petrov
d20af1133a
Use captured instance in interface companion object initializer
...
Similar to enum entry initialization, when we have a companion object
in an interface, its constructor (or clinit) initializes its state
before the instance field in corresponding interface is initialized.
So, interface companion object must be accessed via a captured object
reference (#0 , or #0.this$0 for inner anonymous objects).
2017-09-14 10:26:35 +03:00
Alexander Udalov
9ae6feb2c5
Temporarily remove JvmPackageName and tests, but keep the implementation
...
This is needed because we want the compiler code to stay as much the
same in master and in 1.2 as possible
2017-09-13 23:23:36 +03:00
Alexander Udalov
d07b628e0c
Support JvmPackageName annotation in JVM back-end
...
This annotation is currently internal because we only commit to its
support for our own libraries. It will be used to change JVM package
names of declarations in JDK-specific stdlib additions (now called
kotlin-stdlib-jre7/8), both to preserve source compatibility of the old
Kotlin code and to solve the split package problem (KT-19258)
2017-09-13 22:59:03 +03:00
Alexander Udalov
234148518e
Temporarily remove isInitialized and tests, but keep the implementation
...
This is needed because we want the compiler code to stay as much the
same in master and in 1.2 as possible
2017-09-13 22:51:23 +03:00
Alexander Udalov
7d80afbe63
Avoid getting invisible_fake visibility for properties in ExpressionCodegen
...
Before this change, we were computing the visibility of an inherited
private property setter, and ISE at AsmUtil.getVisibilityAccessFlag
happened ("invisible_fake is not a valid visibility in backend")
2017-09-13 22:49:26 +03:00
Alexander Udalov
c6263ac8e6
Support isInitialized intrinsic for lateinit properties
...
See https://github.com/Kotlin/KEEP/pull/73
#KT-9327 Fixed
2017-09-13 22:49:26 +03:00
Anton Bannykh
2249675e59
JS: throw exception when accessing uninitialized lateinit property (KT-14964)
2017-09-13 20:16:01 +03:00
Anton Bannykh
49bc9249a1
JS: add support for the ::foo syntax (callable reference with empty LHS)
2017-09-13 20:12:48 +03:00
Anton Bannykh
22dc36a596
JS: enable translation of primitive arrays to TypedArray's by default (KT-17137)
2017-09-13 18:45:19 +03:00
Zalim Bashorov
30c7f633bd
KJS: don't load declarations marked by PlatformDependent annotation
...
#KT-17450 Fixed
2017-09-13 02:18:43 +03:00
Dmitry Petrov
6b6d1e80f8
Fix enum entry reference from enum entry initialization context
...
Enum entries are "special" kind of singletons that should be
referenced as a captured 'this' instance inside during entry
initialization, because corresponding static fields in enum class
are not initialized yet.
#KT-7257 Fixed
2017-09-12 11:00:24 +03:00
Dmitry Jemerov
aed01c8475
Consistent naming: common platform is common, not default
2017-09-11 15:07:51 +02:00
Alexey Andreev
c90c3e4bf5
Add hack to make JS coercion compatible with older versions of stdlib
2017-09-11 14:34:35 +03:00
Alexey Andreev
0acc96c4f3
Translate reference to kotlin.Unit to a shorter JS code
2017-09-11 14:34:35 +03:00
Alexey Andreev
2656a6a513
Eliminate redundant RHS of JS comma expression
2017-09-11 14:34:34 +03:00
Alexey Andreev
37fa45dc34
Add mechanism for type coercion in JS
...
Use it for char boxing/unboxing and unit materialization.
Possible to use for other purposes, for example, to add type checks
to dynamics.
See KT-18793, KT-17915, KT-19081, KT-18216, KT-12970, KT-17014,
KT-13932, KT-13930
2017-09-11 14:34:34 +03:00
Dmitry Petrov
66ece54b25
Fix initialization of inner class instances in enum entries
...
In an inner class of the enum entry class, enum entry reference should
be generated as an outer 'this', not as a enum entry access, because
enum entry itself may be not initialized yet.
2017-09-11 09:42:18 +03:00
Alexey Andreev
24c6f5f0f0
JS: add test to prove that KT-19483 is no more reproducible
2017-09-08 18:27:43 +03:00
Alexey Andreev
c66bc0b0e9
Remap source maps in JS DCE. Improve JS DCE error logging
...
See KT-19821
2017-09-08 18:27:41 +03:00
Alexey Andreev
1350e3c4ac
JS: improve optimization of for loop over range literals
...
See KT-18329, partial fix for KT-8372
2017-09-08 18:27:40 +03:00
Alexey Andreev
502c51ccff
Sanitize names for backing fields and private declarations in JS BE
...
See KT-1816
2017-09-08 18:27:40 +03:00
Alexey Andreev
206369c088
JS: fix capturing of reified type parameters when used as class literals
...
See KT-19891
2017-09-08 18:27:39 +03:00
Alexander Udalov
2877314313
Support "::foo" as a short-hand for "this::foo"
...
#KT-15667 Fixed
2017-09-08 10:59:44 +03:00
Alexey Andreev
d2ff821a3b
JS: prove that lambdas in inline function compiled correctly
...
Obsoletes KT-19712
2017-09-08 10:57:42 +03:00
Alexey Andreev
ff0efe59f6
JS: fix error in generation of if/else statements in some cases
...
See KT-19495
2017-09-08 10:56:49 +03:00
Alexey Andreev
4779f4fefb
JS: don't mark access to captured var as pure
...
See KT-19108
2017-09-08 10:56:06 +03:00
Mikhael Bogdanov
2fa4c28e0f
Properly reorder arguments in anonymous object super class constructor
...
#KT-18356 Fixed
2017-09-07 15:18:05 +02:00
Alexey Andreev
5bf4540458
JS: fix inlining of functions derived from other modules
...
See KT-16408
2017-09-06 17:55:31 +03:00
Alexey Andreev
361d6dfca0
JS: rewrite source map generator to use specialized JSON writer
...
Fixes problems with string escaping. See KT-20005
2017-09-06 17:55:06 +03:00
Anton Bannykh
f4b329a055
JS: support @Before and @After annotations in kotlin.test
2017-09-06 14:36:45 +03:00
Dmitry Petrov
8c5d18c1f2
Tests for boxing optimization on KClass are JVM-specific
2017-09-06 14:20:05 +03:00
Dmitry Petrov
61faa068d4
Do not optimize == for KClasses in redundant boxing elimination
...
For primitive wrappers such as java.lang.Integer,
jlc = java.lang.Integer.class
jlt = java.lang.Integer.TYPE
!(ljc.equals(ljt))
However, in Kotlin corresponding KClass instances are equal.
#KT-17748 Fixed Target versions 1.1.50
#KT-17879 Fixed Target versions 1.1.50
2017-09-06 09:54:36 +03:00
Dmitry Petrov
21cdf9dd5b
Add cast to expected type in call-based in-expression generation
...
#KT-20106 Fixed
2017-09-05 15:32:53 +03:00
Mikhail Zarechenskiy
e7449a3584
Fix referencing inner class constructor on an outer class instance
...
#KT-12796 Fixed
2017-09-05 14:41:44 +03:00
Alexey Andreev
b8aa2f81a2
Fix delegate property name clash in JS BE
...
See KT-19542
2017-09-04 15:35:35 +03:00
Alexey Andreev
28c9d274ec
JS: prohibit illegal chars on dynamic call site
...
See KT-19540
2017-09-04 15:35:00 +03:00