Commit Graph

33578 Commits

Author SHA1 Message Date
Denis Zharkov 2fb5b0e248 Simplify allDesciptors computation
Do not split descriptors into declared/non-declared groups

It should not be important as order of non-declared members' appearance
does not affect stub building, deserialization and other order-sensitive
stuff
2016-09-09 10:27:35 +03:00
Denis Zharkov f0ba09ae40 Optimize deserialized scope members computation for non-existing names
Do not use memoized function if member with given name is not contained in the scope

There are a lot of queries with names of non-existent functions, that
leads to many effectively redundant Map nodes in MemoizedFunction and also cause
additional computation that is worth to compute at once

Also drop unused 'location' parameter
2016-09-09 10:27:35 +03:00
Denis Zharkov b1edb01dd4 Introduce getFunctionNames and getVariableNames into MemberScope
Also provide some basic implementation

The main purpose of these methods is optimization.
Most of the member scopes store mapping from names to descriptors
MemoizedFunction<Name, Collection<Descriptor>>

While there are 10 functions in class in average, there are a lot of
queries with names of non-existent functions, that leads to many
effectively redundant Map nodes in MemoizedFunction and also cause
additional computation that is worth to compute at once
2016-09-09 10:27:35 +03:00
Denis Zharkov 8ee5f3de8f Minor. Use ArrayList instead of LinkedHashSet
Looks like there's no duplicates anyway
2016-09-09 10:27:35 +03:00
Denis Zharkov e89c53d49f Minor. Extract common pattern in DeserializedMemberScope 2016-09-09 10:27:35 +03:00
Denis Zharkov f50d0b63f0 Minor. Simplify type aliases computation
computeNonDeclaredTypeAliases is always empty
2016-09-09 10:27:35 +03:00
Denis Zharkov 2251e3b1e9 Minor. Replace explicit lazy calculation call with delegation convention 2016-09-09 10:27:35 +03:00
Denis Zharkov a0a0d9b554 Get rid of DeserializedMemberScope.ProtoKey class
Only 'name' property matters, 'isExtension' is only needed for sorting
when computing all descriptors (can be replaced with additional sort)
2016-09-09 10:27:35 +03:00
Denis Zharkov 257417bc4a Minor. Lower type aliase declarations priority
There are several reasons for doing this:
- See org.jetbrains.kotlin.serialization.deserialization.descriptors.DeserializedMemberScope.computeDescriptors,
  classifiers are being deserialized in the last turn, so it's necessary to preserve consistent order
