Commit Graph

86506 Commits

Author SHA1 Message Date
Ilya Goncharov a0fb60f201 [JS IR] Use label for continue loop in tailrec
^KT-46218 fixed
2021-10-06 18:40:34 +00:00
Tianyu Geng eb901e4f32 FIR HL API: add helper for shortening ref on EDT thread 2021-10-06 21:30:17 +03:00
Dmitry Savvinov 50050154d3 [gradle, mpp] Change how outputs of associated compilations are handled 2021-10-06 17:10:17 +03:00
Ilya Gorbunov 9c4a2d4431 Leave all deprecated duration API experimental KT-46784 2021-10-06 13:51:23 +00:00
Dmitry Petrov 3d64c91375 PSI2IR KT-49053 skip fake overrides with unresolved types in signature 2021-10-06 16:23:08 +03:00
pyos 1c3a20fab9 JVM_IR: generate $suspendImpl in interfaces as public
The visibility was the cause of KT-44533; not generating `$suspendImpl`
at all makes `super` calls impossible.

^KT-49106 Fixed
2021-10-06 15:03:51 +02:00
Yahor Berdnikau b7cfbf031c Snapshot compile tasks outputs and restoring them on compilation error.
It happens Gradle has low performance on passing 'Array<Byte>' or
'List<Byte>' via properties api. In this change, task outputs approach
was changed to snapshot pre-execution state by coping outputs to the new
directory and coping them back on incremental compilation error.

^KT-46406 Fixed
2021-10-06 11:56:21 +00:00
Yahor Berdnikau e30b11fc05 Unify build cache debug approach.
^KT-45745 In Progress
2021-10-06 13:53:03 +02:00
Yahor Berdnikau 862d46f58b Enable publishing test build build-scan.
^KT-45745 In Progress
2021-10-06 13:53:03 +02:00
Ilmir Usmanov 27081231d9 Use original instead of lowered function to retrieve toString-impl
in string concatenation lowering. Otherwise, inliner tries to get
body of already lowered function, failing.
 #KT-48284 Fixed
2021-10-06 11:12:26 +00:00
Yahor Berdnikau dd0f01d93d Deprecate 'kapt.use.workers.api' property.
^KT-48826 Fixed
2021-10-06 10:10:34 +00:00
Svyatoslav Scherbina bc01676489 Add kotlin-native/tools/degrade -- a helper for K/N Gradle builds
Intended to be helpful in minimizing reproducers or investigating
Kotlin/Native-related problems.

It analyses kotlin-multiplatform Gradle plugin events,
and creates shell scripts that run executed Kotlin/Native tools
(compiler, cinterop) without Gradle.
2021-10-06 09:48:16 +00:00
Elena Lepilkina 6bfa710e34 [K/N][tests] Added test for @ character in library name 2021-10-06 09:34:55 +00:00
Elena Lepilkina 416719c216 [KLIB] Removed support of pattern '<library_name>@<version>' (KT-42500 Fixed) 2021-10-06 09:34:55 +00:00
Sergej Jaskiewicz 65d40c2253 [JS IR] Make tests that use directives pass with IR BE 2021-10-06 09:23:50 +00:00
Sergej Jaskiewicz a359e503fb [JS tests] Introduce the CHECK_FUNCTION_EXISTS directive 2021-10-06 09:23:50 +00:00
Sergej Jaskiewicz c84f9cde07 [JS] Check the DECLARES_VARIABLE directive for all matching functions
Not just the first one.
2021-10-06 09:23:49 +00:00
Sergej Jaskiewicz 103be8f7bc [JS] Don't fail the test after the first directive check fails 2021-10-06 09:23:49 +00:00
Sergej Jaskiewicz 09467954bc [JS] Allow per-backend directives in JS tests
This way we can use different directives for the legacy and IR backends.
2021-10-06 09:23:49 +00:00
Sergej Jaskiewicz b93e0181ca [JS IR] Enable directives for IR box tests 2021-10-06 09:23:48 +00:00
Sergey Bogolepov c9a0369805 [K/N] Add StubGenerator tests to sanity 2021-10-06 04:40:07 +00:00
Sergey Bogolepov 742c65a26b [K/N] Fix StubIr tests 2021-10-06 04:40:06 +00:00
Sergey Bogolepov 2f6a9519c0 [K/N] Don't check UniqId because it is an obsolete extension 2021-10-06 04:40:06 +00:00
Roman Artemev ba759fb61b [IR] Fix compatibility mode
- pass corresponding flag to mangler
 - properly handle local declarations in field initializers
 - fix KT-48912
