Commit Graph

1108 Commits

Author SHA1 Message Date
Alexander Udalov 6429dd4b04 Preserve JavaPropertyDescriptor type in substitution/copy
JavaPropertyDescriptor.substitute should return JavaPropertyDescriptor,
similarly to what's happening in JavaMethodDescriptor
2016-03-03 16:08:18 +03:00
Alexander Udalov 371051b1d6 Filter out package members from other facades in KPackageImpl
#KT-10690 Fixed
2016-03-03 16:08:18 +03:00
Valentin Kipyatkov 5aca50b4ca Enhanced constructor descriptor should not loose its source!
#KT-11256 Fixed
2016-03-02 21:43:43 +03:00
Denis Zharkov eb2c584578 Rename JetTypeMapper 2016-03-02 13:38:46 +03:00
Denis Zharkov 4583283515 Search classes by JavaClass through package scope 2016-03-02 13:38:46 +03:00
Denis Zharkov 3652cd9c18 Optimize top level class searching in LazyJavaPackageScope
Do not try to search something, that is known not to exist
2016-03-02 13:38:46 +03:00
Alexander Udalov 1a5a077bd6 Replace map + filterNotNull -> mapNotNull in project 2016-02-20 19:05:30 +03:00
Alexander Udalov 1b8f934b54 Delete deprecated enum 'values' property 2016-02-19 22:28:44 +03:00
Dmitry Petrov 30c2abba3c KT-9550: distinguish signature conflict on override from signature conflict of inherited members.
Add a common OverridingStrategy class for cases where we don't care (yet) about precise diagnostics.
2016-02-19 15:59:08 +03:00
Michael Bogdanov af3437626b Properly calculate isConst for java properties 2016-02-17 16:53:17 +03:00
Denis Zharkov 87497a5dc6 Do not run enhancement for fake overrides with one overridden 2016-02-16 12:01:13 +03:00
Denis Zharkov 42d451f2d1 Optimize ErasedOverridabilityCondition
Do not start substitution if some basic conditions are failed
2016-02-16 12:01:13 +03:00
Denis Zharkov 9f22b17918 Optimize external overridability conditions
- Skip ones that can lead only to success after first success
- And vice versa
2016-02-16 12:01:13 +03:00
Pavel V. Talanov 1800e5a7db Remove some usages of Name.guess (and rename this utility to discourage new usages) 2016-02-15 13:32:42 +03:00
Jake Wharton f713adc96e Add support for AOSP's nullability annotations.
These are different than 'android.support.annotation' in that they are used on the JVM for projects within AOSP.
2016-02-15 11:32:09 +03:00
Pavel V. Talanov 7d98103c0c overriddenDescriptors is empty for java static property and function declarations
Fake overrides are still created for java static with non-empty overriddenDescriptors

Add tests for inheriting visibility for java static members
Add test: check that java static declarations that shadow deprecated declarations should not be deprecated
Add test for corner case where "overriding" java static constant led to incorrect type in inheritor

