Commit Graph

79998 Commits

Author SHA1 Message Date
Igor Yakovlev f05630fcab [FIR IDE] Enabled search services and added services stubs 2020-09-15 11:25:07 +03:00
Igor Yakovlev 1a10275d0d [FIR IDE] Enabled usages services and added services stubs 2020-09-15 11:25:06 +03:00
Igor Yakovlev 75347d06b9 [FIR IDE] Move IconProvider in fir independed module 2020-09-15 11:25:06 +03:00
Igor Yakovlev e30f09d513 [FIR IDE] Separate find usages logic from descriptors 2020-09-15 11:25:06 +03:00
Pavel Kirpichenkov b102042dd8 Minor: add regression test for KT-41806 2020-09-15 10:52:47 +03:00
Jinseong Jeon 2fad935ce2 FIR deserializer: load inline/external flags properly 2020-09-15 10:21:35 +03:00
Sergey Bogolepov 0fc0cb221e Update kotlinx-metadata-klib version
The new version drops dependency on descriptors
2020-09-15 14:20:25 +07:00
Elena Lepilkina c4293a8e58 Replace request to get branch name from TC in order to get right info in builds with several projects 2020-09-15 10:10:13 +03:00
Sergey Bogolepov 2154c94100 [Native] Add tests for resolvable properties 2020-09-15 13:54:10 +07:00
Sergey Bogolepov 5a0a853d9b [Native] Add simple symbol mechanism to konan.properties
Java Properties format is extremely trivial and does not support any
kind of references or variables. It makes konan.properties repetitive.
This commits adds support of perl-like `$` sigil which allows to
reference properties inside values.
2020-09-15 13:54:09 +07:00
Elena Lepilkina 7e439432cd Fix configurations on Mac and Windows 2020-09-15 09:20:04 +03:00
Pavel Punegov fc35b5398c Mute test in Native 2020-09-14 23:41:47 +03:00
Nikita Bobko 0b2d05ee30 Minor: dereference archiveFile when logging it
Previously it was "Plugin artifacts packed to task ':zipPlugin' property 'archiveFile'"
After fix it's    "Plugin artifacts packed to /home/bobko/jb/kotlin/build/kotlin-plugin.zip"

`archiveFile` has type `Provider<RegularFile>`
2020-09-14 21:37:09 +03:00
Elena Lepilkina 8b2fed994a Added possibility to use cset to run benchmarks in the isolated cpus 2020-09-14 20:16:39 +03:00
Aleksei Cherepanov c64c319231 JPS. Suppress "Add new files to git" during portable artifacts extraction 2020-09-14 19:06:43 +03:00
Sergey Bogolepov e9dd7cb3b6 [KT-34261][Linker] Pre-link static caches
Use `ld -r` on darwin-based targets to pre-link static caches
before final linker invocation. It allows to hide symbols from
caches to avoid linkage problems when linking 2 or more
Kotlin-produced binaries.

Sadly, it has several problems:
1. `ld -r` is slow.
2. There is no obvious way to make common symbols private.
These are the reasons why we don't enable `-Xpre-link-cached` by default.
2020-09-14 22:45:54 +07:00
Sergey Bogolepov a710a478a5 Minor linker code clean-up 2020-09-14 22:45:54 +07:00
Roman Golyshev 7e2269a3cf Update completion-ranking-kotlin dependency (0.1.2 -> 0.1.3) 2020-09-14 15:19:36 +00:00
Mikhail Glukhikh 97ebf2867a [FIR] Get rid of type mismatch suppression during diagnostic casting 2020-09-14 18:08:33 +03:00
Mikhail Glukhikh 6fd3b011ca [FIR] Simplify substitution for unsafe-variant type parameter types
#KT-41792 Fixed
2020-09-14 18:08:31 +03:00
Mikhail Glukhikh e1b4108e4a [FIR2IR] Mute some tests due to captured type problems 2020-09-14 18:08:30 +03:00
Mikhail Glukhikh aa897db132 [FIR] Introduce UnsafeVariance attribute (see KT-41792) 2020-09-14 18:08:29 +03:00
Mikhail Glukhikh e4aaae9ae7 FIR call completion: approximate type argument types
This commit removes some captured / ILT types at the end of resolve
2020-09-14 18:08:28 +03:00
Mikhail Glukhikh 3b828ac62b [FIR] Bad test data fixes (around captured types) 2020-09-14 18:08:27 +03:00
Mikhail Glukhikh cf5480a398 [FIR] Questionable test data fixes (around captured types) 2020-09-14 18:08:26 +03:00
Mikhail Glukhikh 4605a65f41 [FIR] Good test data fixes (around captured types) 2020-09-14 17:56:39 +03:00
Mikhail Glukhikh c2d9fc469a Get rid of exception at ConeKotlinType.varargElementType 2020-09-14 17:56:37 +03:00
Mikhail Glukhikh 2f61a2f56f [FIR] Provide correct comparison of captured types 2020-09-14 17:56:36 +03:00
Mikhail Glukhikh b5f8fec213 FIR substitution: use standard approximation to remove captured types 2020-09-14 17:56:35 +03:00
Mikhail Glukhikh 7a73787680 [FIR] Use captureFromArguments in createSubstitution
This commit breaks ~57 resolve tests because captured types
now exists at the end of FIR resolve
2020-09-14 17:56:34 +03:00
Mikhail Glukhikh e83f3bbf04 Introduce substitution to ConeTypeContext.captureFromArguments
This commit itself does not influence anything
2020-09-14 17:56:33 +03:00
Mikhail Glukhikh 414842343d [FIR2IR] Add another problematic test with captured type argument 2020-09-14 17:56:32 +03:00
Mikhail Glukhikh 267382d86b [FIR2IR] Add problematic test with incorrect type argument
NB: we should not have <E> as AbstractFirBasedSymbol type argument,
because it isn't accessible in the current scope. Star expected instead.
2020-09-14 17:56:30 +03:00
Dmitry Petrov b395771d01 KT-37050 don't generate redundant special bridges
Loosely based on https://github.com/JetBrains/kotlin/pull/3662
2020-09-14 16:13:34 +03:00
Igor Chevdar 5bc03a45a7 [IR] Rewrote debug output using Context.log 2020-09-14 15:06:25 +03:00
Alexander Udalov f0282bcfdf JVM IR: add module name for internal functions before "$default"
The change is a bit complicated because the name mapping logic is
refactored so that we would compute the needed suffix first (either
module name, or multifile part class name), and then shove it into the
mangled name between the original function name and "$default", if the
function in question is the default arguments adapter.

