Commit Graph

72279 Commits

Author SHA1 Message Date
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 5b64ceceb3 JVM_IR. Generate additional checkcast for when/try epressions to avoid frame map problems on reification 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 0b0ba7d987 Don't use warningsAsError in compiler modules if useFIR is ON 2021-02-02 16:29:27 +03:00
Marcin Aman d953a03807 Specify type explicitly in KotlinCoreProjectEnvironment.createCoreFileManager to allow overriding this method with different implementation 2021-02-02 05:26:04 -08:00
Mikhail Glukhikh 21000f4174 [FIR] Support TypeVariableMarker.isReified 2021-02-02 16:25:08 +03:00
Mikhail Glukhikh 465261e611 FIR: don't create intersection override for duplicating symbols 2021-02-02 16:25:08 +03:00
Dmitry Gridin b9c33a0c6e [i18n] copy-paste message from RefactoringBundle to fix missing resource in 202
^KT-44675 Fixed
2021-02-02 20:23:04 +07:00
Ivan Gavrilovic 2fce6a4af9 Locate build history when file is outside of root project dir
Support use-cases when the build dir is outside of root project dir.
Many projects set up output dir as <root_project>/../out/<project_name>/build
to be able to clean build dir more easily. This commit adds support
to build history file detection and it tries to find build history
files for artifacts that are:
- under root project dir (a default structure)
- under root project's build dir parent (to support typical custom setup)

Fixes https://youtrack.jetbrains.com/issue/KT-40875

Test: BaseIncrementalCompilationMultiProjectIT
2021-02-02 12:47:07 +03:00
Nicola Corti 5de34b052f Remove unsupported '!' from DIAGNOSTICS directive 2021-02-02 01:30:33 -08:00
Nicola Corti e2b7aba086 Do not report UNNECESSARY_SAFE_CALL on ErrorType 2021-02-02 12:10:56 +03:00
Roman Artemev 59551eb037 [Plugin API] Provide diagnostic API for IR plugins 2021-02-02 12:05:35 +03:00
Roman Artemev 9fa5feeeea [CLI] Provide MessageCollector based logger for IR from CLI 2021-02-02 12:05:35 +03:00
Roman Artemev daa65a2fff [KLIB] Handle linkage error
Do not crash compiler with ugly stacktrace in case of misconfiguration.
Report relatively friendly diagnostic message instead
2021-02-02 12:05:35 +03:00
Roman Artemev bf67308cc2 [KLIB] Use IrMessageLogger in klib linker to report errors 2021-02-02 12:05:35 +03:00
Roman Artemev 6891ad0dfc [IR] Add IrMessageLogger interface for diagnostic reporting from IR 2021-02-02 12:05:35 +03:00
Roman Artemev bb66b2fd04 Drop redundant compile dependency 2021-02-02 12:05:35 +03:00
Roman Artemev c5068b7d45 [KLIB] Drop unused logger 2021-02-02 12:05:34 +03:00
Roman Artemev 484b884d04 [KLIB] Make IrModuleDeserializer's printable 2021-02-02 12:05:34 +03:00
Roman Artemev d6bb1f2d4e [KLIB] Make KotlinLibraryImpl printable 2021-02-02 12:05:34 +03:00
Roman Artemev 24d82c63e0 [JS IR] Commonize CLI error reporting
Use general `AnalysisResult.CompilationErrorException` instead of
custom JsIrCompilationError to indicate about unsuccessful compilation

- Drop JsIrCompilationError
2021-02-02 12:05:34 +03:00
Roman Artemev ba5193870e [IR] Drop unused language version settings parameters from DependenciesGenerator 2021-02-02 12:05:34 +03:00
Sergey Bogolepov 06498c0efd Support for macos_arm64 target in backend 2021-02-02 15:30:03 +07:00
Dmitriy Novozhilov f255f93ad9 [Test] Support skip of android codegen tests with new ASSERTION_MODE directive 2021-02-02 07:08:13 +01:00
Alexander Udalov eff13d24dc Remove unneeded language feature configuration from fir:tree
It causes a verbose warning to be displayed on each build. Inline
classes are enabled by default since Kotlin 1.5, so this configuration
is no longer needed.
2021-02-01 20:25:06 +01:00
Nwokocha wisdom maduabuchi e47dfcbe64 Update ReadMe.md (#3877) 2021-02-01 21:27:02 +03:00
Igor Yakovlev 18cebe5131 [FIR IDE] Codereview minor refactoring
https://jetbrains.team/p/kt/review/2069/
https://jetbrains.team/p/kt/review/2070/
2021-02-01 21:21:03 +03:00
Igor Yakovlev e529a7bf9b [FIR IDE] Implement isInheritor for FirLightClassForClassOrObjectSymbol 2021-02-01 21:21:03 +03:00
Igor Yakovlev 56db4bd1ac [FIR IDE] Implement isInheritor for KtFirBasedFakeLightClass 2021-02-01 21:21:02 +03:00
Igor Yakovlev 5d4606daaa [FIR IDE] Remove LightClassProvider 2021-02-01 21:21:02 +03:00
Igor Yakovlev 2812034896 [FIR IDE] Make KtFakeLightClass independent 2021-02-01 21:21:02 +03:00
Igor Yakovlev c1cdf273a6 [FIR IDE] Fix test data fir parameters highlighting test 2021-02-01 21:21:02 +03:00
Igor Yakovlev 9f282e0ddc [FIR] Do not erase type arguments for unresolved method calls 2021-02-01 21:21:02 +03:00
Igor Yakovlev 659d2c13b4 [FIR IDE] Fix annotation value parameter and ctor resolve 2021-02-01 21:21:01 +03:00
Igor Yakovlev 019635189a [FIR IDE] Fix annotation call reference resolve to ctor 2021-02-01 21:21:01 +03:00
Igor Yakovlev 65b6a95f64 [FIR IDE] Fix structure element non analyzable elements recording for analyzable properties 2021-02-01 21:21:01 +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
Anton Yalyshev 3e59adc7f3 Add change-notes for 1.4.30 release 2021-02-01 19:03:47 +03:00
Anton Yalyshev 90f9dd5b33 Revert change-notes for 1.4.30 2021-02-01 18:57:05 +03:00
Mikhael Bogdanov 206b38f0ab Fix compilation against asm 7.0 2021-02-01 16:52:46 +01:00
Anton Yalyshev 78c6e0733c Add change-notes for 1.4.30 2021-02-01 18:51:38 +03:00
Mikhail Glukhikh 1f62fee4f9 Fix typo 2021-02-01 18:33:05 +03: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 bd3bc13e75 JVM_IR: give loops somewhat more debuggable labels 2021-02-01 15:51:31 +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