1803 Commits

Author SHA1 Message Date
Johan Bay 04e1e19dfc [K/N] skip lowerings for header caches
^KT-65443
2024-03-19 14:09:44 +00:00
Johan Bay 5adaa9a1f3 [K/N] skip consistency check for header caches
^KT-65443
2024-03-19 14:09:44 +00:00
Johan Bay 0dc646b0d1 [K/N] do not save klib hash in header caches
^KT-65443
2024-03-19 14:09:44 +00:00
Johan Bay 8f325d6f2c [K/N] remove class field types from caches
^KT-65443
2024-03-19 14:09:44 +00:00
Johan Bay 2d7107f354 [K/N] deserialize inline functions for header klibs
For header klibs the indices in the cache for the function bodies
are wrong so we instead deserialize the inline functions up-front.
^KT-65443
2024-03-19 14:09:44 +00:00
Johan Bay 32d67d101a [K/N] add flag to klib manifest for header klibs
^KT-65443
2024-03-19 14:09:44 +00:00
Johan Bay ac524f15d1 [K/N] serialize field names to caches
^KT-65443
2024-03-19 14:09:44 +00:00
Johan Bay 48ce542e95 [K/N] add header_cache output type
^KT-65443
2024-03-19 14:09:44 +00:00
Dmitriy Dolovov a007551574 Revert "[K/N] add header_cache output type"
This reverts commit 84341a9e25.
2024-03-15 22:32:50 +01:00
Dmitriy Dolovov ce6021e11d Revert "[K/N] serialize field names to caches"
This reverts commit 1b521d564f.
2024-03-15 22:32:50 +01:00
Dmitriy Dolovov a78d498e36 Revert "[K/N] add flag to klib manifest for header klibs"
This reverts commit 59f0c0464b.
2024-03-15 22:32:50 +01:00
Dmitriy Dolovov de3ad3cd3a Revert "[K/N] deserialize inline functions for header klibs"
This reverts commit a481f35450.
2024-03-15 22:32:50 +01:00
Dmitriy Dolovov dc66a53611 Revert "[K/N] remove class field types from caches"
This reverts commit 1f1522b787.
2024-03-15 22:32:50 +01:00
Dmitriy Dolovov 0df9b4242c Revert "[K/N] do not save klib hash in header caches"
This reverts commit 612caf13cf.
2024-03-15 22:32:50 +01:00
Dmitriy Dolovov ef814fe76e Revert "[K/N] skip consistency check for header caches"
This reverts commit d845e7c3f6.
2024-03-15 22:32:50 +01:00
Dmitriy Dolovov 23ee7cedfa Revert "[K/N] skip lowerings for header caches"
This reverts commit cf2135aaa4.
2024-03-15 22:32:50 +01:00
Johan Bay cf2135aaa4 [K/N] skip lowerings for header caches
^KT-65443
2024-03-15 10:24:26 +00:00
Johan Bay d845e7c3f6 [K/N] skip consistency check for header caches
^KT-65443
2024-03-15 10:24:26 +00:00
Johan Bay 612caf13cf [K/N] do not save klib hash in header caches
^KT-65443
2024-03-15 10:24:26 +00:00
Johan Bay 1f1522b787 [K/N] remove class field types from caches
^KT-65443
2024-03-15 10:24:26 +00:00
Johan Bay a481f35450 [K/N] deserialize inline functions for header klibs
For header klibs the indices in the cache for the function bodies
are wrong so we instead deserialize the inline functions up-front.
^KT-65443
2024-03-15 10:24:26 +00:00
Johan Bay 59f0c0464b [K/N] add flag to klib manifest for header klibs
^KT-65443
2024-03-15 10:24:26 +00:00
Johan Bay 1b521d564f [K/N] serialize field names to caches
^KT-65443
2024-03-15 10:24:26 +00:00
Johan Bay 84341a9e25 [K/N] add header_cache output type
^KT-65443
2024-03-15 10:24:25 +00:00
Alexander Shabalin d88092aa94 [K/N][tests] Migrate various runtime/ tests ^KT-61259 2024-03-15 01:28:01 +00:00
Ivan Kylchik 3ee126de74 [IR] Drop alwaysCreateTemporaryVariablesForArguments from inliner
This parameter was always set to be true.

#KT-66509
2024-03-14 16:00:53 +00:00
Alexander Shabalin bbcc5c9aed [K/N][tests] Migrate interopTest tests ^KT-61259 2024-03-14 11:47:00 +00:00
Alexander Shabalin adf5331ff0 [K/N] Remove more ext properties 2024-03-13 12:35:15 +00:00
Alexander Shabalin bb8c8431e8 [K/N][tests] Move gradle stuff for old infra to old infra 2024-03-13 12:35:15 +00:00
Dmitry Savvinov 55e36dcf66 [build, native] Minor: delete obsolete commented out code 2024-03-12 16:22:27 +00:00
Dmitry Savvinov 4957d99fd6 [native] Drop deprecated Kotlin/Native targets (4/8)
We still want to report a readable error on using removed targets rather
than just an "Unknown target"-exception. As previous commits has removed
actual KonanTarget-entries, the check has to be adjusted to work on
plain strings.

