Mikhail Glukhikh
d00d078b4f
FIR Java: implement "appendErasedType" thus adding predefined signatures
...
Related to KT-29937
2019-03-14 18:18:20 +03:00
Mikhail Glukhikh
43d06f85e3
Add raw type comparison for Java (J2K mapping is taken into account)
...
NB: Java enhancement scope does not perform substitution, so we could
have some duplicates inside "type enhancement" testData
Related to KT-29937
2019-03-14 18:17:58 +03:00
Mikhail Glukhikh
f5e2cd2ac4
No override check in FirClassUseSiteScope, fix nasty substitution bug
...
This fixes MPP override test
(see mppFakeOverride in FirMultiModuleResolveTestGenerated)
2019-03-14 18:17:44 +03:00
Mikhail Glukhikh
de14dd1b9f
FIR type enhancements: more accurate * handling
2019-03-14 18:17:31 +03:00
Mikhail Glukhikh
c708171add
FIR type enhancements: support annotations for default parameter values
...
Related to KT-29937
2019-03-14 18:17:17 +03:00
Mikhail Glukhikh
5f3a01c25a
Get rid of FirElement.session usages inside fir:java
2019-03-14 18:16:58 +03:00
Mikhail Glukhikh
6c12fabf74
FIR: make JavaClassEnhancementScope use-site, get rid of scope providers
...
Related to KT-29937
2019-03-14 18:09:41 +03:00
Mikhail Glukhikh
e0348b56a1
FIR type enhancement: extract indexed Java type qualifiers
2019-03-14 18:08:16 +03:00
Mikhail Glukhikh
be412baf9f
FIR type enhancement: fold flexible types when it's possible
...
Related to KT-29937
2019-03-14 18:08:01 +03:00
Mikhail Glukhikh
3d29b31177
FIR type enhancements: handle class qualifiers, add new JSR 305 tests
...
Related to KT-29937
2019-03-14 18:07:46 +03:00
Mikhail Glukhikh
6c8aba8039
FIR: support callable symbols in dependencies provider
...
This breaks mppFakeOverrides test because of bug in FIR fake overrides
2019-03-14 18:07:32 +03:00
Mikhail Glukhikh
33fb3d154b
FIR Java model: support static members & enum entries
...
Related to KT-29218
2019-03-14 18:07:17 +03:00
Mikhail Glukhikh
0434a55ea2
FIR: add initial JSR 305 tests for Java type enhancements
2019-03-14 17:57:28 +03:00
Mikhail Glukhikh
14fb495ab6
Support Java constructors in FIR (related to KT-29218)
2019-03-14 17:57:13 +03:00
Mikhail Glukhikh
484e67727f
JavaClassifierTypeImpl: convert to Kotlin & cleanup
2019-03-14 17:56:57 +03:00
Mikhail Glukhikh
21d19f4144
JavaClassifierTypeImpl.java -> kt
2019-03-14 17:56:41 +03:00
Mikhail Glukhikh
fb788dc4c0
Fix null Java type argument problem & add relevant test
2019-03-14 17:56:23 +03:00
Mikhail Glukhikh
7563a98999
FIR type enhancement: make J2K mapping and changed handling more exact
...
Related to KT-29937
2019-03-14 17:56:05 +03:00
Mikhail Glukhikh
9bb2278fd4
Simplify JavaClassEnhancementScope: callback -> TypeInSignature
2019-03-14 17:55:47 +03:00
Mikhail Glukhikh
226cf8e42c
FIR Java types: handle wildcard types correctly
...
Related to KT-29937, KT-29218
2019-03-14 17:55:25 +03:00
Mikhail Glukhikh
6c79b184c0
FIR Java types: add Kotlin/Java mapping & mutability enhancements
...
Related to KT-29937
2019-03-14 17:55:10 +03:00
Mikhail Glukhikh
e7ac88d326
FIR: implement Java fields (in provider, type enhancement, scopes)
...
Related to KT-29218
2019-03-14 17:54:53 +03:00
Mikhail Glukhikh
4255c9f774
Add FIR enhancement tests, fix some exceptions / problems around them
...
Test data and tests themselves are based on
compiler/testData/loadJava/compiledJava
2019-03-14 17:52:33 +03:00
Mikhail Glukhikh
f31faafd72
Introduce initial version of FIR Java type enhancement
...
Java type enhancement is performed by a special scope kind
Java FIR dump was added for multiplatform tests to look at enhancements
Overrides, J2K mapping, special cases does not work yet
Related to KT-29937
2019-03-14 17:51:00 +03:00
Mikhail Glukhikh
060bd1b464
Add separate FirJava elements (class, method, parameter, type reference)
...
Related to KT-29218
2019-03-14 17:40:04 +03:00
Mikhail Glukhikh
109f1938f6
FIR: make simplification around class substitution scope
2019-03-14 17:39:49 +03:00
Denis Zharkov
6740cdabac
Get rid of ConeAbbreviatedType::directExpansion
...
It becomes necessary after extracting supertypes resolution into a
separate phase.
But also it looks reasonable because direct expansion actually depends
on the module we are looking from.
2019-03-14 17:06:45 +03:00
Denis Zharkov
92defc2ae3
Extract supertypes resolution into a separate FIR phase
2019-03-14 17:06:45 +03:00
Steven Schäfer
3f4c5c8d53
Resolve type aliases when looking for default arguments to actual methods.
...
Change-Id: I059093c1af32fcd7a2de36c25160c352d6f03a3c
2019-03-14 14:59:34 +01:00
Ilmir Usmanov
0c0f035241
Set default value of releaseCoroutines in TypeSignatureMapping to true
2019-03-14 15:06:07 +03:00
Georgy Bronnikov
d7ce24410d
Remove descriptors from SharedVariablesManager
2019-03-13 23:13:41 +03:00
Mads Ager
8b566fda76
JVM_IR: Perform asm type conversion for string concat arguments.
...
This ensures that the Unit instance is loaded when string
concatenation contains a sub part that is a call of a Unit
return-type method.
2019-03-13 10:01:21 +01:00
Ting-Yuan Huang
013ad4b8e4
JVM_IR: defer some branch optimizations to codegen.
...
Specifically, defer the removal of hand-written "if (true|false)" from
JvmBuiltinOptimizationLowering into codegen so that appropriate debug
info (and a NOP) can be inserted.
Change-Id: Ia11af05ad8b4251946bd3e685fb7c3319f0f433f
2019-03-13 08:48:20 +01:00
Ting-Yuan Huang
6bbb0269b1
IR: Set when.origin for IrIfElseImpl
...
Change-Id: I38510b59e3dc936baadbfe3ef2702990493815e5
2019-03-13 08:48:20 +01:00
Mikhael Bogdanov
1e3277d0e6
Set proper origin for cascaded if expression
2019-03-13 08:27:07 +01:00
Alexander Udalov
584137121b
Do not write version requirements in metadata for lambdas
...
#KT-29790 Fixed
2019-03-12 18:53:08 +01:00
Alexander Udalov
e942bff4a2
Reformat module 'serialization', fix inspections
2019-03-12 18:53:08 +01:00
Alexander Udalov
a269e9bc00
JVM IR: fix typo in condition in KCallableNamePropertyLowering
...
This however makes testLocalFunctionName fail because currently
isSubclassOf (incorrectly) returns false and therefore an anonymous
class is generated and the name is taken from there. The name there is
"box$OK" which is incorrect. The isSubclassOf issue is KT-28198 and will
be fixed separately; the incorrect name issue will be investigated later
2019-03-12 18:49:41 +01:00
Mikhael Bogdanov
dd59deb977
Mute failed test
2019-03-12 13:33:35 +01:00
Mikhail Zarechenskiy
f95fdb3cf1
Advance bootstrap to include fix in NI about Nothing-expressions
...
See 1594c1fc for details. Also, remove fix from f07fed9a .
2019-03-12 15:27:12 +03:00
Steven Schäfer
9ea39d2b7c
Fix return types for while loops.
2019-03-12 09:33:00 +01:00
Steven Schäfer
4c8425caeb
Run ExpectDeclarationsRemoving in the JVM_IR backend.
2019-03-12 09:29:00 +01:00
Alexander Udalov
d12e5ddafc
Generate bytecode for array intrinsics manually
...
#KT-28285 Fixed
2019-03-11 18:36:10 +01:00
Alexander Udalov
dd0b087b92
Add StackValue.put(InstructionAdapter) for convenience
2019-03-11 18:36:09 +01:00
Alexander Udalov
f9be21c935
Report warning on @Synchronized on inline methods
...
Until KT-27310 is supported, we warn users that this has no effect.
#KT-29884 Fixed
2019-03-11 18:32:44 +01:00
Alexander Udalov
76aff56b04
Remove unneded parameter of ResolverForProjectImpl
2019-03-11 18:31:59 +01:00
Alexander Udalov
0ccf7345e3
Move JsAnalyzerFacade from ide-common to js.frontend
...
To be used in diagnostic tests now, and as a replacement for
TopDownAnalyzerFacadeForJS in the future
2019-03-11 18:31:59 +01:00
Mikhail Zarechenskiy
1594c1fc6b
[NI] Don't consider Nothing-constraint as proper to complete call
...
Follow-up of 9b3e17f0 . There we decided to complete call if a type
variable from a return type has proper lower constraints, now we refine
this rule wrt `Nothing`-like constraints to avoid inferring type variables
to Nothing, which is quite useless
#KT-30370 Fixed
2019-03-11 19:14:29 +03:00
Ilya Gorbunov
f07fed9afa
Temporary fix to avoid runtime exception due to incorrect inferred type
...
Caused by: java.lang.ClassCastException:
kotlin.collections.EmptySet cannot be cast to java.lang.Void
at org.jetbrains.kotlin.codegen.coroutines.CoroutineTransformerMethodVisitorKt.findSafelyReachableReturns(CoroutineTransformerMethodVisitor.kt:984)
Co-authored-by: Alexander Udalov <alexander.udalov@jetbrains.com >
2019-03-08 23:35:32 +03:00
Nikolay Krasko
8977d0e26d
Setup Missing API inspection
2019-03-08 19:13:07 +03:00