Zalim Bashorov
01d10a9592
KJS: remove no longer valid test
2016-11-17 16:22:28 +03:00
Zalim Bashorov
aa2a4f0794
KJS: implement Throwable in Kotlin instead of use it as alias of JS Error
...
* Make it an inheritor of JS Error. Otherwise, Chakra engine doesn't fill stack trace of exception; In other engines inheritance has some good effects too.
* Copy all properties from internally created instance of JS Error
#KT-6985 Fixed
#KT-2328 Fixed
#KT-8019 Fixed
#KT-10911 Fixed
2016-11-17 16:22:27 +03:00
Zalim Bashorov
a03e22e774
KJS: fix refering to native nested class
2016-11-17 16:21:16 +03:00
Zalim Bashorov
bd90b4e051
KJS: don't overwrite prototype of native classes when inheriting from them
2016-11-17 16:17:44 +03:00
Zalim Bashorov
c25dfe997c
KJS: fix inheritance from renamed native classes
2016-11-17 16:17:43 +03:00
Anton Bannykh
0dc9121a91
JS property accessors inlining (KT-13456)
2016-11-17 15:25:29 +03:00
Alexey Andreev
d2fdc7ffc0
JS: when both clauses of if become empty during optimization, remove if entirely. Make condition and then clause of JsIf non-nullable. Fix #KT-13912
2016-11-17 12:20:37 +03:00
Alexey Andreev
0015f7518e
JS: improve dead code elimination to handle switch case bodies
2016-11-16 19:29:35 +03:00
Ilya Gorbunov
4769ed5f79
Fix imports in tests: do not use java.util.* stuff
2016-11-16 18:47:42 +03:00
Alexey Andreev
5ef8879aae
JS: fixes after code review
2016-11-11 16:26:39 +03:00
Alexey Andreev
a72ea64142
JS: fix translation of lambdas in public inline functions; fix AMD emulation for Ant test
2016-11-11 16:26:39 +03:00
Alexey Andreev
6791ed7bf3
JS: fix obsolete tests
2016-11-11 16:26:38 +03:00
Alexey Andreev
a452260da6
JS: simplify merging kotlin.js
2016-11-11 16:26:38 +03:00
Alexey Andreev
ac4bfc645e
JS: refactor translation of callable references to top-level properties
2016-11-11 16:26:38 +03:00
Alexey Andreev
0252fe57af
JS: refactor flat declaration generator. Add more tests on inter-module dependencies
2016-11-11 16:26:37 +03:00
Alexey Andreev
f244bbaae3
JS: change how declarations are exported from modules. Change how parts of kotlin.js merged
2016-11-11 16:26:36 +03:00
Alexey Andreev
3d9beb15da
JS: fix translation of !! operation
2016-11-11 16:26:36 +03:00
Alexey Andreev
cacd917350
JS: fix translation of extension properties
2016-11-11 16:26:36 +03:00
Alexey Andreev
0f87703c87
JS: rewrite code that copies interface members with implementation to subtypes
2016-11-11 16:26:35 +03:00
Alexey Andreev
bb57eaef96
JS: fix some minor issues in new flat translator
2016-11-11 16:26:34 +03:00
Alexey Andreev
06476402a2
JS: support enums in flat JS structure
2016-11-11 16:26:33 +03:00
Alexey Andreev
38a3f4af80
JS: fix Kotlin.isType for case of traits
2016-11-11 16:26:32 +03:00
Alexey Andreev
20396b0e5f
JS: fix inlining in a new flat JS generator
2016-11-11 16:26:32 +03:00
Alexey Andreev
e13d34e08d
JS: rewrite stdlib to compile with new flat structure
2016-11-11 16:26:31 +03:00
Alexey Andreev
f9a392fdec
JS: introduce new flat JS declaration structure
2016-11-11 16:26:31 +03:00
Ilya Gorbunov
dceec89572
JS: Array.toString is const, Array.contentToString is shallow, Array.contentDeepToString is deep and self-reference aware
...
#KT-13582
2016-11-08 17:23:45 +03:00
Ilya Gorbunov
f3da656d6e
contentEquals, contentHashCode, contentToString: Add js implementation and tests
...
#KT-13582
2016-11-08 17:23:45 +03:00
Ilya Gorbunov
660dc94f7c
Move Closeable to its usage, move internal Serializable to kotlin package in JS, introduce internal typealias in kotlin.io in JVM.
2016-11-07 21:39:36 +03:00
Ilya Gorbunov
a895702730
Remove js classes that should not be there
2016-11-07 21:35:27 +03:00
Anton Bannykh
283d16b7f4
Updated example test path in the test.html (used to debug JS box tests) to match the current state.
2016-11-07 15:32:26 +03:00
Alexander Udalov
e8fecea871
JS: drop Collections.max
2016-11-07 12:27:52 +03:00
Zalim Bashorov
5f2ba70745
KJS: use cached KClass instead create new each time when getting it from JsClass
2016-10-18 13:26:05 +03:00
Zalim Bashorov
a085df914f
KJS: allow to use KClass::isInstance; implement isInstance in KClassImpl
2016-10-18 13:26:05 +03:00
Zalim Bashorov
11b2c5fe59
JS: change visibility to internal for library and marker annotations
2016-10-14 19:44:57 +03:00
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
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
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
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
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
fb7f221158
KT-2752: add test to ensure that JsName affects classes
2016-10-08 19:25:40 +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
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