Commit Graph

32 Commits

Author SHA1 Message Date
Ilya Gorbunov 86f4a1b6e4 Compiler&plugin deprecations cleanup: replace streams with sequences. 2015-06-29 17:06:40 +03:00
Ilya Gorbunov 2c31a1a345 Compiler&plugin deprecations cleanup: *array -> *arrayOf, copyToArray -> toTypedArray. 2015-06-29 17:06:12 +03:00
Pavel V. Talanov 65c6adfaa4 Drop "injector-generator" module, tests and existing generated injectors
Move GeneratorsFileUtil to "generators" module
Drop "Generate Injectors" run configuration
2015-06-26 15:21:43 +03:00
Pavel V. Talanov df529f1a4b Convert usages of existing generated injectors to dynamic injectors
Rewrite RuntimeModuleData to use hand-written code as we do not pack container module into runtime
This change introduces some overhead (up to 10% for the tests I ran) in some scenarios in IDE, that should be addressed later
2015-06-26 15:21:41 +03:00
Pavel V. Talanov 705f35450f Refactor setting dependencies for ModuleDescriptors 2015-06-13 20:36:47 +03:00
Denis Zharkov eb7114bd53 Add 'constructor' keyword in whole project where needed 2015-06-12 09:55:15 +03:00
Alexander Udalov d4c18b3d55 Drop PsiBasedMethodSignatureChecker 2015-06-10 14:41:56 +03:00
Alexander Udalov d1df234cfe Support annotations as annotation arguments in reflection, add test
A follow-up to 281acb8 where this was supported in the compiler
2015-06-02 17:31:19 +03:00
Pavel V. Talanov cfdb1f4ec3 Refactor creation of ModuleDescriptor
Add storageManager to ModuleDescriptorImpl (to be used later)
Extract ModuleParameters to hold default imports and platform class map
Introduce MutableModuleContext to simplify module creation code
2015-05-20 19:45:50 +03:00
Alexander Udalov 0a66c78449 Disperse primitive type mapping in JavaToKotlinClassMap 2015-04-24 02:09:02 +03:00
Denis Zharkov 0abc63261d Inject reflectionTypes into LazyJavaResolverContext 2015-04-16 10:40:20 +03:00
Alexander Udalov 0202217135 Fix JVM signatures involving multi-dimensional array types
Apparently ASM's Type#getElementType returns the type of the array even if it's
multi-dimensional, so the loop was incorrect
2015-04-07 20:06:23 +03:00
Alexander Udalov 0b252505d9 Minor, add clarifying comment & inline useless property 2015-04-02 03:22:58 +03:00
Alexander Udalov 57be11a7e6 Minor, move common logic to ReflectJavaModifierListOwner 2015-04-02 03:22:22 +03:00
Alexander Udalov 32c3bb8c7f Extract module 'deserialization' out of 'serialization'
'deserialization' stays in core because it's needed both in compiler and
reflection, but 'serialization' is used only in the compiler
2015-03-30 19:44:17 +03:00
Alexander Udalov 085bc2197b Merge module 'serialization.jvm' into 'descriptor.loader.java'
It was very small and there proved to be no point in separation of loading Java
classes and deserializing Kotlin classes
2015-03-30 17:22:06 +03:00
Pavel V. Talanov ed218c473a Get rid of 'class object' usages in code and builtins
Replace some comments and library usages as well
2015-03-25 18:28:00 +03:00
Alexander Udalov 9a041136f2 Make ClassId's relative class name FqName instead of FqNameUnsafe
It was FqNameUnsafe in times when there were classes without identifier names,
specifically class objects with names like '<class-object-for-...>'
2015-03-23 16:30:25 +03:00
Pavel V. Talanov 2a6facaef6 default -> companion: default object -> class object in project code, builtins and libs code 2015-03-17 15:46:48 +03:00
Andrey Breslav 36bbd2c0e3 ErrorReporter is now Java-independent 2015-03-11 19:38:15 +03:00
Alexander Udalov ff0044f66a Use descriptors for reflection on extension properties 2015-03-11 16:42:34 +03:00
Alexander Udalov d1debf586c Support local classes in reflection 2015-03-11 16:42:32 +03:00
Alexander Udalov 64fdb18ad3 Use descriptors for reflection on class properties
- use ConcurrentHashMap as a cache of class loaders to module descriptors
- KClassImpl now has a lazy class descriptor and it manages property creation
  by looking (also lazily) for the property descriptor in the corresponding
  scope
- since deserialized descriptors have full information about where a JVM symbol
  is located and what signature it has, new tests will begin to pass where
  Kotlin model and Java reflection model differ, see classObjectVar.kt
2015-03-11 16:42:31 +03:00
Alexander Udalov af6e7cf140 Minor, remove ReflectJavaTypeProvider, throw unsupported instead
getTypeProvider() is in fact a bad abstraction because it's only used in SAM
construction, which does not happen at runtime
2015-03-11 16:42:26 +03:00
Alexander Udalov e95d22dcfe Refactor ReflectJavaConstructor.getValueParameters()
See https://youtrack.jetbrains.com/issue/KT-6886 for more information
2015-03-11 16:42:25 +03:00
Alexander Udalov 1054f004aa Load annotations on constructors and parameters of Kotlin reflected classes 2015-03-11 16:42:24 +03:00
Alexander Udalov 4fb420f3f1 Fix deserialization of enum annotation arguments at runtime 2015-03-11 16:42:23 +03:00
Alexander Udalov f36ef6f546 Provide equals, hashCode, toString for classes in reflection model 2015-03-11 16:42:21 +03:00
Alexander Udalov a14b301f31 Resolve annotations on all reflected elements
Annotation in NestedEnumArgument test is made public, because we try to load
annotation argument values eagerly and fail, since you can't invoke methods
reflectively on an object of a non-effectively-public class
2015-03-11 16:42:19 +03:00
Alexander Udalov c90f11b7e6 Support Java symbols in runtime descriptor loading 2015-03-11 16:42:18 +03:00
Alexander Udalov 73e4287aee Initial support of annotation loading at runtime
In order to locate an annotated entity, we need to implement almost the whole
Java element model (which will be used anyway for Java descriptor loading)
2015-03-11 16:42:17 +03:00
Alexander Udalov 356f54b5df Initial support of descriptor loading at runtime 2015-03-11 16:42:15 +03:00