Alexander Udalov
eee8b033a6
JVM IR: minimize usages of jvmPhases outside backend.jvm
2021-09-14 22:29:12 +02:00
pyos
3a80cb1808
FIR: hide construction of JavaSymbolProvider
2021-09-14 19:00:45 +03:00
Aleksei.Cherepanov
cc5382b37e
[JPS] Fix incremental build after changing Java constant
...
InlineConstantTracker implemented for tracking changed java static final constants, that used in kotlin.
#KT-46506 Fixed
2021-09-11 13:00:00 +03:00
Ivan Kochurkin
cfd2835254
[FIR] Add JVM Default diagnostics
2021-09-10 00:48:59 +03:00
Dmitriy Novozhilov
8ffe3764ef
Remove dependency on descriptors from :compiler:config.jvm
2021-09-09 17:20:13 +03:00
pyos
090b90f62e
FIR: load type qualifiers from module, package, and parent classes
2021-09-06 13:11:13 +03:00
Alexander Udalov
0a10cec579
Remove obsolete -X compiler arguments for JVM backend
...
-Xno-exception-on-explicit-equals-for-boxed-null
-Xstrict-java-nullability-assertions
-Xuse-old-spilled-var-type-analysis
-Xpolymorphic-signature
2021-09-02 22:11:22 +02:00
Alexander Udalov
1864716c83
Remove -Xnormalize-constructor-calls
...
Constructor call normalization is enabled by default since 1.3.
2021-09-02 22:11:22 +02:00
Denis.Zharkov
c9a93eb1b5
Get rid of hard referencing to LanguageLevel entries
...
It should make easier to use different intellij-core versions
Some of them doesn't have JDK_15_PREVIEW while the other don't have
JDK_17, while we're ok with both of them since they support records and
sealed interfaces
2021-09-01 18:39:00 +03:00
Alexander Udalov
a6336ec134
Report deprecation warning when -Xuse-old-backend is specified
...
#KT-48532
2021-09-01 16:30:19 +02:00
Alexander Udalov
a37642e5af
Minor, cleanup CLITool
...
Reformat, remove unused code which was copied to another place in
04b04ea0ee .
2021-08-30 19:45:02 +02:00
Ilmir Usmanov
1f8dd45c2b
Remove experimental coroutines support. Part 2
2021-08-30 14:21:57 +03:00
ov7a
5ddf0cc7b2
JVM Cli: Proper Main-class manifest attribute for JvmStatic entry point.
...
`findMainClass` could handle main entry point from object and companion
object, not just top-level function.
Fixes [KT-32376](https://youtrack.jetbrains.com/issue/KT-32376 ).
2021-08-25 23:38:51 +02:00
Stanislav Erokhin
9becb2c468
Add compiler performance metrics
...
WIP
2021-08-24 16:33:12 +03:00
Steven Schäfer
a54503cede
JVM: Add an extension point for file output
2021-08-23 18:25:33 +02:00
Ilya Chernikov
caa44e413d
Abstract FIR cli pipeline from core environment and related entities
2021-08-23 16:50:40 +03:00
Ilmir Usmanov
486c6b3c15
Remove obsolete experimental coroutines support
...
in compiler.
2021-08-13 22:31:30 +02:00
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