Commit Graph

92085 Commits

Author SHA1 Message Date
Ilya Kirillov 12e0254918 [analysis api] simplify dependent analysis mode tests 2022-04-13 12:52:58 +02:00
Ilya Kirillov 3206c0ce87 [analysis api, refactoring] get rid of HL name in class names 2022-04-13 12:52:57 +02:00
Ilya Kirillov 3838552a75 [analysis api] move some test framework parts to a separate module 2022-04-13 12:52:55 +02:00
Sergey Bogolepov 19658b3a47 [K/N] Disable mutation checks if freezing is disabled 2022-04-13 10:51:37 +00:00
Jinseong Jeon e72dc7d0c9 ULC: use special name for default setter parameter
to match the name appeared at LVT in compiler-generated JVM bytecode
2022-04-12 22:05:24 +02:00
Jinseong Jeon 2763b58cdd RAW FIR: use special name for default setter parameter
FE1.0 descpritor, PSI2IR, and JVM IR backend use that.
FIR2IR is also using that, which implies name "value" in RAW FIR
maybe has not been used anywhere.
2022-04-12 22:05:22 +02:00
Ilya Gorbunov 3778b1fde1 Remove ExperimentalStdlibApi no longer required in tests 2022-04-12 15:03:42 +00:00
Ilya Gorbunov e74a3eb0e9 Promote findAnnotations to Stable #KT-51470 2022-04-12 15:03:41 +00:00
Ilya Gorbunov f3cf8cc13b Hide subarrayContentToString in Native&Wasm 2022-04-12 15:03:40 +00:00
Ilya Gorbunov 1845e326d1 Hide deprecated Double/FloatArray.contains/indexOf/lastIndexOf 2022-04-12 15:03:40 +00:00
Ilya Gorbunov b35c571a23 Remove deprecated sequence and iterator builders
They were originally provided for migration from experimental coroutines

#KT-26678
2022-04-12 15:03:39 +00:00
Ilya Gorbunov 2303730d57 Remove deprecated and not stabilized primitive unsigned iterators 2022-04-12 15:03:38 +00:00
Ilya Gorbunov 4598552e46 Promote Regex.matchAt and matchesAt to Stable #KT-51470 2022-04-12 15:03:37 +00:00
Ilya Goncharov d62b01ef41 [JS] Update lock files
Merge-request: KT-MR-6073
Merged-by: Ilya Goncharov <Ilya.Goncharov@jetbrains.com>
2022-04-12 15:02:21 +00:00
Yahor Berdnikau 2c252f9231 Print in info level logs applied plugin variant
^KT-49227 Fixed
2022-04-12 14:48:49 +00:00
Yahor Berdnikau e8774448ee Allow to register specific variant implementations
Such way those implementations are accessible from the common code.
 To avoid putting stub implementations in every variant, it is also
 possible to add default implementation from the common code if variant
 hasn't register own.

 As an example of usage, support for removed in Gradle 7.0 'maven' plugin
 was moved into 'main' variant (Gradle 6.7.1 - 6.9.3).

 ^KT-49227 In Progress
2022-04-12 14:48:48 +00:00
Yahor Berdnikau 78cc2365b0 Fix gradle api dependency version in variants
Common SourceSet was forcing gradle api version to be the same
in all plugin variants via 'extendsFrom(..)'.

^KT-49227 In Progress
2022-04-12 14:48:48 +00:00
Mads Ager 1e444e0451 [JVM IR] Limit local variables in do-while conditions.
Locals introduced in the body of a do-while loop are not
necessarily live at the do-while condition. For example,
if there is a continue in the body before the declaration:

    do {
      if (shouldContinue(x))
        continue
      val y = 32  // not always defined in the condition
      doSomething(y)
    } while (x < 2)

For locals referenced in the condition such code is rejected
by the frontend because a local referenced in the condition
must be always defined when you get there.

However, locals that are not used in the condition were always
put in the local variable table. This leads to invalid locals
information which can trip of debuggers and other build tools
such as the D8 dexer.

This patch only puts in locals information for locals actually
referenced in the local variable table for the condition.

^Fixes KT-51754
2022-04-12 15:47:14 +02:00
Roman Golyshev 32fa2fc476 [FIR] Resolve receiver in qualified expressions with no selector
In qualified expression like `foo().`, selector expression is null.
Because of that the whole expression was marked as an error FIR
expression, and `foo()` part was not resolved at all (including
arguments and everything else).

This commit fixes the problem by providing receiver's FIR expression
as an underlying expression for error FIR expression. That way
it will be seen by all resolve transformers and will be successfully
resolved.

^KTIJ-21484 Fixed
2022-04-12 10:55:12 +00:00
Pavel Punegov 3b53d8694f [K/N][build] Fix build version property usage 2022-04-12 08:33:31 +00:00
Yahor Berdnikau 85689f4eb3 Fix jvmTarget was not set on reusing configuration cache.
When project has toolchain configured and on reusing configuration
cache, 'filteredMapArguments' input was calculated without actual
value of `jvmTarget` provided by toolchain leading to non-UP-TO-DATE
KotlinCompile task state.

^KT-51937 Fixed
2022-04-12 08:32:30 +00:00
Svyatoslav Scherbina 1dae506198 Mention concurrent sweep in kotlin-native/NEW_MM.md 2022-04-12 07:11:21 +00:00
Svyatoslav Scherbina 956cd1ebde Update kotlin-native/NEW_MM.md to Kotlin 1.6.20 and Ktor 2.0.0
Also use "memory manager" instead of "memory model", since this is more correct and matches other documents.

