Igor Yakovlev
78e249c2d5
[FIR IDE] Fix creating fir light classes for NotUnderContentRootModuleInfo module content
2021-07-26 23:08:53 +02:00
Igor Yakovlev
ab2aaec4fe
[FIR IDE] Ensure resolve for status transformer
2021-07-26 23:08:53 +02:00
Igor Yakovlev
4e870b6796
[FIR IDE] Fix invalid resolve for fir synthetic properties and accessors
2021-07-26 23:08:53 +02:00
Igor Yakovlev
6700179ee4
[FIR IDE] Add LibraryModuleSourceInfoBase and filter out light classes for sources from libraries
2021-07-26 23:08:53 +02:00
Igor Yakovlev
a0418c3146
[STUBS] Fix invalid classId calculation for KtObjectLiteralExpression
2021-07-26 23:08:53 +02:00
Igor Yakovlev
6869fbbfe5
[FIR IDE] Insert ensure resolve into checkers and scopes
2021-07-26 23:08:53 +02:00
Igor Yakovlev
2fd6c55fc8
[FIR IDE] Replace FIR phase update to FIR IDE
2021-07-26 23:08:53 +02:00
Ilya Chernikov
df9a3c0300
Restore scripting-ide-services testing, fix coroutines dependency
2021-07-26 21:16:50 +03:00
Ivan Kochurkin
173813f7cf
[FIR] Implement REIFIED_TYPE_FORBIDDEN_SUBSTITUTION
2021-07-26 21:13:25 +03:00
Ivan Kochurkin
bade6cb611
[FIR] Improve TYPE_PARAMETER_AS_REIFIED detecting, implement TYPE_PARAMETER_AS_REIFIED_ARRAY, TYPE_PARAMETER_AS_REIFIED_ARRAY_WARNING
2021-07-26 21:13:25 +03:00
Ivan Kochurkin
2333b1bcf6
[FIR] Implement BREAK_OR_CONTINUE_JUMPS_ACROSS_FUNCTION_BOUNDARY
2021-07-26 21:13:23 +03:00
Alexander Udalov
cbdd0f579a
Regenerate Gradle options
2021-07-26 19:36:53 +02:00
Alexander Udalov
0083ef053b
Remove Gradle option annotation for -Xbuiltins-from-sources
...
This is an internal compiler argument for FIR which doesn't seem
valuable enough to be exposed in Gradle, because it'd require to perform
some kind of deprecation if it's changed or removed. It'll still be
possible to use it via `freeCompilerArgs += "-Xbuiltins-from-sources"`.
Note that generated Gradle options are not changed because the generator
was not rerun after adding this compiler argument. (And the test that
checks that the generator was run is failing right now.)
2021-07-26 19:36:53 +02:00
Alexander Udalov
fe18e3fa31
Do not use uninterruptible file channels in FileChannelUtil
...
To avoid illegal access errors from incremental compilation on JDK 16+.
#KT-45689 Fixed
#KT-47152 Fixed
2021-07-26 19:27:09 +02:00
Alexander Udalov
2ca241c82c
Copy FileChannelUtil from intellij-core
...
#KT-45689
#KT-47152
2021-07-26 19:27:09 +02:00
Alexander Udalov
698c0bb2a9
Replace --illegal-access workaround with --add-exports
...
--illegal-access=permit doesn't work since JDK 17.
#KT-47152 Fixed
2021-07-26 19:27:09 +02:00
Nikolay Lunyak
a44048e713
Add withBindThis to field configuration
2021-07-26 16:12:16 +00:00
Aleksei.Cherepanov
4003cd2832
Fix backward compatibility of portable caches for 212 idea
...
Write zero to deletedCount value of counters map instead of removing it in context of LookupStorage performance improving
2021-07-26 18:58:12 +03:00
Alexander Shabalin
a24eab9745
Fix STMS tests
2021-07-26 15:09:59 +00:00
Alexander Udalov
5526281c54
Minor, refactor diagnostic tests on repeatable annotations
2021-07-26 14:33:32 +02:00
Alexander Udalov
56866e6927
JVM IR: move java.lang.annotation symbols to JvmSymbols.javaAnnotations
...
Since a separate instance of AdditionalClassAnnotationLowering is
created for each source file, symbols for these classes were created as
many times as there were source files in the module.
Also inline some variables in the process and move around some methods.
2021-07-26 14:33:32 +02:00
Alexander Udalov
50f7594d9e
Minor, move RepeatableAnnotationChecker to separate file
2021-07-26 14:33:31 +02:00
Alexander Udalov
104188c035
Render annotation arguments in bytecodeListing tests
2021-07-26 14:33:30 +02:00
Yahor Berdnikau
7958307d28
Allow to override build options for particular builds.
...
^KT-45745 In Progress
2021-07-26 14:27:47 +02:00
Yahor Berdnikau
25192cd639
Fix project options are ignored for builds.
...
Fix 'forceOutput' and 'enableGradleDebug' project level options are not
taken into account when running particular build.
^KT-45745 In Progress
2021-07-26 14:27:47 +02:00
Yahor Berdnikau
a49b36f6b1
Add additional output assertions.
...
- check if output contains string exactly times
- check if output does not contain Kotlin warnings
- check expected incremental compilation
^KT-45745 In Progress
2021-07-26 14:27:47 +02:00
Yahor Berdnikau
c816d6f2e5
Modify file exists assertion.
...
Additionally allow to check if file exists in any location, even outside
of the project.
^KT-45745 In Progress
2021-07-26 14:27:47 +02:00
Yahor Berdnikau
18d74e62a6
Add additional shortcuts for common project files.
...
^KT-45745 In Progress
2021-07-26 14:27:47 +02:00
Yahor Berdnikau
35677f4727
Add random hash to the tempDir project dir.
...
This will allow to create several similar projects from one resource
project in a single test.
^KT-45745 In Progress
2021-07-26 14:27:46 +02:00
Andrey Zinovyev
8a0941a85a
[FIR] Report deprecations in qualified expressions
2021-07-26 14:50:54 +03:00
Mikhail Glukhikh
98bd6f5d3e
Fix "implicit type" exception in FIR OptIn checker
2021-07-26 10:13:13 +03:00
Mikhail Glukhikh
2a6355b64c
FIR: use coneType instead of coneTypeSafe in OptIn checkers
2021-07-23 23:59:01 +03:00
Mikhail Glukhikh
73539cf342
FIR: use symbols as base for OptIn-checkers
2021-07-23 23:59:00 +03:00
Mikhail Glukhikh
cb847b945d
FIR: use getAnnotationByClassId instead of getAnnotationByFqName
2021-07-23 23:58:59 +03:00
Mikhail Glukhikh
7cbea12c8a
FIR: store all annotationContainers in checker context
2021-07-23 23:58:58 +03:00
Mikhail Glukhikh
d020948933
FIR: support EXPERIMENTAL_MARKER_CAN_ONLY_BE_USED_AS_ANNOTATION...
2021-07-23 23:58:57 +03:00
Mikhail Glukhikh
543ce06d85
FIR OptIn: temporarily replace error USAGE with warning
...
This commit is required for FP test to pass,
because FP test does not see module -Xopt-in=... flags.
2021-07-23 23:58:56 +03:00
Mikhail Glukhikh
82f268d611
FIR: add EXPERIMENTAL_API_USAGE reporting
2021-07-23 23:58:55 +03:00
Mikhail Glukhikh
3235b09a92
FIR: introduce MutableCheckerContext to save performance
2021-07-23 23:48:19 +03:00
Denis.Zharkov
b547870d71
Use unsigned version of short numbers in ZipImplementation
...
Because some two-byte represented numbers (like amount of files in the zip)
exceed 32767 (but less than 65534)
2021-07-23 21:38:46 +03:00
Denis.Zharkov
ea5157cadc
Change type of KotlinCoreEnvironment::projectEnvironment type
2021-07-23 21:38:45 +03:00
Denis.Zharkov
d6adac8dd0
Move FastJarFileSystem to ProjectEnvironment and link to the root disposable
2021-07-23 21:38:45 +03:00
Denis.Zharkov
3afed7f972
Fallback to CoreJarFileSystem when JDK doesn't support buffers unmapping
2021-07-23 21:38:43 +03:00
Denis.Zharkov
c6525974d0
Move handlers cache from static field to the instance of FastJarFileSystem
2021-07-23 21:38:43 +03:00
Denis.Zharkov
03e5dc6117
Force unmapping MappedByteBuffer
...
Otherwise, on Windows daemon might hold mapped regions for some time
(until those objects are collection) and during the time those file become
locked (it's impossible to modify or remove them)
Reflection/Unsafe of course is not a cool thing to use, but JDK still
(already for 18 years) doesn't have public API for this
See https://bugs.java.com/bugdatabase/view_bug.do?bug_id=4724038
And https://stackoverflow.com/questions/2972986/how-to-unmap-a-file-from-memory-mapped-using-filechannel-in-java
2021-07-23 21:38:42 +03:00
Denis.Zharkov
4e11c670c6
Clear cleanFileAccessorsCache for FastJarFileSystem
2021-07-23 21:38:41 +03:00
Denis.Zharkov
7ca2a83f08
Use native endian mode from MappedByteBuffer
2021-07-23 21:38:40 +03:00
Denis.Zharkov
33cf058b55
Use MappedBuffer for FastJarFileSystem implementation
2021-07-23 21:38:40 +03:00
Denis.Zharkov
8f06e59d3b
Implement new faster version of Jar virtual file system
...
It's only enabled by default in FIR and might be turned on with a CLI flag
The main idea is that default FarFS re-read ZIP file list each time when
class file is requested that is quite slow.
We read it once and them reading bytes from the known offset.
Also, unlike the default version we don't perform attributes check on each access
On the one hand, it works faster on the other it might not notice that one
of the JAR has been changed during compilation process
But looks like it's not supposed to be a frequent even during
compilation of a single module
2021-07-23 21:38:38 +03:00
Dmitriy Novozhilov
559e7d223a
[FIR] Add friends path from Module in CLI compiler
2021-07-23 17:28:42 +03:00