Denis.Zharkov
bc75a21852
Optimize Strings representation at FastJarHandler
2021-08-04 17:04:50 +03:00
Denis.Zharkov
4e66fd29e0
Minor. Rename properties in FastJarVirtualFile
2021-08-04 17:04:49 +03:00
Denis.Zharkov
6cd3d84e74
Optimize parseCentralDirectory
...
Avoid creating redundant IntRange
2021-08-04 17:04:47 +03:00
Denis.Zharkov
f81f28569f
Get rid of last map in FastJarHandler
2021-08-04 17:04:44 +03:00
Denis.Zharkov
fa9f0d588d
Optimize FastJarHandler
...
- Do not use normalization as it seems unnecessary
2021-08-03 16:24:51 +03:00
Denis.Zharkov
2266a348c3
Get rid of another map built in FastJarHandler
2021-08-03 16:24:50 +03:00
Denis.Zharkov
42b2605c2a
Minor. Rename local vals
2021-08-03 16:24:50 +03:00
Denis.Zharkov
1a262c9c31
Adapt FastJarVirtualFile constructor to its usages
2021-08-03 16:24:49 +03:00
Denis.Zharkov
920d57563b
Add fast-path for filename String creation
...
In most cases, it's encoded with ASCI
2021-08-03 16:24:48 +03:00
Denis.Zharkov
cd51264940
Avoid using FactoryMap at FastJarHandler
...
It has quite a slow entrySet implementation
2021-08-03 16:24:48 +03:00
Denis.Zharkov
979f5e8443
Rework FastJarHandler
...
1. Do not inherit from ZipHandler
2. Previously, the following computations have been happening:
- Map<String, ZipEntryDescription> -> Map<String, EntryInfo> (see createEntriesMap)
- Map<String, EntryInfo> -> VirtualFile tree
But the intermediate computations (Map<String, EntryInfo>)
were only used in the constructor, thus they've eliminated in this commit
3. Unclear magic semantic from `getOrCreate` with "/" and "\\" (copy-pasted from CoreJarHandler)
has been replaced with `normalizePath`
2021-08-03 16:24:47 +03:00
Dmitry Petrov
ebf837c135
JVM_IR disable IR and bytecode validation by default
2021-07-30 20:21:41 +03:00
Alexander Udalov
6af042c1dd
Temporarily disable runtime version consistency checks
...
To be enabled after the project is fully bootstrapped and default
language version is advanced to 1.6.
2021-07-29 19:45:55 +02:00
Mikhael Bogdanov
228100ef09
Upgrade toolchain to api/lv 1.4
2021-07-29 19:45:53 +02:00
Ilya Kirillov
77fcb12af8
Fix project leaking in tests
...
The project was leaking via MockApplication -> LowMemoryWatcherManager -> List<Project>
It happened due to unregistered disposable provided to the MockApplication
2021-07-27 17:58:47 +03:00
Ilya Kirillov
970d7b5a78
HL API: implement tests for reference resolve
2021-07-27 17:58:43 +03: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
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
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
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
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
Jiaxiang Chen
0774d4d734
expose original message collector in CLIConfiguration
2021-06-29 19:01:09 +03: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
Denis.Zharkov
7645663d12
Deprecate (V)::a reference resolution to companion in FE 1.0
...
^KT-45315 Fixed
2021-06-25 18:41:14 +03:00
Ilya Kirillov
8ac2a48eaf
Allow specify path of compiler extension points for ide tests
2021-06-23 20:36:20 +03:00
Andrey Uskov
92b08dfcfb
Revert "Unify the way to set compiler options using System.properties"
...
This reverts commit 28e4e775
2021-06-23 11:34:04 +03:00