Alexander Udalov
91c39ed01c
Build: remove obsolete compiler arguments
...
These compiler arguments enable features which are enabled by default in
the current Kotlin anyway.
The only exception is in :compiler:cli which uses an old language
version.
2021-07-27 13:35:38 +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
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
Anton Bannykh
a7549be95e
JS IR IC: report cache validataion duration when up-to-date
2021-07-23 17:10:07 +03:00
Nikolay Krasko
ec99585eb9
Remove explicit registration of classFileDecompiler EP and core.xml
2021-07-23 16:58:27 +03:00
Nikolay Krasko
bba0dfb469
Cleanup as42 bunch files
...
We don't build AS42 plugin from main kotlin repo anymore.
2021-07-23 16:58:24 +03:00
Roman Artemev
0310f7cb0b
[JS IC] Lot of fixes after rebase
2021-07-22 21:56:57 +03:00
Anton Bannykh
20088994c1
JS IC: IC lowerings prototype
2021-07-22 21:56:55 +03:00
Dmitriy Novozhilov
f3116cb64a
Fix NON_EXHAUSTIVE_WHEN_STATEMENT warnings in project code
2021-07-20 13:33:46 +03:00
Dmitriy Novozhilov
37c096cb10
[FIR] Support creation of IR of common + platform sources in FirAnalyzerFacade
2021-07-20 10:33:52 +03:00
Dmitriy Novozhilov
950db81aa4
[FIR] Split compileModulesUsingFrontendIR to multiple functions
2021-07-20 10:33:32 +03:00
Alexander Udalov
9b1de90452
Cache async-profiler when using -Xprofile
2021-07-19 15:14:57 +02:00
Ilya Chernikov
5b2acea98f
FIR: Add analysis flag for loading IR builtins from sources
2021-07-16 02:24:32 +03:00
Ilya Chernikov
01f26ec699
FIR: Switch to FIR-based IrBuiltIns in FIR compilation
...
get rid of using old FE for builtins on FIR compilation
2021-07-16 02:24:28 +03:00
Georgy Bronnikov
c3a94e1e62
FIR: adapt to changes in IR interface
...
JvmGeneratorExtensionsImpl, JvmIrCodegenFactory need new arguments.
2021-07-14 21:20:31 +03:00
Georgy Bronnikov
20b76d4149
JVM_IR: reorganize initialization of JvmGeneratorExtensionsImpl
...
CachedFields are now created at initialization.
Therefore we need CompilerConfiguration as a constructor parameter.
2021-07-14 21:20:30 +03:00
Georgy Bronnikov
1c4466951f
IR: a flag to GeneratorExtensions to control IR deserialization
...
There is no need to search for IR embedded in toplevel classes when none
is expected (in npon-JVM backends or when -Xserialize-ir is not set).
2021-07-14 21:20:27 +03:00
Georgy Bronnikov
b2617199bc
JVM_IR: call serialization for IR.
...
Serializer for IR is called when -Xserialize-ir flag is set.
2021-07-14 21:20:04 +03:00
Mikhail Glukhikh
113d2653aa
Drop deprecated -Xexperimental flag from compiler and tests
2021-07-14 21:18:23 +03:00
Roman Artemev
0a49b24320
[JS IR] Move klib resolution from cli into compiler
...
Simplify CLI -> Compiler API
Clean up code
2021-07-13 14:43:40 +03:00
Nikita Bobko
83c5c41dd4
Fix that marketplace identifies newly uploaded Kotlin plugin artifacts as Kotlin 1.2 artifacts
...
This `compiler.xml` is packed into `kotlin-idea.jar` and causes troubles for marketplace
in identifying correct Kotlin plugin version
2021-07-12 22:04:20 +03:00
Mikhail Glukhikh
a997a98054
Commend -Xopt-in deprecation warning (due to bootstrap problems)
2021-07-12 21:26:21 +03:00
Mikhail Glukhikh
5871f3d663
CLI: support -option=value syntax for non-advanced flags #KT-47640 Fixed
2021-07-12 21:26:19 +03:00
Mikhail Glukhikh
d8417fd622
Introduce -opt-in stable compiler option instead of -Xopt-in
...
#KT-47099 Fixed
2021-07-12 21:26:18 +03:00
Mikhail Glukhikh
195b6d1fb1
Deprecate -Xuse-experimental #KT-47623 Fixed
2021-07-12 21:26:16 +03:00
Victor Petukhov
33a281c637
Introduce separate compiler flag for unrestricted builder inference
2021-07-12 13:57:13 +03:00
Alexander Udalov
68432f0c20
Fix deprecation/unchecked warnings after update to 203
2021-07-09 14:24:07 +02:00
Alexander Udalov
25f0beed12
Load async-profiler.jar if possible when using -Xprofile
...
Instead of requiring it to be on the compiler classpath.
This will make it much easier to profile the Kotlin compiler daemon in
Gradle, by just specifying a compiler argument instead of also manually
patching the compiler jar.
2021-07-08 20:44:45 +02:00
Dmitriy Novozhilov
30578cfb95
Delete DynamicBundle copy
...
We can safely use it from IDEA after IDEA-248785 was fixed
2021-07-08 13:29:21 +03:00
Dmitriy Novozhilov
a710cdf822
[FIR] Properly unregister java element finder in CLI compiler
2021-07-08 13:29:20 +03:00
Dmitriy Novozhilov
eb94575c69
Remove redundant usages of IDEA services in CLI
2021-07-08 13:29:19 +03:00
Igor Yakovlev
b64f7909b8
[FIR IDE] Implement own fir light classes support
2021-07-07 14:08:41 +02:00
Victor Petukhov
74aa8e7497
Get rid of singleOrNull of NullabilityAnnotationStates
2021-07-06 09:54:31 +03:00
Victor Petukhov
b0a44705b4
Take into account user defined jsr-305 annotations
2021-07-06 09:54:30 +03:00
Victor Petukhov
b2dff10e32
Implement caching states for nullability annotations
2021-07-06 09:54:30 +03:00
Victor Petukhov
a82772f31a
Depend on passed language version explicitly to compute nullability annotation settings
2021-07-06 09:54:29 +03:00
Victor Petukhov
ea901d81fb
Get rid of redundant Jsr305State
2021-07-06 09:54:28 +03:00
Victor Petukhov
6d3badb2cd
Support configuring of nullability annotations with their report levels through a test directive
2021-07-06 09:54:27 +03:00