Commit Graph

8649 Commits

Author SHA1 Message Date
Evgeny Gerashchenko d37bdbc07d Saving and loading projection kind of array element type in bytecode. 2012-11-20 17:20:00 +04:00
Evgeny Gerashchenko 21e97b408c Loading java arrays as Array<out T> at method return type position, as well. 2012-11-20 16:16:47 +04:00
Evgeny Gerashchenko d2a308964d Skipping java.util.Collection and similar classes in JdkAnnotationsSanityTest. 2012-11-20 16:16:47 +04:00
Evgeny Gerashchenko d1f217f2df Minor. LinkedHashMap for easier output parsing. 2012-11-20 16:16:46 +04:00
Evgeny Gerashchenko 62b89655b9 Simplified calculateTypeArgumentsFromSuper and added samples in comments. 2012-11-20 16:16:46 +04:00
Evgeny Gerashchenko f20c4dac15 Cleanup in tests. 2012-11-20 16:16:46 +04:00
Evgeny Gerashchenko 5ff718b94c Minor. Renamed variables where 'projection kind' term should be used instead of 'variance'. 2012-11-20 16:16:46 +04:00
Evgeny Gerashchenko 4a37c130df Minor. Better name for CollectionClassMapping class. 2012-11-20 16:16:46 +04:00
Evgeny Gerashchenko f287e2b55d Minor. Various fixups after code review. 2012-11-20 16:16:46 +04:00
Evgeny Gerashchenko 94cad16d1d Moved all code relevant to signatures propagation to separate class.
#KT-2776 in progress
2012-11-20 16:16:46 +04:00
Evgeny Gerashchenko 00bed4a2a4 Added tests with two superclasses.
#KT-2776 in progress
2012-11-20 16:16:46 +04:00
Evgeny Gerashchenko 3b63e6e061 Supported variance propagation. 2012-11-20 16:16:45 +04:00
Evgeny Gerashchenko 9177080d8b Fixed loading variance from alternative signature. 2012-11-20 16:16:45 +04:00
Evgeny Gerashchenko c5e9deb906 Reverted modification in TypeTransformingVisitor in "Renamed & moved AllInjectorsGenerator".
It was not relevant to that commit: it was squashed accidentally during interactive rebasing.
2012-11-20 16:16:45 +04:00
Evgeny Gerashchenko 044487cf37 Supported propagating read-onliness.
#KT-2776 in progress
2012-11-20 16:16:45 +04:00
Evgeny Gerashchenko 89b413b7ad Supported generic subclasses in submethods.
#KT-2776 in progress
2012-11-20 16:16:45 +04:00
Evgeny Gerashchenko e2d213f1fd Loading functions from superclasses before current to avoid heisenbug.
Added test with two supertypes.

 #KT-2776 in progress
2012-11-20 16:16:45 +04:00
Evgeny Gerashchenko 494345ce10 Improved algorithm, added simple tests with generic types.
#KT-2776 in progress
2012-11-20 16:16:44 +04:00
Evgeny Gerashchenko 1f4d994480 Introduced simple propagation of nullability on loading Java.
#KT-2776 in progress
2012-11-20 16:16:44 +04:00
Natalia.Ukhorskaya 961fde3c8a Remove redundant abstract tests. Use AbstractCodegenTest instead 2012-11-20 14:35:58 +04:00
Natalia.Ukhorskaya 3fc2e5d20c Attempt to split long or double on the stack exception
#KT-3042 Fixed
2012-11-20 13:35:30 +04:00
Natalia.Ukhorskaya 900788a8e0 Fix javaClass property for long and double
#KT-3046 Fixed
2012-11-19 21:19:48 +04:00
Pavel V. Talanov 7bb7445c57 Fix for invoking abstract method in enum 2012-11-19 20:18:45 +04:00
Andrey Breslav 6384b7340c IDEA 122.813 is required now (API of the new make depends on the new build) 2012-11-19 18:15:20 +04:00
Andrey Breslav 47e057d529 Migrate to IDEA 122.813 2012-11-19 17:04:18 +04:00
Andrey Breslav 636deb6a09 KT-3016 Exception during analyze when some function has no name
#KT-3016 Fixed
2012-11-19 13:44:55 +04:00
Evgeny Gerashchenko be7989af36 Moved JVM-specific String.repeat method to StringsJVM.kt 2012-11-19 13:29:17 +04:00
Tommy Hallgren 7ccded5f6d KT-2503 Added String.repeat method
#KT-2503 fixed
2012-11-17 14:43:06 +04:00
Alexander Udalov 712fafddb6 DataFlowInfo.getPossibleTypes() now returns Set
This solves some performance problems related to DataFlowInfo (lots of nested
conditions etc.)
2012-11-16 17:56:31 +04:00
Alexander Udalov 6c7b32dc03 Fix data flow info after inner loops with continue-outer
ControlStructureTypingVisitor.containsBreak() is refined and now also takes
into account continue to outer loops
2012-11-16 17:56:30 +04:00
Alexander Udalov d1de446ae0 Fix & optimize DataFlowInfo.or()
Get complete nullability & type info before creating a new data flow info.

