Commit Graph

17 Commits

Author SHA1 Message Date
Nikita Nazarov 407448d8e3 [JVM] Implement new inlined variable naming format
^KT-65478 fixed
2024-02-23 23:59:13 +01:00
Steven Schäfer 111c550f3c JVM IR: More tests for inlining in $default stubs 2020-09-24 07:53:31 +02:00
Steven Schäfer 5e27d9b089 JVM IR: Make inlining in $default stubs compatible with the JVM BE
The JVM BE inlines calls to the underlying function in a $default stub
verbatim, e.g., without renaming LVT entries or regenerating anonymous
objects. This commit introduces the same behavior in the JVM IR BE.

Fixes KT-36769.
2020-09-24 07:53:31 +02:00
Kristoffer Andersen c1d350f8f3 [JVM IR] Added null-checks of handler for non-super $default calls 2020-02-26 16:28:27 +01:00
Dmitry Petrov 94d20d9176 Update bytecode text tests in JVM_IR 2020-02-17 23:52:48 +03:00
Mikhael Bogdanov 17e89fbbdb JVM_IR. Align synthetic parameter name generation across backends 2020-01-29 16:59:57 +01:00
Alexander Udalov b48d7f4ba7 JVM IR: fix InterfaceLowering for $default methods from base interfaces
The first change here is swapping the isCompatibility and hasJvmDefault
checks. Otherwise behavior could be different depending on -Xjvm-default
mode even for non-JvmDefault declarations, which makes little sense.

Another change is avoiding generating $default stubs for fake overrides
in interfaces, which replicates the behavior of the current backend.
(Note that this change also fixes the first problem on the newly added
tests, but the first change seems useful anyway.)
2020-01-10 14:05:27 +01:00
Mikhael Bogdanov a214d61567 IR. Change visibility to lowered default function/constructors to public 2019-11-20 12:57:38 +01:00
Mikhael Bogdanov 3196893166 Don't write synthetic arguments to LVT 2019-11-20 12:57:33 +01:00
pyos 55acc296a2 JVM_IR: never create temporaries in $default stubs
Given the strict pattern-matching in the inliner, this is the only way
to make it not crash when attempting to inline these stubs. Note that
the IR backend does not currently use the inliner's default method stub
handling; the crash only occurs when a module compiled with the non-IR
JVM backend is attempting to call an inline function with default
arguments defined in a module that was compiled with the IR backend.
2019-10-23 11:11:16 +02:00
Steven Schäfer ac667403ef (Un)mute and add tests for vararg codegen 2019-08-13 14:24:55 +02:00
Steven Schäfer 79f71f61d5 JVM BE: Add more tests for default arguments
- Inline class parameters should not be boxed.
- Empty vararg parameters should not allocate an empty array.
2019-08-05 16:48:18 +03:00
Ilmir Usmanov 871134cff8 Update test data
#KT-28309
2018-12-28 14:18:39 +03:00
Mads Ager 3a11322506 Enable bytecode text tests for the JVM_IR backend. 2018-12-21 16:20:45 +01:00
Mikhael Bogdanov a7c9e14805 Don't generate default arguments for inline call 2017-04-28 12:19:09 +02:00
Mikhael Bogdanov 02cc5f6bc1 Expand default parameters conditions on inlining default function
#KT-14564 Fixed
 #KT-10848 Fixed
 #KT-12497 Fixed
2017-04-28 12:19:07 +02:00
Alexander Udalov b4051c4577 Do not generate unnecessary super-call checks for functions with defaults
Such check should only be generated for a function in an open class

 #KT-11962 Fixed
2016-12-27 16:22:12 +03:00