Commit Graph

13 Commits

Author SHA1 Message Date
Steven Schäfer dc0ef996b7 JVM IR: Implement the new inline class ABI 2020-05-28 18:00:35 +03:00
Dmitry Petrov e625bb375f Temporarily mute unsigned tests in JVM_IR and FIR 2020-05-20 07:19:30 +03:00
Dmitriy Novozhilov 7f02d57d88 [FIR] Correctly detect super type in delegated constructor call 2020-04-17 12:37:29 +03:00
Jinseong Jeon 078cf02c8a FIR: Provide dispatch receiver for 'field' according to property type 2020-03-30 16:57:53 +03:00
simon.ogorodnik f83c20065d [FIR-test] Unmute passing tests, mostly fir2ir 2020-03-24 18:58:19 +03:00
Alexander Udalov 957b100cd1 JVM IR: do not generate hidden constructor for inline classes more than once
SyntheticAccessorLowering was initially implemented under the assumption
that any access to an invisible declaration will cause an accessor to be
generated _in the same file_. Moreover, it's declared in the group of
phases that are performed by file.

But this assumption is incorrect for constructors which need to be
hidden (those which take parameters of inline class types), since such
constructor is public and can be called from anywhere. In this case,
SyntheticAccessorLowering actually generated a new accessor for the
hidden constructor for each (!) source file where that constructor is
called, which led to ClassFormatError because of the class file having
multiple methods with the same signature. The internal `functionMap`
cache didn't help because it's not shared among phase instances for
different files (well, it helped to generate not more than one accessor
per usage-file).

In this change, we use the global cache, stored in JvmBackendContext,
for accessors to hidden constructors. Note that after this change, calls
to hidden constructors are always transformed to the corresponding
accessor in SyntheticAccessorLowering right away, but that accessor
might be orphaned for a while (not declared in any parent's
declarations). Only when SyntheticAccessorLowering encounters the
original constructor which needs to be hidden, it adds the accessor
beside it.

The test is sensitive to the file order, so both variants are added.
2020-01-10 13:49:05 +01:00
Mark Punzalan 9df2f69f09 [FIR] Disable failing blackbox codegen tests for FIR. 2019-11-19 11:00:09 +03:00
Steven Schäfer 917ef250cf Add and (un)mute inline class tests 2019-06-13 12:25:06 +02:00
Svyatoslav Kuzmich 75328f26ea [JS IR BE] Add missing KJS_WITH_FULL_RUNTIME to some tests
+ ranges test generator
2019-01-27 01:14:51 +03:00
Dmitry Petrov a4897641d4 Minor: mute some tests in JS/JS_IR 2018-12-24 16:10:35 +03:00
Dmitry Petrov 2f6c4a0472 Use original method signature to call accessor for hidden constructor
#KT-28855 Fixed Target versions 1.3.30
2018-12-24 16:09:44 +03:00
Dmitry Petrov bbbca9fbbf Minor: mute inline classes tests in JVM_IR 2018-09-10 10:42:18 +03:00
Dmitry Petrov 006c0aa740 Hide constructors accepting inline class parameters 2018-09-07 15:57:59 +03:00