Dmitriy Novozhilov
b9dd73220c
[FIR] Update testdata after rebase
2021-08-06 22:57:19 +03:00
Dmitriy Novozhilov
1d491fdce6
[FIR] Don't create union call node for lambda from one when branch and call from condition of another
2021-08-06 22:57:18 +03:00
Tianyu Geng
684ef871ee
FIR: unify common special names scattered around the code base
2021-08-06 22:57:17 +03:00
Tianyu Geng
263b876e6e
FIR: extends scope of SENSELESS_COMPARISON
...
FE1.0 only reports SENSELESS_COMPARISON if one of the operand is `null`.
This change makes FIR reports also in case one of the operand has type
`Nothing?`.
In addition, fix handling of type alias in ConeTypeContext#isNullableType
2021-08-06 22:57:17 +03:00
Tianyu Geng
c7272f6986
FIR checker: SENSELESS_(COMPARISON|NULL_IN_WHEN)
...
Currently DFA does not set "definitely equal to null" for access to variables that got assigned `null`. For example, FIR should mark the following line as SENSELESS_COMPARISON due to `s = null` above.
https://github.com/JetBrains/kotlin/blob/d1531f9cdd5852352c0133198706125dc63b6007/compiler/testData/diagnostics/tests/smartCasts/alwaysNull.fir.kt#L6
The problem is at https://github.com/JetBrains/kotlin/blob/7e9f27436a77de1c76e3705da7aa1fbe8938336b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/dfa/FirDataFlowAnalyzer.kt#L1104
For null assignment, ideally the type should be `Nothing?`. This is
addressed in a followup commit instead.
2021-08-06 22:57:16 +03:00
Tianyu Geng
4726dcce40
FIR DFA: smartcast variable to Nothing? on null assignment
...
In order to make resolution still work for members not available from
`Nothing`, we track the type without `Nothing?` and use that for
resolution instead.
2021-08-06 22:57:15 +03:00
Tianyu Geng
7e2f15f532
FIR DFA: fix logic clear aliasing
...
The logic should clear back aliases as well. To ensure all back aliases
don't lose any information, statements on the original variable are
copied over to its aliases.
2021-08-06 22:57:15 +03:00
Tianyu Geng
e495c722c7
FIR DFA: fix handling of equality operation
2021-08-06 22:57:14 +03:00
Tianyu Geng
0026560bd7
FIR: substitute the whole lambda body after builder inference
2021-08-06 22:57:13 +03:00
Tianyu Geng
f737d8002e
FIR: allow no else branch for when on Nothing(?)
2021-08-06 22:57:12 +03:00
Tianyu Geng
e242ad955b
FIR: tolerate comparison of an intersection of incompatible types
...
Previously, if user compares an `it<String, Int>` with `String`, the
checker reports it since the flattened types `[String, Int, Int]` are
incompatible. But technically, before flattening, the intersection type
actually contain the other side, so they should really be compatible.
2021-08-06 22:57:11 +03:00
Yahor Berdnikau
b5ea811b9f
Migrated BuildCacheIT tests to new DSL.
...
^KT-45745 In Progress
2021-08-06 20:09:05 +02:00
Yahor Berdnikau
20afb268d1
Allow providing specific kapt options.
...
^KT-45745 In Progress
2021-08-06 20:09:04 +02:00
Yahor Berdnikau
3d4186bdb1
Allow enabling build cache debug information.
...
^KT-45745 In Progress
2021-08-06 20:09:04 +02:00
Yahor Berdnikau
e949a0d38d
Add assertion checking if task was put into build cache.
...
^KT-45745 In Progress
2021-08-06 20:09:00 +02:00
Roman Artemev
2574c00dd9
Add index() to LocalSignature for more clear access
2021-08-06 20:49:20 +03:00
Roman Artemev
5a7298808e
[JVM KLIB] Fix Type Parameter resolve
2021-08-06 20:49:19 +03:00
Roman Artemev
3dcee8fda8
[KLIB] Optimize deserialization a bit
2021-08-06 20:49:19 +03:00
Roman Artemev
7add820f0d
[JS IC] Simplify code a bit
2021-08-06 20:49:17 +03:00
Roman Artemev
398b545801
[JS IC] Rollback hack
2021-08-06 20:49:17 +03:00
Roman Artemev
67f814c99f
[JS IC] Don't serialize IrTypeAbbreviation in IC cache
2021-08-06 20:49:15 +03:00
Roman Artemev
d174e8c3d2
small optimization
2021-08-06 20:49:14 +03:00
Roman Artemev
9bfe502afd
[JS IC] Fix signature finding in some cases
...
Found in KFSAD
2021-08-06 20:49:13 +03:00
Roman Artemev
15648da2b4
[PIR] Use simple fast hashCode
2021-08-06 20:49:12 +03:00
Roman Artemev
11f70412e7
[KLIB] Don't resolve delegated symbol where it could be existed
2021-08-06 20:49:12 +03:00
Roman Artemev
297e0a9f43
[JS IC] Improve IC deserializer code a bit
2021-08-06 20:49:11 +03:00
Roman Artemev
6ca87dc43f
[KLIB] Drop useless set
2021-08-06 20:49:10 +03:00
Roman Artemev
aeea7147fe
[JS IC] Simplify code a bit more
2021-08-06 20:49:09 +03:00
Roman Artemev
28cf9898ef
[KLIB] Simplify file symbol resolve
2021-08-06 20:49:08 +03:00
Roman Artemev
6cd0d81561
[JS IC] Drop redundant enqueue
2021-08-06 20:49:07 +03:00
Roman Artemev
b1eeb1fb27
[JS IC] Don't persist temporary copies of inline functions
...
- drop special `IrValueParameterPublicSymbol`
- drop special `IrAnonymousInitializerPublicSymbolImpl`
- drop hacky `useGlobalSignatures`
2021-08-06 20:49:06 +03:00
Roman Artemev
b1251c1716
[JS IC] Drop special IdSignatureSerializer for IC
2021-08-06 20:49:04 +03:00
Roman Artemev
4a601ebf95
[JS IC] Eradicate GlobalScopeLocalDeclaration from code
...
- Normalize proto names
2021-08-06 20:49:03 +03:00
Roman Artemev
74d8e16d09
[JS IC] Eradicate GlobalFileLocalSignature from code
...
- Reduce usage of global maps
2021-08-06 20:49:02 +03:00
Roman Artemev
a0449892b2
[JS IC] Simplify signatures, don't use GlobalScopeLocalDeclaration
2021-08-06 20:49:01 +03:00
Roman Artemev
3d3c70141c
[JS IC] Properly handle type parameters of Functional interfaces
...
- drop redundant `IrSymbolTable` and `IrIcModuleDeserializerWithBuiltIns`
2021-08-06 20:48:59 +03:00
Roman Artemev
6aed492703
[JS IR] Set proper visibility for static stub of private members
2021-08-06 20:48:58 +03:00
Yahor Berdnikau
bcf08e3293
Set jvm target validation mode to 'error'.
2021-08-06 17:53:45 +02:00
Yahor Berdnikau
d375c52830
Remove deprecated 'kotlin.useFallbackCompilerSearch' property.
...
^KT-46719 Fixed
2021-08-06 15:36:46 +00:00
Igor Laevsky
331681b40b
WASM: Add different debug levels to the test runner
2021-08-06 17:34:22 +03:00
Igor Laevsky
5db8ec6551
WASM: Don't use intrinsics to specify NaN's
2021-08-06 17:34:21 +03:00
Igor Laevsky
4ffed54f76
WASM: Fix JS runner for standalone compiles
2021-08-06 17:34:20 +03:00
Sergey Bogolepov
18bb287d3b
[K/N] Switch from cyclone to apple-a7 for Apple AArch64
...
This change shouldn't affect behaviour, but rather makes bitcode a bit
more consistent with what Xcode generates.
2021-08-06 14:19:42 +00:00
Sergey Bogolepov
d64cb24643
[K/N] Don't pass -target-cpu to clang
...
It is not supported by bitcode embedding on Apple platforms.
Instead, we set it in function attributes directly as Clang does.
2021-08-06 14:19:41 +00:00
Dmitriy Novozhilov
3a210f6c81
[Test] Temporary mute some tests because of problems with RepeatedAnnotationLowering
...
^KT-48131
2021-08-06 16:40:16 +03:00
Dmitriy Novozhilov
cbef031780
Advance bootstrap to 1.6.0-dev-2458
2021-08-06 16:40:07 +03:00
Aleksei.Cherepanov
a4a1d35021
Simplify nested errors
...
Replace incomprehensible IndexOutOfBoundsException with intelligible exception
#KT-47753 Fixed
2021-08-06 15:08:01 +03:00
Dmitriy Novozhilov
afd9b4935a
[FIR] Configure language version for FP test via env properties
2021-08-06 14:24:42 +03:00
Ivan Kylchik
4f15bd4817
Introduce a workaround in interpreter tests to make them pass
...
There is a problem with ranges and iterators. To work properly
they must be resolved firstly, before operator rangeTo.
2021-08-06 13:33:33 +03:00
Ivan Kylchik
44e1b61e6c
Move static cache from Wrapper into non-static container in environment
...
By this change it is possible to run multiple test in parallel
without running out of memory.
2021-08-06 13:33:32 +03:00