Commit Graph

97453 Commits

Author SHA1 Message Date
Pavel Punegov b9b2713a96 [K/N][perf] Rewrite UI part to kts 2022-12-20 09:07:18 +00:00
Pavel Punegov 315b59e0d6 [K/N][perf] Rewrite performance server's build
Rewrite to KTS and use JS-IR backend
2022-12-20 09:07:18 +00:00
Pavel Kunyavskiy 09b7c483dd [K/N] Switch to http basic auth in performance infra
^KT-52473
2022-12-20 09:07:17 +00:00
Bogdan Mukvich e97ecc13b0 Cleanup pre-push hook
KTI-673
2022-12-20 08:53:41 +00:00
Dmitriy Novozhilov d75160250d [FIR] Drop transformExtensionReceiver and transformDispatchReceiver from FirQualifiedAccess
After removal of `StoreReceiver` transformers those methods are not used
  anymore, so it's ok to remove them at all
2022-12-20 08:12:10 +00:00
Dmitriy Novozhilov 02e327277e [FIR] Report VAL_REASSIGNMENT on assign to non-local vals
In this commit reporting on member properties in init section of class
  is not supported (see KT-55528)

^KT-55493 Fixed
2022-12-20 08:12:09 +00:00
Dmitriy Novozhilov e87a064cdd [FIR] Report VARIABLE_EXPECTED on assign to this 2022-12-20 08:12:09 +00:00
Dmitriy Novozhilov 9ccbf8639d [FIR] Add dispatchReceiverType to FirAnonymousInitializer
This is needed to add ability to quickly find class to which initializer
  belongs
2022-12-20 08:12:09 +00:00
Dmitriy Novozhilov edd7468d5b [FIR] Get rid of StoreType transformer 2022-12-20 08:12:08 +00:00
Dmitriy Novozhilov 4ba92f66c0 [FIR] Get rid of TransformImplicitType transformer 2022-12-20 08:12:08 +00:00
Dmitriy Novozhilov f8ef55ad16 [FIR] Get rid of StoreNameReference and StoreCalleeReference
All usages of it are replaced with `replaceCalleeReference`
2022-12-20 08:12:08 +00:00
Dmitriy Novozhilov 3f8beb0b52 [FIR] Get rid of StoreReceiver
All usages of it are replaced with `replaceXXXReceiver`
2022-12-20 08:12:07 +00:00
Dmitriy Novozhilov d45ae59d33 [FIR] Add methods to replace dispatch and extension receivers 2022-12-20 08:12:07 +00:00
Dmitriy Novozhilov 4bddb27ca3 [FIR] Get rid of candidateSymbol in FirNamedReference
`candidateSymbol` has any reasonable meaning only for references with
  not completed candidate, so this property is moved from FirNamedReference
  to new node FirNamedReferenceWithCandidateSymbol, which has real
  implementation only in :resolve module (`FirNamedReferenceWithCandidate`)
2022-12-20 08:12:07 +00:00
Sergey Bogolepov 366edcfe3c [K/N] Drop obsolete static driver 2022-12-20 06:30:36 +00:00
Sergey Bogolepov 7706ad8cb3 [K/N] Enable dynamic and static output for dynamic driver 2022-12-20 06:30:36 +00:00
Yahor Berdnikau 2e5981eb94 Fix eager Kotlin/JVM task configuration on Gradle 7.3+
^KT-54836 Fixed
2022-12-19 21:00:12 +00:00
Sergej Jaskiewicz f8e6c59600 Add compatibility aliases for declarations moved from other packages
1539d7ef1a brought some package names in
sync with the directory layout. However, this broke some third-party
code that used classes from those packages.

The new compatibility aliases allow that code to continue to compile.
Deprecation warnings will be emitted, suggesting to replace the imported
packages with new ones.
2022-12-19 19:42:05 +00:00
Sergey Bogolepov f5fa8f2b83 [CODEOWNERS] K2NativeCompilerArguments.kt to native team 2022-12-19 17:41:48 +00:00
Abduqodiri Qurbonzoda fb31a29c39 [K/N] Fix stack overflow in regex when a quantifier is matched many times
Motivation:

