Andrey Breslav
d52f2e25b0
AnnotationDescriptor interface extracted
2013-10-15 19:54:39 +04:00
Andrey Breslav
cd275fd814
'runtime' module replaced by 'kotlin-runtime' library
2013-10-14 14:42:25 +04:00
Andrey Breslav
d7936b7ea4
Do not fail when a class is not found
2013-10-06 17:01:40 +04:00
Andrey Breslav
0765e89b19
Weakly retained memoized functions moved out of util.runtime
2013-10-05 16:59:57 +04:00
Andrey Breslav
239ca9728d
StorageManager API does not use Computable and Function and more
2013-10-05 16:59:57 +04:00
Andrey Breslav
7d1c46ed2c
Getting rid of Computable and Function in lazy values and memoized functions
2013-10-05 16:59:56 +04:00
Andrey Breslav
4d28dfada6
Lazy values and memoized functions conform to Kotlin's function interfaces
2013-10-05 16:59:56 +04:00
Alexander Udalov
9d7968457f
JDR doesn't depend on intellij-core
2013-10-04 18:32:42 +04:00
Alexander Udalov
89dbafb6be
Rename KotlinClassFileHeader and related classes
2013-10-04 18:32:42 +04:00
Alexander Udalov
c3abd1c26f
Delete LOG.error from ReadDataFromAnnotationVisitor
...
These conditions can happen on a broken binary data, no need to report an error
about it
2013-10-04 18:32:42 +04:00
Alexander Udalov
098d183a72
Remove Logger from AnnotationDescriptorDeserializer
...
Use abstract ErrorReporter instead
2013-10-04 18:32:42 +04:00
Alexander Udalov
ef7bb0cdf4
Delete LOG.warn about number of type arguments from JDR
...
This can happen when loading symbols from incorrect Java sources, which is OK
2013-10-04 18:32:41 +04:00
Alexander Udalov
f218877cf2
Get rid of dependency of PackageClassUtils on StringUtil
2013-10-04 18:32:41 +04:00
Alexander Udalov
5f0c593bb8
Minor, inline methods, use String instead of StringUtil
2013-10-04 18:32:41 +04:00
Alexander Udalov
edda5d8801
Move AssertInvisibleInResolver check to frontend.java
...
This is a dirty hack, taking advantage of the fact that
JavaResolverCache.getClass() is called exactly once and right after this check
2013-10-04 18:32:41 +04:00
Alexander Udalov
dbba6c614b
Rename JvmClassName.getFqName() and add a warning
...
All usages of this method as of right now seem wrong, as they don't work in the
case of classes which contain dollars in their names -- dollars get replaced to
dots
2013-10-04 18:32:41 +04:00
Alexander Udalov
e8d4aae48b
Minimize usages of JvmClassName.getFqName()
2013-10-04 18:32:41 +04:00
Alexander Udalov
044a47905e
Get rid of dependency on Guava's Multimap
...
Replace with a hand-written multi-map
2013-10-04 18:32:41 +04:00
Alexander Udalov
3d5e128267
Remove trivial dependencies of JDR on Guava
2013-10-04 18:32:41 +04:00
Alexander Udalov
fc78971aea
Delete JvmClassName.getAsmType()
2013-10-04 18:32:40 +04:00
Alexander Udalov
521496b188
Delete JvmPrimitiveType.getAsmType()
...
Create PrimitiveTypesUtil in frontend.java for this and other utilities
2013-10-04 18:32:40 +04:00
Alexander Udalov
f4abaaee10
Delete JvmClassName.byType
...
Replace JvmClassName by ASM Type in many places of JVM codegen: it wasn't used
to abstract anything, but there was a lot of useless conversions between the
two
2013-10-04 18:32:39 +04:00
Alexander Udalov
6898274f47
Delete JvmClassName.getDescriptor()
...
It shouldn't be available in descriptor.loader.java, since it wouldn't depend
on ASM and its descriptors won't make any sense there. Most of the places where
this method was used were in codegen. The few exceptions are reading
annotations for compiled Kotlin classes by ASM visitors, but that will be
abstracted away soon
2013-10-04 18:32:39 +04:00
Alexander Udalov
45bc7c2926
Delete JvmClassName.byClass, refactor JvmAnnotationNames
...
Store constant class names as instances of FqName instead of JvmClassName. This
is done to minimize usages of the method 'JvmClassName.getFqName()', since it's
wrong and shouldn't be used
2013-10-04 18:32:39 +04:00
Alexander Udalov
6aab9fe04e
Delete JvmClassName.byClassDescriptor
...
It only worked correctly by coincidence: mapping from the Kotlin world to the
JVM world should always be done through JetTypeMapper
2013-10-04 18:32:39 +04:00
Alexander Udalov
54db0e30c0
Delete signature name from JvmClassName
2013-10-04 18:32:39 +04:00
Alexander Udalov
1cb68e9cf4
Move KotlinToJavaTypesMap, AsmTypeConstants to frontend.java
...
They're used only in compiler
2013-10-04 18:32:38 +04:00
Alexander Udalov
73b867d1e5
Simplify JvmPrimitiveType, PrimitiveType
...
Delete utility methods from interfaces, move once-used methods to where they're
used
2013-10-04 18:32:38 +04:00
Alexander Udalov
1578d891cb
Remove PsiClassFinder
...
Inline the implementation into JavaClassFinderImpl
2013-10-04 18:32:38 +04:00
Alexander Udalov
19dd2e5e1b
Create special classes for decompiled Java enums
...
Simplify logic in JavaConstructorResolver and JavaClassResolver
2013-10-04 01:03:34 +04:00
Alexander Udalov
01e46bbd11
Move caching logic from java class scope to descriptor
2013-10-04 01:03:34 +04:00
Andrey Breslav
f3cd83c744
All storage-related code moved to util.runtime
2013-10-03 15:49:18 +04:00
Alexander Udalov
f68a702e8f
Report ABI errors on KotlinClass, not VirtualFile
2013-10-02 17:55:02 +04:00
Alexander Udalov
1afd0504fa
Make compiled package fragments not show up in completion, go-to, etc.
2013-10-02 17:55:02 +04:00
Alexander Udalov
3087c6f584
ReadDataFromAnnotationVisitor doesn't depend on ASM anymore
2013-10-02 17:07:37 +04:00
Alexander Udalov
8b63665b20
Delete getFqName() method from KotlinClassFileHeader
...
It's not related to the header. Add getClassName() method to
KotlinJvmBinaryClass, which reads the internal name of the class
2013-10-02 17:05:50 +04:00
Alexander Udalov
a5a80a9ccc
Change KotlinClassFileHeader loading interface
...
It should be able to load the header based on an abstract KotlinJvmBinaryClass,
not only the VirtualFile-based one
2013-10-02 17:05:50 +04:00
Alexander Udalov
2eebcd91c0
Make annotation deserializer not depend on VirtualFile & ASM
...
KotlinJvmBinaryClass now has its own visitor interfaces, which are an
abstraction over ASM visitors and the ones that will be implemented over
reflection
2013-10-02 17:05:50 +04:00
Alexander Udalov
7eff1292f0
Make an abstraction over VirtualFileFinder
...
Java descriptor loader now can work with KotlinClassFinder, which finds
abstract KotlinJvmBinaryClass'es: they are based on VirtualFile in the
compiler/IDE and will be based on j.l.Class in the reflection
2013-10-02 17:05:50 +04:00
Alexander Udalov
c5bed7a246
Remove hack from AnnotationDescriptorDeserializer
...
Now that package fragment classes are generated to "*Package-filename-hash", we
can use virtualFileFinder to find such classes by FQ name. Support
KotlinPackageFragment annotation, by which VirtualFileFinder will determine
that a class was compiled by Kotlin compiler
2013-10-02 17:05:49 +04:00
Alexander Udalov
fdc631d595
Increase ABI version after changes to package fragment names
2013-10-02 17:05:47 +04:00
Alexander Udalov
fc4e13f573
SerializedDataHeader now always has valid annotationData
...
This helps to avoid errors of checking 'instanceof SerializedDataHeader' but
forgetting to check if it 'isCompatibleKotlinCompiledFile'
2013-10-02 02:14:51 +04:00
Alexander Udalov
a97bb80216
Serialize FQ names of Kotlin classes
...
This helps to avoid a nasty hack with loading inner Kotlin classes in JDR,
which makes it a bit easier to 'lazify' JDR, since now the container of a
Kotlin class is no longer required to be resolved eagerly before resolution of
the class itself
2013-09-30 22:43:18 +04:00
Alexander Udalov
ee92ebe941
Move Kotlin descriptor loading to kotlin/ package
2013-09-30 22:43:17 +04:00
Alexander Udalov
fa9307d08c
Delete unused method from VirtualFileFinder
2013-09-30 22:43:17 +04:00
Alexander Udalov
b42a3e6f6c
Write KotlinPackageFragment annotation to package$src classes
2013-09-30 22:43:17 +04:00
Alexander Udalov
afa1f5c947
Move nested class to top-level
2013-09-30 22:43:17 +04:00
Alexander Udalov
84f64a5dfb
Refactor KotlinClassFileHeader
...
Split into two subclasses: KotlinClass/KotlinPackage-annotated classes and
JetClass/JetPackage-annotated classes
2013-09-30 22:43:17 +04:00
Alexander Udalov
e4d538c668
Move KotlinClassFileHeader to header/ package
2013-09-30 22:43:16 +04:00
Alexander Udalov
1f466ff57d
Simplify logic in KotlinClassFileHeader
...
When processing annotations, we should ensure not only that we have no more
than one KotlinClass/KotlinPackage annotation, but any supported header type at
all. Also instead of throwing an exception it's safer to just log the error
2013-09-30 22:43:16 +04:00