Commit Graph

1409 Commits

Author SHA1 Message Date
Svetlana Isakova 0d1790a4f4 alternative signature applies for names
mapped in standard library (and differs from auto transformed Java signature)
e.g.Collections.copy(MutableList, List)
2012-09-13 17:28:31 +04:00
Svetlana Isakova 75479c7acd extracted method mapPlatformClass(FqName) 2012-09-13 17:28:31 +04:00
Svetlana Isakova f799df9126 AsmTypeConstants, KotlinToJavaTypesMap moved to frontend.java module 2012-09-13 17:28:31 +04:00
Svetlana Isakova 3c083c83e2 alternative signature applicability check changed 2012-09-13 17:28:30 +04:00
Nikolay Krasko 9a645dca3e Ability to get correct fqName for JvmClassName with names for class objects and traits 2012-09-11 21:29:41 +04:00
Svetlana Isakova 3bd79fa701 introduced interface PlatformToKotlinClassMap
changed method in ModuleConfiguration (now it returns PlatformToKotlinClassMap)
JavaToKotlinTypesMap implements PlatformToKotlinClassMap
'importAllUnderDeclaration' in Importer uses PlatformToKotlinClassMap
2012-09-07 19:03:06 +04:00
Alexander Udalov cb13995057 Write callable member's kind to JetMethod annotation
Reuse deprecated kind() parameter in JetMethod annotation to store
CallableMemberDescriptor.Kind if it's not DECLARATION.

JavaDescriptorResolver doesn't always resolve members to DECLARATION
anymore, instead it deserializes member's kind from the annotation.

Create DescriptorKindUtils to convert Kind to int value and back.
2012-09-07 19:00:07 +04:00
Evgeny Gerashchenko 17932f1b7c EA-36257 - NPE: DecompiledDataFactory.appendDescriptor
Added assert in only place where source of NPE may appear.
2012-09-07 17:52:32 +04:00
Svetlana Isakova 8e5e309440 preserve order while collect overrides 2012-09-05 18:55:19 +04:00
Svetlana Isakova bab20717ee KT-2688 Provide mutable/immutable interfaces for Java collections
#KT-2688 fixed
2012-09-05 18:55:16 +04:00
Svetlana Isakova 6fe49398a6 added 'getKotlinAnalogsForJavaStandardClasses'
to most of module configurations
2012-09-05 18:55:16 +04:00
Svetlana Isakova 726bcb5465 KT-2606 Filter java.util.* import
#KT-2606 fixed
 added FilteringScope
2012-09-05 18:55:16 +04:00
Svetlana Isakova e70db866ad add 'getKotlinAnalogs' to ModuleConfiguration 2012-09-05 18:55:15 +04:00
Svetlana Isakova 7073b12d11 add ModuleConfiguration to injectors
(to be able to use it in TypeResolver)
2012-09-05 18:55:15 +04:00
Natalia.Ukhorskaya 97cab46c39 JavaDescriptorResolver: remove duplicated code 2012-08-30 12:20:26 +04:00
Natalia.Ukhorskaya 19221e3ba6 JavaDescriptorResolver: Add resolve for annotation parameters (array, annotation, enum)
Temporary change testData for LoadJavaTest because enums in parameters of annotations in kotlin files is now unsupported
2012-08-30 10:56:33 +04:00
Pavel V. Talanov 00a12bd013 Constructors for enum entries and class objects have private visibility in frontend.
Introduce DescriptorUtils#getDefaultConstructorVisibility.
DescriptorResolver: remove exception wrapping.
Hardcode package-private visibility for enum entries in JetTypeMapper.

Refactoring:
DescriptorResolver: rename createPrimaryConstructorForObject -> createAndRecordPrimaryConstructorForObject, createPrimaryConstructorForObject now a separate method.
JavaDescriptorResolver: extract containingDeclaration variable.
JetTypeMapper: rename variable declaration -> containingDeclaration.
2012-08-29 14:42:12 +04:00
Alexander Udalov 6af6f2827d get rid of JdkNames 2012-08-27 20:52:40 +04:00
Alexander Udalov d99ffbd120 jet.Annotation
Create a supertype for all Kotlin annotations, jet.Annotation.
Map java.lang.annotation.Annotation to jet.Annotation and vice versa.
Add extension function "annotationType()" to every annotation, similar to java.lang.annotation.Annotation.annotationType()
 #KT-1620 Fixed
