Dmitriy Novozhilov
1b479c49a8
[FIR] Fix exhaustiveness checking for conditions with equals to object
...
#KT-37488 Fixed
2020-03-16 17:04:28 +03:00
Dmitriy Novozhilov
3765a1efaf
[FIR] Add values and valueOf to deserialized enums
2020-03-16 17:04:28 +03:00
Dmitriy Novozhilov
caec5fe352
[FIR-TEST] Add test for KT-37478
2020-03-16 17:04:28 +03:00
Dmitriy Novozhilov
37aa234bb7
[FIR] Fix transform of subject of when expressions with subject variable
2020-03-16 17:04:28 +03:00
Dmitriy Novozhilov
820da6edaa
[FIR] Don't set up expected type for function body
2020-03-16 17:04:28 +03:00
Dmitriy Novozhilov
813003e12e
[FIR] Approximate statements with ILT without expected type
2020-03-16 17:04:28 +03:00
Dmitriy Novozhilov
698f78570d
[FIR] Add ability to pass data=null to transformInplace with data producer
2020-03-16 17:04:28 +03:00
Dmitriy Novozhilov
fe95e37c88
[FIR] Add equality to Unit constraint for lambda without return expressions
2020-03-16 17:04:27 +03:00
Dmitriy Novozhilov
fc2e7da2a9
[FIR] Don't pass flow from inplace lambdas while resolve delegates
...
#KT-36248
2020-03-16 17:04:27 +03:00
Dmitriy Novozhilov
e90d86e1b4
[FIR] Add cfg for delegating constructor calls
2020-03-16 17:04:27 +03:00
Dmitriy Novozhilov
83257d00b9
[FIR] Pass flow from postponed lambdas to closest completed call
...
#KT-36248
2020-03-16 17:04:27 +03:00
Dmitriy Novozhilov
3a5c30a581
[FIR] Remove ortho splines mode from CFG dump
2020-03-16 17:04:27 +03:00
Dmitriy Novozhilov
f83cedd244
[FIR] Don't render call arguments in cfg dump
2020-03-16 17:04:27 +03:00
Roman Artemev
8e295de593
[KLIB] Make sure float/double bits have fixed representation for NaN.
...
- Store float and double constants as fixed32/64 proto value
and encode/decode them in our side.
2020-03-16 16:49:39 +03:00
Dmitry Gridin
ae96a68bd1
i18n: createByPattern: add @NonNls to parameters
2020-03-16 18:40:48 +07:00
Dmitry Gridin
2b8373447a
i18n: KtPsiFactory: add @NonNls to parameters
2020-03-16 18:40:48 +07:00
Roman Golyshev
e1cb561398
i18n: add bundle for idea/refactoring/rename
...
- Modify `text.parameter` value to `Parameter`;
use `text.parameter.0` in previous usages
- Add @Nls and @NonNls annotations to few places
2020-03-16 18:40:47 +07:00
Roman Golyshev
37e1333fe1
i18n: add bundle for idea/refactoring/pullUp
...
- Add @NonNls to used methods from `KtPsiFactory`
2020-03-16 18:40:47 +07:00
Igor Chevdar
a1eff7f4af
[IR] Set source offsets in SAM lowering
...
This is needed for debug info generating in K/N
2020-03-16 11:58:36 +03:00
Alexander Udalov
57fd449288
Minor, add check of const field modifiers to codegen test
...
#KT-29885
2020-03-13 23:26:12 +01:00
pyos
bdd88e1655
JVM_IR: place suspend markers in faux lambdas around inline references
...
Otherwise, the assumption that coroutine codegen makes about every
inlined function already having the markers breaks and it is no longer
true that calls to inline lambdas do not require them.
2020-03-13 18:33:41 +01:00
Roman Artemev
d27954a6d4
[IR] Use erased types in backing field initializer in case of generic delegated property
...
- Since neither IrProperty nor IrField is Type Parameter container
using of proprty's type parameter in IrField related code leads to
creation of "hanging" type parameters which should be considered as
incorrect IR.
- Such code designed to be prohibited in LV 1.5
- The fix makes use of erased type in such case
where type parameter is expected.
2020-03-13 17:28:31 +03:00
Roman Artemev
13a73b67de
[IR] Fix IrPropertyReference for delegated property
...
- Make sure that property CR passed to `getValue` doesn't have type
arguments.
2020-03-13 17:28:30 +03:00
Roman Artemev
34c17e2bed
[KLIB] Add regression to about VarAsFun type parameter leak
2020-03-13 17:28:30 +03:00
Roman Artemev
8c1772d623
[KLIB] Add regression test
2020-03-13 17:28:30 +03:00
Dmitriy Novozhilov
31776d9a3b
[CFA] Mark arguments of all annotation calls as USED_AS_EXPRESSION
...
Also revert hacky fix of KT-37294 introduced in 80caa063b
#KT-37447 Fixed
2020-03-13 14:32:28 +03:00
Mikhail Glukhikh
20c4a7b244
[FIR2IR] Introduce staged transformation (first step)
...
Now FE IR -> BE IR transformation is performed in multiple stages
controller by Fir2IrConverter. Stages are
* files & classes registration
* supertypes & type parameters handling
* functions & properties signature generation
* body generation
After each step we have guarantee (with exception of local classes &
type inference combination, and external symbols) that required symbols
(class/function/property/variable/type parameter)
are already bound to real declarations and have correct parents.
This commit also fixes incorrect parents for local classes
2020-03-13 12:18:02 +03:00
Alexander Udalov
a9f7ff254b
Add -Xno-optimized-callable-references to disable KT-27362 optimization
...
This argument is useful in situations where the stdlib version which the
code compiles against is different from the one which is available at
runtime, such as the case of kotlin-gradle-plugin, which depends on the
compiler/stdlib compiled by 1.4, but may be executed in Gradle where
only 1.3.x is available.
#KT-37435
2020-03-13 10:07:22 +01:00
Zalim Bashorov
7cf8697e30
[JS BEs] use star projection when type parameter used recursively
...
#KT-37128 Fixed
2020-03-13 10:15:56 +03:00
Zalim Bashorov
8c7562d338
[CJS BE] don't crash when intersection types passed for a reified parameter
...
#KT-37163 Fixed
2020-03-13 10:15:53 +03:00
Zalim Bashorov
415893b8aa
[JS CLI] revert disabling NI by default
2020-03-13 01:51:24 +03:00
Vladimir Dolzhenko
87242b419a
Improvements in KotlinCopyPasteReferenceProcessor
...
reduced scope of nonBlockingRead to avoid long rerun of it
used smart pointers to keep valid elements over changes
moved back to non-modal progress
Relates to #KT-37414
2020-03-12 22:42:58 +01:00
Victor Petukhov
b1c4b5f51b
NI: Analyze lambdas which are return arguments of another lambda
...
^KT-36044 Fixed
2020-03-12 23:29:09 +03:00
Georgy Bronnikov
426738b7d4
JVM_IR: Cache stubs in CollectionStubMethodLowering
2020-03-12 23:14:17 +03:00
Georgy Bronnikov
92268c8144
JVM_IR: do not generate excessive stubs for immutable collections
2020-03-12 23:14:17 +03:00
Zalim Bashorov
179ec41a6b
[JS BEs] Generate tests for whole "codegen/boxInline"
2020-03-12 17:22:33 +03:00
Alexander Udalov
3762b5cba7
Minor, remove extraneous field CodegenTestCase.coroutinesPackage
...
After a795c38eb7 , this field is available in the base class
KotlinBaseTest.
2020-03-12 13:51:40 +01:00
Alexander Udalov
244db9bcf9
JVM IR: don't rename fake overrides for fields
...
In case derived class has a field with the same name as the base class,
RenameFieldsLowering previously tried to rename one of the fields by
adding the "...$1" suffix, which led to NoSuchFieldError.
2020-03-12 13:51:40 +01:00
Mikhail Glukhikh
6fd8ccc293
[FIR2IR] Support (simple) conversion of captured types
2020-03-12 15:17:51 +03:00
Sergey Bogolepov
e919e7b79a
[Gradle][Native][Cache] Don't skip metadata-based interop libraries
...
`resolveSingleFileKlib` by default doesn't support klibs with
non-default ir providers. In case of cache generation for native interop
libraries we need to override this behavior because they have
ir_provider=kotlin.native.cinterop.
2020-03-12 18:11:47 +07:00
Dmitry Petrov
c0b15b1768
KT-37448 'this' in delegating constructor call may refer to outer object
2020-03-12 13:40:14 +03:00
Ilmir Usmanov
7efab887aa
JVM_IR: Do not generate accessor for private function
...
if the function is called in suspendCoroutine's lambda.
#KT-37242 Fixed
2020-03-12 11:15:46 +01:00
Georgy Bronnikov
fded6fb494
JVM_IR: fix suspendCoroutineUninterceptedOrReturn
2020-03-12 11:28:42 +03:00
Ilya Chernikov
3cbfdd19f5
Optimize constraints simplification
...
simplify only when affecting changes are detected
2020-03-12 08:02:46 +01:00
Ilya Chernikov
c2b866fe7a
Reduce number of constraints simplifications
...
assuming that MutableVariableWithConstraints is constructed either
with no initial constraints or already from simplified list
2020-03-12 08:02:46 +01:00
Ilya Chernikov
84a0e39956
Skip duplicates removal on constraints simplification
...
It is already coveren on addition. Speeds up inference a bit.
2020-03-12 08:02:46 +01:00
Ilya Chernikov
6f97745de2
Optimize MutableDiagnosticsWithSuppression
...
avoid modificationTracker and own diagnostics list initialization if
possible
2020-03-12 08:02:46 +01:00
Ilya Chernikov
4538e212db
Optimize hot addSubTypeConstraintAndIncorporateIt function
...
reduce number of allocations, optimize for cases with small number
of possible new constraints
2020-03-12 08:02:45 +01:00
Ilya Chernikov
357ceeae19
Avoid unnecessary freshTypeConstructor() calls
2020-03-12 08:02:45 +01:00
Ilya Chernikov
54f10a709a
Cache isProperType calculations in the constraint system
...
avoid expensive calculations with type.contains
2020-03-12 08:02:45 +01:00