Don't create unnecessary data flow infos
2012-11-16 17:56:29 +04:00
Alexander Udalov 6b65c44d45 Optimize DataFlowInfo.and()
Instead of copying everything, we now only completely copy one data flow info
and use another as a delegation target
2012-11-16 17:56:29 +04:00
Alexander Udalov f5ed3ff6bd Refactor DataFlowInfo.establishSubtyping()
Don't create useless copies of data flow infos.

Also get rid of vararg subject variable in type-checking 'when' expression
2012-11-16 17:56:28 +04:00
Alexander Udalov d52387a7eb Delegating data flow info
A delegating data flow info can have a parent data flow info, which it queries
when is queried itself. This helps to avoid lots of copying of the same data
2012-11-16 17:56:27 +04:00
Alexander Udalov 83d56213cd Separate DataFlowInfo into interface & implementation 2012-11-16 17:56:27 +04:00
Alexander Udalov ed02c6c39e Remove DataFlowInfo.CompositionOperator
It was used only in one place, which wouldn't suffer without it
2012-11-16 17:56:26 +04:00
Alexander Udalov 4ec95ff4d6 Minor, replace Name creation with constants usage 2012-11-16 17:56:25 +04:00
Alexander Udalov 57f18fca2e Retain data flow info after array accesses 2012-11-16 17:56:24 +04:00
Alexander Udalov 7c0ea67356 Fix erroneous check when saving EXPRESSION_DATA_FLOW_INFO
Before saving a data flow info, we checked if it's the same as that of context,
which was passed to us. This proves wrong when eventually somebody asks for a
data flow info of the same expression, but with a different context (i.e. with
a different data flow info in it) and we return this (different) context's
info, whereas we should have returned that of the original context.
This could've happened in CandidateResolver, for example.

Save data flow info after every expression now, only if it's not empty.

No new tests added, see next commit.
2012-11-16 17:56:23 +04:00
Alexander Udalov ac7ee9d3f5 Retain data flow info after when-expressions
This means the subject expression and the common data flow info of all entries'
conditions
2012-11-16 17:56:23 +04:00
Alexander Udalov d0a2ba5737 Retain data flow info after is-expression 2012-11-16 17:56:22 +04:00
Alexander Udalov ef3e38071c Retain data flow info after try-finally 2012-11-16 17:56:21 +04:00
Alexander Udalov d629fe2d91 Retain data flow info after 'for' loop range expressions 2012-11-16 17:56:20 +04:00
Alexander Udalov 0b1c87a812 Retain data flow info after conditions in do-while statements 2012-11-16 17:56:20 +04:00
Alexander Udalov b0e9c7aab7 Retain data flow info after conditions in while-statements 2012-11-16 17:56:19 +04:00
Alexander Udalov ae77bf0a4e Retain data flow info after conditions in if-statements 2012-11-16 17:56:18 +04:00
Alexander Udalov 2872a0799a Retain data flow info after string template expressions 2012-11-16 17:56:17 +04:00
Alexander Udalov 950f912154 Retain data flow info after multi-declaration
#KT-2825 In Progress
2012-11-16 17:56:17 +04:00
Alexander Udalov a54e34282a Retain data flow info after assignment operations (+= etc)
#KT-2825 In Progress
2012-11-16 17:56:16 +04:00
Alexander Udalov f949d9e804 Retain data flow info after assignment statements
#KT-2825 In Progress
2012-11-16 17:56:15 +04:00