Commit Graph

10149 Commits

Author SHA1 Message Date
Evgeny Gerashchenko 0fee69fe07 Prioritized synthetic and not synthetic functions. 2013-03-28 20:07:47 +04:00
Evgeny Gerashchenko 2e678a94f1 Replaced predicate strategy with priority-returning strategy. 2013-03-28 18:27:35 +04:00
Evgeny Gerashchenko 69c5411269 Fixed recently added annotation. 2013-03-28 17:12:26 +04:00
Evgeny Gerashchenko 0bc65321c2 KT-1547 Wrong layout of closure classes
#KT-1547 fixed
2013-03-28 15:54:51 +04:00
Evgeny Gerashchenko 05e4164a0d Committing ant.xml. 2013-03-28 15:54:51 +04:00
Evgeny Gerashchenko b7527101cd Always using "SAM interface" term. 2013-03-28 15:54:51 +04:00
Evgeny Gerashchenko c619685dc8 Added test with overridden j.l.Object methods in trait. 2013-03-28 15:54:51 +04:00
Natalia.Ukhorskaya 221df82c01 Build class hierarchy for classes from BuiltIns 2013-03-28 15:25:28 +04:00
Natalia.Ukhorskaya f4a0808a28 Fix resolve in sources files of libraries 2013-03-28 15:25:24 +04:00
Natalia.Ukhorskaya e1dece4345 Inline functions from AnalyzeSingleFileUtil 2013-03-28 14:30:57 +04:00
Andrey Breslav 1ad0cad020 Incomplete analysis results are available for light class generation
If we have the following classes

 class A // Kotlin
 class B extends A {} // Java
 class C : B() // Kotlin

 The analysis runs into infinite recursion, because C needs all members of B (to compute overrides),
 and B needs all members of A, and A is not available from KotlinCacheManager.getDeclarationsFromProject() -- it is being computed right now,
 so the analysis runs again...

 Our workaround is:
  * when analysis starts put its trace into user data on the project
  * when a light class is about to generate a stub, it requests a trace, and if there is such an incomplete trace, it is returned
  * the logic of TopDownAnalyzer that works in descending order (down the class hierarchy) guarantees that all the superclasses are already processed
2013-03-28 11:29:53 +04:00
Andrey Breslav 83e2986a7b Unused methods removed, class renamed 2013-03-27 20:31:00 +04:00
Nikolay Krasko fb4a205277 Fix absence of notification about unsupported Abi 2013-03-27 20:20:38 +04:00
Evgeny Gerashchenko cadb9bcb8f Supported multi-reference in imports (SAM interfaces are resolved as both functions and classes). 2013-03-27 19:19:59 +04:00
Evgeny Gerashchenko 8130c813e9 Not looking for super methods which are Object methods in interfaces, because they are not loaded by JDR. 2013-03-27 19:19:59 +04:00
Evgeny Gerashchenko d8ccfe55b6 Removed redundant checking for test mode. Exceptions will be thrown anyway. 2013-03-27 19:19:59 +04:00
Evgeny Gerashchenko 3917f11b12 Updated test data. 2013-03-27 19:19:59 +04:00
Evgeny Gerashchenko 4fc1148d59 Added dummy methods to avoid loading test interfaces as SAM. 2013-03-27 19:19:59 +04:00
Evgeny Gerashchenko 8f079f6d41 Added tests for ignoring Object methods when loading interface. 2013-03-27 19:19:58 +04:00
Evgeny Gerashchenko ecf882fc21 Removed method which had never been used. 2013-03-27 19:19:58 +04:00
Evgeny Gerashchenko 3761dc051e Generating ACC_SUPER for closures.
Removed commented.
2013-03-27 19:19:58 +04:00
Evgeny Gerashchenko 4e0d408178 Minor. Annotated with @Nullable/@NotNull. 2013-03-27 19:19:58 +04:00
Evgeny Gerashchenko a2b4f446b5 Removed useless ACC_PUBLIC flags from closure classes. 2013-03-27 19:19:58 +04:00
Evgeny Gerashchenko fb18e5ab39 Removed recording function twice. 2013-03-27 19:19:58 +04:00
Evgeny Gerashchenko 56d2bb2639 Removed volatile flag from bridge method.
Actually, volatile flag is equal to bridge flag, which is already there.
2013-03-27 19:19:58 +04:00
Evgeny Gerashchenko 288dbe70c6 Got rid of adding constant on each call site. 2013-03-27 19:19:57 +04:00
Evgeny Gerashchenko d5031e60ad Prepared code for supporting SAM conversions. 2013-03-27 19:19:57 +04:00
Evgeny Gerashchenko b891d6d87f Loading SAM constructor functions for nested interfaces. 2013-03-27 19:19:57 +04:00
Evgeny Gerashchenko 17cc055152 Loading deeply nested static method correctly. 2013-03-27 19:19:57 +04:00
Evgeny Gerashchenko 81381a206c Simplified code. 2013-03-27 19:19:57 +04:00
Evgeny Gerashchenko 7a136eae5b Extracted method. 2013-03-27 19:19:57 +04:00
Evgeny Gerashchenko 0422253943 Loading generic interfaces with upper bounds. 2013-03-27 19:19:57 +04:00
Evgeny Gerashchenko dea7ef77ec If interface method has generic parameters, interface is not functional. 2013-03-27 19:19:56 +04:00
Evgeny Gerashchenko 91282b992d Supported functional interfaces with generic parameters in codegen. 2013-03-27 19:19:56 +04:00
Evgeny Gerashchenko 3b558d575c Loading functional interfaces with generic parameters. 2013-03-27 19:19:56 +04:00
Evgeny Gerashchenko 526cc3ce15 Renamed method. 2013-03-27 19:19:56 +04:00
Evgeny Gerashchenko 933a455f6c Capable of changing owner. 2013-03-27 19:19:56 +04:00
Evgeny Gerashchenko 45d638cc51 Loading interface with only one method inherited from Object as not functional.
#KT-1242 fixed
2013-03-27 19:19:56 +04:00
Evgeny Gerashchenko e6c047b2e0 Added tests with FilenameFilter (several arguments). 2013-03-27 19:19:56 +04:00
Evgeny Gerashchenko 461bfec45d Added FileFilter to mock JDK. 2013-03-27 19:19:55 +04:00
Evgeny Gerashchenko 835c0f85c7 Supported SAM constructors in codegen (simplest case). 2013-03-27 19:19:55 +04:00
Evgeny Gerashchenko 8f34dea4c8 Saving mapping from SAM constructor to trait. 2013-03-27 19:19:54 +04:00
Evgeny Gerashchenko a96a461e61 Calculating interface function name in constructor. 2013-03-27 19:19:54 +04:00
Evgeny Gerashchenko 0add163467 Asserting right after reading. 2013-03-27 19:19:54 +04:00
Evgeny Gerashchenko 73823260be Removed redundant code. 2013-03-27 19:19:54 +04:00
Evgeny Gerashchenko 5ad571c5ab Inlined method which was used only once, and in different subsystem. 2013-03-27 19:19:54 +04:00
Evgeny Gerashchenko 32a048674f Got rid of method duplication. 2013-03-27 19:19:54 +04:00
Evgeny Gerashchenko f4551da18b Moved SAM function creation to JavaFunctionResolver. 2013-03-27 19:19:54 +04:00
Evgeny Gerashchenko dad2ba34aa Removed redundant field in JavaPackageScope. 2013-03-27 19:19:54 +04:00
Evgeny Gerashchenko f43631377b Updated test data. 2013-03-27 19:19:53 +04:00