Commit Graph

87884 Commits

Author SHA1 Message Date
Anton Bannykh dbbc30a6a2 [JS IR] enable per-module by default 2021-12-01 16:50:22 +03:00
Anton Bannykh af134912be [JS IR] fix test data 2021-12-01 16:50:20 +03:00
Anton Bannykh 9c4c798fe7 [JS IR] mute tests with wrong linkage 2021-12-01 16:50:16 +03:00
Sergej Jaskiewicz 1300d9604a fixup! [JS IR] [runtime] Remove valueOf method from Long
fix the test for the legacy backend
2021-12-01 12:36:35 +00:00
Sergej Jaskiewicz e13b6b2a90 [JS IR] [runtime] Remove valueOf method from Long
This method was used for coercing `Long` values to JavaScript
`number`. However, it caused issues when `Long` values were
concatenated to a string (see KT-8666, KT-26706).
2021-12-01 12:36:34 +00:00
Margarita Bobova 3b98c330fd Add changelog for 1.5.32 2021-12-01 14:34:20 +03:00
Sergey Bogolepov 0eb0d2c10e [K/N] Fix performance suite after update to Xcode 13 2021-12-01 09:53:53 +00:00
Ilya Goncharov 2e350a10bd [Gradle, JS] Windows environment for not ignoring scripts 2021-12-01 09:18:37 +00:00
Ilya Goncharov d4953cb51a [Gradle, JS] Separately add arguments for kotlin npm install
^KT-49902 fixed
2021-12-01 09:18:36 +00:00
Dmitry Petrov 52a3713c9c JVM small optimization in temporary vals elimination 2021-12-01 12:13:17 +03:00
Dmitry Petrov f3ca0afd34 JVM run temporary variable elimination before inlining 2021-12-01 12:13:16 +03:00
Dmitry Petrov de3203ee48 JVM KT-49903 prohibit reordering of 'getstatic System.out' 2021-12-01 12:13:13 +03:00
Sergey Bogolepov dfa6507cae [K/N] Bump Apple SDK versions 2021-12-01 08:49:51 +00:00
Sergey Bogolepov 10b48296e8 [K/N] Fix FrameworkTest in case of simulator target
As of Xcode 13.1 Swift 5.5 passes wrong libclang_rt to simulator targets
(similar to ours KT-47333). To workaround this problem, we explicitly
provide the correct one.
2021-12-01 08:49:51 +00:00
Sergey Bogolepov 3ef97511f6 [K/N] Fix testStackTraceFramework test after Xcode update 2021-12-01 08:49:51 +00:00
Sergey Bogolepov 9b06df48e4 [K/N] Update Xcode version to 13.1 2021-12-01 08:49:50 +00:00
Dmitriy Novozhilov dd17e98266 Revert changes in .idea/vcs.xml 2021-12-01 11:49:36 +03:00
Denis.Zharkov 6082f0b712 FIR2IR: Postpone binding overrides for lazy classes until sources processed 2021-12-01 08:32:20 +00:00
Denis.Zharkov 78ba49ddd8 FIR2IR: Make a component for Fir2IrConverter 2021-12-01 08:32:20 +00:00
Denis.Zharkov 60073239bb FIR2IR: Introduce non-static main conversion method to Fir2IrConverter 2021-12-01 08:32:20 +00:00
Pavel Kunyavskiy 9b366af38b [K/N] Fix String.compareTo on unicode strings
^KT-49873
2021-12-01 07:51:27 +00:00
Pavel Kunyavskiy 8b4540f7e4 [K/N] Add test for suspend function inheritance in ObjCExport
^KT-49395
2021-12-01 07:50:39 +00:00
Alexander Udalov d3e9ea0aae Prepare kotlinx-metadata-jvm 0.4.1 for release 2021-12-01 01:05:22 +01:00
Morten Krogh-Jespersen 544689dc4f Add getter for syntheticMethodForDelegate in JvmExtensions 2021-12-01 01:05:22 +01:00
Kristoffer Andersen 0dd5ad08f3 [EE-IR] Support inline functions in IR evaluator
Inline functions called by the fragment is detected by the fragment
frontend and the PSI for them is supplied to the compiler backend.

For the purpose of compilation, the inline function is considered as
part of the same source module as the fragment, and then discarded
upon loading the compiled fragment for evaluation.
2021-12-01 00:52:46 +01:00
Kristoffer Andersen 39fee12f32 [IR/FE] BindingContext: Change USED_AS_EXPRESSION to Basic Slice
This commit changes the slice implementation used for
`USED_AS_EXPRESSION`.

Here is the problem as identified and mitigated by this commit:

Slices are key-value maps. They are not total over the domain of keys,
so "looking up" a key not in the slice is a valid operation, yielding
`null`.

A binding context is a collection of slices.

Binding contexts can be stacked as composite binding contexts to
e.g. facilitate scoped analyses. Looking up a key proceeds down the
stack, yielding the first non-null value, or `null` if no slice in the
stack of binding contexts contain that key.

A slice made by `createSimpleSetSlice` models a "set" of keys that can
be enlarged by inclusion: adding `(k, true)` to the slice indicates
`k` belongs to the set. `(k, false)` indicates non-membership.

However, looking up a key _not in_ the slice yields _false_, rather
than null.

Hence, simple set slices do not compose in composite binding traces.

