Commit Graph

22 Commits

Author SHA1 Message Date
Alexander Udalov 9ebd665c96 Report error on annotated type inside typeOf on JVM
Since it's not feasible to support annotated types in 1.6, we're making
this an explicit error in 1.6, so that typeOf can become stable and this
feature can be supported in the future without breaking changes to the
existing code.

Note that extension function types are a special case of annotated
types. A separate error is created for them just because the message
"annotated types are not supported" would be confusing, since such types
don't have explicit annotations in the source code.

 #KT-29919
2021-07-22 15:54:48 +02:00
Alexander Udalov 02774fae0c Report error on non-reified type parameter with recursive bound in typeOf
Instead of throwing an exception.

 #KT-40173
2021-07-09 14:31:52 +02:00
Alexander Udalov 438ce57183 Report error on typeOf<suspend ...>()
Otherwise an invalid type is constructed which causes kotlin-reflect to
crash, and stdlib implementation to render the type incorrectly. The
reason is that suspend functional types are not properly supported in
reflection. Once they are supported, this error can be removed.

 #KT-47562
2021-07-09 14:31:52 +02:00
pyos e06bacafad JVM: fix inline cycle detection
1. use the correct descriptor in the old backend;
 2. clear the temporary variables for arguments in the IR backend.

 #KT-45292 Fixed
2021-03-12 11:49:42 +01:00
Alexander Udalov bc5fc122c5 JVM, JVM IR: report error if not all parts of multifile class are @JvmSynthetic
#KT-41884 Fixed
2021-03-11 13:33:25 +01:00
Ilmir Usmanov 62123d72e2 IC: Add inline class -> @JvmInline value class warning 2021-02-25 16:06:47 +01:00
Dmitriy Novozhilov f1a2e66ba4 [Test] Setup proper jvm target for kotlinClassImplementsJavaInterface test 2021-01-12 18:35:33 +03:00
Dmitriy Novozhilov 85c87f7df9 [Test] Migrate AbstractBlackBoxCodegenTest to new infrastructure 2021-01-12 18:35:30 +03:00
Ilmir Usmanov f922ebbfc3 Value classes: Add JvmInlineValueClasses language feature 2020-12-18 17:53:58 +01:00
Ilmir Usmanov 69be56d042 Value classes: Forbid cloneable value classes
#KT-43741 Fixed
2020-12-04 23:27:46 +01:00
Dmitry Petrov 3b604cfa7f JVM_IR KT-32701 generate multiple big arity invokes, report error later 2020-11-30 15:49:02 +03:00
Dmitry Petrov a206eca164 JVM_IR KT-43611 report signature clash on private interface members 2020-11-27 18:54:09 +03:00
Ilmir Usmanov c62093f54c IC mangling: Change mangling rules
1. Use 'x' for each parameter, which is not an inline class, every
possible clash is handled by signature rather than name. This change
makes more API changes binary-compatible. So, the changes are in line
with the vision of inline classes are value classes, like primitives.

2. Take return type into account when mangling a function if the return
type is inline class. Otherwise, boxing bridge will not be generated,
which leads to CCE at runtime.
2020-11-19 17:39:24 +01:00
Alexander Udalov 6f622920e7 Minor, deduplicate matching JVM_OLD/JVM_IR duplicateJvmSignature tests 2020-09-21 18:49:36 +02:00
Mads Ager 05c662ec55 [JVM_IR] Remove line numbers from delegated member functions.
This fixes smart step into for delegated member functions.
Additionally, we align on the string "memberFunctionName(...)"
for expression non-null checks for both JVM_IR and JVM
backends.
2020-09-21 18:49:08 +02:00
pyos f765963056 Split JVM backend diagnostics test into IR and non-IR versions
The IR backend no longer generates redundant INLINE_CALL_CYCLEs.
2020-04-08 07:04:16 +02:00
Mads Ager 03fb49bb38 [JVM_IR] Improve debugging behavior of inline functions
Specifically, this commit improves the stepping behavior of the IR
backend around functions with defaults.

  - Improved line numbers in the default handler itself for better
    stepping when inlined.

  - Improved source information on default arguments

  - Improved test coverage of stepping behavior in old and IR backends.

Improves the stepping behaviour around inline methods with default
arguments. In particular, we now accurately step through the
evaluation of default arguments, but do _not_ spuriously show the exit
from the $default handler.
2020-04-07 16:52:45 +02:00
pyos c650c9570f JVM: use conditional suspension point markers 2020-04-07 15:42:41 +02:00
pyos 72b80ef158 Detect inline cycles faster
E.g. in the following code

    fun x() {}
    inline fun f() { x(); g() }
    inline fun g() { x(); f() }

the old implementation of inline cycle detection bailed out after
generating 3 calls of x() in each function, while the new one stops
after 2. In other words, code generation for a single function is no
longer reentered.
2020-03-19 08:13:19 +01:00
Dmitry Petrov 866f188120 Report JVM signature clashes from JVM_IR
Also:

* Do not rename public ABI fields
This includes backing fields for const, lateinit, @JvmField properties,
and instance fields for objects.

* FAKE_OVERRIDE declarations for static members of parent Java classes
Required to report cases when a Kotlin function accidentally overrides
Java class member.
2020-02-13 11:35:48 +03:00
Dmitry Petrov a1326d3ef5 !RENDER_DIAGNOSTICS_FULL_TEXT directive
Compares diagnostics rendered as text with corresponding .diag.txt file
2020-02-07 10:50:56 +03:00
Dmitry Petrov 4e6c3b6b43 Diagnostics tests with JVM backend 2020-02-07 10:50:56 +03:00