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
Alexey Andreev
dc8e90809c
JS: coroutines: fix handling of throw statement inside try/catch block when controller has handleSuspend function
2016-11-23 12:19:02 +03:00
Alexey Andreev
e44edf12e0
JS: coroutines: fix inlining of suspend functions
2016-11-23 12:13:54 +03:00
Alexey Andreev
8b9852edec
JS: remove Kotlin.createClass/definePackage/etc functions from stdlib. Reimplement some classes in Kotlin
2016-11-23 12:13:54 +03:00
Alexander Udalov
c0b5fd193a
Refactor DeserializedPackageFragment and subclasses
...
Push loadResource and loadResourceSure down to KotlinJavascriptPackageFragment,
as it's no longer needed in BuiltInsPackageFragment
2016-11-22 18:19:02 +03:00
Ilya Gorbunov
427c6386a9
Remove java.lang from default imports in JS target platform
2016-11-21 18:22:05 +03:00
Ilya Gorbunov
62fe89b536
Make several tests running on JS backend.
2016-11-21 18:20:33 +03:00
Ilya Gorbunov
0899a0fdda
Make some tests JVM only
2016-11-21 18:20:33 +03:00
Ilya Gorbunov
50cd620f92
Remove java.util.* imports from common code.
2016-11-21 18:20:33 +03:00
Alexey Andreev
85a775375a
JS: when deciding whether inner class of a local class captures this, don't check for subtyping, since frontend generates strict classes in descriptors. Remove fix for #KT-13583, since it's no more needed. Fix #KT-13792
2016-11-21 12:57:59 +03:00
Alexey Andreev
0a240b2a3a
KT-12976: add code to generated JS modules that detects wrong module order and produces human-friendly error message. Fix #KT-12976
2016-11-21 12:57:11 +03:00
Dmitry Petrov
d665193c20
Type alias constructors for inner classes in expressions ans supertype lists.
2016-11-21 10:25:51 +03:00
Dmitry Petrov
4c47d77a9f
Report error on non-top-level type aliases (unsupported in 1.1).
...
Get rid of nested type aliases in project.
2016-11-21 10:25:51 +03:00
Ilya Gorbunov
87c9d4e84e
Introduce unsafeCast function. Provide more JS-idiomatic emptyArray() implementation.
...
#KT-14034 Fixed
2016-11-19 03:37:47 +03:00
Anton Bannykh
68b35aa0ac
JS inliner: Don't treat 'bar' as unused in the presence of 'bar.call' expressions
2016-11-18 20:55:07 +03:00
Ilya Gorbunov
1defc10add
Minor fix: pass message to superconstructor of NoSuchElementException
2016-11-18 19:12:05 +03:00
Ilya Gorbunov
ac2c2aa959
Remove collectionsMax once again.
2016-11-18 19:12:05 +03:00
Ilya Gorbunov
0dbaf2a605
Make toTypedArray reified again and thus inline, rewrite copyToArray and copyToArrayImpl in kotlin.
2016-11-18 19:12:05 +03:00
Ilya Gorbunov
698bc7bd31
Internal visiblity for hacks.kt declarations.
...
Explicit public visibility.
2016-11-18 19:12:05 +03:00
Anton Bannykh
2f0bccfb09
JS: chained reified function calls (KT-12527) fixed
2016-11-18 13:48:16 +03:00
Dmitry Jemerov
d3ccbe8172
Generate correct varargs flag for @JvmOverloads-generated methods
...
#KT-14186 Fixed
2016-11-18 11:04:59 +01:00
Dmitry Jemerov
16a133bf5c
Generate default constructor also for private classes when all parameters have default values
...
#KT-14408 Fixed
2016-11-18 11:04:51 +01:00
Dmitry Jemerov
248185943c
Handle @JvmOverloads on inner class constructors correctly
...
#KT-14678 Fixed
2016-11-18 11:04:49 +01:00
Dmitry Petrov
8b99141030
KT-14839 Do not coerce after remapped variable store.
2016-11-18 09:35:31 +03:00
Zalim Bashorov
ef11393462
KJS: add multimodule version of inheritFromRenamedNativeClass
2016-11-17 16:22:31 +03:00
Zalim Bashorov
8c630954a8
Minor: fix typo in file name
2016-11-17 16:22:30 +03:00
Zalim Bashorov
e1248f8f0b
KJS: don't copy members from native interfaces
2016-11-17 16:22:29 +03:00
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
1f4d95eaa7
Minor: rename kotlin.kt -> Enum.kt
2016-11-17 16:22:26 +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