2012-08-27 20:44:43 +04:00
Svetlana Isakova 440adfb54b types mapping refactoring
(rename, methods reorder)
2012-08-27 17:09:23 +04:00
Svetlana Isakova 30d3144434 invoke register on java class, not on name 2012-08-27 17:09:20 +04:00
Svetlana Isakova a386a5eb1e KotlinToJavaTypesMap, JavaToKotlinTypesMap added 2012-08-27 17:08:37 +04:00
Pavel V. Talanov 6132946ced Introduce ClassKind#CLASS_OBJECT and ClassKind#isObject and usages.
Rename LazyClassDescriptor#onlyEnumEntries -> enumClassObjectInfo.
Determine ClassKind in JetClassInfo and JetObjectInfo constructor.
Remove complex constructor for enum entry in enum test.
Logic simplified in LazyClassMemberScope.
Minor refactorings.
2012-08-27 15:52:36 +04:00
Pavel V. Talanov b228fd66e0 Enum entry has final modality when loaded from binaries. 2012-08-27 15:52:34 +04:00
Svetlana Isakova 0dcdaccad1 KT-2640 Provide jet.MutableIterator and jet.MutableIterable
#KT-2640 fixed
2012-08-24 15:07:24 +04:00
Nikolay Krasko 57d4a28a94 Remove duplicates and speeding-up PluginJetFilesProvider.allInScope 2012-08-23 15:53:41 +04:00
Pavel V. Talanov 0a044b18d5 Remove VariableDescriptor#isObjectDeclaration and usages.
Replace with BindingContext trace slice OBJECT_DECLARATION_CLASS.
Remove corresponding field from constructor.
Introduce hack in JavaDescriptorResolver which creates dummy class descriptors for enum entry objects.
2012-08-22 18:06:37 +04:00
Natalia.Ukhorskaya 3d9ad3f6cb ExpressionCodegen: take EnumEntry type from containingDeclarationDescriptor
JavaDescriptorResolver: pass to propertyDescriptor correct value of isObject parameter
2012-08-22 14:32:01 +04:00
Natalia.Ukhorskaya aeb297d417 Move isEnumClassObject from JavaDescriptorResolver to DescriptorUtils 2012-08-22 14:31:59 +04:00
Natalia.Ukhorskaya 36ca99ade0 Use validateFqName in FqName(String) constructor.
Fix JavaDescriptorResolver and JavaClassOrPackageScope accordingly.
2012-08-21 21:40:50 +04:00
Natalia.Ukhorskaya 8c9cc058c7 Remove hack in JavaPackageScope#getClassifier. 2012-08-21 21:39:52 +04:00
Natalia.Ukhorskaya 8b8c595f4e JavaDescriptorResolver: represent Java enums as kotlin enums.
Split members from java enum psiclass into two groups: for class itself and for class object:
Hack JavaClassMembersScope to be able to use it for static members.
Hack JavaDescriptorResolverHelper to process fields for enums read from class files.

Introduce JavaDescriptorResolver#ResolverEnumClassObjectClassData.

Specially treat values and valueOf methods.
2012-08-21 21:39:51 +04:00
Natalia.Ukhorskaya 546ec296e2 Extract ResolverClassData as superclass from ResolverBinaryClassData. Use it instead. 2012-08-21 21:39:48 +04:00
Pavel V. Talanov b36873bf6d Class object always have name of the form <class-object-for-ClassName>. 2012-08-21 15:32:44 +04:00
Svetlana Isakova 3d1f71b355 added mapping for Iterable:
java.lang.Iterable -> jet.Iterable
 java.util.Iterator -> jet.Iterator
 in java classes loading
2012-08-16 18:39:23 +04:00
Andrey Breslav 00305ba920 Fixing interdependency between delegation and fake overrides
Main changes sit in OverrideResolver::generateOverridesAndDelegationInAClass()

Now fake overrides AND delegation are generated for supertypes before any processing is done for subclasses.
2012-08-15 16:15:04 +04:00
Evgeny Gerashchenko 199029360a KT-2326 Link external annotations via mechanism in IDEA core when Kotlin depends on IDEA 12.x
Dropped temporary classes.

 #KT-2326 fixed
2012-08-14 21:51:08 +04:00
Nikolay Krasko cf6787b798 Inject context for body resolve 2012-08-14 14:15:10 +04:00
Alex Tkachman 5947759684 proper compilation of enums 2012-08-13 22:37:27 +03:00
Andrey Breslav b76bdd09ff Formatting + redundant modifiers removed 2012-08-13 11:57:10 +04:00
Alex Tkachman b497fcc167 removing hack where ClosureAnnotator deals with range class objects 2012-08-10 09:40:59 +03:00
Evgeny Gerashchenko db101f732e Made some fields final in AlternativeSignatureData. 2012-08-02 16:06:10 +04:00
Alexander Udalov a85f46816e KT-937 When loading array types from Java project them so that they are covariant
#KT-937 Fixed
2012-08-01 21:27:57 +04:00
Evgeny Gerashchenko 7e81898b9f Reverted debug output. 2012-07-31 20:25:03 +04:00
Evgeny Gerashchenko 7370107616 Optimized reading external annotations: now they when annotations file is accessed, it's parsed data is stored in cache. 2012-07-31 20:16:05 +04:00
Andrey Breslav 5f3643804c Import directives migrated from ASM 3.3 to 4.0 with renamed packages 2012-07-25 12:07:19 +04:00
Nikolay Krasko a3cbd37e5f An attempt to to increase idea responsibility
#KT-2494 In Progress
2012-07-24 12:59:26 +04:00
Svetlana Isakova 6f8f151db5 added java.lang.Comparable to JavaTypeTransformer 2012-07-20 19:34:55 +04:00
Svetlana Isakova 084566aac4 classDescriptorMap used instead of classTypeMap
in JavaTypeTransformer
so 'getKotlinAnalog' now is used instead of 'unwrapPrimitive'

classTypeMap removed,
=> removed now unnecessary numberType, throwableType, etc. from JetStandardLibrary
2012-07-20 19:34:55 +04:00
Andrey Breslav e182041eb9 Escaping optimized
TODO: we have to integrate this optimization in IDEA
2012-07-13 12:52:55 +04:00