Commit Graph

61 Commits

Author SHA1 Message Date
Pavel Kunyavskiy 817dba8564 [K/N] Use suspend function desugaring lowerings. 2022-09-30 08:48:58 +00:00
Vladimir Sukharev 046f0ad95d Adjust test kt53119_append_generated.kt to changes in KT-53864
Merge-request: KT-MR-7080
Merged-by: Vladimir Sukharev <Vladimir.Sukharev@jetbrains.com>
2022-09-09 14:42:11 +00:00
Igor Chevdar 16eaba8f68 [K/N][tests] Added a test on stack allocated string 2022-08-22 06:05:53 +00:00
Vladimir Sukharev 9f2cdb0130 Fix basic blocks order for WHEN expression
Merge-request: KT-MR-6833
Merged-by: Vladimir Sukharev <Vladimir.Sukharev@jetbrains.com>
2022-08-11 08:27:06 +00:00
Vladimir Sukharev 412f07c55b Call toString() within known class, during string concatenation type narrowing
^KT-53119 Improved

Merge-request: KT-MR-6755
Merged-by: Vladimir Sukharev <Vladimir.Sukharev@jetbrains.com>
2022-07-28 14:57:28 +00:00
Vladimir Sukharev 2313dbeb9e Don't introduce call to deprecated "StringBuilder.append(String)"
Merge-request: KT-MR-6705
Merged-by: Vladimir Sukharev <Vladimir.Sukharev@jetbrains.com>
2022-07-27 11:08:58 +00:00
Vladimir Sukharev 26149be44a KT53100: Optimization: <T-unbox>(CONSTANT_PRIMITIVE(x: T?)) => x
Merge-request: KT-MR-6684
Merged-by: Vladimir Sukharev <Vladimir.Sukharev@jetbrains.com>
2022-07-21 21:45:03 +00:00
Vladimir Sukharev d378d7d5f5 KT53119: Implement String Concatenation Type Narrowing to improve escape analysis
Merge-request: KT-MR-6661
Merged-by: Vladimir Sukharev <Vladimir.Sukharev@jetbrains.com>
2022-07-20 16:28:33 +00:00
Alexander Shabalin 29f3445721 [K/N] Deprecated freezing ^KT-50541
Starting with 1.7.20 freezing is deprecated. See https://github.com/JetBrains/kotlin/blob/master/kotlin-native/NEW_MM.md#freezing-deprecation for details.

Merge-request: KT-MR-6399
Merged-by: Alexander Shabalin <Alexander.Shabalin@jetbrains.com>
2022-06-16 09:04:14 +00:00
Igor Chevdar 554e94a322 [K/N][IR] Never consider a enum a final class
Unfortunately, neither descriptors nor Lazy IR have enough information
to correctly deduce a enum's modality as psi2ir does, so to avoid the RTTI generator
generating different vtables in different setups (whether a klib is cached or not),
conservatively consider all enums non-final.
2022-02-02 22:46:15 +05:00
Pavel Kunyavskiy 541f6b0c88 [K/N] Fix handling of legacy suspend-function superclass
^KT-50737
2022-01-12 19:42:37 +00:00
Elena Lepilkina f650311b11 [K/N] Support properties in BCE 2021-12-16 08:33:36 +00:00
Igor Chevdar cb71240938 [K/N] Supported outer this references from cached inline bodies 2021-11-18 17:52:57 +05:00
Svyatoslav Scherbina 2f5706597a IR: fix offsets in irTemporary
The variable generated by IrStatementBuilder.irTemporary doesn't inherit
startOffset and endOffset from the builder. In particular, as a result,
temporary variables generated for elvis operator left operand have
UNDEFINED_OFFSET.

Additionally, ProvisionalFunctionExpressionLowering copies the offsets
of a variable to lowered lambda in the variable initializer. With the
problem described above, this causes invalid debug information in
Kotlin/Native, see KT-49360.

Fix irTemporary by using builder's offsets for the variable.

