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
Ilya Chernikov
a45e31720c
Make state of the default REPL compiler explicit and replaceable
...
restores proper object hierarchy in case the legacy REPL infrastructure
2021-08-24 21:39:37 +03:00
Stanislav Erokhin
9becb2c468
Add compiler performance metrics
...
WIP
2021-08-24 16:33:12 +03:00
nataliya.valtman
64da19cb2d
Add Artifact Transform stat into ES
2021-08-24 16:33:11 +03:00
Roman Artemev
22cd20781e
[JS IC] Support per-file invalidation in CLI
...
- now disabled
2021-08-24 01:09:18 +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
Ting-Yuan Huang
39c6be86cb
K2JsIrCompiler: pass right configuration when creating lib module
2021-08-12 18:01:59 +03:00
Ting-Yuan Huang
06d3c6f233
Support repeated analysis and frontend-only-mode in K2JsIrCompiler
2021-08-12 18:01:58 +03:00
Ting-Yuan Huang
e75ca75e3e
K2JsIrCompiler: hoist common front-end preparation logic
...
Instead of creating ModuleStructure and run analysis in each backend,
the common preparation logic is moved into K2JsIrCompiler.doExecute().
2021-08-12 18:01:56 +03:00
Igor Laevsky
4ffed54f76
WASM: Fix JS runner for standalone compiles
2021-08-06 17:34:20 +03:00
Victor Petukhov
dc8dbad0bc
Add compiler X-flag to enable self upper bound type inference
...
^KT-48026 Fixed
2021-08-04 17:36:52 +03: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
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