Co-authored-by: Sergey Bogolepov <sergey.bogolepov@jetbrains.com>
2022-04-12 07:10:46 +00:00
konstantin.tskhovrebov c82b1d3e33 KT-51884 Skip XCFramework and FatFramework tasks on non-mac machines. 2022-04-12 06:52:46 +00:00
Nikolay Krasko 8bc29a3011 Apply reproducible-build-maven-plugin to fix ordering in resulting jars
Plugin https://github.com/Zlika/reproducible-build-maven-plugin has
an Apache 2-0 licence.

There's an explicit mentioning that ZIP and
JAR entries ordering `depends on file system order` at
https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=74682318

kotlin-annotation-processing-maven-{version}-sources.jar
kotlin-archetype-js-{version}-sources.jar
kotlin-archetype-jvm-{version}-sources.jar
kotlin-maven-allopen-{version}-sources.jar and other jars were affected.

KTI-729
2022-04-11 21:38:04 +00:00
pyos d61e7db937 JVM_IR: add a test for when(enum) binary compatibility 2022-04-11 22:50:07 +02:00
pyos 518a6dec8c JVM_IR: ignore NoSuchFieldError when constructing enum mappings
^KT-30473 Fixed
^KT-38637 Fixed
2022-04-11 22:50:07 +02:00
Artem Kobzar fc4c745cc4 chore: remove usage of globalscope declaration. 2022-04-11 20:33:20 +00:00
Artem Kobzar f142599243 feat: add limited support of comments inside js call. 2022-04-11 17:03:28 +00:00
Mads Ager bfe8c3b263 Use method entry line number for synthetic code in suspend fun.
If no line number is emitted, the line number of the last line
in the suspend function is used. That combined with the IntelliJ
debuggers handling of breakpoint setting and the D8 dexers
reordering of blocks can lead to cases where breakpoints on
the last line of a suspend function are never hit.

See https://youtrack.jetbrains.com/issue/KT-51936 for details.

^Fixed KT-51936
2022-04-11 17:00:40 +00:00
pyos a07e21d913 JVM: streamline handling of tail-call suspend functions
Just see if every suspend call is followed only by safe instructions or
returns, then insert a suspension point check if there isn't a direct
return.

The first part of this is equivalent to the old implementation, just
refactored. The second part generates strictly more checks; see, for
example, the fixed test, in which the previous implementation failed to
insert a check before a CHECKCAST.

^KT-51818 Fixed
2022-04-11 17:00:26 +00:00
Artem Kobzar 97fc97e63d chore: add miss internal modifier to internal annotation. 2022-04-11 14:25:49 +00:00
Artem Kobzar 7d7490eaa7 chore: fixe rest of comments tests. 2022-04-11 14:25:49 +00:00
Artem Kobzar f5e7b9886c fix: directive and line test. 2022-04-11 14:25:48 +00:00
Artem Kobzar e68ee4053e fix: add semicolon to pattern for parsing directive arguments. 2022-04-11 14:25:48 +00:00
Artem Kobzar 4e8082ad3a fix: arguments pattern for assertion directives. 2022-04-11 14:25:48 +00:00
Artem Kobzar 86df391cab fix: function body comments. 2022-04-11 14:25:47 +00:00
Artem Kobzar 672561b847 chore: remove unused import. 2022-04-11 14:25:47 +00:00
Artem Kobzar 45e3c94a8b feat: add limited support of comments inside js call. 2022-04-11 14:25:46 +00:00
Ilmir Usmanov 6e30ce2763 FE: Make synchronized suspend functions and lambdas error in 1.8
#KT-27333 Fixed
2022-04-11 12:02:30 +00:00
Ilmir Usmanov f473998e8b FIR: Make 'suspend fun', where 'suspend' is not builtin error in 1.8
#KT-49264
2022-04-11 12:02:29 +00:00
Ilmir Usmanov f75a8109d2 FE 1.0: Make 'suspend fun', where 'suspend' is not builtin error in 1.8
#KT-49264 Fixed
2022-04-11 12:02:28 +00:00
Ilya Goncharov 1c2604a95e rra/ilgonmic/dry-run-wo-output
[Gradle, JS] Use assertOutputDoesNotContain

[Gradle, JS] Add test on no output for dry run in gradle tests

[Gradle, JS] No output for dry run in gradle tests

Merge-request: KT-MR-6029
Merged-by: Ilya Goncharov <Ilya.Goncharov@jetbrains.com>

^KT-51895 fixed
2022-04-11 10:38:27 +00:00
Artem Kobzar c724ca943d test: add labels and breaks count tests. 2022-04-11 10:37:21 +00:00
Artem Kobzar 12f337f63d chore: fix meterialize argument annotation. 2022-04-11 10:37:19 +00:00
Artem Kobzar d46db2a9f3 fix: block statements rendering. 2022-04-11 10:37:18 +00:00
Artem Kobzar e405799b3b chore: use fqName instead of custom crafted name. 2022-04-11 10:37:16 +00:00
Artem Kobzar 7ef14fc11b chore: use CompositeBlock instead of GlobalBlock. 2022-04-11 10:37:14 +00:00
Artem Kobzar c6136619d2 chore: remove unreadable blocks and use comments instead. 2022-04-11 10:37:13 +00:00
Artem Kobzar fba4ac12b7 chore: remove unused break statement for inline functions. 2022-04-11 10:37:11 +00:00