^KT-49360 Fixed
2021-11-16 11:59:55 +00:00
zhelenskiy c1dc1f7e33 Diagnostics renamed
Signed-off-by: zhelenskiy <zhelenskiy2000@yandex.ru>
2021-11-13 12:38:45 +01:00
Pavel Kunyavskiy 523cb4b3e8 [K/N] Better handling of nested returns in RedundantCoercionsCleaner.kt
^KT-49356
2021-11-12 19:12:37 +00:00
Pavel Punegov a207a3e8fa [K/N][test] Don't use assertFailsWith on wasm32 in the test 2021-11-09 09:55:13 +00:00
Pavel Kunyavskiy f4a88bde4e [K/N] Force static constants and boxing caches be same values
^KT-49403
2021-11-03 07:21:25 +00:00
Svyatoslav Scherbina 99447a11c1 Native: fix ^KT-49384
Don't report errors for projections in nested type arguments of
SAM conversion target types.
2021-10-26 10:12:30 +00:00
Svyatoslav Scherbina 65bea27431 Native: add test for ^KT-48876
The issue itself was already fixed in 981a6ffe.
2021-10-26 10:10:26 +00:00
Igor Chevdar f1c1094393 [K/N][optmz] Fix for https://youtrack.jetbrains.com/issue/KT-49234 2021-10-15 14:08:17 +00:00
Pavel Kunyavskiy 533eb589cb [K/N] Add tests for static initialisation of ConstantValues 2021-10-14 11:22:28 +00:00
Igor Chevdar e64140af08 Added a test on unsigned arrays 2021-10-04 06:12:22 +00:00
Igor Chevdar e194a07358 [tests] Added some tests 2021-09-16 10:54:14 +00:00
Igor Chevdar 23a02be169 [K/N][IR] Fix for https://youtrack.jetbrains.com/issue/KT-48527 2021-09-13 16:41:37 +05:00
Pavel Kunyavskiy 51c85e7f86 [K/N] Safer handling of bridges function in dce 2021-09-10 15:58:42 +00:00
Mikhail Glukhikh 3febabe977 Use OPT_IN instead of EXPERIMENTAL in diagnostic names 2021-09-10 16:29:13 +03:00
Igor Chevdar e67a78abaf [K/N][codegen] Fix for https://youtrack.jetbrains.com/issue/KT-48543
Sometimes an interface contains final methods, they shouldn't be in its itable
cause they can't be called virtually
2021-09-07 12:04:26 +05:00
Dmitriy Dolovov 1a863106e6 [Native][tests] Move golden data outside of Gradle build file 2021-09-01 10:14:01 +03:00
Igor Chevdar ce44403d1b [K/N][IR][codegen] Made lazy init logic JVM-like
Now a file will be initialized only if a top level function has been called
rather than any function like was before the commit
2021-08-27 18:22:52 +05:00
Svyatoslav Scherbina 981a6ffeb8 Native: RedundantCoercionsCleaner should rewrite nested returns too 2021-08-26 07:15:25 +00:00
Igor Chevdar 81ce59cf48 [K/N][IR][codegen] Implemented eager initialization
Properties marked with @EagerInitialization will be initialized at program/worker start
even in lazy initialization mode
2021-08-11 11:53:19 +05:00
Igor Chevdar 448376f073 [K/N][IR][optmz] Global analysis for top-level initializers
The analysis' goal is to remove redundant calls to initializers
2021-07-31 01:40:00 +05:00
Igor Chevdar b11201be81 [K/N][IR][runtime] Implemented lazy per-file initialization strategy 2021-07-31 01:39:59 +05:00
Elena Lepilkina 025e572462 [K/N] Fixed case with parameter which can be optimized with BCE 2021-07-13 09:22:13 +00:00
Elena Lepilkina c096e6a3eb [K/N] Analyze vals in bounds check elimination 2021-07-13 09:22:11 +00:00
Elena Lepilkina 9503627864 Changed an order of processing loops in ForLoopsLowering 2021-07-13 09:22:11 +00:00
Elena Lepilkina 7975311ca2 [K/N] Added tests for bounds checks 2021-07-13 09:22:09 +00:00
Pavel Kunyavskiy eec8fdf16a [K/N] Implement isExperimentalMM intrinsic 2021-07-09 08:53:07 +00:00
Igor Chevdar 421ff68cd6 [K/N][codegen] Fix for https://youtrack.jetbrains.com/issue/KT-47183 2021-06-18 15:57:45 +05:00
Dmitriy Dolovov d42ff069f6 [Native][IR] Move verbose RTTI for local classes and anonymous objects
^KT-45304
2021-06-10 11:02:16 +03:00
Alexander Shabalin b1e0e43ba4 Add isFrozen test on object 2021-06-09 15:03:15 +00:00
Dmitriy Dolovov e927764aaf [IR][Native] Fix invalid IR return statement generation
^KT-46836
2021-05-29 19:31:13 +00:00
Alexander Shabalin 858e3584a9 Disable escape analysis with the new MM 2021-05-25 10:06:40 +00:00
Pavel Kunyavskiy 8a418161f6 [K/N] Support pre-creating for objects with only constant properties 2021-05-20 08:29:23 +00:00
Igor Chevdar 3b3318ab06 [K/N][codegen] Refactored interface calls
Removed old impl for debug builds
Fixes https://youtrack.jetbrains.com/issue/KT-44547 as a side effect
2021-05-18 18:58:14 +05:00
Dmitriy Dolovov 75d2e415e1 [K/N][IR] Generate missing return statement, p. 2
^KT-42832
2021-05-04 13:26:02 +03:00
Dmitriy Dolovov 5e392a511f [K/N][IR] Generate missing return when using Nothing-returning safe call as lambda result or function expression body
^KT-42832
2021-04-14 13:20:41 +03:00
Dmitriy Dolovov 003d07b51e [K/N][IR] Ref to expect property in actual declaration is not remapped
^KT-36880
2021-04-02 09:35:46 +03:00
Igor Chevdar f9f948fea6 [IR] Fixed problems with nested inline classes
Fixes https://youtrack.jetbrains.com/issue/KT-45139 as well

(cherry picked from commit 44916e39bfa69325a9ab73cb4533bd2612fb4e56)
2021-03-09 20:19:34 +00:00