Commit Graph

50 Commits

Author SHA1 Message Date
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
Igor Chevdar 10e79bff8b [IR] Fixed bug with wrong init order of a enum's entries
This fixes https://youtrack.jetbrains.com/issue/KT-38540

(cherry picked from commit d031526a6e1a618597898dd6beadb04eed74b478)
2021-03-02 17:11:20 +00:00
Igor Chevdar 31835f1921 [IR] Reworked adapted references building + test
As a side effect, this fixes https://youtrack.jetbrains.com/issue/KT-43887

(cherry picked from commit 387c09e7aed7666f5a178b2ac342fb17ed3cdda3)
2021-03-02 17:11:19 +00:00
Igor Chevdar 764f7f31d2 [IR] Erase non-trivial type projections off of super types
This fixes https://youtrack.jetbrains.com/issue/KT-44826
2021-02-24 10:53:42 +01:00
Igor Chevdar ab36e919bc [IR] Fix for https://youtrack.jetbrains.com/issue/KT-44799 2021-02-15 10:16:10 +01:00
LepilkinaElena 71f44dce0f Added StringTrimLowering to pipeline (#4647) 2021-01-26 17:38:02 +03:00
Igor Chevdar 1222b72dcd [IR] Fix for https://youtrack.jetbrains.com/issue/KT-44219 + test 2021-01-19 13:37:36 +03:00
LepilkinaElena 55cb50e15b Added test for inlining accessors of const properties (#4589)
(cherry picked from commit fa4cd091ae9160b97d79bd318cc92f76ada82fec)
2020-12-14 15:31:10 +01:00
Igor Chevdar e2cbe53776 [IR] Supported value classes 2020-12-14 15:25:36 +01:00
Svyatoslav Scherbina d4beef6872 Add trivial test for CStructVar declared in source code 2020-11-28 20:51:55 +01:00
SvyatoslavScherbina 77fcc0d010 Fix type safe barrier bridges for generics with non-trivial upper bound 2020-11-28 20:51:01 +01:00
Stanislav Erokhin f624800b84 Move everything under kotlin-native folder
I was forced to manually do update the following files, because otherwise
they would be ignored according .gitignore settings. Probably they
should be deleted from repo.

Interop/.idea/compiler.xml
Interop/.idea/gradle.xml
Interop/.idea/libraries/Gradle__org_jetbrains_kotlin_kotlin_runtime_1_0_3.xml
Interop/.idea/libraries/Gradle__org_jetbrains_kotlin_kotlin_stdlib_1_0_3.xml
Interop/.idea/modules.xml
Interop/.idea/modules/Indexer/Indexer.iml
Interop/.idea/modules/Runtime/Runtime.iml
Interop/.idea/modules/StubGenerator/StubGenerator.iml
backend.native/backend.native.iml
backend.native/bc.frontend/bc.frontend.iml
backend.native/cli.bc/cli.bc.iml
backend.native/cli.bc/src/org/jetbrains/kotlin/cli/bc/K2Native.kt
backend.native/cli.bc/src/org/jetbrains/kotlin/cli/bc/K2NativeCompilerArguments.kt
backend.native/tests/link/lib/foo.kt
backend.native/tests/link/lib/foo2.kt
backend.native/tests/teamcity-test.property
2020-10-27 21:00:28 +03:00