Users often expect simple patterns, like `[a]+` or `[^a]+`, to work fast
and without any problems, even with long strings.
Char class from the first pattern matches only 'a' and gets wrapped into
LeafQuantifierSet, and works fine with long strings indeed.
Char class from the second pattern, however, matches any character
except 'a', including supplementary code points. So, the number of chars
it consumes is not known beforehand. There is no optimization for such
char classes, and if they are matched multiple times, the stack memory
gets exhausted.

Modification:

Introduce FixedLengthQuantifierSet node.
The node represents quantifier over constructs that consume a fixed
amount of characters for a given string and index. Such constructs don't
need backtracking to find a different match. Thus, it is possible for
the node to avoid recursion when matching multiple times.

Result:

Fixes KT-46211, KT-35508 and probably KT-39789. Reproducer for the
latter issue is no longer available, but error stacktrace resembles
those of the other issues.
2022-12-19 16:40:51 +00:00
Abduqodiri Qurbonzoda 6e50bbee3b [K/N] Set mayContainSupplCodepoints flag only when alt is updated
Motivation:

Calling AbstractCharClass.setNegative always leads to
mayContainSupplCodepoints being `true`, even when `alt` is already
equal to the argument. Given that CharClass always calls setNegative
with its constructor parameter - `negative`, mayContainSupplCodepoints
always gets set. i.e. `[a]` will have mayContainSupplCodepoints set.
mayContainSupplCodepoints affects what node (RangeSet or SupplementaryRangeSet)
wraps this char class. See Pattern.processRangeSet.
RangeSet is better optimized and avoids recursion when it is quantified.

Modification:

Set `mayContainSupplCodepoints` flag only when `alt` is updated.
When `alt` is updated, this char class gets inverted, hence now may
contain supplementary code points.
Otherwise, content of this char class does not change, i.e. no new
supplementary code points is added.

Result:

Fixes KT-46211.
2022-12-19 16:40:51 +00:00
Abduqodiri Qurbonzoda d7f166eda3 [K/N] Remove unused SupplementaryCharSet in regex
Motivation:

The node was never used. Perhaps, it was copied from apache harmony
but ultimately, despite possible performance impact, SequenceSet was
used instead. See Pattern.processCharSet and AbstractSet.first.
The performance impact wouldn't be noticeable anyway.

Modification:

Keeping unused code in project is not a good practice, so get rid of it.

Result:

Less code to maintain.
2022-12-19 16:40:50 +00:00
Yahor Berdnikau dc4ddebe2f Change compiler/daemon owner to Kotlin Build Tools 2022-12-19 15:58:05 +00:00
Nikolay Krasko 74dd31d00a Call additional publishToMavenLocal in maven build scripts and enable info
'publish' do not publish all artifacts to maven local and maven
fails because of it as it can't find dependencies.

KTI-729
2022-12-19 14:40:52 +00:00
Mads Ager d87ed38cbf [Kotlin/Native] Avoid jni overhead when optimizing bitcode.
The phase to eliminate redundant function prologue safepoints
was written in Kotlin which meant that it was performing a lot
of jni calls. Moving the simple optimization to C code speeds
things up dramatically.

On a large project this reduces the time for this phase from
11.8 seconds to 1.4 seconds.
2022-12-19 11:13:24 +00:00
Evgeniy.Zhelenskiy 53b98503ed [IR] Support MFVC properties without backing fields
Signed-off-by: Evgeniy.Zhelenskiy <Evgeniy.Zhelenskiy@jetbrains.com>

#KT-1179
2022-12-18 22:11:23 +00:00
Sergey.Shanshin 5e01669e23 Added saving SerialInfo annotations to the enum class
Resolves Kotlin/kotlinx.serialization#2121

