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
Ilya Chernikov
70c89a28e1
Stop subtyping constraint search if equality constraints for...
...
all not fixed type vars are found
#KT-35626 fixed
2020-03-12 08:02:45 +01:00
Ilya Chernikov
b6c9432334
[minor] Optimize diagnostic reporting a bit
...
Eliminating a couple of function calls on reporting, speeds up
diagnostic tests for a few %
2020-03-12 08:02:45 +01:00
Ilya Chernikov
2727507d18
Fix diagnostic inferred type calculation for null in some cases
...
#KT-36222 fixed
2020-03-12 08:02:45 +01:00
Nikolay Krasko
1afd3d929a
201: Update to 201.5985.32
2020-03-12 03:02:28 +03:00
Mikhail Zarechenskiy
7c86911f44
Filter out PSI values & valueOf methods from Java structure
...
These methods were recently added in Java PSI for IJ 201 and now have
clash with the methods that we add on our side. Note that we can't
start using methods from PSI as is because of different nullability:
they have flexible types in their signatures while current methods
have not-null types
#KT-36095 Fixed
2020-03-12 00:15:03 +03:00
Mikhail Glukhikh
1321bf426b
[FIR] Define argument lists and their builders more accurately
2020-03-11 22:08:59 +03:00
Mikhail Glukhikh
3d17ce05b5
[FIR] Introduce FirResolvedArgumentList with argument-parameter mapping
...
#KT-36345 Fixed
2020-03-11 22:08:59 +03:00
Mikhail Glukhikh
6b0a3aa176
[FIR] Cleanup vararg handling during call completion
2020-03-11 22:08:59 +03:00
Mikhail Glukhikh
91d51b93e1
[FIR] Introduce FirArgumentList node
2020-03-11 22:08:58 +03:00
Dmitry Petrov
a9ab3ae192
KT-36047 Support when-with-subject in optimized 'when' generators
2020-03-11 18:09:17 +03:00
Ilmir Usmanov
fd70b10b17
JVM_IR: Generate suspend fun main wrapper as class instead of reference
...
This way, there is no getName, getOwner and getSignature generated.
#KT-37404: Open
2020-03-11 15:34:38 +01:00
Mark Punzalan
79fef09bf5
[JVM IR] Add tests for KT-15971.
2020-03-11 14:33:31 +01:00
Mark Punzalan
2239b5ceab
[JVM IR] Maintain KT-36188 bug compatibility between non-IR and IR
...
backends.
2020-03-11 14:33:31 +01:00
Mikhail Glukhikh
47ebd38534
FIR2IR: fix origin of object literal constructor call
2020-03-11 16:01:58 +03:00
Mikhail Glukhikh
8231377f6b
FIR2IR: convert qualifiers inside getClass properly
2020-03-11 16:01:57 +03:00
Mikhail Glukhikh
1812b490a1
FIR: set anonymous object constructor return type properly
2020-03-11 16:01:57 +03:00
Alexander Udalov
4d2ee279c0
Remove unneeded workaround for IBM JDK and older intellij-core
...
The underlying problem (IDEA-206446) was fixed a long time ago and the
compiler is no longer affected by it.
#KT-37286 Fixed
2020-03-11 12:49:38 +01:00
Svyatoslav Kuzmich
f113c22450
[JS IR BE] Fix enum entry initialization
...
Keep helper fields uninitialized. This way thier initialization
would not depend on field initialization order.
2020-03-11 14:28:20 +03:00
Pavel Kirpichenkov
04f9a03796
[NI] Fix isNullableType for definitely not null type parameter
...
Consider type parameter with nullable bound not null
if it is inside of a definitely not null type.
2020-03-11 13:55:25 +03:00
Pavel Kirpichenkov
88ae9bc7d5
minor: rename test
2020-03-11 13:55:24 +03:00
Zalim Bashorov
7dc9a2fc64
[JS IR BE] Add intrinsic for hashCode on Boolean
2020-03-11 12:54:43 +03:00
Zalim Bashorov
2103c0e0f8
[JS IR BE] Add intrinsic for hashCode on String
2020-03-11 12:54:43 +03:00
Zalim Bashorov
c8efe8c4ec
Add tests for equals, hashCode, toString in String and Number
2020-03-11 12:54:42 +03:00
Zalim Bashorov
9e59d93ad5
[JS IR BE] Add intrinsics for hashCode on primitive number types
2020-03-11 12:54:42 +03:00
Zalim Bashorov
62014e6711
[JS IR BE] Add better error message when some function not found during init JsIrBackendContext
2020-03-11 12:54:41 +03:00
Zalim Bashorov
d22e4495de
[JS IR DCE] Improve handling overrides
...
Introduce the notion of contagious for overridable declarations.
So, now overriding uncontagious declaration will not lead to becoming a declaration reachable.
By default, all declarations treated as contagious, it's not the most efficient, but it's safest.
In case when we access a declaration through a fake-override declaration,
the original (real) one will not be marked as contagious, so, later,
other overrides will not be processed unconditionally only because
it overrides a reachable declaration.
2020-03-11 12:54:40 +03:00
Zalim Bashorov
f60d0b2c7c
[JS IR CLI] Change K2JsIrCompiler#executableScriptFileName's body to TODO() and provide a proper fix later
2020-03-11 12:54:39 +03:00
Zalim Bashorov
2a7e32d3ae
[JS IR DCE] Add CLI option to print reachability info
2020-03-11 12:54:39 +03:00
Zalim Bashorov
16cd3f0cef
[JS IR DCE] Print reachability info
2020-03-11 12:54:39 +03:00
Zalim Bashorov
e6657b016f
[JS IR DCE] Move withNested fun to get better diff in the next commit
2020-03-11 12:54:39 +03:00
Zalim Bashorov
95d248189f
[JS IR BE] JsClassGenerator: don't use descriptor for error message
2020-03-11 12:54:39 +03:00
Leonid Startsev
01108d595c
Fix broken test data from 5d73550b
2020-03-11 12:25:13 +03:00
Georgy Bronnikov
d032f9b9cc
JVM_IR: handle common klibs when compiled via cli
2020-03-11 11:03:58 +03:00
Georgy Bronnikov
6af099c11a
Typo fix
2020-03-11 11:03:58 +03:00
Vyacheslav Gerasimov
f735396ffb
Build: Make toolsJarApi() helper for JPS build
2020-03-10 17:24:21 +03:00
Vyacheslav Gerasimov
ef169aa12b
Build: Use preprocessed tools.jar for compilation
...
tools.jar from JDK has different public api on different platforms which
makes impossible to reuse caches for tasks which depend on it. Since we
can't compile against those classes & stay cross-platform anyway, we
may just exclude them from compile classpath. This should make tools.jar
compatible at least within one build of JDK for different platforms
2020-03-10 17:24:21 +03:00
Mikhail Zarechenskiy
8fbd22ff73
Add test to check consistency of pre_release flag in the compiler
...
It's important to have consistent pre_release flag values in the
current and bootstrap compiler. Otherwise, it's possible to publish
release compiler with pre_release artifacts (stdlib, for example) and
vice versa.
Once this test fails, the next step is to advance bootstrap compiler
2020-03-10 17:22:26 +03:00
Mikhail Zarechenskiy
8fdc39ecbc
Update test data due to using stdlib with a pre_release flag
...
The problem here is that we have separate bootstrap compiler and
artifacts (stdlib, for example) that are used in tests and implicitly
participate in them.
For example, this test started to fail when bootstrap compiler was
advanced to a version where pre_release flag is enabled. As a result,
dependent stdlib become pre_release as well and now we have additional
error about `Unit` type
2020-03-10 17:22:26 +03:00
Dmitry Petrov
90d012cecb
Handle unbound extension receiver in callable reference adaptation
2020-03-10 16:56:48 +03:00
Dmitry Petrov
e175ff0d73
KT-36953 break/continue/return/throw have kotlinType Nothing
2020-03-10 16:56:48 +03:00
Mikhail Glukhikh
603685b5a4
Mute FIR2IR test (pushed as unmuted accidentally?)
2020-03-10 15:19:35 +03:00
Mikhail Glukhikh
2651fe9fb8
FIR2IR: use CLASS kind for anonymous objects
2020-03-10 15:19:35 +03:00
Mikhail Glukhikh
9c3dfed2d7
FIR2IR: provide IR_EXTERNAL_DECLARATION_STUB origin also for members
2020-03-10 15:19:35 +03:00