^KT-64517
2024-03-12 16:22:27 +00:00
Dmitry Savvinov 29e90d70c6 [native] Drop deprecated Kotlin/Native targets (3/8)
This commit inlines some helper-APIs that became redundant after
dropping deprecated targets.

Full list:
- 'threadsAreAllowed' is always 'true' now
- 'indirectBranchesAreAllowed' is always 'true' now
- 'supportsThreads' is always 'true' now
- 'isMips' is always 'false' now
- 'tlsMode' is always 'LLVMGeneralDynamicTLSModel' now
- 'getBoxRange' is always equal to 'cache.defaultRange' now
-  `targetHasAddressDependency` is always true now, so memory order
   is always LLVMAtomicOrderingMonotonic now

^KT-64517
2024-03-12 16:22:27 +00:00
Dmitry Savvinov 85bcc8443d [native] Drop deprecated Kotlin/Native targets (2/8)
Remove plain references to removed KonanTarget or Family entries. All
the changes in this commit are simple removal of some when-branches
on now dropped entries

^KT-64517
2024-03-12 16:22:26 +00:00
Alexander Shabalin 9832edddab Revert "Revert "[K/N][Tests] Migrate test override_konan_properties0 and add testDriverVersion""
This reverts commit 8518c3f54f.
2024-03-12 15:42:06 +00:00
Alexander Shabalin 60c74ab91a Revert "Revert "[K/N][Tests] Migrate test override_konan_properties0""
This reverts commit 4765cfda53.
2024-03-12 15:42:06 +00:00
Alexander Shabalin 3c097ee5e0 Revert "Revert "[K/N][Tests] Migrate driver test llvm_variant_dev""
This reverts commit dc4f12f29c.
2024-03-12 15:42:06 +00:00
Alexander Shabalin e95af641bc Revert "[K/N][tests] Restore ir_providers/hello.kt ^KTI-1597"
This reverts commit c600b74459.
2024-03-12 15:42:06 +00:00
Ivan Kylchik e1180adfbd [Native] Always cast expression to the expected type after inline
Right now, during the process of inlining, the compiler erases types.
Because of that, we can end up with some random type
(for example, `Any`) where the concrete type was
expected (for example, `Int`). Compiler must insert a cast in the
required places.

#KT-66017 Fixed
2024-03-12 08:19:50 +00:00
Dmitriy Novozhilov d352cc9d96 [Frontend] Make DiagnosticSuppressor a project-level extension
Originally it was an application-level component, which caused non-trivial
  logic and cognitive load to carefully handle those extensions to avoid
  memory leaks.

6740a596 introduced a way to easily register `DiagnosticSuppressor` to
  project, and this commit continues this work, making it a proper
  project-level extension

A lot of changes caused by the fact, that this extension is needed to be
  obtained from `BindingContext` (see `BindingContextSuppressCache` and
  its usages), so almost all changes are introducing `Project` to
  `BindingContext`

^KT-66449 Fixed
2024-03-12 06:43:58 +00:00
Alexander Udalov 1d38c01afc IR: remove some usages of deepCopyWithVariables
At this point, `deepCopyWithVariables` is the same as
`deepCopyWithSymbols` except that the former doesn't call
`patchDeclarationParents`, which most likely produces incorrect IR in
some call sites.
2024-03-11 11:49:10 +00:00
Alexander Udalov e7e8cba1b4 IR: slightly simplify deep copy interface
Do not pass TypeRemapper explicitly unless an instance of something
other than DeepCopyTypeRemapper is required.
2024-03-11 11:49:10 +00:00
Wojciech Litewka e9005e4fed [IR] Initialize IrFunction.returnType eagerly, when possible 2024-03-11 09:07:54 +00:00
Wojciech Litewka d1e8016ab2 [IR] Pass null instead of IrUninitializedType to IrFactory
#KT-66053 In progress
2024-03-11 09:07:54 +00:00
Wojciech Litewka 943be239ee [IR] Simplify IrFileImpl and IrExternalPackageFragment
#KT-65773 In Progress
2024-03-07 14:32:31 +00:00
Igor Chevdar 27a4cb6c12 [K/N][IR] Fixed wrong type in IR around enums 2024-03-06 05:21:32 +00:00
Igor Chevdar 17d79dafb1 [K/N][IR] Fixed wrong type in IR around ImmutableBlob 2024-03-06 05:21:31 +00:00
Igor Chevdar faf5a7fecc [K/N] Handle conservative type approximations in functional types
Sometimes FE resolves type as an intersection type which gets approximated to Nothing
(as a part of a functional type for function references), this commit tries to workaround
this by getting this type from the referenced function
2024-03-06 05:21:31 +00:00
Alexander Shabalin e8202c3355 [K/N] Simplify dependencies around kotlin-native/ 2024-03-05 21:47:43 +00:00
Alexander Shabalin 24ede14e37 [K/N] Convert :kotlin-native:backend.native buildscript to kts
Use folder structure from the rest of the project and build it by
the bootstrap compiler.
2024-03-05 21:47:43 +00:00
Alexander Shabalin 0542b62430 [K/N] Extract :native:cli-native from kotlin-native/backend.native/cli.bc 2024-03-05 21:47:43 +00:00