Alexander Udalov
9babd90999
Support default arguments and varargs for callable references
...
#KT-8834
#KT-19869
#KT-25514
2018-08-01 16:26:06 +02:00
Zalim Bashorov
8d97512179
[JS IR BE] Improve diagnostics in tests
2018-07-31 11:28:39 +03:00
Zalim Bashorov
0da14e4189
[JS IR BE] Support calls, property accesses and most of operators on expressions with dynamic type
2018-07-31 11:28:38 +03:00
Roman Artemev
14b1f0ef6a
Fix issue #KT-24475
...
* count coroutine metadata references during RemoveUnusedImport pass in JsInliner
* add cases to test usage of stdlib symbols in inlined functions
2018-07-26 19:23:06 +03:00
Roman Artemev
dec307799a
Fix infinite loop in suspend function in case of return from finally [#KT-21961]
...
* add test
2018-07-25 23:04:57 +03:00
Ilya Gorbunov
293e5794f0
Allow to skip JS IR tests with gradle property kotlin.compiler.js.ir.tests.skip
2018-07-25 20:25:15 +03:00
Roman Artemev
eb420a1e0f
Fix [#KT-23921]
...
* make name collector in inliner process handle JsCatch
* visit JsParameter during live analyser in coroutine transformer
2018-07-25 14:22:11 +03:00
Roman Artemev
5241b37ad9
Fix fallthrough in suspendable switch [#KT-22694, #KT-23687]
...
* do not explicitly put break for each case
* add test for related cases
2018-07-24 20:19:35 +03:00
Roman Artemev
0c6256d003
Fix initialization order
...
* put inheritance code in the beginning
* put top-level initializer after any declaration
2018-07-24 20:16:39 +03:00
Mikhail Zarechenskiy
045058c29a
Support inline class values inside string templates through boxing
...
#KT-25626 Fixed
#KT-25613 Open
2018-07-20 13:58:31 +03:00
Mikhail Zarechenskiy
ec9d8e580e
Leave boxing for compareTo/areEqual methods for inline classes
...
Inline classes can override methods and thus introduce side effects
2018-07-20 11:51:34 +03:00
Alexander Udalov
4122021090
Add BinaryVersion to DeserializationContext
...
This will be useful to implement version-dependent deserialization,
which is needed for gradual fixes of issues in metadata
#KT-25120 In Progress
2018-07-18 17:58:46 +02:00
Roman Artemev
e4b314c26c
Fix inlining of invoke operator [#KT-25474]
...
* add test
2018-07-18 16:12:41 +03:00
Alexander Udalov
79c2aa4acf
Minor, move tests on JvmField into subdirectory
2018-07-18 13:24:45 +02:00
Mikhail Zarechenskiy
bb575866cb
Pass actual invoke parameters for inline functions with inline classes
...
#KT-25511 Fixed
2018-07-17 23:39:38 +03:00
Mikhail Zarechenskiy
77959247d2
Fix bridge generation for inline classes over Any type
2018-07-17 23:39:34 +03:00
Alexander Udalov
ae6627fe94
Simplify code in JS serialization related to module descriptors
...
Do not use `JsModuleDescriptor<...>` where only its `data` is needed
2018-07-17 20:26:31 +02:00
Svyatoslav Kuzmich
1abb4f42ac
[JS IR BE] Add ranges to runtime, rangeTo for primitive numbers
2018-07-17 20:18:29 +03:00
Mikhail Zarechenskiy
b6db8971e4
Warn about annotations that targets non-existing accessors
...
#KT-15453 In Progress
2018-07-17 00:22:53 +03:00
Mikhael Bogdanov
1d283d243e
Support @JvmField on interface properties
...
#KT-15807 Fixed
2018-07-16 16:13:15 +02:00
Mikhail Zarechenskiy
857cc0f728
Make tests about mod and varargs valid for 1.3 version
2018-07-16 14:01:59 +03:00
Alexander Udalov
dcbb8045bd
Disallow function types with big arity on JVM if LV < 1.3 or API < 1.3
...
The implementation is a bit obscure because this worked on JS since
Kotlin 1.0 and we should not break that; however, on JVM, a diagnostic
will be reported with old language/API version
#KT-25241 Fixed
2018-07-16 10:41:27 +02:00
Alexander Udalov
56f509ba09
Support function types with >= 23 parameters
...
See https://github.com/Kotlin/KEEP/issues/107
#KT-13764 Fixed
2018-07-16 10:41:27 +02:00
Zalim Bashorov
3f0b31dc23
Speed up JS IR BE tests compiling the common parts (runtime + test common utils) once (on demand) and sharing the result between tests
...
It's a temporary hack until we implement IR based library format.
It relies on the fact that currently, IR BE generates stable (enough) names.
2018-07-13 23:42:41 +03:00
Zalim Bashorov
34758110ee
JS IR test runner: collect all .kt files from the "irRuntime" dir automatically instead of declaring each one in the list
2018-07-13 23:42:40 +03:00
Alexander Udalov
0d03d5abf6
Regenerate tests
2018-07-13 18:40:31 +02:00
Georgy Bronnikov
8478c73434
Make @JvmStatic work on JVM_IR
2018-07-13 13:43:02 +03:00
Mikhail Zarechenskiy
4e3674b330
Fix for-in iterator over list of boxed inline class values
...
#KT-25325 Fixed
2018-07-12 18:53:30 +03:00
Mikhail Zarechenskiy
0308e10c11
Fix for-in iterator over array of boxed inline class values
...
#KT-25324 Fixed
2018-07-12 18:53:24 +03:00
Anton Bannykh
cf9ad635e1
JS: add more tests
2018-07-12 14:18:34 +03:00
Anton Bannykh
0579b52d6b
JS: enabled codegen box tests for release coroutines
2018-07-12 14:18:34 +03:00
Mikhael Bogdanov
9cf9cb3ecd
Fix KotlinType building by IrType: don't miss type parameters of outer for inner class
...
#KT-25405 Fixed
2018-07-11 15:12:43 +02:00
Anton Bannykh
9233e6c176
JS IR: char (always boxed for now)
2018-07-11 14:49:36 +03:00
Mikhail Zarechenskiy
8d24ca65a3
Propagate KotlinType into when expression codegen
...
This commit removes unneeded boxing when result expression of `when` is
value of inline class type
2018-07-10 23:10:57 +03:00
Anton Bannykh
65846d783d
JS IR: Long
2018-07-10 13:34:19 +03:00
Ilya Gorbunov
be8cb94105
Add failing tests for overflow in empty progressions KT-24204
2018-07-09 22:08:01 +03:00
Denis Zharkov
820506d9c6
Fix tests after new Continuation API support
...
#KT-24863 Fixed
2018-07-09 15:27:19 +03:00
Ilmir Usmanov
bc8295b137
Minor: regenerate tests
2018-07-05 15:09:13 +03:00
Ilmir Usmanov
4ec82cad90
Minor: add test to call callable references from Java
2018-07-05 15:09:06 +03:00
Ilmir Usmanov
28ad498956
Use AnonymousFunctionDescriptor for suspend callable references
...
Also use it for local suspend functions, which allows us to remove hack
with dropSuspend.
Regenerate tests.
2018-07-05 15:08:49 +03:00
Ilmir Usmanov
eea95441c5
Add diagnostics tests. Forbid callable reference to coroutineContext
...
#KT-16908: Fixed
2018-07-05 15:08:42 +03:00
Ilmir Usmanov
f94b579d19
Implement callable references to suspend functions
...
In FE they have type KSuspendFunctionN
In BE they are treated like normal callable references with additional
parameter in invoke function.
2018-07-05 15:08:34 +03:00
Mikhail Zarechenskiy
2939d9c8c6
Use correct lhs KotlinType & AsmType for is check generation
...
There were two problems:
- For asm type `OBJECT_TYPE` was used, which can be wrong in case of
inline classes, because it can be an underlying value of some inline class
- For KotlinType, type from rhs was used
2018-07-05 12:55:43 +03:00
Mikhail Zarechenskiy
4f490ac264
Fix generation of checkcast instructions for inline classes
...
Normalize LHS and RHS types to use only boxed ones and then let bytecode
optmizer reduce redundant boxing
2018-07-05 12:55:39 +03:00
Svyatoslav Kuzmich
83f8cfaa66
[JS IR BE] hashCode, toString, number conversion support
2018-07-03 19:51:58 +03:00
Alexander Udalov
4266e50be8
Use manual type mapping in reflection for members from built-ins
...
There are cases when members deserialized from JVM classes have no JVM
signature in the proto. For example, if a member is inherited from a
built-in class (such as Map.getOrDefault in some Map implementations),
or if a member is synthesized in the compiler front-end and back-end
separately (such as enum values/valueOf). In these cases, we'll use the
naive type mapping to try to recover the signature.
#KT-16616 Fixed
#KT-17542 Fixed
2018-07-02 18:49:08 +02:00
Alexander Udalov
17fc41e0f9
Do not create primary constructor for enum entry synthetic class
...
The change in DescriptorSerializer is needed so that serialized protos
of enum entry classes which are resolved in sources
(LazyClassDescriptor) and are deserialized from binaries
(EnumEntrySyntheticClassDescriptor) are the same. There are tests on
incremental compilation in JS that check that the serialized proto is
exactly the same after rebuild and after an incremental build.
#KT-22048 Fixed
2018-07-02 18:49:08 +02:00
Roman Artemev
c887b88ed9
Fix coroutine test generator
2018-07-02 15:35:02 +03:00
Dmitry Petrov
46a3f7420c
When in debugger context, access private companion object directly
2018-06-26 16:46:55 +03:00
Alexander Udalov
1951d38f40
Retain optional expected annotations when compiling platform code
...
After this change, optional expected annotations will be compiled to
physical class files on JVM, and stored to metadata on other platforms,
to allow their usages from dependent platform modules. For example:
@OptionalExpectation
expect annotation class A
When compiling this code on JVM, A.class will be produced as if the
class A did neither have the 'expect' modifier, nor had it been
annotated with OptionalExpectation. Note that if there's no actual
annotation class for A, then usages (which can only be usages as
annotation entries) are simply skipped.
Class A will be public from Kotlin's point of view (since it should
be possible to use it in Kotlin sources), but _package-private_ in Java
to disallow its usages outside of the declaring module.
#KT-18882 Fixed
#KT-24617 Fixed
2018-06-26 10:23:55 +02:00