Alexander Udalov
6889bdbef8
Add CompilerConfiguration to JsConfig
...
Will be used to store common compiler options (such as source version, inline
disabled, etc) as well as JS-specific options, to unify the logic of compiler
option initialization between JS and JVM compilers
2016-05-26 11:47:30 +03:00
Alexander Udalov
116e4a5ced
Rename Config -> JsConfig
2016-05-26 11:47:30 +03:00
Alexander Udalov
2bd3211ba8
Get rid of unnecessary exceptions in JS translator
...
Before this commit, an internal error during JS translation resulted in the
actual exception wrapped in TranslationRuntimeException wrapped in
TranslationInternalException wrapped in RuntimeException being thrown. This
change gets rid of the two latter wrappings.
Also delete unthrown MainFunctionNotFoundException and related unused
constructors in TranslationException
2016-05-26 11:47:30 +03:00
Alexey Andreev
81bdd6b4bb
JS: improve performance of Hashtable-based collections
2016-05-23 12:23:27 +03:00
Alexey Andreev
f0ee52faaf
KT-11086 Treat initializer of a companion object as a class initializer
2016-05-23 12:22:50 +03:00
Alexey Andreev
c5eaea846d
KT-7424: add test to show that inlining works for anonymous functions
2016-05-23 12:22:50 +03:00
Alexey Andreev
db5baf7fa7
KT-8386: pass mutable list to JsInvocation from intrinsic generator, so that inliner had a chance to replace arguments
2016-05-23 12:22:50 +03:00
Dmitry Petrov
32f61c3918
KT-11588 Type aliases
...
Deserialization
2016-05-20 14:17:25 +03:00
Mikhail Glukhikh
ceb4aa7ac0
Cleanup: simplify for
2016-05-20 13:38:46 +03:00
Stanislav Erokhin
8c2d68fff0
Refactoring. Move specificity relations into TypeSpecificityComparator component.
2016-05-20 09:32:53 +03:00
Alexander Udalov
c1c2651988
J2K backend-common classes: convert
...
Also merge CodegenUtilKt into CodegenUtil
2016-05-20 00:36:56 +03:00
Stanislav Erokhin
7332032bb6
Support sealed class inheritors in the same file
...
#KT-11573 Fixed
2016-05-19 16:22:40 +03:00
Alexey Andreev
cb36b61f7f
KT-12254 Prevent JsEmptyExpression from getting into initializer JS when compiling code like val x = throw Exception()
2016-05-19 11:41:50 +03:00
Alexey Andreev
4387c31939
KT-8005 Add test to prove the issue is no more reproducible
2016-05-19 11:37:02 +03:00
Alexey Andreev
3cd7dcdb26
KT-8299 Make proper access to private fields in generated methods of data classes
2016-05-19 11:32:22 +03:00
Zalim Bashorov
7b1afd4e6a
JS backend: use ResolvedCall when translate super expression and remove some heuristics when translate receivers; generate right receiver when reference to super of outer class;
2016-05-18 17:34:18 +03:00
Alexey Andreev
23a4184e48
Minor style and formatting improvements of CallArgumentsTranslator
2016-05-17 10:33:16 +03:00
Alexey Andreev
2f42f3bdf6
KT-12305 Fix passing single argument to native vararg function
2016-05-17 10:33:15 +03:00
Mikhael Bogdanov
93b342c936
TODO: reuse tests for local delegated properties from JVM backend in JS one
2016-05-13 19:11:22 +03:00
Mikhael Bogdanov
e207b56009
Support increment and '+=' on local delegated properties in JS backend
2016-05-13 19:11:21 +03:00
Dotlin
0e071b4748
Delegated Properties: Code generation for local properties (JS)
2016-05-13 19:11:20 +03:00
Mikhail Glukhikh
e31806e2b5
Code cleanup: redundant modality (minor)
2016-05-13 17:57:12 +03:00
Mikhail Glukhikh
733f3e8025
Code cleanup: type parameters can have in / out variance
2016-05-13 17:57:02 +03:00
Alexey Andreev
826cee58bd
KT-11996 Fix issue with referencing outer class in case of inner class constructors and members/properties. Fix issue with referencing outer classes from secondary constructors. Remove unnecessary tests.
2016-05-10 17:41:21 +03:00
Alexey Andreev
1764000bf4
KT-11823 Generate proper argument for closure constructor for this as a free variable. Give some explanation for function that generates closure arguments as well as a clear name. Give explanation to some code in UsageTracker.isSingletonReceiver, augmented by a test case.
2016-05-10 17:41:21 +03:00
Alexey Andreev
12c9a97587
JS/RTTI: minor refactoring of expandInCalls
2016-05-05 17:24:27 +03:00
Alexey Andreev
7ff658414f
JS/RTTI: if it's known that T <: X & Y, where T is non-reified type variable, for each a is T check that a is X && a is Y
2016-05-05 17:24:26 +03:00
Alexey Andreev
6454613b51
JS/RTTI: in expressions like a as T when inferred type for a is S, where S <: T, don't generate type checking
2016-05-05 17:24:25 +03:00
Alexey Andreev
0f6a6a3ba4
JS/RTTI. Fix runtime checking against kotlin.CharSequence
2016-05-05 17:24:25 +03:00
Alexey Andreev
f52b836f0e
JS/RTTI: fix withInlineTurnedOff test
2016-05-05 17:24:24 +03:00
Alexey Andreev
75015f6bfa
JS/RTTI: fix compiler crashing when translating expressions like (continue as T)
2016-05-05 17:24:23 +03:00
Zalim Bashorov
3a87049359
JS/RTTI. Fix build and tests
2016-05-05 17:24:23 +03:00
Alexey Tsvetkov
9bb60b48b2
JS/RTTI. Fix run-time type checking against Comparable
2016-05-05 17:24:22 +03:00
Alexey Tsvetkov
390d71ac8d
JS/RTTI. Fix RegExpMatch
2016-05-05 17:24:21 +03:00
Alexey Tsvetkov
fcd941ad49
JS/RTTI: removed Kotlin.orNull(Kotlin.isAny) optimization
2016-05-05 17:24:21 +03:00
Alexey Tsvetkov
f7af868d4f
JS/RTTI: added another cast to reified test
2016-05-05 17:24:20 +03:00
Alexey Tsvetkov
a9d5c74ff7
JS/RTTI: Added cast to Array test
2016-05-05 17:24:19 +03:00
Alexey Tsvetkov
c99fd179e1
JS/RTTI: simplify cast to Any test
2016-05-05 17:24:19 +03:00
Alexey Tsvetkov
cd60a8d207
JS/RTTI: fixed cast to generic type parameter with upper bound different than Any
2016-05-05 17:24:18 +03:00
Alexey Tsvetkov
57fbab9f7c
JS/RTTI: (minor) escape code fragments in comments
2016-05-05 17:24:17 +03:00
Alexey Tsvetkov
87659bd95b
JS/RTTI: fix nullability check
2016-05-05 17:24:16 +03:00
Alexey Tsvetkov
7a5b4650ad
JS/RTTI: use Array.isArray to check array instance
2016-05-05 17:24:16 +03:00
Alexey Tsvetkov
ae9a5523e0
JS/RTTI: use typeof f === 'function' to check function instance
2016-05-05 17:24:15 +03:00
Alexey Tsvetkov
7cfe1433c5
JS/RTTI: cast to generic type parameter as to Any
2016-05-05 17:24:15 +03:00
Alexey Tsvetkov
38b0effe15
JS/RTTI: fix cast to Any
2016-05-05 17:24:14 +03:00
Alexey Tsvetkov
2b3ebc7e9f
JS/RTTI: support safe casts
2016-05-05 17:24:13 +03:00
Alexey Tsvetkov
3fd387d4a6
JS/RTTI: support unsafe casts
...
#KT-2670 fixed
2016-05-05 17:24:13 +03:00
Alexey Tsvetkov
1d2da9729e
JS/RTTI: made cast test generated
2016-05-05 17:24:12 +03:00
Alexey Tsvetkov
427b95f821
JS/RTTI: test that reified is-check works when inline turned off
2016-05-05 17:24:12 +03:00
Alexey Tsvetkov
dce0971c52
JS/RTTI: fixed double testing for null for reified
2016-05-05 17:24:11 +03:00