2021-10-06 03:47:20 +03:00
Roman Artemev 8f8c59e748 [JS IR] Fix passing abiVersion to compiler in tet runner 2021-10-06 03:47:18 +03:00
Roman Artemev 1d39b37c90 [IR] Add test describes case from KT-48912
It actually doesn't check behaviour because we don't have proper infra
for that but explains a bit a problem for further investigations.
2021-10-06 03:47:17 +03:00
Nikolay Lunyak 8496729597 [FIR] Remove the type parameters scope duplicate 2021-10-05 19:37:57 +03:00
Nikolay Lunyak e5d5e5be44 [FIR] Reorder scopes for KT-34822 2021-10-05 19:37:53 +03:00
Nikolay Krasko 1d2c1140a4 Minor: rewrite testResolveWithRuntime without !! 2021-10-05 17:51:50 +03:00
Nikolay Krasko 1d42d86537 Minor: unify kotlin version used in MavenResolverTest 2021-10-05 17:51:50 +03:00
Nikolay Krasko 824c227d81 Stop removing libraries from local maven in MavenResolverTest
While it's a good practice to remove all files that were downloaded
during the test execution, here we delete files in common directory
without checking that files were not present before test start.

This might be dangerous as we might fail other tests and programs.
As we manipulate common maven directory it's better to leave downloaded
files untouched
2021-10-05 17:51:50 +03:00
Nikolay Krasko 31e30dc852 Fix external issue with org.uberfire library in MavenResolverTest
Use kotlin library instead.

java.lang.AssertionError: org.eclipse.aether.resolution.DependencyResolutionException: Failed to collect dependencies at org.uberfire:uberfire-io:jar:7.39.0.Final -> org.uberfire:uberfire-nio2-model:jar:7.39.0.Final -> com.thoughtworks.xstream:xstream:jar:1.4.11.1 -> xmlpull:xmlpull:jar:1.2.0
2021-10-05 17:51:48 +03:00
Ilya Goncharov 464331d196 rra/ilgonmic/lazy-init-with-js-fun
[JS IR] Use initializer of field to use in js fun

[JS IR] Use string folding to consider const-like string vals as pure

Merge-request: KT-MR-4677
2021-10-05 13:37:06 +00:00
Dmitry Petrov 1dae2aca4c JVM_IR KT-48954 prohibit indy reference creation in some cases 2021-10-05 15:38:46 +03:00
Sergey Bogolepov 7552767d85 [K/N] Add munmap to the calls checker 2021-10-05 12:37:03 +00:00
Tianyu Geng 5ccc5591f5 FIR: add isImplicit to FirThisReceiverExpression 2021-10-05 15:30:40 +03:00
Tianyu Geng a297ee66d4 FIR: suppress VARIABLE_EXPECTED for error reference 2021-10-05 15:30:39 +03:00
Tianyu Geng c572bf05b5 FIR checker: honor DSL marker annotation on the function type
It seems the original function type gets lost during resolution. Hence
thie change added a custom attribute to recover the original function
type on an anonymous function
2021-10-05 15:30:38 +03:00
Tianyu Geng 826ea122a9 FIR checker: DSL_SCOPE_VIOLATION 2021-10-05 15:30:37 +03:00
Tianyu Geng 7aaac2573c FIR: preserve diagnostics in createResolvedNamedReference 2021-10-05 15:30:35 +03:00
Tianyu Geng 1b6fa4303f FIR: make ConeVariableExpectedError an object 2021-10-05 15:30:34 +03:00
Roman Golyshev 9b9c51bc8d [FIR] Fix dispatch receivers on inner classes' constructors
1. Inner class constructor should have its outer class as a dispatch
receiver, since it is necessary for the call. Before it was null
2. Substituted inner class constructor should have its original dispatch
 receiver type with the proper substitution. Before it was set to the
 class itself (since the class was usually passed as a new dispatch
 receiver)

Also, modify FIR renderer, so it properly renders the dispatch receiver
of the constructors
2021-10-05 12:17:08 +00:00
Roman Golyshev 8673819260 [FIR] Add requirement to checkUpperBoundViolated function 2021-10-05 12:17:08 +00:00
pyos 337cbeded1 JVM_IR: do not move receivers on functions with inline class parameters
^KT-48993 Fixed
2021-10-05 13:34:32 +02:00
Denis.Zharkov 3eb3015688 FIR: Do not fail when trying to apply attributes to stub types 2021-10-05 13:48:54 +03:00
Denis.Zharkov 0a3c950e7f FIR: Fix resolution scope of constructor delegation calls 2021-10-05 13:48:53 +03:00
Denis.Zharkov f038b575f1 FIR: Merge FirAbstractTreeTransformerWithSuperTypes and FirTypeResolveTransformer 2021-10-05 13:48:51 +03:00
Alexander Udalov b6ebed0c96 IR serialization: cleanup/optimize DescriptorExportCheckerVisitor
Check if visibility is public API first, then check if declaration is
annotated with `@PublishedApi`. This is needed because loading
annotations and iterating over them can be slow.
2021-10-05 12:18:07 +02:00
Alexander Udalov 4da4719246 IR: slightly optimize IdSignature calculation in SymbolTable
Do not compute IdSignature for descriptor a second time when adding a
new symbol. Instead, pass the calculated signature to the lambda in
declare/declareIfNotExists/referenced, and use it in `reference*`
methods.
2021-10-05 12:18:06 +02:00
Alexander Udalov 1c735948d1 IR: cleanup SymbolTable
Extract duplicated code, remove unused methods and unneeded OptIn.

Also, check original for descriptors only in case the symbol is not
computed yet. Checking it on every access is not needed.
2021-10-05 12:16:24 +02:00