Commit Graph

84343 Commits

Author SHA1 Message Date
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
Dmitriy Novozhilov d9d2a9cc31 Move BuildSessionLoggerTest to :kotlin-gradle-plugin tests
There was a problem that :kotlin-gradle-statistics:test can not be
  properly imported and kotlin stdlib wasn't accessible in it. I didn't
  find a way to fix it in :kotlin-gradle-statistics module, so I just
  moved tests from it to others gradle plugin tests
2021-07-23 17:15:55 +03:00
Anton Bannykh a7549be95e JS IR IC: report cache validataion duration when up-to-date 2021-07-23 17:10:07 +03:00
Anton Bannykh 4cee44cd6e JS IR IC: add a flag for DCE hack
The deserialized PIR does not support declaration mutation.
Until that's fixed the associatedObject removal optimization
has to be disabled.
2021-07-23 17:10:07 +03:00
Anton Bannykh 508d3bd9c0 JS IR IC: IC data may reference additional original declarations
Function types, which are created on the fly from lowerings are one such example.
2021-07-23 17:10:06 +03:00
Anton Bannykh fa21132704 JS IR IC: fix order storage
Some classes don't survive till the end. Their declaration lists
need to be stored nevertheless.
2021-07-23 17:10:06 +03:00
Anton Bannykh c6ab195a87 JS IR IC: invalid loops references exist after lowerings 2021-07-23 17:10:04 +03:00
Anton Bannykh 0130d18ea9 JS IR IC: deserialization fix 2021-07-23 17:10:03 +03:00
Anton Bannykh 058ca16af7 JC IR IC: correct signatures for function types created during lowerings 2021-07-23 17:10:02 +03:00
Anton Bannykh 8553c6ef58 JS IR IC: pass through more compiler flags 2021-07-23 17:10:02 +03:00
Yahor Berdnikau 5dc6e1b473 Fix no duplicate strategy was set for compilation with 'withJava()'.
In such case Kotlin jvm compilation has additionally java resource dir
that points to the same location. So ProcessResources task copies same
file twice. Fixed by setting ignore duplicates strategy.

^KT-46978 Fixed
2021-07-23 14:03:57 +00:00
Nikolay Krasko 83023c2073 Remove 202 platform support in build scripts 2021-07-23 16:58:28 +03:00
Nikolay Krasko ec99585eb9 Remove explicit registration of classFileDecompiler EP and core.xml 2021-07-23 16:58:27 +03:00
Nikolay Krasko 1b3046a61b Cleanup 202 bunch files
Leave 202 in .bunch file to give some time for updating build server
2021-07-23 16:58:26 +03:00
Nikolay Krasko 000a437315 Update .bunch file after 202 -> 203 switch 2021-07-23 16:58:25 +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
Dmitry Petrov 34f5b85ae5 IR KT-47840 fix-point solution for closure conversion 2021-07-23 14:58:23 +03:00
Jinseong Jeon e9f2d574d5 FIR IDE: simplify HL APIs for PsiType
The idea is to convert `KtType` to `PsiType`, along with the given
`PsiElement` context, instead of providing individual API to convert
different psi source to `PsiType`. To that end, we need to
migrate/rewrite some APIs/implementations that retrieve `KtType` from
different source of `PsiElement`.
2021-07-23 13:28:14 +02:00
Jinseong Jeon f02f3c76ae FIR IDE: API to resolve KtTypeReference to KtType 2021-07-23 13:28:11 +02:00
Jinseong Jeon 5358d4f07c FIR IDE: construct function type from a function as PsiType 2021-07-23 13:28:05 +02:00
Jinseong Jeon f19a501cc7 FIR IDE: common super type of given KtExpression's 2021-07-23 13:27:59 +02:00
Jinseong Jeon 5690b4d8c2 FIR IDE: get the return type of KtDeclaration as PsiType 2021-07-23 13:27:57 +02:00
Konstantin Tskhovrebov de4c2d35ab Assemble fat framework if Xcode requires several architectures.
#KT-47653
2021-07-23 11:00:35 +00:00
Konstantin Tskhovrebov 68a3c5f378 Use 'ARCHS' Xcode env for assembleAppleFramework task registration.
#KT-47653
2021-07-23 11:00:34 +00:00
Konstantin Tskhovrebov 414e735a67 Move native target definition by sdk and arch from Cocoapods to MPP plugin.
#KT-47653
2021-07-23 11:00:34 +00:00
Dmitriy Novozhilov 9b00776dba [FIR] Create CFG node for ::class calls 2021-07-23 12:20:39 +03:00
Yahor Berdnikau c5ce52eef5 Configure Android SDK in new test dsl. 2021-07-23 08:11:03 +00:00
Yahor Berdnikau 1e758c6767 Toolchain takes into account kotlin options set via Android extension.
This extension updates not common task kotlin options, but special
field in the task. Toolchain will also check this field to decide
whether it should set 'jvmTarget' or not.

