Alexander Udalov
b9dec41ea0
Cache more stuff in reflection implementation
...
Delete KAnnotatedElementImpl because it's not possible to make it a class (its
subclasses have other classes in supertypes) to cache annotations in a property
2016-09-13 14:12:34 +03:00
Alexander Udalov
80db0e4b71
Minor, make KCallableImpl a class
...
This will allow to cache stuff common to all callables in KCallableImpl
2016-09-13 14:12:33 +03:00
Alexander Udalov
4d7d70db19
Regenerate public API reference after changes in runtime.jvm
2016-09-13 14:12:32 +03:00
Alexander Udalov
d128827a34
Inherit FunctionReference from CallableReference
...
This became possible now because FunctionImpl is no longer a class
2016-09-13 14:12:32 +03:00
Alexander Udalov
a10cf8a931
Support 'is/as FunctionN<...>' and 'invoke' for KFunction instances
2016-09-13 14:12:31 +03:00
Alexander Udalov
dcc66a6400
Drop KFunctionFromReferenceImpl, make FunctionImpl an interface
...
23 invokes in KFunctionFromReferenceImpl (and consequently, in FunctionImpl)
were needed before 1576160390 : a wrapped function
reference must have had the necessary invoke to be called as an instance of a
specific function type. After 1576160390 , this is
not needed anymore because KFunctionFromReferenceImpl is now an internal
implementation detail of reflection, and no invoke is ever called on it.
2016-09-13 14:12:30 +03:00
Alexander Udalov
fbfa61da5d
Drop K(Mutable)Property{0,1,2}Augmented
...
Also store name in KPropertyImpl, so that calling 'name' on a KProperty
instance in the property delegate does not result in unnecessary descriptor
computation
2016-09-13 14:12:29 +03:00
Alexander Udalov
fc043c6e66
Drop KPropertyNFromReferenceImpl classes
...
The only place where their get/set methods were used was in
KPropertyNImpl.Getter.invoke, and it's fine if that results in a reflective
call instead (KPropertyN#getter is not available without kotlin-reflect.jar
anyway). The test data has been changed because a package local Java field is
not accessible via reflection
2016-09-13 14:12:29 +03:00
Alexander Udalov
b0af2581ae
Drop unused get/set implementations from PropertyReference runtime classes
...
They are overridden in all subclasses anyway: either in the corresponding
(Mutable)PropertyReferenceNImpl class, or in the anonymous class for a
reference, generated by the compiler.
2016-09-13 14:12:28 +03:00
Alexander Udalov
d3abc83b4c
Merge DescriptorBasedProperty into KPropertyImpl, make the latter a class
2016-09-13 14:12:27 +03:00
Alexander Udalov
cd703868d4
Inherit KPropertyImpl.Accessor from KCallableImpl
...
This is needed to make KCallableImpl a class
2016-09-13 14:12:26 +03:00
Alexander Udalov
304b5deacb
Simplify KProperty implementations: get rid of KMutablePropertyImpl
2016-09-13 14:12:26 +03:00
Alexander Udalov
c7050ed445
Cache everything cacheable in KClassImpl
...
#KT-10651 Fixed
2016-09-13 14:12:19 +03:00
Alexander Udalov
6a97dc5f2c
Cache declared/non-declared static/non-static KClass members
...
Making KClassImpl.Data, its superclass and ReflectProperties public was
required because they are accessed from other package in KClasses.kt
2016-09-13 14:01:52 +03:00
Alexander Udalov
f292ca3dad
Simplify signature and usages of KDeclarationContainerImpl#getMembers
2016-09-13 14:01:52 +03:00
Alexander Udalov
b9067e6462
Introduce reflection cache in KClassImpl and KPackageImpl
...
Most of KClassImpl operations should be cached, but creating a lazy value for
each operation would significantly increase memory footprint of a KClassImpl
instance. Therefore we decide to store all lazy values under a single lazy
value named 'data' which is stored in KClassImpl. There's a minor overhead of
indirection on any operation now, however it'll allow us to substantially
increase reflection performance by caching everything we can
2016-09-13 14:01:52 +03:00
Valentin Kipyatkov
f6b471ac01
Better tests
2016-09-13 12:02:10 +03:00
Valentin Kipyatkov
5bf701ab03
KT-13047 Autocomplete inserts a fully-qualified variable name inside a String
...
KT-12083 String interpolation -- auto {} if there is a letter after cursor
#KT-13047 Fixed
#KT-12083 Fixed
2016-09-13 12:02:10 +03:00
Alexey Sedunov
6e02051be5
Rename: Rename all overridden members if user chooses to refactor base declaration(s)
...
#KT-8867 Fixed
2016-09-12 21:03:21 +03:00
Alexey Sedunov
a77e1dabce
Move: Do not show directory selection dialog if target directory is already specified by drag-and-drop
...
#KT-13553 Fixed
2016-09-12 21:03:20 +03:00
Alexey Sedunov
bb859ea0f6
Misc: Do not use empty scope for KtParameter/KtTypeParameter (possible fix for EA-1185336)
2016-09-12 21:03:19 +03:00
Alexey Sedunov
23491afde2
Move to Companion Intention: Do not use qualified names as labels
...
#KT-11483 Fixed
2016-09-12 21:03:18 +03:00
Yan Zhulanow
78a4e90132
Minor: Fix Maven plugin compilation (configuration parameter is not required now in analyzeAndGenerate(), cherrypick problem)
2016-09-12 19:07:57 +03:00
Mikhail Glukhikh
222b964f3a
Minor: intention message changed for if/when -> assignment/return
2016-09-12 15:01:17 +03:00
Mikhail Glukhikh
edacc7f8d7
Quick-fix for reassignment in try / catch (fold to assignment) #KT-13778 Fixed
2016-09-12 14:45:20 +03:00
Michael Bogdanov
69dc18b8b4
Proper concrete implementation filtering in java 8 interface case
2016-09-12 12:59:31 +03:00
Michael Bogdanov
4b0c272e19
'toString' implementation in DescriptorBasedFunctionHandle
2016-09-12 12:59:31 +03:00
Mikhail Glukhikh
babf61ec19
Minor: message fixed in diagnostics test
2016-09-12 12:57:48 +03:00
Mikhail Glukhikh
292384fb4c
Merge pull request #948 from shiraji/quick_fix_for_final_upper_bound_2
...
KT-13674 Add quickfix to remove the final upper bound
2016-09-12 13:33:37 +04:00
Dmitry Jemerov
2a5f10855c
Merge pull request #950 from shiraji/expand_brackets
...
KT-13693 Expand selection for array brackets
2016-09-12 12:17:50 +03:00
Dmitry Jemerov
cc29e28b2d
Merge pull request #949 from calexHG/patch-1
...
Fix KtTypeReference.hasParentheses() to check for both LPAR and RPAR
2016-09-12 11:44:29 +03:00
Alexander Udalov
81556b1339
Fix AssertionError in notFoundClasses.kt on bad FQ names (EA-85046)
...
FQ names like "Foo." or "Foo..Bar" were causing this exception. No tests added:
no idea how to reproduce this exception
2016-09-12 10:39:21 +03:00
Alexander Udalov
90eafe0d71
Fix reflective access on overridden generic property reference
...
Generation of callable reference's signature in codegen should use the same
mechanism for obtaining the signature as the runtime in RuntimeTypeMapper,
namely DescriptorUtils.unwrapFakeOverride(...).original
#KT-13700 Fixed
2016-09-12 10:39:21 +03:00
Denis Zharkov
6845d0958a
Refine AALOAD handling in OptimizationBasicInterpreter
...
See comment in test data for clarifications
#KT-13289 Fixed
2016-09-12 10:26:06 +03:00
Denis Zharkov
6269f890c8
Minor. Regenerate tests for type aliases in JS
2016-09-12 10:26:06 +03:00
Yan Zhulanow
261a300299
Do not dex kapt2 test classes (it consumes too much memory while RR)
...
(cherry picked from commit 54f7ac4)
2016-09-10 17:36:54 +03:00
Yan Zhulanow
015130832b
Kapt: allow to use Kapt from compileBunchOfSources()
2016-09-10 17:36:53 +03:00
Yan Zhulanow
fbf44aa9be
Kapt: Fix erasure() for immediate class types (KT-13748)
...
(cherry picked from commit 5fe01f6)
2016-09-10 17:36:51 +03:00
Yan Zhulanow
ef375e66cd
Kapt: calculate default values of Kotlin annotations correctly for annotations from binaries (KT-13733)
...
(cherry picked from commit fed9cb2)
2016-09-10 17:36:50 +03:00
Yan Zhulanow
30a29eaa46
Minor: Fix Gradle tests, update Kotlin artifact version to 1.1
2016-09-10 17:36:15 +03:00
Yan Zhulanow
025f861e76
Minor: Fix path separators check on Windows
...
(cherry picked from commit 974bbe7)
2016-09-10 17:36:15 +03:00
Yan Zhulanow
c6c1673902
Kapt: load all annotations, even if annotation processors does not require it explicitly. Some annotation processors may want to process some more annotations (see DbFlow, Database annotation).
...
Blacklist some common-used Java and Kotlin annotations instead (like Deprecated, Nullable or Metadata).
(cherry picked from commit 6856a7c)
2016-09-10 17:36:15 +03:00
Yan Zhulanow
975364b2ed
Kapt: Provide SourceRetentionAnnotationHandler for incremental compilation.
...
Collect annotations with the "SOURCE" retention.
(cherry picked from commit 6ef66e7)
2016-09-10 17:36:15 +03:00
Yan Zhulanow
c3ae66bc9c
Minor: fix compilation exception (due to exception in kotlinc)
...
(cherry picked from commit 5f2d3c4 )
2016-09-10 17:36:15 +03:00
Yan Zhulanow
471ddc5a93
Kapt: Write annotations with the "SOURCE" retention if kapt2 is enabled
...
(cherry picked from commit 6177b2b)
2016-09-10 17:36:15 +03:00
Yan Zhulanow
00355f3c52
Kapt: Remove generated output directory each time before annotation processing
...
(cherry picked from commit c4b772a)
2016-09-10 17:36:15 +03:00
Yan Zhulanow
32d77e5226
Kapt: support incremental compilation in Gradle (KT-13500)
...
Kapt will process sources on each step of incremental compilation.
(cherry picked from commit 4cb2127)
2016-09-10 17:36:15 +03:00
Yan Zhulanow
743be477ec
Kapt: Add tests with Filer.
...
JavaFileObject.getName() now returns a path as required.
(cherry picked from commit c611f9b)
2016-09-10 17:36:15 +03:00
Yan Zhulanow
824b778a7b
Kapt: support multiple annotation processing steps (KT-13651)
...
(cherry picked from commit 880e183)
2016-09-10 17:36:15 +03:00
Yan Zhulanow
6ceaac63dc
Kapt: provide a default constructor if PsiClass does not have any
...
(cherry picked from commit 550b1c0)
2016-09-10 17:36:15 +03:00