This was encountered porting the expression evaluator to the IR
backend. PSI2IR uses `USED_AS_EXPRESSION` to generate expression body
functions properly. The frontend analysis of the fragment is layered
ontop of the binding context from the editor's analysis of the
underlying project being debugged, which contains speficially the
analysis results of inline functions called from the fragment.
2021-12-01 00:52:46 +01:00
Ilya Kirillov a70c336c2c Analysis API: fix constructor return type for FE1.0 implementation 2021-11-30 18:02:33 +01:00
Tianyu Geng 6e555e1d28 FE1.0 Analysis API: fix getReturnTypeForKtDeclaration for setter parameter 2021-11-30 18:02:33 +01:00
Tianyu Geng f1d0791f15 Analysis API: add test for KtDeclaration.getReturnKtType
FE1.0 always return kotlin.Unit as return type for constructors while
FIR returns the constructed class type. I am not sure which is more
desirable. Also, I am not sure how to make FE1.0 behave the same way.
2021-11-30 18:02:33 +01:00
Sergej Jaskiewicz 0e93931e24 Remove .idea/misc.xml 2021-11-30 16:47:51 +00:00
Anton Bannykh 1696628b5e [JS IR] temporarily disable .ts compilation for tests
Current task crashes on Windows.
2021-11-30 19:18:16 +03:00
Alexander Udalov 8a7d86c4e5 Build: remove obsolete argument -Xskip-runtime-version-check
It was removed in KT-41664.
2021-11-30 17:13:10 +01:00
Ilmir Usmanov 8e8a6e6108 Do not count receivers in default parameters mask
If we implement default function with default parameters in inline
class, the receivers will be added to parameter list
(see ac7538a269). But since they
are not present in source parameters, we should not count them when we
compute mask for default parameters.

 #KT-49977 Fixed
2021-11-30 15:09:16 +00:00
Mikhail Glukhikh 7ccd1309e6 FirToConstantValueTransformer: extract lazy dispatchReceiverValue 2021-11-30 18:00:02 +03:00
Mads Ager f220e4a5ed [FIR] Fix a couple of issues in annotation serialization. 2021-11-30 18:00:00 +03:00
konstantin.tskhovrebov 3dd27b9b1f Add integration tests for new K/N library DSL. 2021-11-30 17:51:58 +03:00
konstantin.tskhovrebov 2e86fbd2b5 Add new DSL for configuring K/N xcframework artifact. 2021-11-30 17:51:57 +03:00
konstantin.tskhovrebov 43fe1e52c9 Add new DSL for configuring K/N fatframework artifact. 2021-11-30 17:51:57 +03:00
konstantin.tskhovrebov 3f40af10dc Add new DSL for configuring K/N framework artifact. 2021-11-30 17:51:56 +03:00
konstantin.tskhovrebov cfdd5673ee Add new DSL for configuring K/N library artifact. 2021-11-30 17:51:56 +03:00
konstantin.tskhovrebov 17fe4f67e5 Add new compilation independent KotlinNativeLinkArtifactTask. 2021-11-30 17:51:55 +03:00
konstantin.tskhovrebov bbc43cde74 Change FileCollection to List<File> for K/N argument builder. 2021-11-30 17:51:54 +03:00
Dmitriy Novozhilov f12a010fc8 [Test] Fix file separators in generated spec tests on windows
^KTI-713 Fixed
2021-11-30 17:02:55 +03:00
Sergey Bogolepov da5c86cc1e [K/N] Add missing watchos_simulator_arm64 to watchOS set_depends.sh 2021-11-30 13:02:01 +00:00
Sergey Bogolepov b0077dce88 [K/N] Speedup defFileDependencies by running it in parallel 2021-11-30 13:02:01 +00:00
Ilya Goncharov b47925b126 [JS] Update mocha and mocha-teamcity-reporter in test infrastructure
Merge-request: KT-MR-5129
2021-11-30 12:24:56 +00:00
Hung Nguyen 6ba1b2cc08 KT-45777: Don't include classpath snapshot dir in task output backup
for performance reasons: (1) the snapshots are too big, and (2) they are
usually updated only at the end of the task execution--in a failed task
run, they are usually unchanged and therefore don't need to be restored.
2021-11-30 13:59:19 +03:00
Hung Nguyen 062a8fe56f KT-45777: Ignore Kotlin synthetic classes when computing classpath changes 2021-11-30 13:59:17 +03:00
Hung Nguyen 2b65d673bb KT-45777: Also collect added classes/class members as classpath changes
as they can impact recompilation (examples shown in the code comments).

Test: Updated ClasspathChangesComputerTest
2021-11-30 13:59:17 +03:00
Hung Nguyen 8c611e0b4d KT-45777: Add -dontwarn com.google.gson.** to Proguard rules
The previous commit added gson to `incremental-compilation-impl` module.
However, gson is currently not added to -libraryjars for Proguard, so
running with -Pteamcity=true would fail with
```
> Task :kotlin-compiler:proguard
Warning: ... can't find referenced class com.google.gson.Gson
Warning: ... can't find referenced class com.google.gson.GsonBuilder
   You may need to add missing library jars or update their versions.
   If your code works fine without the missing classes, you can suppress
   the warnings with '-dontwarn' options.
   (http://proguard.sourceforge.net/manual/troubleshooting.html#unresolvedclass)
```

This commits adds -dontwarn com.google.gson.** to work around this
error. The proper fix is probably to add gson (and many other libraries)
to Proguard's -libraryjars.
2021-11-30 13:59:16 +03:00