Alexey Andreev
c767b3d0ac
KT-13043: fix translation of super call from secondary constructor when base constructor has default arguments
2016-08-23 15:44:27 +03:00
Zalim Bashorov
33e96fcb9a
JS: fix runtime type checking for native non-fake interfaces on WebKit (JavaScriptCore); add tests for object and object expressions.
2016-08-17 14:25:29 +03:00
Zalim Bashorov
9ece62fa0f
JS backend: fix runtime type checking for interfaces
2016-08-10 15:04:27 +03:00
Zalim Bashorov
88ad00b0bc
JS backend: add the ability to get JS constructor function by class name and from instance. Support it for reified type parameters too. Add ability to get name of class.
...
#KT-5987 Fixed
#KT-4115 Fixed
2016-08-05 18:13:05 +03:00
Alexey Andreev
4ff2b62bc0
KT-12864: add Comparable interface to Enum metadata so that RTTI should handle is Comparable case correctly
2016-08-05 16:32:27 +03:00
Alexey Andreev
efb5a9eca6
KT-13160: when decomposing assignment with lhs like array[index], extract array instead of supporting only qualifier.name`
2016-07-27 18:28:28 +03:00
Alexey Andreev
05dd039151
KT-12275 Add JS optimization that transforms the following code
...
```
do {
X
if (B) break;
} while (A)
```
to
```
do {
X
} while (!B && A)
```
Add inversion that takes boolean expression and applies negation to it, simplifying if possible (like !!a => a).
2016-07-25 18:46:46 +03:00
Alexey Andreev
b3d29adad9
KT-12275 Add JS optimization that transforms the following code
...
```
do {
guard: {
// do something
break guard;
// do something
}
} while (condition)
```
to
```
do {
// do something
continue;
// do something
} while (condition)
```
2016-07-25 18:32:10 +03:00
Alexey Andreev
1a61115148
KT-12275 Preserve evaluation order when do..while loop with extractable condition contains continue statement
2016-07-25 18:32:08 +03:00
Alexey Andreev
b5f9287bfa
JS: add tests for support of 'for' statement in TemporaryAssignmentElimination
2016-07-18 19:26:49 +03:00
Alexey Andreev
f8b96a1c62
JS: add tests to prove that KT-8003, KT-8318 and KT-12157 are no longer reproducible
2016-07-18 19:26:49 +03:00
Alexey Andreev
e2b836db09
JS: refactor TemporaryVariableElimination
2016-07-14 18:00:34 +03:00
Alexey Andreev
88eef7337e
KT-12928: decompose invocation like "a.foo(b)" to "$t = a; $s = $t.foo.bind($t); $s(b)" instead of "$t = a.foo; $t(b)", since in the latter case foo won't receive proper this. Add optimization that replaces "foo.bar.bind(baz)(args)" with "baz.bar(args)"
2016-07-04 14:52:12 +03:00
Dmitry Petrov
07cb3e09b9
KT-11892: explicitly qualified 'super' with a supertype that is overridden
...
by a different explicitly declared supertype is an error (as in Java)
(see http://docs.oracle.com/javase/specs/jls/se8/html/jls-15.html#jls-15.12.3 )
2016-07-04 13:53:49 +03:00
Zalim Bashorov
48617caacc
JS: generate a function with the required name for callable references instead try to change the name later. The previous solution doesn't work properly on some JS VMs (e.g. in FireFox)
...
#KT-12929 Fixed
2016-07-01 21:13:15 +03:00
Alexey Andreev
da53b9a9a4
KT-3008: fix support of KProperty/KMutableProperty
2016-06-27 15:33:30 +03:00
Alexey Andreev
97605a97da
KT-3008: multiple minor fixes after code review
2016-06-27 15:33:28 +03:00
Alexey Andreev
64cd0b70d7
KT-3008 Minor refactoring and clean up
2016-06-27 15:33:27 +03:00
Alexey Andreev
b6b604d78f
KT-3008 Fix UMD and plain module wrappers when module id is not a valid JS identifier
2016-06-27 15:33:25 +03:00
Alexey Andreev
e38b83880f
KT-3008 Add tests for module wrappers
2016-06-27 15:33:25 +03:00
Alexey Andreev
0cfacfa44a
KT-3008 Merge JS runtime modules in one kotlin.js
2016-06-27 15:33:25 +03:00
Alexey Andreev
848d7f92fa
KT-3008 Implement AMD, CommonJS and UMD wrappers. Compile stdlib and builtins modules into separate JS files and wrap them in UMD.
2016-06-27 15:33:24 +03:00
Alexey Andreev
95b78e18df
KT-3008 Change the way how modules are referenced in JS
2016-06-27 15:33:23 +03:00
Alexey Andreev
2e6a48576d
KT-12417: add support of RTTI against K(Mutable)Property* types
2016-06-21 15:42:50 +03:00
Stanislav Erokhin
03241419bd
Minor. removed several tests with error calls.
2016-06-10 21:28:04 +03:00
Denis Zharkov
20d1d12f3b
Revert "'yield' reserved as a keyword"
...
This reverts commit 434082cadb .
2016-06-08 18:53:16 +03:00
Alexey Andreev
0e1dde022a
KT-6942: in JS backed for value equalitity patterns in when generate structural equality check (i.e. Any.equals) instead of referential check (===).
...
(cherry picked from commit 97228e5)
2016-06-07 12:59:16 +03:00
Alexey Andreev
f0e64f8e38
JS/Inlining: rename IneffectiveStatementElimination to RedundantStatementElimination
2016-06-07 11:54:45 +03:00
Alexey Andreev
07d5a4506c
JS/Inlining: minor improvements and clarifications after code review. Test whether expression without side effect does not prevent to relocate another expressions
2016-06-07 11:54:41 +03:00
Alexey Andreev
6b99d4e1c5
JS/Inlining: change sideEffects metadata to take three values: producing side effect, dependding on side effect and purity
2016-06-07 11:54:41 +03:00
Alexey Andreev
774efa4e70
JS/Inlining: improve test for removal of binary expresions without side effect, add tests for removal of a reference to a function parameter
2016-06-07 11:54:34 +03:00
Alexey Andreev
57ac23a606
JS/Inlining: in temporary variable elimination don't treat FQN without side effects as trivial, i.e. disable moving these vars freely across function body
2016-06-07 11:54:20 +03:00
Alexey Andreev
a26c09ae81
JS/Inlining: refactor TemporaryAssignmentElimination, add more tests
2016-06-07 11:54:12 +03:00
Alexey Andreev
b8b6999afc
JS/Inlining: add test case for KT-10931
2016-06-07 11:54:12 +03:00
Alexey Andreev
4783c9b612
JS/Inlining: in function call like fn() extract fn to a local variable, since fn can be access to property with side effects. Add tests to prove that evaluation order became proper in certain cases. Fix KT-11711, KT-7674, KT-7043
2016-06-07 11:54:02 +03:00
Alexey Andreev
47cb0cde01
JS/Inlining: in temporary variable elimination improve moving of some expressions which are provably pure
2016-06-07 11:54:01 +03:00
Alexey Andreev
96532f1fc2
JS/Inlining: fix broken evaluation order after applying temporary variable elimination
2016-06-07 11:52:58 +03:00
Alexey Andreev
ee6483b7ec
JS/Inlining: in expression like f(g()), where *f* is inline, don't treat g() as a lambda constructor
2016-06-07 11:52:57 +03:00
Alexey Andreev
65876c36eb
JS/Inlining: introduce removal of expression statements without side effects
2016-06-07 11:52:57 +03:00
Alexey Andreev
551ed28d84
JS/Inlining: introduce removal of unused variables
2016-06-07 11:52:56 +03:00
Alexey Andreev
c11f2fe2d6
JS/Inlining: fix bug in temporary assignment elimination which causes excess removal of assignment statement. When there is a set of temporary variables that receive same value in different execution branches, remove them carefully so that at least one (and, preferably, at most) remains in each branch.
2016-06-07 11:52:55 +03:00
Alexey Andreev
2bd807bb4e
KT-11960: add test for case of instantiating inner class of a local class
2016-05-31 15:24:30 +03:00
Alexey Andreev
81bdd6b4bb
JS: improve performance of Hashtable-based collections
2016-05-23 12:23:27 +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
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
2f42f3bdf6
KT-12305 Fix passing single argument to native vararg function
2016-05-17 10:33:15 +03:00