The main motivation for this change was to fix KT-41809, but as a side
effect, private functions with default arguments in multifile parts now
also contain the file name, just like normal private functions.

 #KT-41809 Fixed
2020-09-14 13:18:24 +02:00
Alexander Udalov 93f38e1c61 JVM IR: minor, use more specific types in MethodSignatureMapper 2020-09-14 13:18:24 +02:00
Alexander Udalov 2a0f64ebcb JVM IR: do not generate Deprecated(HIDDEN) class as synthetic
#KT-41810 Fixed
2020-09-14 13:18:24 +02:00
Vladimir Ivanov c4ce945262 Use ForeignException wrapper to handle native exception [KT-35056] (#4307)
* Use ForeignException wrapper to handle native exception [KT-35056]

* Add test

* Use Any? instead of NativePtr for automagic memory management

* Use clauseNSException specific clause, similar to `catch (NSException* e)

* cleanup + test fix

* Terminate on anything else but NSException

* Use ForeignException message for NSException details

* Code generated for AppleFamily only + move stuff to kotlinx.cinterop package

* Cleanup

* Fix platform-dependent code generation

* Fix test allocException

* wip: ForeignExceptionMode option: cinterop part

* ForeignExceptionMode support in compiler

* rework test for foreignExceptionMode option

* More tests on foreignExceptionMode option

* PR feedback: resolveFakeOverride and more

* Test reworked and extended

Co-authored-by: Vladimir Ivanov <vladimir.d.ivanov@jetbrains.com>
2020-09-14 13:50:32 +03:00
Ivan Gavrilovic 162dc3aa0c KT-41295: Friend paths and compiler options compatible with conf caching
This change fixes serialization of friend paths and it uses
a file collection to record all friend paths. Also, when
computing the tested classpath for android projects, we now avoid
resolving the file collection until necessary.

Fixes: KT-41295
Test: ConfigurationCacheForAndroidIT
2020-09-14 13:31:52 +03:00
Dmitriy Novozhilov be916e556a [FIR] Properly update type of block after postponed analysis of it's content 2020-09-14 11:46:06 +03:00
Dmitriy Novozhilov 535898c8a4 [FIR] Fix processing integer operator calls for not integer types 2020-09-14 10:57:10 +03:00
Dmitriy Novozhilov def647c094 [FIR] Don't constraints for return expressions of lambda if it has Unit return type 2020-09-14 10:57:09 +03:00
Dmitriy Novozhilov 8e0d0d2fd8 Remove redundant safe call to fix FIR compilation 2020-09-14 10:57:09 +03:00
Dmitriy Novozhilov 4929417aea Remove redundant type arguments to fix compilation with FIR
#KT-41835
2020-09-14 10:57:09 +03:00
Dmitriy Novozhilov 324aaaddad [FIR] Rename createArrayOf to createArrayType 2020-09-14 10:57:09 +03:00
Dmitriy Novozhilov 3b941a8f43 [FIR] Complete types of array literals in annotations 2020-09-14 10:57:09 +03:00
Dmitriy Novozhilov fbe964c074 [FIR] Transform annotations on safe calls 2020-09-14 10:57:08 +03:00
Jinseong Jeon 0bd7de158c FIR: update suspend lambda type during declaration resolution 2020-09-14 10:20:45 +03:00
Jinseong Jeon 680dd64211 FIR2IR: pick return target based on matched IrFunction 2020-09-14 10:09:51 +03:00