Commit Graph

5747 Commits

Author SHA1 Message Date
Dmitriy Novozhilov 4bf6e58f2b [TD] Fix directive order in codegen testdata 2021-02-02 20:37:47 +03:00
Dmitriy Novozhilov a4e9ab90a0 [Test] Migrate :tests-different-jdk on runners which are using JUnit5 2021-02-02 17:54:51 +03:00
Dmitriy Novozhilov 3199ce03a6 [Test] Merge box against java testdata into codegen black box testsdata 2021-02-02 17:54:49 +03:00
Dmitriy Novozhilov e62b118351 [TD] Ignore JS backends in boxAgainstJava tests 2021-02-02 17:54:49 +03:00
Dmitriy Novozhilov 99cb85ab00 [Test] Merge box against java tests into codegen black box tests 2021-02-02 17:54:47 +03:00
Dmitriy Novozhilov 49c2bfe637 [Test] Enable SMAP dump handler in boxInline tests 2021-02-02 17:53:53 +03:00
Dmitriy Novozhilov 64a300bfcd [TD] Update testdata according to previous commit 2021-02-02 17:53:52 +03:00
Dmitriy Novozhilov 8973e3f362 [TD] Update fir directives in boxInline tests 2021-02-02 17:50:07 +03:00
Dmitriy Novozhilov fc83dc17fe [Test] Support USE_OLD_INLINE_CLASSES_MANGLING_SCHEME directive 2021-02-02 17:50:06 +03:00
Dmitriy Novozhilov 0768a7089c [TD] Fix friend modules 2021-02-02 17:50:06 +03:00
Dmitriy Novozhilov 5075484c8e [TD] Update directives in kotlinAgainstKotlin testdata 2021-02-02 17:50:05 +03:00
Dmitriy Novozhilov 5c8d555808 [Test] Move KotlinAgainstKotlin tests under BlackBoxCodegen tests 2021-02-02 17:50:05 +03:00
Mikhael Bogdanov 1ea4fa4464 Fix android test with type annotations. Remove obsolete JVM 8 flavors
Remove some new test cause their originals would be executed on JvmTarget6OnJvm8
2021-02-02 14:32:50 +01:00
Mikhael Bogdanov c13f38f6df Support proper frame maps for enumValues 2021-02-02 14:32:50 +01:00
Mikhael Bogdanov 1a044e5af4 Support proper frame maps for enum valueOf 2021-02-02 14:32:50 +01:00
Mikhael Bogdanov 16928d6e3f Don't remove checkcast for reified values
#KT-35511 Fixed
2021-02-02 14:32:50 +01:00
Mikhail Glukhikh 465261e611 FIR: don't create intersection override for duplicating symbols 2021-02-02 16:25:08 +03:00
Alexander Udalov 5480faf5c5 Add tests for issues fixed in JVM IR and other obsolete issues
#KT-6007
 #KT-16445
 #KT-17753
 #KT-22488
 #KT-23881
 #KT-24135
 #KT-26360
 #KT-27427
 #KT-27449
 #KT-27830
 #KT-28042
 #KT-29595
 #KT-30708
 #KT-32793
2021-02-01 18:29:59 +01:00
Mads Ager 593fb8770b [FIR] Fix lookup order for statics in super chains
The order was reversed and the static in the top-most class
in the inheritance hierarchy would be found instead of the
lowest one.
2021-02-01 18:32:55 +03:00
Dmitry Petrov 4ec369ac5b JVM_IR fix special bridge generation for inline classes 2021-02-01 17:57:58 +03:00
Alexander Udalov 8172ae5d89 Fix codegen test classLiteralWithExpectedType.kt on Android
Similar to changes in d022bb0248, this test started to fail because
`AnnotationTarget.TYPE` is mapped to `ElementType.TYPE_USE` if JVM
target is >= 1.8. In codegen tests on Android, we're running the
emulator of version 19 which is less than 26, where `TYPE_USE` has first
appeared.
2021-02-01 15:54:01 +01:00
pyos ad53fc931e JVM: optimize temporary kotlin.jvm.internal.Refs as well
i.e. remove the condition that there must be an LVT entry. Such
temporary `Ref`s can be created, for example, by the JVM_IR backend
if a lambda inlined at an IR level (e.g. argument to `assert`/`Array`)
is the target of a non-local return from a function inlined at bytecode
level (e.g. `run`):

    IntArray(n) { i ->
        intOrNull?.let { return@IntArray it }
        someInt
    }

->

    val `tmp$0` = IntArray(n)
    for (i in 0 until `tmp$0`.size) {
        var `tmp$1`: Int
        do {
            intOrNull?.let {
                `tmp$1` = it // causes `tmp$1` to become an IntRef
                break
            }
            `tmp$1` = someInt
        } while (false)
        `tmp$0`[i] = `tmp$1`
    }
