Commit Graph

99484 Commits

Author SHA1 Message Date
Pavel Kunyavskiy 62fb3df7f0 [K/N] Disable scope initialization on constant access
^KT-57098
2023-03-15 09:03:19 +00:00
Alexander Shabalin e6297f92fa [K/N] Issue deprecation warning when using legacy MM
Merge-request: KT-MR-9091
Merged-by: Alexander Shabalin <Alexander.Shabalin@jetbrains.com>
2023-03-15 08:22:37 +00:00
Vladimir Sukharev 5bd0a1a0ba Disable some tests due to open issues and incompatibility with K1/MPP
Merge-request: KT-MR-9206
Merged-by: Vladimir Sukharev <Vladimir.Sukharev@jetbrains.com>
2023-03-15 06:55:27 +00:00
Mikhail Zarechenskiy 9ccbc2e5fb Fix tests: don't use signed-unsigned conversions in cinterop part
This kind of conversion is now required an additional compiler flag

 See KT-56583
2023-03-14 22:21:48 +00:00
Nikolay Krasko 071b54deb9 Clean up mute for bunches 2023-03-14 21:30:26 +00:00
Nikolay Krasko e42e2b28db Remove bunch tool chunks 2023-03-14 21:30:26 +00:00
nataliya.valtman 79fff92dc1 Don't use aggregated GC metric for build reports 2023-03-14 20:58:45 +00:00
nataliya.valtman a34657195b Add GC metric to build statistic 2023-03-14 20:58:45 +00:00
nataliya.valtman c16dabba1f Add Kotlin daemon memory usage into build report
#KT-56211: Fixed
2023-03-14 20:58:45 +00:00
Alexander Udalov f0fba7be64 K2: add bytecode listing tests
#KT-57171 Fixed
2023-03-14 21:57:26 +01:00
Ivan Kylchik f8deae4570 Reuse implicitCastIfNeededTo function in FunctionInlining 2023-03-14 20:47:46 +00:00
Ivan Kylchik 49fdfc2992 Suppress some JMV IR inliner delegation tests for K2 2023-03-14 20:47:46 +00:00
Ivan Kylchik 5b3d6583af Change isLambdaCall logic in FunctionInlining
We are allowing to inline `KFunction` invoke call. This is needed for
JVM paired with K2 compiler. Probably this can be reverted after
#KT-57249 fix.
2023-03-14 20:47:45 +00:00
Ivan Kylchik d2e92fd70d Add additional test cases and notes for KT44429 2023-03-14 20:47:45 +00:00
Ivan Kylchik f0d4220ad1 Extract flags from RemoveDuplicatedInlinedLocalClassesLowering 2023-03-14 20:47:45 +00:00
Ivan Kylchik 4ab38ffcfc Extract some common code into extractRelatedDeclaration 2023-03-14 20:47:44 +00:00
Ivan Kylchik 4fc95624a0 Rename attributeOwnerIdBeforeInline to originalBeforeInline 2023-03-14 20:47:44 +00:00
Ivan Kylchik d148231bce Rewrite copy method in FunctionInlining
This way we can avoid unnecessary cast
2023-03-14 20:47:44 +00:00
Ivan Kylchik 4506ca6792 Add KDoc to IrAttributeContainer 2023-03-14 20:47:43 +00:00
Ivan Kylchik 0af4ef8ee9 Fix typo in test name: inlinInDefault -> inlineInDefault 2023-03-14 20:47:43 +00:00
Ivan Kylchik 14b876546d Implement fake vars generation for functions inlined with IR inliner 2023-03-14 20:47:42 +00:00
Ivan Kylchik b812a6c6f5 Ignore tests that are currently not working with IR inliner 2023-03-14 20:47:42 +00:00
Ivan Kylchik 86b3ec73d1 Add new set of tests to run JVM checks with IR inliner 2023-03-14 20:47:42 +00:00
Ivan Kylchik 1c210822ea Add new configuration key that can enable IR inlining for JVM 2023-03-14 20:47:41 +00:00
Ivan Kylchik ab2c3572ab Drop all usages of inlineFunctionSymbol in IrReturnableBlock 2023-03-14 20:47:41 +00:00
Ivan Kylchik 095c7c5930 Remove all secondary constructors from FunctionInlining 2023-03-14 20:47:41 +00:00
Ivan Kylchik 71487e534b Reuse some available variables in JVM backend 2023-03-14 20:47:40 +00:00
Ivan Kylchik c034edd58d Disable tail call optimizations for inlined from IR functions 2023-03-14 20:47:40 +00:00
Ivan Kylchik 1e2ae137bf Slightly change JS test data results in three files
This change is caused by previous commit and was extracted
as a separate change not to mix JVM and JS changes
2023-03-14 20:47:40 +00:00
Ivan Kylchik b31114fa52 Extract new smap creation logic into separate class LineNumberMapper 2023-03-14 20:47:39 +00:00
Ivan Kylchik bb401c39d9 Add several new SMAP tests
Some of them are still failing and suppose to be
fixed later
2023-03-14 20:47:39 +00:00
Ivan Kylchik 32a7633c06 Support smap creation for functions inlined with IR inliner 2023-03-14 20:47:38 +00:00
Ivan Kylchik d451bc94a2 Separate creation and usage of synthetic accessors
This change allow us to inline private declarations
and only after that create synthetic accessors for them.
2023-03-14 20:47:38 +00:00
Ivan Kylchik 6e690f709e Avoid irGet with Unit value if it is last it IrReturnableBlock
This is needed to pass `MethodVerifier` check on JVM backend
2023-03-14 20:47:38 +00:00
Ivan Kylchik 707c5f03b8 Add new "invent name" phase to generate names for regenerated classes 2023-03-14 20:47:37 +00:00
Ivan Kylchik e159f7f682 Move some file level lowerings to module level
This is needed to fix "kt42408" test with enabled
IR inliner.
2023-03-14 20:47:37 +00:00
Ivan Kylchik 795d4bb739 Make regenerated inlined classes public by default 2023-03-14 20:47:37 +00:00
Ivan Kylchik d9382b2b66 Properly remove duplicated inlined classes using capturedConstructors 2023-03-14 20:47:36 +00:00
Ivan Kylchik 969b0216d4 Support inlining of property reference with non-nullable field 2023-03-14 20:47:36 +00:00
Ivan Kylchik 4baf970d5b Collect classes for JVM that must be regenerated after IR inline 2023-03-14 20:47:35 +00:00
Ivan Kylchik 41b56e5f16 Add some new utils to work with IrInlinedFunctionBlock 2023-03-14 20:47:35 +00:00
Ivan Kylchik 60702f0f02 Add new filed attributeOwnerIdBeforeInline to IrAttributeContainer
This field is null by default, and it is set to current
`attributeOwnerId` when declaration was inlined and must be
generated with new name. In its turn `attributeOwnerId` must be set to
`this` to show that this is actually a new declaration, not a copy.
2023-03-14 20:47:35 +00:00
Ivan Kylchik 163ed20de5 Set original type for expression inlined as arguments
This is mainly needed to fix cases like in "kt44429".
2023-03-14 20:47:34 +00:00
Ivan Kylchik ce6084302f Add FunctionInlining lowering to JvmLower 2023-03-14 20:47:34 +00:00
Ivan Kylchik ef78196cbc Replace all usages of inlineFunctionSymbol with inlineFunction 2023-03-14 20:47:34 +00:00
Ivan Kylchik 1d30a68285 Separate inlined by IR inliner arguments into two categories
First category of arguments is those that present at call site, and
second category is for those that are default.
2023-03-14 20:47:33 +00:00
Ivan Kylchik ebf6e69ef3 Add new IR node IrInlinedFunctionBlock
This node will represent inlined in IR function.
2023-03-14 20:47:33 +00:00
Ivan Kylchik 59522a6130 Improve IR inliner to be able to inline property references 2023-03-14 20:47:33 +00:00
Ivan Kylchik a09a48492b Set names for tmp vars in FunctionInlining without special symbols
This way we drop excess symbols like `<` and `>`. This is need on
JVM to get rid of "dexing error".
2023-03-14 20:47:32 +00:00
Ivan Kylchik c2fc745d66 Create special copy function in FunctionInlining
Semantically this is the same code, but it is easier to read
2023-03-14 20:47:32 +00:00