^KT-47754 Fixed
2021-07-23 08:11:02 +00:00
Yahor Berdnikau e3b219b68f Don't produce warning when '-no-jdk' option is present.
Toolchain in such case should avoid setting '-jdk-home' option.

^KT-46626 In Progress
2021-07-23 08:11:02 +00:00
Mads Ager c0f5d09759 Copy locals in addition to instructions when inlining finally blocks
^KT-46448 Fixed
2021-07-23 09:11:48 +02:00
pyos d00fba3718 FE: avoid stack overflow on star projection of enhanced type parameter
#KT-47846 Fixed
2021-07-23 10:03:57 +03:00
Sergey Bogolepov ed44497a9b [K/N] Prepare CallsChecker for LLVM 11.1.0
LLVM 11.1.0 adds a bit more "good" external functions and intrinsics.
2021-07-23 04:52:16 +00:00
Sergey Bogolepov bce1075fc4 [K/N] Prepare MinGW linker for LLVM 11
Explicitly set sysroot, target and linker when linking MinGW binary
because it won't be the default target after LLVM update.
2021-07-23 04:51:52 +00:00
Sergey Bogolepov 272284680e [K/N] Prepare Windows runtime tests for LLVM update
In the upcoming LLVM update the default target for windows will be
x86_64-pc-windows-msvc and it will break runtime tests. To mitigate this
problem we explicitly set compilation target to x86_64-pc-windows-gnu
as we do in BitcodeCompiler.
2021-07-23 04:46:13 +00:00
Roman Artemev f768d5b453 [JS TEST] Refactor test runner a bit
Build IC cache for library right after its compilation
2021-07-22 21:56:57 +03:00
Roman Artemev 0310f7cb0b [JS IC] Lot of fixes after rebase 2021-07-22 21:56:57 +03:00
Roman Artemev 8782399ffb [JS IC] Make sure already bound symbol is not being enqueued 2021-07-22 21:56:56 +03:00
Roman Artemev 334e34b70b [JS PIR] Fix inliner. Do not mutate existed statement list
Such list could be part of PIR structures
2021-07-22 21:56:56 +03:00
Anton Bannykh 20088994c1 JS IC: IC lowerings prototype 2021-07-22 21:56:55 +03:00
Anton Bannykh 525c5b886f JS IR gradle plugin: don't run IC for the main module 2021-07-22 21:56:53 +03:00
Anton Bannykh e03cb372b7 KLIB: don't fail on invalid loops
Temporarily disable assert because this happens in lowered IR
2021-07-22 21:56:52 +03:00
Anton Bannykh 48ce8c049d JS IC: temporarily disable isPublic assert 2021-07-22 21:56:52 +03:00
Anton Bannykh 3833c833ef KLIB: changes in the .proto and linker required for the JS IC
The original behaviour is preserved. All changes should be behind the flags.
2021-07-22 21:56:51 +03:00
Anton Bannykh 002f4210f7 IR: pass information about the declaration being lowered to the infrastructure 2021-07-22 21:56:51 +03:00
Anton Bannykh 5ee865437d JS IC: expose currentDeclaration from StageController 2021-07-22 21:56:50 +03:00
Anton Bannykh ba541bd53b IR: allow SymbolTable descendants 2021-07-22 21:56:50 +03:00
Anton Bannykh e0570d98b2 IR: cache IdSignature hashCode for better performance in maps 2021-07-22 21:56:49 +03:00
Anton Bannykh 76f0684d7c IR: .isBound API for F/O declarations
Fake override functions and properties may not be bound to symbols.
This API allows to know if such declaration is actually bound
2021-07-22 21:56:47 +03:00
Dmitry Petrov 6c734289be JVM skip methods without NEW insns in UninitializedStoresProcessor 2021-07-22 21:29:41 +03:00