Alexey Andreev
d0ffb5bd32
JS: add restrictions to external modifier according to KT-13893
2016-12-08 15:41:42 +03:00
Alexey Andreev
c0c6992ea6
JS: regenerate declarations from IDL
2016-12-08 15:41:42 +03:00
Alexey Andreev
c558b5d2b2
JS: regenerate stdlib
2016-12-08 15:41:41 +03:00
Alexey Andreev
a7ce770cb4
Don't report error for properties and functions without body that either external by themselves or are members of external classes
2016-12-08 15:41:40 +03:00
Alexey Andreev
68412ae94f
JS: replace all usages of @native annotation with external modifier, in tests, stdlib, etc
2016-12-08 15:41:39 +03:00
Alexey Andreev
e0cb56b3c3
JS: use external modifier instead of @native annotation
2016-12-08 15:41:39 +03:00
Alexander Udalov
c811c1bea5
Reflection: add KAnnotatedElement.findAnnotation
...
#KT-12250 Fixed
2016-12-07 21:45:24 +03:00
Alexey Andreev
0302fcbb72
JS: don't write native superclass to metadata. Fix KT-15007
2016-12-06 15:42:34 +03:00
Sergey Mashkov
e7d6711db3
IDL2K: properly handle clash or val and var attributes
2016-12-06 15:00:35 +03:00
Mikhail Zarechenskiy
0134b8819b
Optimize const vals by inlining them at use sites
...
#KT-11734 Fixed
#KT-13570 Fixed
2016-12-05 22:11:33 +03:00
Alexey Andreev
784fe31053
JS: fix translation of calls with aliased labeled lambda arguments. Fix KT-14999
2016-12-05 09:19:06 +03:00
Alexey Andreev
df88ebb1b3
KT-12877: don't throw exception when @JsModule annotation is improperly used
2016-12-03 17:15:11 +03:00
Alexey Andreev
d40e923722
KT-12877: minor fixes and cleanup
2016-12-03 17:15:10 +03:00
Alexey Andreev
d63a727474
KT-12877: support plain reference to declaration in UMD wrapper, support plain reference to package
2016-12-03 17:15:09 +03:00
Alexey Andreev
495c876b3b
KT-12877: add tests for UMD modules
2016-12-03 17:15:09 +03:00
Alexey Andreev
31a1d6ca66
KT-12877: add diagnostics on JsModule/JsNonModule:
...
1) for all cases of misusing of JsModule report on JsNonModule as well
2) report about non-top-level declarations with JsModule/JsNonModule
3) report about JsModule/JsNonModule declarations inside file marked with JsModule/JsNonModule
4) report about usages of declarations not marked with both JsModule and JsNonModule from UMD module
2016-12-03 17:15:08 +03:00
Alexey Andreev
08a7f9c298
KT-12877: reorganize JS module tests to support different module systems. Test JsModule in conjunction with JsNonModule and plain module type
2016-12-03 17:15:08 +03:00
Alexey Andreev
0238b182cc
KT-12877: add JsNonModule with support on front-end
2016-12-03 17:15:07 +03:00
Alexey Andreev
3f2ec6871d
KT-12877: add some front-end diagnostics for JsModule
2016-12-03 17:14:30 +03:00
Alexey Andreev
7be872ebca
KT-12877: modify tests to check whether mutable top-level properties of JsModule files are supported
2016-12-03 17:14:29 +03:00
Alexey Andreev
b1d8f91212
KT-12877: fix how native calls and property references are translated to be make them work with JsModule annotation
2016-12-03 17:14:29 +03:00
Alexey Andreev
ac703dfda6
KT-12877: serialize information about file annotations. For each top-level declaration store containing file. Use this information to properly handle file-targeted JsModule.
2016-12-03 17:14:29 +03:00
Alexey Andreev
6df40559f0
KT-12877: initial simple implementation of JsModule. Remove unnecessary ModuleDescriptor from several classes in pipeline
2016-12-03 17:14:28 +03:00
Anton Bannykh
3e4376f4ba
JS: don't omit guard for catch with Throwable type (KT-13616); don't generate guard for catch with dynamic type (KT-13615)
2016-12-02 17:13:02 +03:00
Anton Bannykh
6301e3ec30
JS: Fix capturing class construction function for lambdas inside inline functions with reified type parameters (KT-13522).
2016-12-02 13:42:42 +03:00
Mikhail Zarechenskiy
240d82d167
Move reified type parameter checker to additional checkers to able turn it off by demand
2016-12-01 10:06:38 +03:00
Denis Zharkov
fcd9ee037e
Support coroutines stack-unwinding in JVM backend
...
#KT-14924 In Progress
2016-11-29 14:14:50 +03:00
Denis Zharkov
27e4caf046
Temporary disable coroutine tests in JS backend
...
#KT-14924 In Progress
2016-11-29 14:14:50 +03:00
Anton Bannykh
159df7964a
JS: bound callable references (KT-13573).
2016-11-28 16:33:58 +03:00
Alexander Udalov
8d3f6f1ce7
Check platform<->impl declaration compatibility
...
For each platform declaration, there must be at least one impl declaration in
the module with the compatible signature; similarly, for each impl declaration,
there must be at least one platform declaration with the compatible signature.
Note that currently the presence of the 'impl' modifier is not checked yet.
Also, the sad fact is that if you have platform and impl declarations which are
not compatible, you get two errors: on the platform delcaration and on the impl
declaration. This needs to be addressed as well
2016-11-25 20:50:26 +03:00
Alexander Udalov
a4169416ad
Support platform modifier in back-ends, add multi-platform integration test
...
Skip 'platform' declarations completely in back-ends
2016-11-25 20:50:22 +03:00
Alexander Udalov
1d71c19b42
Serialize .kotlin_metadata binary files per source file
...
Do not serialize everything in the same package to the same file (as is done
for built-ins) because this approach is unfriendly to incremental compilation,
which is going to be supported in the future. Instead, similarly to JVM
serialize each class to its own file, and each source file with top-level
callables/typealiases to its own file.
E.g. if a file named test.kt contains a class Foo and some
functions/properties, the output will contain two files: TestKt.kotlin_metadata
and Foo.kotlin_metadata. Each one of this files contains the serialized
BuiltIns message (see builtins.proto)
2016-11-25 20:50:10 +03:00
Dmitry Petrov
3d2696c81b
KT-13440 Bound callable references in reflection
2016-11-25 16:11:18 +03:00
Dmitry Petrov
5879e201cd
Proper equality comparison for bound callable references represented as reflection objects
...
(including references to property accessors).
2016-11-25 14:49:24 +03:00
Dmitry Petrov
3dd0c9d1c7
Equality comparison for bound callable references takes into account bound receiver.
...
Fixed KT-14939: use expected receiver type when generating receiver code in get/set methods for bound property references.
Otherwise we have VerifyError for bound receiver 'null' of type 'Nothing?', which is mapped to 'java.lang.Void'.
TODO: proper equality comparison for property accessors ('x::prop.getter', 'x::prop.setter').
2016-11-25 14:49:24 +03:00
Alexey Andreev
ce6cf6475c
JS: fix compilation of project
2016-11-25 14:43:48 +03:00
Alexey Andreev
66c78be10f
JS: don't optimize RTTI when possible, i.e. don't remove is and as when object is known at compile time to have type in RHS of expression. Substitute kotlin.Any with Object. Fix #KT-7665, #KT-7664
2016-11-25 14:08:13 +03:00
Alexey Andreev
c581ec6dd6
JS: fixes after code review
2016-11-25 14:07:31 +03:00
Alexey Andreev
46242f4430
JS: when RHS of as cast is non-nullable native interface, check LHS for null
2016-11-25 14:07:30 +03:00
Alexey Andreev
e17321e1f6
JS: fix some code in stdlib that attempts to to is check against native interface
2016-11-25 14:07:30 +03:00
Alexey Andreev
2eb54f234c
JS: prohibit passing native interfaces to reified type parameters
2016-11-25 14:07:29 +03:00
Alexey Andreev
acf7fcaebf
JS: prohibit is checks against native interfaces. Warn about casts to native interfaces. Fix #KT-14037, fix #KT-14038
2016-11-25 14:07:29 +03:00
Sergey Mashkov
1954cffd01
IDL2K: regenerate stubs
2016-11-24 12:14:34 +03:00
Sergey Mashkov
d3afb683a3
Update tests expected files
2016-11-24 12:14:31 +03:00
Sergey Mashkov
ecbf2c023d
Upgrade example
2016-11-24 12:14:31 +03:00
Ilya Gorbunov
db1d2bf76f
Deprecate all java.util.* stuff in JS library
2016-11-23 17:58:52 +03:00
Alexey Andreev
ea1e196e9a
JS: remove unused imports from generated JS. Fix KT-14748
2016-11-23 12:19:04 +03:00
Alexey Andreev
cf89e24b49
JS: fix removal of unused lambdas after inlining
2016-11-23 12:19:04 +03:00
Alexey Andreev
40e00a62f5
JS: fix translation of augmented assignment when RHS changes value of LHS
2016-11-23 12:19:03 +03:00
Alexey Andreev
be196789d2
JS: fix bug in temporary variable elimination
2016-11-23 12:19:03 +03:00