- Their priority should be close to classes
2016-09-09 10:27:35 +03:00
Nikolay Krasko 5d65951938 Make removing artifacts work with rri branches 2016-09-08 21:46:41 +03:00
Mikhail Glukhikh 8b6cec6ba2 Test fix: typeFromJavaFlexibleRecursive 2016-09-08 18:54:57 +03:00
shiraji 9d768e2375 Add quickfix for FINAL_UPPER_BOUND: inline type parameter #KT-13773 Fixed 2016-09-08 17:48:01 +03:00
Nikolay Krasko 28d187ca1a More tests for ChangeVisibilityModifierIntention
(cherry picked from commit e7cdba7)
2016-09-08 17:32:40 +03:00
Nikolay Krasko 1e9db3c23e Restrict default applicability range for intentions to enclosing block
(cherry picked from commit bf2aade)
2016-09-08 17:32:38 +03:00
Nikolay Krasko 37492fcc78 Make KtLambdaExpression lazy parsable element
(cherry picked from commit 533fca1)
2016-09-08 17:32:37 +03:00
Valentin Kipyatkov 1d24fc3a7b Refactored to ensure use of correct options 2016-09-08 16:11:12 +03:00
Valentin Kipyatkov 32e4a033db Fixed use of options 2016-09-08 16:11:11 +03:00
Valentin Kipyatkov fc27212456 Shorten references to use analyze() for multiple elements 2016-09-08 16:11:11 +03:00
Valentin Kipyatkov 6efb3ac009 Added TODO 2016-09-08 16:11:11 +03:00
Valentin Kipyatkov 215b870946 Added TODO 2016-09-08 16:11:10 +03:00
Valentin Kipyatkov dd6b5ab5a7 Used analyze to multiple elements for copy/paste 2016-09-08 16:11:10 +03:00
Valentin Kipyatkov 5a5a6d47b3 Minor 2016-09-08 16:11:09 +03:00
Valentin Kipyatkov bcfa31de2b Implemented ability to analyze to multiple elements at once 2016-09-08 16:11:09 +03:00
Valentin Kipyatkov 36c2b01047 KT-13675 Ctrl-W: cannot select type argument in return type
#KT-13675 Fixed
2016-09-07 20:02:50 +03:00
Valentin Kipyatkov 73828d1411 Renamed file 2016-09-07 19:04:49 +03:00
Valentin Kipyatkov 8d16af41a9 Fixed test data 2016-09-07 19:04:48 +03:00
Valentin Kipyatkov 6d028fbcce Supported object value access expressions 2016-09-07 19:04:48 +03:00
Valentin Kipyatkov e8471b4f32 Added TODO 2016-09-07 19:04:48 +03:00
Valentin Kipyatkov 77dfbda389 Added progress when searching invoke() by plain search 2016-09-07 19:04:48 +03:00
Valentin Kipyatkov b1a6255ac2 Renamed class 2016-09-07 19:04:47 +03:00
Valentin Kipyatkov 29831f648d Added @TestOnly 2016-09-07 19:04:47 +03:00
Valentin Kipyatkov 82089da0cf Better test 2016-09-07 19:04:47 +03:00
Valentin Kipyatkov 5b638f51b0 Down-shift to plain search if reference in unknown language encountered 2016-09-07 19:04:46 +03:00
Valentin Kipyatkov e314e22215 Minor refactoring 2016-09-07 19:04:46 +03:00
Valentin Kipyatkov 63ed93d1ac Minor optimization 2016-09-07 19:04:46 +03:00
Valentin Kipyatkov a6a7075568 Fixed the case of public from private class inheritance in Java 2016-09-07 19:04:46 +03:00
Valentin Kipyatkov 904017eaff Covered case when variable of our type is multi-declaration entry 2016-09-07 19:04:46 +03:00
Valentin Kipyatkov 7b907e6518 Added comments 2016-09-07 19:04:45 +03:00
Valentin Kipyatkov 2322ecb032 Fixed test 2016-09-07 19:04:45 +03:00
Valentin Kipyatkov 4e0c3fcee7 Refactored reference searches to take read-actions when necessary 2016-09-07 19:04:45 +03:00
Valentin Kipyatkov 637da2e693 Converted to Kotlin and edited 2016-09-07 19:04:45 +03:00
Valentin Kipyatkov 843ff15943 Fixed assertion about read-action 2016-09-07 19:04:44 +03:00
Valentin Kipyatkov d7a94ac470 Fixed find usages for Java's invoke() 2016-09-07 19:04:44 +03:00
Valentin Kipyatkov 478556890a KT-13605 Find Usages fails to find usages of component function defined in Java
#KT-13605 Fixed
2016-09-07 19:04:44 +03:00
Valentin Kipyatkov 5e52e74963 Fixed test data 2016-09-07 19:04:44 +03:00
Valentin Kipyatkov 0158ff46f3 Fixed operator references search for functions declared in Java 2016-09-07 19:04:43 +03:00
Valentin Kipyatkov f6fbd0b623 Fast search of contains operator 2016-09-07 19:04:43 +03:00
Valentin Kipyatkov 5ce780cafc Optimization 2016-09-07 19:04:43 +03:00
Valentin Kipyatkov 0f32574be0 Fast get/set operators search 2016-09-07 19:04:42 +03:00
Valentin Kipyatkov eeea85c86a Fast search of assignment operations 2016-09-07 19:04:42 +03:00