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
Victor Petukhov
46d0b16142
Use new default settings for java nullability annotations in JavaTypeEnhancementState and get rid of all hardcoded defaults
2021-07-06 09:54:24 +03:00
Victor Petukhov
c8af1b735f
Introduce compiler flag to manage status of specific Java nullability annotations
2021-07-06 09:54:23 +03:00
Zalim Bashorov
2460f5f9ae
[JS CLI] Support sourcemap generation for IR BE in CLI
...
#KT-46551 In Progress
2021-07-05 21:01:41 +03:00
Zalim Bashorov
64c6d852de
[JS IR] Preparing for introducing sourcemap as another compilation output
...
* Rename `JsCode` to `CompilationOutputs`.
* Rename members of CompilerResult.
#KT-46551 In Progress
2021-07-05 21:01:38 +03:00
Jiaxiang Chen
0774d4d734
expose original message collector in CLIConfiguration
2021-06-29 19:01:09 +03:00
Ilya Goncharov
21a3494bca
[JS IR] Add test with boolean in external interface
...
[JS IR] Add possibility to safely access Boolean in external declaration
[JS IR] Add diagnostic for booleans in externals
2021-06-29 10:12:54 +00:00
Alexander Udalov
4b7fa44e80
CLI: fix resolution of Java records as single file roots
...
#KT-46764 Fixed
2021-06-29 01:22:08 +02:00
Zalim Bashorov
a908e5576d
[JS] Extract sourcemap generating related files to a separate module
...
It's required to reuse the same infrastructure in the new backend.
2021-06-28 16:04:09 +03:00