Zalim Bashorov
3c520a3ce3
JS backend: basic support for class literals.
...
Added:
* the ability to get KClass using class literals (`::class`);
* the ability to get KClass from JsClass and vice versa;
* the ability to get simpleName.
#KT-13345 Fixed
2016-10-14 19:44:53 +03:00
Zalim Bashorov
ace10f46b2
Minor: move reflection/light/* -> reflection/*
2016-10-14 19:40:36 +03:00
Zalim Bashorov
d31f18137d
JS: make Any as upper bound of type parameter of JsClass and helpers
2016-10-14 19:40:35 +03:00
Ilya Gorbunov
e6887ea4e5
Use abstract readonly collections as base classes for implementing collection properties of regex MatchResult
2016-10-14 19:06:25 +03:00
Zalim Bashorov
96830e306a
JS: add templates for kotlin and kotlin-compiler packages
2016-10-13 23:22:36 +03:00
Dmitry Petrov
8d634f6003
KT-14274: resolve type alias constructors calls in supertypes list as type alias constructors.
...
Support @Deprecated for type aliases, including type alias constructors.
2016-10-13 17:52:21 +03:00
Alexander Udalov
2f616bdd33
Drop ModuleParameters, inline defaultImports everywhere
2016-10-12 17:07:09 +03:00
Alexander Udalov
88af36001c
Introduce DeserializationConfiguration
...
Will be used soon to deliver the language/API-version-related behavior to the
deserialization
2016-10-12 12:19:17 +03:00
Alexey Andreev
30c2c85c94
KT-13830: support case when LHS of augmented assignment is something different than qualified expression or array access
2016-10-11 11:54:04 +03:00
Michael Bogdanov
5bd045c79c
Fix for KT-14243: Wrong invocation descriptor on calling implicitly generated implementation in class
...
#KT-14243 Fixed
2016-10-10 14:17:50 +03:00
Alexey Andreev
61b429f2f0
JS: fix exception during translation of for expression with iterator having generic type constrained by Iterable. Fix #KT-8385
2016-10-10 11:22:21 +03:00
Alexey Andreev
977fd8f591
KT-12707: support case when secondary super constructor has optional parameters
2016-10-10 11:21:45 +03:00
Alexey Andreev
c1b8e50734
KT-12707: (JS) proper translation of a constructor in subclass that calls secondary constructor of parent class. Fix #KT-12707
2016-10-10 11:21:45 +03:00
Alexey Andreev
322f6fe7ac
KT-2752: fix translation of call to internal function from subclass
2016-10-08 19:25:53 +03:00
Alexey Andreev
c814a9d1d2
KT-2752: fix support of typealiases
2016-10-08 19:25:52 +03:00
Alexey Andreev
831ac97ecd
KT-2752: fix some tests and make them slightly less fragile
2016-10-08 19:25:51 +03:00
Alexey Andreev
9c7c82b151
KT-2752: refactor NameSuggestion, change rules for determining name stability and applying mangling
2016-10-08 19:25:50 +03:00
Alexey Andreev
6f7e7d8504
KT-2752: fixes after code review
2016-10-08 19:25:49 +03:00
Alexey Andreev
00867cb269
KT-2752: remove unnecessary hack that tries to treat annotation on property accessor as annotation on property itself; looks like FE has fixed that
2016-10-08 19:25:48 +03:00
Alexey Andreev
e7e6a917eb
KT-2752: when simple name of class is a JS keyword or a well-known global name, add '$' to name of constructor function
2016-10-08 19:25:47 +03:00
Alexey Andreev
a4bf058be6
KT-2752: add hash-based suffix to private members of open/abstract public classes
2016-10-08 19:25:46 +03:00
Alexey Andreev
ba9c908875
KT-2752: export JsName on class via JS reflection
2016-10-08 19:25:45 +03:00
Alexey Andreev
aa5d15cff7
KT-2752: minor fixes after code review
2016-10-08 19:25:43 +03:00
Alexey Andreev
7956b038fd
KT-2752: add test to prove that KT-13024 is no longer reproducible with new implementation of name mangling
2016-10-08 19:25:43 +03:00
Alexey Andreev
4e2b1d68cf
KT-2752: deprecate parameter of @native annotation, prohibit simultaneous usage of parameterized @native and @JsName
2016-10-08 19:25:42 +03:00
Alexey Andreev
49022fd5bc
KT-2752: move some diagnostics from entire declarations to their headers
2016-10-08 19:25:41 +03:00
Alexey Andreev
fb7f221158
KT-2752: add test to ensure that JsName affects classes
2016-10-08 19:25:40 +03:00
Alexey Andreev
b888d9e7d9
KT-2752: refactor NameSuggestion
2016-10-08 19:25:40 +03:00
Alexey Andreev
72ada61342
KT-2752: rename FQNPart to SuggestedName and FQNGenerator to NameSuggestion
2016-10-08 19:25:39 +03:00
Alexey Andreev
0c61f431ff
KT-2752: add some docs to FQNGenerator
2016-10-08 19:25:38 +03:00
Alexey Andreev
c14795f66d
KT-2752: refactor support of modules and root packages
2016-10-08 19:25:38 +03:00
Alexey Andreev
c657716ae0
KT-2752: minor fixes
2016-10-08 19:25:37 +03:00
Alexey Andreev
681a428473
KT-2752: prohibit JSName on extension properties
2016-10-08 19:25:36 +03:00
Alexey Andreev
33daf83f14
KT-2752: refactoring:
...
1. Get rid of most of ManglingUtils
2. Use simple mangling for delegated properties instead of stable mangling
3. Use stable mangling for public declarations of open non-public classes
4. When generating a fresh name in a JsScope, check it for clashing against parent scopes
5. JsFunctionScope does not generate fresh name instead of stable names
6. Function scopes inherit directly from global scope
7. Generate simple mangled names for backing fields of properties
2016-10-08 19:25:36 +03:00
Alexey Andreev
1dcb037aee
KT-2752: remove diagnostic that reports about overridden method having several names from different sources. Generate proxies instead. Fix reporting name clash when two distinct fake overrides require same name.
2016-10-08 19:25:35 +03:00
Alexey Andreev
c5087779e4
KT-2752: add diagnostics that reports about conflicting overridden declarations
2016-10-08 19:25:34 +03:00
Alexey Andreev
16c172f053
KT-2752: add diagnostic that reports about applying JsName on overridden declarations
2016-10-08 19:25:33 +03:00
Alexey Andreev
725d13b72e
KT-2752: fix JsName with explicit use target. Add some tests for JsName with use targets
2016-10-08 19:25:33 +03:00
Alexey Andreev
be0013d9f2
KT-2752: declare properties as a pair of functions when accessors are marked with @JsName
2016-10-08 19:25:32 +03:00
Alexey Andreev
6e1a0901ac
KT-2752: add checkers for inconsistent usage of JsName
2016-10-08 19:25:31 +03:00
Alexey Andreev
638952e96e
KT-2752: JsName renames native declarations
2016-10-08 19:25:31 +03:00
Alexey Andreev
7a7a6914a6
KT-2752: fix old tests, add test for clashing between class and its companion object
2016-10-08 19:25:30 +03:00
Alexey Andreev
50dd1e31c3
KT-2752: move tests, that check whether there's no name clash, to JS backend tests
2016-10-08 19:25:29 +03:00
Alexey Andreev
5ce158f297
KT-2752: add basic tests for JsName
2016-10-08 19:25:28 +03:00
Alexey Andreev
5e3aa33b13
KT-2752: add draft implementation of JsName annotation. Fix some tests using the annotation
2016-10-08 19:25:27 +03:00
Alexey Andreev
8738458c34
KT-2752: fix name clash diagnostic for case of extension property. Add more tests for the diagnostic
2016-10-08 19:25:27 +03:00
Alexey Andreev
8f829557c8
KT-2752: add diagnostic that checks whether Kotlin declarations produce conflicting names in generated JS
2016-10-08 19:25:26 +03:00
Alexey Andreev
f70b50b6e2
KT-2752: refactor generation of FQN in JS. Move backend-independent code to generic code in frontend.
2016-10-08 19:25:25 +03:00
Alexey Andreev
ed55923bb0
KT-2752: a new approach to compose fully-qualified names that does not depend on code generation and can be reused in JS front-end
2016-10-08 19:25:25 +03:00
Mikhail Glukhikh
e7d290f726
Refactor PSI for destructuring declarations in for: they are now children of KtParameter and not instead of it
2016-10-06 21:03:19 +03:00