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
8a5336aca2
Don't use $ in package fragment class names
...
Package fragment classes now are named "*Package-<filename>-<hash>" instead of
"*Package$src$<filename>$<hash>". This will help to avoid erroneous code in
intellij FileManager, which assumes that classes with dollars are always inner
classes of some other class (see AnnotationDescriptorDeserializer)
2013-10-02 17:03:24 +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
Evgeny Gerashchenko
eebe605771
Fixed tests on android (file names escaping).
2013-10-01 22:18:03 +04:00
Evgeny Gerashchenko
efef7edca4
Removed copyToArray hack
2013-10-01 21:06:17 +04:00
Andrey Breslav
02e76bd805
Accidental collection modification fixed
2013-10-01 20:19:17 +04:00
Evgeny Gerashchenko
eb5455e89f
Got rid of "jet" file extension.
2013-10-01 19:32:38 +04:00
Evgeny Gerashchenko
dc42be8543
Fixed VerifyError when copyToArray() is immediately returned from method.
2013-10-01 19:32:37 +04:00
Evgeny Gerashchenko
94cb523eb7
Removed examples.
...
Moved to https://github.com/kotlin-projects/examples
2013-10-01 18:43:53 +04:00
Evgeny Gerashchenko
1993bff51b
Temp hack to workaround backend bug
2013-10-01 18:24:54 +04:00
Andrey Breslav
3f00004255
Exception fixed: com.intellij.psi.PsiInvalidElementAccessException
2013-10-01 17:15:47 +04:00
Andrey Breslav
1646b0875e
Fixing assertion failure in a quick-fix
2013-10-01 17:15:47 +04:00
Andrey Breslav
98ce0e078c
Chaching results of findClasses in JavaElementFinder
...
Quieries to this method appear very high in the profile when there are many exceptions in the console
2013-10-01 17:15:47 +04:00
Andrey Breslav
fedf528127
Cache files in the provider
...
This is required when, for example, very many exceptions are thrown in tests, and the console goes crazy calling JetExceptionFilter
2013-10-01 17:15:47 +04:00
Evgeny Gerashchenko
123aef6846
Fixed compilation. toArray → copyToArray
2013-10-01 17:02:33 +04:00
Evgeny Gerashchenko
2ae1a2c81b
Added copyToArray intrinsic method.
...
#KT-3352 fixed
2013-10-01 15:11:30 +04:00
Evgeny Gerashchenko
41d1f277dc
Generated default implementations for Collection.toArray().
...
#KT-3352 in progress
2013-10-01 15:11:30 +04:00
Evgeny Gerashchenko
d56c59d9d7
Removed toArray() from collections (few tests are still failing).
...
#KT-3352 in progress
2013-10-01 15:11:30 +04:00
Evgeny Gerashchenko
48625dd7b6
Disallowed using type parameter as reified type argument.
...
#KT-3050 fixed
2013-10-01 15:06:57 +04:00
Evgeny Gerashchenko
2c877f080e
Introduced CompositeExtension (to pass several of them).
2013-10-01 15:06:57 +04:00
Natalia.Ukhorskaya
722ffbdab5
Add notnull annotations
2013-10-01 14:20:11 +04:00
Natalia.Ukhorskaya
96f8403d1c
Cache module type
2013-10-01 14:03:29 +04:00
Natalia.Ukhorskaya
ea5122e0de
After runtime library update an unrelated jar is affected
...
#KT-4035 Fixed
2013-10-01 11:57:50 +04:00
Natalia.Ukhorskaya
b78815a415
Update path to sources for kotlin-runtime library
2013-10-01 11:57:49 +04:00
Alexander Udalov
5fa489b7d3
Add 'topLevelMemberInvocation.twoModules' test to CompileBinaryTestData
2013-09-30 22:43:18 +04:00
Alexander Udalov
f7db95f63c
Minor refactoring in DeserializedClassDescriptor
2013-09-30 22:43:18 +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
a16db2c773
Regenerate ProtoBuf files
2013-09-30 22:43:17 +04:00
Alexander Udalov
91cbe3e239
Move ClassSerializationUtil to 'compiler-tests' module
...
It's not used in 'serialization'
2013-09-30 22:43:17 +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
Alexander Udalov
92cc0ddd1f
KotlinClassFileHeader is now nullable everywhere
...
'null' means there's no header. This makes all of KotlinClassFileHeader's
fields non-null
2013-09-30 22:43:16 +04:00
Alexander Udalov
9e9b3c7284
Make KotlinClassFileHeader immutable, make its inner class nested
2013-09-30 22:43:16 +04:00
Alexander Udalov
e981681d3e
Remove KotlinClassFileHeader.HeaderType.NONE
...
Use null instead
2013-09-30 22:43:16 +04:00
Alexander Udalov
b4d9fb75d8
Minor refactorings in KotlinClassFileHeader
2013-09-30 22:43:15 +04:00
Alexander Udalov
b9ce7f9289
Remove dependency of annotation deserializer on ASM Type
2013-09-30 22:43:15 +04:00
Alexander Udalov
ed6f908049
Move JavaProtoBufUtil utilities to where they're used
...
Serialization goes to backend: it's not needed in runtime, at least in the
state in which it is now (dependent on ASM).
Deserialization goes to AnnotationDescriptorDeserializer. Inline some methods,
remove unneeded abstractions.
This removes dependency of serialization.java on ASM
2013-09-30 22:43:15 +04:00
Alexander Udalov
dfb0908da0
Move 8bit<->7bit logic to a separate class
2013-09-30 22:43:15 +04:00
Svetlana Isakova
a3f9cef354
fixed bug: 'isStatement' for function body == 'hasBlockBody'
...
not vice versa
2013-09-30 21:06:05 +04:00
Pavel V. Talanov
fa8ca4e781
Refactor: Improve code clarity in DelegationResolver
...
Filter out non-overridable descriptors earlier for possible optimization
Report error to trace even if name identifier is null
2013-09-30 20:54:44 +04:00
Pavel V. Talanov
9eeda58747
Fix for MakeOverriddenMemberOpenFix
...
Fixes bugs which led to BindingContextUtils#descriptorToDeclaration throwing exception
2013-09-30 20:54:43 +04:00
Pavel V. Talanov
9599f7d98c
Test for delegated members being overridden
2013-09-30 20:54:42 +04:00