Fix test data for existing tests
2016-02-11 14:08:14 +03:00
Pavel V. Talanov 7e78e8d8ab Refactor: Move and rename OverridingUtil.DescriptorSink -> OverridingStrategy 2016-02-11 14:08:13 +03:00
Nikolay Krasko 99a693a14b Too many empty ArrayList stored for arguments 2016-02-08 16:43:54 +03:00
Denis Zharkov c879f83037 Fix primitive types mapping
Use boxed version if type was enhaced to not-nullable
2016-02-08 16:40:47 +03:00
Denis Zharkov 18e7272a1e Do not force overridden descriptors computation
Currently 'overriddenDescriptors' of substituted function is lazy
and in most cases it's unnecessary to compute it
(it's enough to use the same field from 'original')
2016-02-08 16:40:47 +03:00
Denis Zharkov fae6de9acd Replace 'addOverriddenDescriptor' with 'setOverriddenDescriptors'
It helps to get rid of redundant SmartSets (e.g. for top-level functions)
2016-02-08 16:40:47 +03:00
Denis Zharkov c1f57b743b Do not build enhanced descriptors if they are unchanged 2016-02-08 16:40:47 +03:00
Denis Zharkov 924d706e79 Release original Java descriptors while enhancing
It's both more correct and helps to release memory retained by
descriptor before enhancement
2016-02-08 16:40:47 +03:00
Alexander Udalov 8800782c83 Move constants from JvmAnnotationNames closer to usages 2016-02-06 15:53:55 +05:30
Alexander Udalov 2f5a6ac465 Minor, add extra constant to JvmAnnotationNames, drop unneeded utility 2016-02-06 15:53:55 +05:30
Alexander Udalov 5de1cf3bb4 Do not write old metadata annotations to bytecode 2016-02-06 15:53:55 +05:30
Ilya Gorbunov a12fe2c18a Do not use inline-only in java 2016-02-01 22:09:17 +03:00
Denis Zharkov 6b33e3fb67 Minor. Rename variables and add assertion 2016-01-29 14:36:53 +03:00
Denis Zharkov 11a96ee8c8 Introduce not null type parameter capability
Java nullability annotations may generate types that currently are not denotable in Kotlin:
class Java {
  void <F> foo(@NotNull F f) {}
}

Type of given value parameter should be not nullable under any substitution:
String/String?/String! because of annotation contract.

NB: Currently there is no full analogues for such types in pure kotlin
2016-01-28 08:36:23 +03:00
Denis Zharkov 08dd675fcd Minor. Drop unused property 2016-01-28 08:36:23 +03:00
Denis Zharkov 6542d091ee Support generic constructors defined in Java
#KT-10686 Fixed
 #KT-10410 Fixed
2016-01-28 08:35:18 +03:00
Ilya Gorbunov 744a7a83f7 Cleanup RC deprecations in compiler and plugin. 2016-01-27 18:34:30 +03:00
Alexey Tsvetkov 56942930c9 Minor: remove unreachable code 2016-01-27 12:28:44 +03:00
Yan Zhulanow 0304bd1dc1 More precise diagnostic messages about "operator modifier is not applicable" 2016-01-26 17:21:44 +03:00
Denis Zharkov f560799bb7 Support top level wildcard types
#EA-73650 Fixed
2016-01-26 16:41:29 +03:00
Alexander Udalov 7981e5aa3a Increase metadata version to 1.1, hardcode incompatibility with 1.0
Add a temporary option to suppress incompatibility errors when compiling Kotlin
against current IDEA libraries until they are migrated
2016-01-23 10:00:19 +03:00
Stanislav Erokhin 30bb8d4828 Minor. Optimized enhanceSignature method 2016-01-22 22:09:33 +03:00
Stanislav Erokhin f710ba88f8 Minor. Removed TypeParameterDescriptor#getLowerBounds 2016-01-22 22:09:33 +03:00
Denis Zharkov d87b13931d Create special type for missing dependencies when resolving annotations
#KT-10748 Fixed
2016-01-22 19:17:22 +03:00
Ilya Gorbunov e500e4bdf4 Obtain purely implemented interface class descriptor by its fq-name. 2016-01-22 05:54:38 +03:00
Ilya Gorbunov 9c0f0cad70 Packages: move collections to kotlin.collections. 2016-01-22 05:54:38 +03:00
Ilya Gorbunov 9fbbc9db98 Packages: move Ranges, Progression, ProgressionIterators to kotlin.ranges and PrimitiveIterators to kotlin.collections. 2016-01-22 05:54:38 +03:00
Alexander Udalov e2f49536f5 Move OldPackageFacadeClassUtils to module light-classes 2016-01-19 18:54:08 +03:00
Alexander Udalov c78bf6c807 Set bytecode version to 1.0.0
It was 1.0.2 only because it was introduced as a clone of the metadata version,
which is 1.0.2 at the moment
2016-01-19 18:43:07 +03:00
Alexander Udalov 27dbfc7aef Rethrow InvalidProtocolBufferException with class file location info 2016-01-19 18:39:59 +03:00
Alexander Udalov 4d93d18af7 J2K DeserializedDescriptorResolver: prettify 2016-01-19 18:39:59 +03:00
Alexander Udalov 3efa51af40 J2K DeserializedDescriptorResolver: convert 2016-01-19 18:39:59 +03:00
Alexander Udalov 432d458c02 J2K DeserializedDescriptorResolver: rename .java -> .kt 2016-01-19 18:39:59 +03:00
Alexander Udalov b216ed99b4 Simplify UTF-8 decoding, just trivially convert bytes to 16-bit Unicode
ASM will do the rest (see ByteVector#encodeUTF8)
2016-01-19 18:39:59 +03:00
Alexander Udalov 9620893fa4 Drop synthetic class kind Function, drop Metadata#xi 2016-01-19 18:39:59 +03:00