Alexey Andreev
70c5f05f6e
JS: fix compile-time failure when inheriting one local class from another local class
2016-09-09 17:52:42 +03:00
Alexey Andreev
b91ed1e02a
KT-13544: support typealiases in JS backend
2016-09-09 14:38:11 +03:00
Alexey Andreev
7510b7f080
JS: fix tests that don't fail due to lack of support of strict mode (multiValInIntFor, multiValInIntRangeFor).
2016-09-09 13:59:53 +03:00
Alexey Andreev
16af7d667f
KT-12868: if a property initializer is a complex expression that emits additional statements, emit these statements directly before assignment to the property, not at the beginning of constructor
2016-09-09 13:54:03 +03:00
Alexey Andreev
80361bf2fb
KT-13583: allow local classes to capture members of outer classes
2016-09-09 13:07:08 +03:00
Valentin Kipyatkov
322df5b348
More correct operator treatment
2016-09-07 19:04:42 +03:00
Alexey Andreev
43abdaa894
KT-13658: don't capture FakeCallableDescriptorForObject in closure
2016-09-06 10:59:56 +03:00
Denis Zharkov
86c1dbe7b5
Fix decompilation of types based on local classifiers
...
If deserializing a type with arguments based on a local class for
decompiler, then just return Any type (without arguments).
Previously Any constructor was used with serialized arguments, that lead
to exception
Note that in case of deserialization for compiler nothing changes about
local-classes-based types (LocalClassifierResolverImpl is just inlined)
#KT-13408 Fixed
2016-09-05 17:54:36 +03:00
Alexey Andreev
60a09ecb45
KT-12873: add temporary variables generated by delegation expression to class initializer. Fix #KT-12873
2016-08-30 12:26:06 +03:00
Sergey Mashkov
8ae5ecf4ff
KT-12810 IDL: support special modifiers(e.g. getter and setter)
2016-08-29 17:56:17 +03:00
Kevin Greene
ce1844a6c9
Updates link to JavaScript issues on YouTrack ( #939 )
2016-08-27 21:18:20 +03:00
Ilya Gorbunov
25d8af3112
JS: Implement Long.hashCode function.
...
#KT-13756 Fixed
2016-08-26 05:28:48 +03:00
Ilya Gorbunov
813bee62e5
JS: Remove intrinsic for Long.equals, because it's applied incorrectly for nullable longs.
...
#KT-7500 Fixed
2016-08-26 05:28:20 +03:00
Alexey Andreev
7016ce9b41
JS: refactor how cached access translators work. Fix cached access translator in case of arrays. Use cached access translator to translate reassignments
2016-08-23 18:06:51 +03:00
Alexey Andreev
cb2c8edaf9
JS: don't translate RHS of overloaded assignment operators twice. It can break compilation in some cases, for example, when there are lambdas in RHS.
...
Fix #KT-12808 #KT-12807
2016-08-23 18:06:51 +03:00
Alexey Andreev
df86840515
KT-13025: when receiver of call of 'invoke' method is a Function, check whether receiver is an extension function and generate additional '.call' invocation. Fix #KT-13025
2016-08-23 15:45:48 +03:00
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
Ilya Gorbunov
0d7819e011
Move exceptions to kotlin package in JS library, introduce type aliases for exceptions in kotlin package in JVM runtime.
...
#KT-18 Fixed
2016-08-17 12:40:50 +03:00
Alexander Udalov
18887f8bec
Rename CompanionObjectMapping.hasMappingToObject -> isMappedIntrinsicCompanionObject
2016-08-15 19:41:47 +03:00
Alexander Udalov
611899e9d3
Minor, make CompanionObjectMapping a singleton
2016-08-15 19:41:47 +03:00
Zalim Bashorov
9ece62fa0f
JS backend: fix runtime type checking for interfaces
2016-08-10 15:04:27 +03:00
Ilya Gorbunov
e35a214eaf
Review fixes: special case of toMap for singleton map.
...
#KT-9108
2016-08-09 21:49:57 +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
Zalim Bashorov
e7eb35b169
JS backend: always (explicitly) generate constructor function for classes. Use name of class as name of constructor function when it isn't special.
...
#KT-4115 In Progress
2016-08-05 18:13:05 +03:00
Alexey Andreev
19cea48637
JS: add tests to show that #KT-12865 fixed as well
2016-08-05 16:32:27 +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
Mikhail Glukhikh
692623cb55
Cleanup: smart casts of safe call receiver applied (do NOT cherry-pick to 1.0.X)
2016-07-27 16:24:18 +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
Alexander Udalov
d945c33d5e
Move some members from OverrideResolver to OverridingUtil
2016-07-25 15:55:31 +03:00
Michael Bogdanov
1d5924d236
'superConstructorCall' test folder moved under 'innerNested'
2016-07-21 19:10:42 +03:00
Michael Bogdanov
55382ba848
Removed obsolete code in 'lookupConstructorExpressionsInClosureIfPresent' method
2016-07-21 19:10:42 +03:00
Michael Bogdanov
5dca4dbc67
Fix for KT-11833: Error generating constructors of class null with kind IMPLEMENTATION on anonymous object inheriting from nested class of super class
...
#KT-11833 Fixed
2016-07-21 19:10:42 +03:00
Stanislav Erokhin
6556cde329
Introduce new type checker.
2016-07-21 16:07:16 +03:00
Alexey Andreev
df05b20bc6
JS: in tests add verifier that checks whether no expression statements with only null expression exist
2016-07-18 19:26:50 +03:00
Alexey Andreev
a27f5c8fee
JS: add TranslationContext.cacheExpressionIfNeeded and use it where possible
2016-07-18 19:26:50 +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
9cb6b22d62
JS: minor code style and formatting fixes
2016-07-18 19:26:48 +03:00
Alexey Andreev
9fcad45edb
JS: refactor generation of temporary variables
2016-07-18 19:26:48 +03:00
Alexey Andreev
9edb9fabe5
JS: get rid of JsEmptyExpression, use JsLiteral.NULL instead, rely on optimizer to remove redundant code
2016-07-18 19:26:47 +03:00
Alexey Andreev
fe5a7aaf46
JS: during translation of expression mark assignment to temporary variables as synthetic statement.
...
This helps optimizer to find and eliminate temporary variables.
2016-07-18 19:26:47 +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
Alexander Udalov
77bb691d4e
Rename SymbolUsageValidator -> ClassifierUsageChecker
...
Also validateTypeUsage -> check
2016-06-29 22:03:34 +03:00