Alexander Udalov
5d647cac94
Delete ScopeUtils, move its only method
2013-08-26 15:59:52 +04:00
Alexander Udalov
78bd6faffc
Minor, refactor JetFilesProvider
2013-08-26 15:59:51 +04:00
Alexander Udalov
155f3b3b96
Simplify TypeVariableResolver
2013-08-26 15:59:50 +04:00
Alexander Udalov
cbdc157743
Delete PsiAnnotationWrapper
...
Merge its logic into KotlinSignatureAnnotation, move the latter to
resolve/java/kotlinSignature, delete resolve/java/kt package
2013-08-26 15:59:49 +04:00
Alexander Udalov
bd54e070bb
Get rid of dependency on PsiClass from deserialized resolver
2013-08-26 15:59:48 +04:00
Alexander Udalov
8746ee2895
Report ABI errors without PsiClass
2013-08-26 15:59:46 +04:00
Alexander Udalov
19299daacd
Deserialize annotations on class object properties
...
Class object properties' backing fields are generated into static fields of the
containing class, not into fields of class object. For fields we now store the
flag which, if set, tells that this field should be looked for in the
containing class
2013-08-26 15:59:45 +04:00
Alexander Udalov
32c5624531
Convert between byte[] and String[] efficiently
2013-08-26 15:59:44 +04:00
Alexander Udalov
2af8dd4298
Rename package in JPS plugin tests
...
Package 'kotlin' is not supported until package views are implemented, because
its name clashes with the stdlib
2013-08-26 15:59:43 +04:00
Pavel V. Talanov
5ea38437c2
KotlinClassFileHeader determines what kind of annotation it contains
...
Add some stronger assertions about class file format
2013-08-26 15:59:42 +04:00
Pavel V. Talanov
a131592c70
Refactor: Extract utilities related to reading KotlinClass and KotlinPackage annotations to a separate class KotlinClassFileHeader
2013-08-26 15:59:40 +04:00
Pavel V. Talanov
e83c785a50
Add serialization modules as dependencies for plugin
2013-08-26 15:59:39 +04:00
Alexander Udalov
9cb19d17b0
Don't test line numbers on *Package classes
...
Package classes in line number tests only contain "1" as the first line number
of a single function, so there's no point in testing it. The test was failing
due to the latest changes in the order of generation of classfiles (first $src,
then facade)
2013-08-26 15:59:38 +04:00
Pavel V. Talanov
f77dd0bad6
Remove JetTypeJetSignatureReader
2013-08-26 15:59:37 +04:00
Pavel V. Talanov
a9b57a5535
Rearrange JvmStdlibNames, delete old annotations
...
Delete unused constants
Move constants related to abi to JvmAbi class
Constants related to annotation names are now in JvmAnnotationNames
Remove old annotation classes
Deprecate JetClass and JetPackageClass name constants
2013-08-26 15:59:36 +04:00
Pavel V. Talanov
5f108905d1
Remove testing Kotlin signature from WriteSignatureTest
2013-08-26 15:59:34 +04:00
Pavel V. Talanov
01735a0412
Do not write old annotations (JetClass and others)
2013-08-26 15:59:33 +04:00
Pavel V. Talanov
4fe78e4e7b
Move utilities using annotations to determine whether PsiClass is kotlin class or package class to DescriptorResolverUtils
...
Fix some of the usages
PackageClassUtils uses more precise method name
2013-08-26 15:59:32 +04:00
Pavel V. Talanov
7c49374dab
Minor: remove unused field
2013-08-26 15:59:31 +04:00
Pavel V. Talanov
9be16bf94c
Remove logic in JavaPropertyResolver related to kotlin properties
...
Make logic in MembersCache clearer
Remove useless helper classes
2013-08-26 15:59:29 +04:00
Pavel V. Talanov
f5c4075837
Remove PsiClassWrapper class
2013-08-26 15:59:28 +04:00
Pavel V. Talanov
6c02f6aba8
Remove PsiParameterWrapper class
2013-08-26 15:59:27 +04:00
Pavel V. Talanov
9a76cd8472
Remove unused classes and methods in org.jetbrains.lang.resolve.java.kt package
2013-08-26 15:59:26 +04:00
Pavel V. Talanov
33d40f8a50
Use new annotations throughout JetFromJavaDescriptorHelper
...
Remove rest of JetClass annotation uses
2013-08-26 15:58:07 +04:00
Pavel V. Talanov
ba8732d10f
Remove JvmParameterMeaning abstraction
...
Some code enhancements included
2013-08-23 17:39:27 +04:00
Pavel V. Talanov
1843b7bbbe
Don't use DeclarationOrigin
2013-08-23 17:39:27 +04:00
Pavel V. Talanov
69295290eb
Remove big chunk of code related to using old annotations
2013-08-23 17:39:27 +04:00
Pavel V. Talanov
60619a3507
KotlinAbiVersionIndex checks for KotlinClass and KotlinPackage annotations
2013-08-23 17:39:26 +04:00
Alexander Udalov
3123e57aa2
Calculate annotations once for each VirtualFile
2013-08-23 17:39:26 +04:00
Alexander Udalov
f3f0260e69
Don't test DescriptorFinder logic in KotlinClass test
...
LoadCompiledKotlin and DescriptorSerialization tests should cover this.
KotlinClassAnnotationTest should only test that the correct annotation is
written
2013-08-23 17:39:26 +04:00
Alexander Udalov
49604f6298
Minor, move anonymous class to private inner
2013-08-23 17:39:26 +04:00
Alexander Udalov
eff99e563b
Write ProtoBuf.Package to .kotlin_package
...
Instead of a delimited list of callables. Also some minor refactorings
2013-08-23 17:39:26 +04:00
Alexander Udalov
be2636de0f
Refactor AbstractDescriptorSerializationTest
...
Serialize/deserialize package members via PackageData and
DescriptorSerializer.packageProto(), delete useless code
(JavaDescriptorFinder), extract some methods, etc.
2013-08-23 17:39:25 +04:00
Alexander Udalov
9ae9870d44
Don't test annotations in DescriptorSerializationTest
2013-08-23 17:39:25 +04:00
Alexander Udalov
196b829002
Serialize packages via descriptors in codegen
...
Disable KotlinPackage annotation for scripts, otherwise script analyzer tries
to add descriptors to a locked scope
2013-08-23 17:39:25 +04:00
Alexander Udalov
d059a15bff
Minor, make descriptor available to NamespaceCodegen
2013-08-23 17:39:25 +04:00
Alexander Udalov
8cbdb2924a
Minor, make callback method empty, not abstract
2013-08-23 17:39:24 +04:00
Alexander Udalov
132f77d3c4
Minor, delete SerializerProvider
2013-08-23 17:39:24 +04:00
Alexander Udalov
2e3005e431
Minor, deserialized package scope is now not abstract
2013-08-23 17:39:24 +04:00
Alexander Udalov
b602db03f2
DescriptorFinder now can find class names in a package
...
This helps to get rid of "repeated class_name" field in Package protobuf
message. DescriptorFinder in resolve.java uses PSI to find all classes in a
package, and the finder for built-ins just reads .kotlin_class_names file
2013-08-23 17:39:24 +04:00
Alexander Udalov
047ed18901
Change .kotlin_class_names format a little
...
Before writing a list of indexes of built-in classes' names, write the length
of such a list. It helps to read this list normally (not until an exception
happens)
2013-08-23 17:39:23 +04:00
Alexander Udalov
d49a2ed613
Move Intrinsic annotation to javaClass property from its getter
...
This is needed because the property, not its getter, is used as a key to the
intrinsics map when codegen decides how to generate a method call. Earlier it
worked because annotations on getters of properties loaded from bytecode were
mistakenly added to annotations on properties themselves
2013-08-23 17:39:23 +04:00
Alexander Udalov
cfe9d78015
Deserialize annotations from package$src files if needed
...
For top-level members, we now write a FQ name of the package$src class which
has the member's annotations, and read the correct file in deserialization
2013-08-23 17:39:23 +04:00
Alexander Udalov
e63a087ee5
Minor refactoring in codegen
...
Replace String by JvmClassName where possible in OwnerKind, ClassFileFactory,
NamespaceCodegen, add NotNull annotations, some minor renames, etc.
2013-08-23 17:39:23 +04:00
Pavel V. Talanov
977cd7608a
Split KotlinInfo annotation into two: KotlinClass and KotlinPackage
...
Two annotations are needed to properly distinguish package classes
2013-08-23 17:39:23 +04:00
Pavel V. Talanov
8a508fe938
Refactor: use constants instead of string literals
2013-08-23 17:39:22 +04:00
Alexander Udalov
8dd27aa298
Java serialization maps descriptors correctly
...
Instead of determining JVM method names, fields, types heuristically (mapType),
do it correctly: in the place where a member is generated, its descriptor and
signature are stored into MemberMap, which is queried later when we serialize
its container
2013-08-23 17:39:22 +04:00
Alexander Udalov
6035d89c33
Extract field signature out of Java property signature
2013-08-23 17:39:22 +04:00
Alexander Udalov
cf7c27ba79
Minor, Nullable/NotNull annotations
2013-08-23 17:39:21 +04:00
Alexander Udalov
87d4e35388
Deserialize annotations on class properties w/o fields
...
Annotations on properties without backing fields are stored on a special
synthesized method inside the class
2013-08-23 17:39:21 +04:00