Merge-request: KT-MR-8019
Merged-by: Sergey Shanshin <Sergey.Shanshin@jetbrains.com>
2022-12-18 19:22:16 +00:00
Ilya Chernikov 88d140527f Scripting: optimize check for allowed scripts on init 2022-12-18 16:49:41 +00:00
Vyacheslav Gerasimov 9ca24b6965 Build: Remove parcelize tests from compilerPluginTest root task 2022-12-18 13:51:23 +01:00
Vyacheslav Gerasimov bfbeb2763f Build: Run only js tests with jsCompilerTest root task 2022-12-18 13:51:23 +01:00
Mikhail Glukhikh af96c735bb K2: use PUBLICATION mode for lazy members in KtSourceElement
This commit removes performance problems during these members access
2022-12-17 21:44:58 +00:00
Igor Chevdar 0e4e53786c [K/N] Fixed a problem with built coroutine visibility
#KT-55494 Fixed
2022-12-16 18:32:43 +00:00
Igor Chevdar 0f2ebeea15 [tests] Added a test for KT-55494 2022-12-16 18:32:42 +00:00
Artem Vasilev 1e1f96f73e [LL FIR] fix more possible NPEs at lock access
Depending on the execution, some accesses to lock could cause NPE.
The best solution we've found so far is to make lock volatile, so that
reads between lock and value are consistent between threads.
It requires further work to determine if we can have one volatile field.
2022-12-16 17:56:49 +00:00
Artem Vasilev 04924dbfed [LL FIR] replace guard with ReentrantLock.holdCount
Previously, there was a guard variable that prevented recursive
locks. It can be replaced with lock.holdCount check.
2022-12-16 17:56:49 +00:00
Artem Vasilev 879f6c3432 [LL FIR] restructure lock assertion to prevent NPEs
When the other thread has already computed the value and cleared the
lock, the other thread could still enter the computeValueWithoutLock()
and see lock == null
2022-12-16 17:56:49 +00:00
Yahor Berdnikau 11bc3dbd82 Undeprecate missed kotlinOptions deprecation
^KT-54580 Fixed
2022-12-16 17:25:50 +00:00
Yahor Berdnikau 860d3fda95 Undeprecate 'kotlinOptions' DSL
'@ReplaceWith' is not that flexible in this case and proper IDE support
required for smooth migration. After such migration in IDE will be added
 - deprecation should be restored.

 ^KT-54399 Fixed
2022-12-16 17:25:49 +00:00
mcpiroman a244aaf162 KT-53957 Fix indy lambdas with extension and context receivers (#5021) 2022-12-16 17:47:58 +01:00
Sebastian Sellmair b6682d1789 [Gradle] IdeaKotlinClasspath: Use Intener implementation from kotlin-tooling-core
^KT-55475 Verification Pending
2022-12-16 16:46:16 +00:00
Sebastian Sellmair 71fac797ee [kotlin-tooling-core] Implement generic Interner
^KT-55475 Verification Pending
2022-12-16 16:46:16 +00:00
Sebastian Sellmair 84fdc5e3df [Gradle] Cleanup shared run configurations
^KT-55475 Verification Pending
2022-12-16 16:46:15 +00:00
Sebastian Sellmair ca32347c91 [Gradle] Add IdeaKotlinClasspathSerializationTest.test - empty ByteArray
^KT-55475 Verification Pending
2022-12-16 16:46:15 +00:00
Sebastian Sellmair e19d5768e2 [Gradle] Add documentation on IdeaKotlinProjectArtifactDependency.artifactsClasspath
^KT-55475 Verification Pending
2022-12-16 16:46:15 +00:00
Sebastian Sellmair aed8c323e4 [Gradle] Fix IdeSourceDependencyResolutionTest after 9f810116
^KT-55475 Verification Pending
2022-12-16 16:46:14 +00:00
Sebastian Sellmair 38f310467a [Gradle] Implement IdeaKotlinClasspath interner
This very simple interner mechanism ensures that when import runs
within the IDE process, we de-duplicate existing file instances.

This might have an effect, because during GradleProjectResolution
we could have plenty source sets that refer to the same
files.

^KT-55492 Verification Pending
2022-12-16 16:46:14 +00:00
Sebastian Sellmair e32cff3b38 [Gradle] Implement IdeMultiplatformImport using new IdeaKotlinClasspath
^KT-55492 Verification Pending
2022-12-16 16:46:13 +00:00
Sebastian Sellmair 53c5444a7a [Gradle] kgp-idea: Compatibility tests: bump version to 1.8.20-dev-4242
KT-55492
2022-12-16 16:46:13 +00:00
Sebastian Sellmair 4eb5641e2a [Gradle] Implement IdeaKotlinClasspath concept
KT-55492
2022-12-16 16:46:13 +00:00
Evgeniy.Zhelenskiy f6c63c6e4f [IR, Serialization] Support kotlinx-based (de)serialization of MFVC, nullable MFVC value assignment to nonnull variable
Signed-off-by: Evgeniy.Zhelenskiy <Evgeniy.Zhelenskiy@jetbrains.com>

#KT-1179
2022-12-16 17:20:51 +01:00