Commit Graph

99466 Commits

Author SHA1 Message Date
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
Svyatoslav Scherbina ba2e46758d Fix kotlin-native/backend.native/tests/samples after 82524fd
Enable language feature for these tests, because some code relies
on implicit integer coercion there
2023-03-14 19:26:44 +00:00
Alexander.Likhachev 67fc9be3c5 [Gradle] Access the artifact type attribute via non-deprecated API
#KT-54447 Fixed
2023-03-14 18:41:24 +00:00
Ilya Goncharov 2de4f471e9 [Gradle, JS] Use default browsers for wasm
^KT-56585 fixed
2023-03-14 17:06:35 +00:00
Dmitrii Gridin b7370f0156 [Test] Add testdata of SLC tests to Test Helper plugin path 2023-03-14 16:09:50 +01:00
Yan Zhulanow a350deaa4d [LL API] Support FirScript declarations in declaration providers (KTIJ-21108) 2023-03-14 14:31:53 +00:00
Pavel Kunyavskiy dc2e072af2 [K/N] Make exception handling in initializers more consistent with jvm
^KT-57091
2023-03-14 12:59:14 +00:00
Pavel Kunyavskiy 0506d39d8a [K/N] Support ignoring test with legacy mm 2023-03-14 12:59:13 +00:00
Pavel Mikhailovskii 0f589dac34 KT-56833 [SLC] Mark accessors of lateinit properties with @NotNull 2023-03-14 12:45:57 +00:00
Ilya Goncharov 7794998113 [Gradle, JS] Use JAR archive task type for js ir 2023-03-14 12:34:19 +00:00
Leonid Startsev 5cf1c01273 Expand type aliases in K2 when checking if serializable class' properties
have serializers.

#KT-56594 Fixed
#KT-56480 Fixed
2023-03-14 12:11:32 +00:00
Ilya Goncharov 63e27a9713 [Gradle, JS] Implement own IncrementalSyncTask 2023-03-14 11:16:20 +00:00
Ilya Goncharov 7d2ba28911 [Gradle, JS] Only if with reasons 2023-03-14 11:10:34 +00:00
Ilya Goncharov 9d8e7991a8 [Gradle, JS] Remove redundant fields inside NpmDependency 2023-03-14 11:10:34 +00:00
Ilya Goncharov df50994f4f [Gradle, JS] Add documentation of KotlinNpmResolutionManager 2023-03-14 11:10:33 +00:00
Ilya Goncharov d64e211dca [Gradle, JS] Remove redundant field 2023-03-14 11:10:33 +00:00
Ilya Goncharov 234ffb4644 [Gradle, JS] Fix naming 2023-03-14 11:10:33 +00:00
Ilya Goncharov e570f97db2 [Gradle, JS] Chaining build service disallowChanges 2023-03-14 11:10:32 +00:00
Ilya Goncharov 55db7690d8 [Gradle, JS] Remove redundant imports 2023-03-14 11:10:32 +00:00