Dmitry Petrov
67a50e92d0
Load annotations for default getter and setter
...
#KT-14697 Fixed
2017-10-05 10:24:29 +03:00
Denis Zharkov
265794e712
Add necessary ResolutionScope::recordLookup implementations
2017-09-28 14:01:30 +03:00
Denis Zharkov
580a7e3e4d
Drop location parameter from ResolutionScope::definitelyDoesNotContainName
...
definitelyDoesNotContainName is called too eagerly sometimes and it leads
to obviously redundant lookups
The idea is to put responsibility for calling recordLookup to resolution
itself
2017-09-28 14:01:30 +03:00
Denis Zharkov
860951748f
Filter out inapplicable member scopes in resolution
2017-09-28 14:01:30 +03:00
Denis Zharkov
3322ed6e04
Implement LazyImportResolver::definitelyDoesNotContainName
2017-09-28 14:01:30 +03:00
Denis Zharkov
6e766634c1
Add location parameter to ResolutionScope::definitelyDoesNotContainName
...
It should be used to record lookups in case of fast paths
in resolution
2017-09-28 14:01:30 +03:00
Denis Zharkov
cd3edfc5b2
Introduce MemberScope::classifierNames and some implementations
...
It aims to help with further optimizations
2017-09-28 14:01:30 +03:00
Denis Zharkov
94356e891b
Introduce ResolutionScope::definitelyDoesNotContainName
...
Also add some obvious implementations
This method might be used in resolution to filter out
inapplicable scopes
2017-09-28 14:01:30 +03:00
Alexander Podkhalyuzin
3f8170d369
Clean idea files generated on the gradle import, add them to .gitignore
2017-09-19 23:58:27 +02:00
Stanislav Erokhin
194d16176c
Rename protobuf header/impl flags
2017-09-15 18:29:36 +03:00
Stanislav Erokhin
e86d2f00ff
Rename isImpl to isActual in descriptors
2017-09-15 18:25:49 +03:00
Stanislav Erokhin
c8ee424f67
Rename isHeader to isExpect in descriptors
2017-09-15 18:25:41 +03:00
Stanislav Erokhin
fd6eab38e5
Regenerate comments in protobuf files for isHeader -> isExpect
2017-09-15 18:25:34 +03:00
Alexander Udalov
2bb437b219
Do not load JvmPackageName-annotated parts on Kotlin < 1.2
2017-09-13 22:59:03 +03:00
Alexey Tsvetkov
1c4ada2008
Fix searching serialized classes package contains multiple fragments
2017-08-29 04:28:03 +03:00
Alexey Tsvetkov
46a3a59b81
Fix missing lookups from deserialized JS descriptors
2017-08-10 21:19:42 +03:00
Valentin Kipyatkov
9361cd895c
Support for import aliases in code completion
...
#KT-8848 Fixed
2017-08-08 22:06:04 +03:00
Mikhael Bogdanov
db9f925bb1
Switch default project jvm target to 1.8, keep 1.6 for core modules
2017-08-04 13:14:50 +02:00
Alexander Udalov
5128b8a409
Add default implementation for Annotations.findAnnotation
2017-07-20 13:27:34 +03:00
Alexander Udalov
f39106f75c
Do not use parameter descriptors in AnnotationDescriptorImpl
2017-07-20 13:26:13 +03:00
Alexander Udalov
41ea0e8ef8
Introduce AnnotationDescriptor.fqName
...
Could be used instead of ".annotationClass.fqName" to avoid the unneeded
resolution of the annotation class descriptor
2017-07-20 13:25:38 +03:00
Alexander Udalov
7ec67505c5
Optimize Annotations.isEmpty in some implementations
2017-07-20 13:25:38 +03:00
Alexander Udalov
9ee4b39e1b
Provide default implementation for Annotations.findExternalAnnotation
2017-07-20 13:25:38 +03:00
Alexander Udalov
5636318eb4
Optimize DeserializedAnnotations in terms of memory traffic
...
Do not wrap every annotation object into an AnnotationWithTarget
2017-07-20 13:25:38 +03:00
Alexander Udalov
21197b53aa
Do not load annotations on value parameter if there are none
...
Also fix an error in the doc in descriptors.proto
2017-07-20 13:25:38 +03:00
Denis Zharkov
99a10d8d63
Minor. Rename compactIfPossible -> compact
...
As ArrayList can always be compacted
2017-07-20 10:53:09 +03:00
Mikhail Glukhikh
9c06739594
Cleanup: apply "lift out..." inspection (+ some others)
2017-07-07 18:15:30 +03:00
Alexander Udalov
751ff48301
Extract logic of builtins package fragment provider creation
...
This allows to drop the compile dependency of module 'descriptors' on
'deserialization', breaking the circular dependency between them
2017-06-06 14:29:20 +03:00
Alexander Udalov
1728b77b2c
Minor, refactor createBuiltInsPackageFragmentProvider
2017-06-06 14:29:19 +03:00
Alexander Udalov
cbaa676c3d
Move some declarations between 'descriptors' and 'deserialization'
...
- Move the following from 'deserialization' to 'descriptors':
NotFoundClasses.kt
AdditionalClassPartsProvider.kt
ClassDescriptorFactory.kt
PlatformDependentDeclarationFilter.kt
findClassInModule.kt
- Move the following form 'descriptors' to 'deserialization':
BuiltInSerializerProtocol.kt
builtInsPackageFragmentProvider.kt
- Extract a marker interface from BuiltInsPackageFragment and move its
implementation to 'deserialization'
- Change the type of parameters in PlatformDependentDeclarationFilter
and AdditionalClassPartsProvider to ClassDescriptor
This will help in getting rid of the circular dependency of
'descriptors' <-> 'deserialization'
2017-06-06 14:29:18 +03:00
Denis Zharkov
63c5d85cf4
Optimize memory footprint for generated protobuf code
...
The problem was that an overload of CodedOutputStream.newInstance
without size uses 4000 as a default value, thus allocating
a 4k-sized byte array.
At the same time the array remained effectively unused
in the most cases since it only used for storing data
for unknown fields.
Because such arrays are being created for each read of
protobuf message, during compilation of IntelliJ project
it was producing 25% of redundant memory traffic.
Of course these arrays were all in the young gen, but still
they have some effect on GC
2017-05-17 14:34:11 +03:00
Pavel V. Talanov
55a0e138fc
Refactor: extract AnnotationDescriptor.annotationClass utility
2017-05-02 15:40:20 +03:00
Alexander Udalov
38ea9986ab
Make KotlinType.isError extension instead of member
2017-04-26 18:10:49 +03:00
Pavel V. Talanov
795a83ee24
LookupTracker.DO_NOTHING is the default implementation of LookupTracker
2017-03-30 18:59:19 +03:00
Dmitry Jemerov
03a26c4ce0
Set language level 6 for modules using JDK 6
2017-03-29 18:41:00 +02:00
Alexander Udalov
db1f039586
Serialize and deserialize 'header' modifier for descriptors
...
This fixes KT-17001 because now 'header' modifier is loaded correctly
for deserialized members and the standard disambiguation in
OverloadingConflictResolver.compareCallsByUsedArguments takes place,
where header members are discriminated against the corresponding impl
members
#KT-17001 Fixed
2017-03-27 19:50:25 +03:00
Alexander Udalov
af5fbef4ea
Use JDK 1.6 to compile modules under "core"
...
Outputs of these modules go into kotlin-stdlib and kotlin-reflect, both
of which must be usable on Java 6
2017-03-21 13:03:18 +03:00
Simon Ogorodnik
f56af41d1e
Fix TypeAliasConstructorDescriptor's to create only once when required
...
Some IDE features relates onto that same descriptors will remain same
between resolve calls
Fix it to be true for TypeAliasConstructorDescriptor's
#KT-16265 fixed
2017-03-20 16:55:40 +03:00
Mikhail Glukhikh
b121bf8802
Cleanup: fix some compiler warnings (mostly deprecations, javaClass)
2017-03-15 17:35:31 +03:00
Mikhail Glukhikh
d0cc1635db
Cleanup: apply "Use synthetic property access syntax"
2017-03-15 16:13:40 +03:00
Alexander Udalov
25c1828288
JS: write and load pre-release flag on binaries
2017-03-03 13:33:51 +03:00
Alexander Udalov
de8dd37e44
Change DeserializedContainerSource.presentableFqName to String
...
To allow outputting something other than "Class 'XXX'" in the diagnostic
message for declarations deserialized from JS
2017-03-03 13:33:51 +03:00
Alexander Udalov
b52b90c182
Extract serialization of packageFqName extension to SerializerExtensionBase
2017-03-03 13:33:51 +03:00
Alexander Udalov
5a00a97cf1
Extract common parts from deserialization of built-ins and JS
2017-03-03 13:33:50 +03:00
Alexander Udalov
3cb8f1ab20
Drop BuiltIns protobuf message, use ProtoBuf.PackageFragment instead
2017-03-03 13:33:50 +03:00
Alexander Udalov
a36e457c12
Introduce PackageFragment protobuf message for kjsm/builtins/common metadata
2017-03-03 13:33:50 +03:00
Alexander Udalov
e19c1b5364
Drop MockTypeAliasDescriptor, use MockClassDescriptor instead
...
It's irrelevant whether the non-found classifier is a class or a
typealias
2017-02-28 20:19:58 +03:00
Alexander Udalov
794cc1e3be
Refactor API of NotFoundClasses
...
Move deserialization-related stuff to TypeDeserializer, because it's
going to be used in other places besides deserialization
2017-02-28 20:19:58 +03:00
Alexander Udalov
86994f81c3
Refactor ClassId.getOuterClassId, make it nullable
2017-02-28 20:19:57 +03:00
Stanislav Erokhin
0a24bf1613
Fix type deserialization for suspend function types which was written by pre-release compiler.
...
Notes: if arity == 0, it means that type was `suspend () -> String` => arguments.size == 1, and it means that SuspendFunction0 has only one type argument and it is return type.
2017-02-21 17:26:07 +03:00