Commit Graph

5871 Commits

Author SHA1 Message Date
Andrey Breslav d7773415bf Support storage manager with no locks 2013-10-03 15:49:19 +04:00
Andrey Breslav 0c83832f27 Use ReentrantLock instead of intrinsic locks in LockBasedStorageManager 2013-10-03 15:49:19 +04:00
Andrey Breslav ee72479344 Thread-safe lazy values used in lazy resolve 2013-10-03 15:49:19 +04:00
Andrey Breslav 344a57f2d5 isComputed() supported for lazy values 2013-10-03 15:49:19 +04:00
Andrey Breslav 7dfe1f963d Support returning default values on subsequent calls after recursion detection 2013-10-03 15:49:19 +04:00
Andrey Breslav e13063017a Exception class moved 2013-10-03 15:49:19 +04:00
Andrey Breslav 9bb77b09a3 Lazy values unified in the project 2013-10-03 15:49:19 +04:00
Andrey Breslav 9064cbd664 Support not null lazy value with default on reentry 2013-10-03 15:49:18 +04:00
Andrey Breslav f987efc510 isComputed() supported in simple lazy values 2013-10-03 15:49:18 +04:00
Andrey Breslav 36ce914613 Support recursion detection in lazy values 2013-10-03 15:49:18 +04:00
Andrey Breslav 98dc11bd1b Support recording exceptions in lazy values 2013-10-03 15:49:18 +04:00
Andrey Breslav 38437a1c25 Encoding changed for non-blocking lazy values 2013-10-03 15:49:18 +04:00
Andrey Breslav 13aa3b4e6f Unused classes removed 2013-10-03 15:49:18 +04:00
Andrey Breslav f3cd83c744 All storage-related code moved to util.runtime 2013-10-03 15:49:18 +04:00
Andrey Breslav 48605074aa Lazy values: change encoding, now NOT_COMPUTED is an explicit object, and null is stored as such 2013-10-03 15:49:17 +04:00
Andrey Breslav 51dfdf795f Recursion-tolerant notnull lazy values 2013-10-03 15:49:17 +04:00
Andrey Breslav bbdff45246 Support recursion-tolerant nullable values
All other values are made recursion-intolerant
2013-10-03 15:49:17 +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 a16db2c773 Regenerate ProtoBuf files 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
Alexander Udalov 07f1e61146 Remove unneeded asserts from JavaSupertypeResolver
Don't do anything special if a Java class happens to extend jet.JetObject: it's
not a Kotlin class and we should collect all its supertypes correctly
2013-09-27 16:01:55 +04:00
Andrey Breslav 0d84565570 name and containingDeclaration pulled up 2013-09-26 09:05:00 -07:00
Andrey Breslav 6bed3cdc59 getOriginal() pulled up 2013-09-26 09:04:59 -07:00
Andrey Breslav 3defb3e519 Mutable field made volatile 2013-09-26 09:04:59 -07:00
Andrey Breslav 65b3d5eac5 Optimization: do not read data from input streams, use contents cached in VFS 2013-09-26 09:04:58 -07:00
Andrey Breslav b98d05bd73 'suppress' annotation added to built-ins
#KT-3319 In Progress
2013-09-24 06:58:39 -07:00
Andrey Breslav 2ae2db75ef Unused methods removed 2013-09-24 06:54:26 -07:00