2021-02-01 15:51:31 +01:00
pyos 0f2ca5d84c JVM_IR: support non-local break/continue in the inliner
Not in the frontend or psi2ir, though, so this not a complete
implementation of KT-1436, but rather a part of it that is currently
useful to make other code compile. In particular, lambdas passed to
array constructors and JVM-style `assert` are inlined as IR returnable
blocks, which are then converted into `do { ... } while (false)` loops,
so non-local returns from them become non-local `break`s.
2021-02-01 15:51:31 +01:00
Alexander Udalov d022bb0248 Switch default JVM target to 1.8
#KT-29405 Fixed
2021-02-01 11:54:04 +01:00
Mikhael Bogdanov 9f9c8e3d77 Mute stream api test on Android 2021-01-29 18:22:16 +01:00
Mikhael Bogdanov be9ef8f3c8 Remove obsolete DxChecker 2021-01-29 17:47:37 +01:00
Dmitry Petrov 5d7dc5fa39 JVM_IR indy-SAM conversions: minor updates
See: KT-44575 KT-44577

KT-44278 KT-26060 KT-42621
2021-01-29 12:59:48 +03:00
Dmitry Petrov f34224ecee JVM_IR indy-SAM conversions: tests for function references equality
(SAM conversion using LambdaMetafactory is not used for function refs).

KT-44278 KT-26060 KT-42621
2021-01-29 12:59:48 +03:00
Dmitry Petrov f0abd8bc68 JVM_IR indy-SAM conversions: prohibit in crossinline lambdas
KT-44278 KT-26060 KT-42621
2021-01-29 12:59:47 +03:00
Dmitry Petrov ad1d80d700 JVM_IR indy-SAM conversions: add more tests
KT-44278 KT-26060 KT-42621
2021-01-29 12:59:47 +03:00
Dmitry Petrov 98b0c07b18 JVM_IR indy-SAM conversions: inline funs and lambdas
KT-44278 KT-26060 KT-42621
2021-01-29 12:59:47 +03:00
Dmitry Petrov 4da2f3d9d4 JVM_IR indy-SAM conversions: use old scheme for suspend funs
KT-44278 KT-26060 KT-42621
2021-01-29 12:59:46 +03:00
Dmitry Petrov 1f16b96796 JVM_IR indy-SAM conversions: inline classes
KT-44278 KT-26060 KT-42621
2021-01-29 12:59:46 +03:00
Dmitry Petrov f30e25aa52 JVM_IR indy-SAM conversions: more cases
KT-44278 KT-26060 KT-42621
2021-01-29 12:59:45 +03:00
Dmitry Petrov 3140cca050 JVM_IR indy-SAM conversions, 1st passing tests
KT-44278 KT-26060 KT-42621
2021-01-29 12:59:45 +03:00
Denis.Zharkov 7e6abffb62 FIR: Fix incorrectly serialized type
See the test added: there's a non-denotable T!! type inside flexible type
that wasn't handled before.

ConeKotlinType::contains handles flexible types content and some other cases
Also, it has better asymptotics
2021-01-29 10:50:23 +03:00
Denis.Zharkov 5c62ee4ba8 FIR2IR: Fix complex cases of smart cast expressions used as dispatch receiver
It might be not only <ExpressionWithSmartCast>(a).foo(), but also
id(<ExpressionWithSmartCast>(a)).foo() and many other cases
2021-01-29 10:50:22 +03:00
Denis.Zharkov b1b89e6f5f FIR2IR: Fix smart-cast approximation implicit receiver
Previously, it was always cast to the first type of smart cast variants list
independently of callee symbol that might be present in the member scope
of a different type
2021-01-29 10:50:22 +03:00
Mikhael Bogdanov 1c612376dd Disable some android box test 2021-01-28 18:30:48 +01:00
Mikhael Bogdanov 0ad24f5346 Enable Android box test 2021-01-28 18:01:21 +01:00
Mikhael Bogdanov b16b1b3b78 Test for obsolete KT-26360
#KT-26360
2021-01-28 18:01:21 +01:00
Mikhail Glukhikh 1c80c5610d FIR: fix serialization of accessor with source-level annotations 2021-01-28 13:21:16 +03:00
Victor Petukhov 670f029bdf Allow passing non-spread arrays into a vararg parameter after sam properly, through propagating vararg element type to a sam adapter from the original parameter descriptor 2021-01-28 13:19:31 +03:00
Victor Petukhov af3eaf5d71 Add explicit disabling ProhibitVarargAsArrayAfterSamArgument feature in tests as it's enabled by default in 1.5 2021-01-28 13:19:31 +03:00
Victor Petukhov e39bbcd937 Unmute test which checks the evaluation order of value arguments with varargs.
The corresponding feature (UseCorrectExecutionOrderForVarargArguments) is enabled by default in 1.5.
2021-01-28 13:19:31 +03:00
Dmitriy Novozhilov 6a2796b067 [Test] Fix source maps in testdata according to KT-37704 2021-01-28 13:19:29 +03:00
Mikhail Glukhikh ce1f9882df FIR2IR: Fix mapping for intersection overrides of deserialized functions 2021-01-27 15:42:04 +03:00
Mikhail Glukhikh 76c2288e21 IrInterpreter: interpret IrGetField properly 2021-01-26 16:19:14 +03:00
Mikhail Glukhikh b311e95487 FIR2IR: don't generate IR getter for const library properties 2021-01-26 16:10:09 +03:00
Dmitry Petrov 708e6914bd JVM JVM_IR hide sealed class constructors 2021-01-25 17:29:38 +03:00