Commit Graph

134 Commits

Author SHA1 Message Date
Alexander Udalov 9a041136f2 Make ClassId's relative class name FqName instead of FqNameUnsafe
It was FqNameUnsafe in times when there were classes without identifier names,
specifically class objects with names like '<class-object-for-...>'
2015-03-23 16:30:25 +03:00
Alexander Udalov 31554b9fa3 Introduce ClassId.getShortClassName() for convenience 2015-03-23 16:30:24 +03:00
Alexander Udalov 06537c5b14 Clarify 'class_fq_name` field in jvm_descriptors.proto
Regenerate protobuf files with protoc 2.5.0
2015-03-23 12:21:38 +03:00
Michael Nedzelsky 9be62de964 add FlexibleTypeCapabilitiesDeserializer.Dynamic object 2015-03-18 09:38:45 +03:00
Michael Nedzelsky c927b69103 DescriptorSerializer: add skip argument to packageProto method 2015-03-18 09:38:33 +03:00
Michael Nedzelsky 930ecb9cf9 move BuiltInsSerializerExtension from builtins-serializer to serialization module 2015-03-18 09:38:25 +03:00
Pavel V. Talanov a50b218c6a default -> companion: Replace some missed usages of "isDefault" 2015-03-17 17:10:53 +03:00
Pavel V. Talanov 06916d98c6 default -> companion: replace all mentions of default and default object 2015-03-17 15:47:39 +03:00
Pavel V. Talanov 188ada2089 Minor: extract ClassDescriptor.secondaryConstructors extension property 2015-03-13 20:17:01 +03:00
Andrey Breslav 36bbd2c0e3 ErrorReporter is now Java-independent 2015-03-11 19:38:15 +03:00
Andrey Breslav 266485add3 Serialization of star projections fixed 2015-03-11 19:38:14 +03:00
Andrey Breslav e0b7e4efca KT-6803 Subtyping breaks on star-projections for recursive generics
Star-projections have upper bounds of the form "parameter's bound where all parameter of the same class are substituted with their star-projections"

  #KT-6803 Fixed
2015-03-11 18:27:36 +03:00
Denis Zharkov 40d7816575 Regenerate protobuf classes
After secondary constructors serialization
2015-03-11 17:45:27 +03:00
Denis Zharkov 111a138a2a Serialize secondary constructors 2015-03-11 17:45:27 +03:00
Alexander Udalov e136025ac5 Show "kotlin.Any" in decompiled text for local/anonymous types 2015-03-07 02:30:28 +03:00
Pavel V. Talanov ed4c265564 Drop ClassKind.CLASS_OBJECT
Default and non-default objects now have ClassKind.OBJECT
2015-03-05 13:06:33 +03:00
Pavel V. Talanov f72f548a93 Add ClassDescriptor#isDefaultObject()
with dummy implementations for now
2015-03-05 13:06:12 +03:00
Pavel V. Talanov f507af15c0 Rename in descriptors.proto: class_object_name -> default_object_name 2015-03-03 20:57:13 +03:00
Pavel V. Talanov 48fbce9582 Refactor: process mentions of class object
Rename usages that refer to "default object" concept now
Test data file names are left as is
2015-03-03 20:57:08 +03:00
Michael Nedzelsky fac2e38054 Do not serizalize null as compile time constant 2015-02-20 02:33:30 +03:00
Alexander Udalov 0d05fca838 Support serialization/deserialization of local classes
Most of these changes are aimed to support and correctly transform ClassId for
local classes, no actual bytes are written or read at the moment (see next
commits). See the comment on ClassId for clarification.

A hack in DescriptorSerializer which erased anonymous types to Any (which had
been breaking the consistency between descriptors resolved from sources and
from serialized information) is now gone
2015-02-16 20:19:54 +03:00
Alexander Udalov fdfe3fd73b Minor, serialize/deserialize local visibility
Also support non-subsequent enum values in Flags
2015-02-16 20:19:51 +03:00
Alexander Udalov cd9898fc43 Minor, rename and invert meaning of ClassId.isTopLevelClass
Also use a simpler constructor and simplify ClassDeserializer.ClassKey
2015-02-16 20:19:50 +03:00
Alexander Udalov ce26ce0458 Drop "extra visibility" from binary format
Descriptors of Kotlin symbols should always have a visibility known to Kotlin
2015-02-16 20:19:49 +03:00
Alexander Udalov 1e50078f6f Delete dependency of 'serialization' on trove4j
Use HashMap of wrapped objects instead of THashMap with custom hashing strategy
2015-02-16 20:19:12 +03:00
Pavel V. Talanov f482768acf Introduce ClassDescriptor#getDefaultObjectDescriptor()
ClassDescriptor#getClassObjectDescriptor (with old semantics) is now a utility
Process usages and replace with calls to a new method where appropriate
2015-02-16 15:38:42 +03:00
Pavel V. Talanov 0343fd8fc7 Rework class objects
Class objects have name "Default" by default
Do not produce synthetic class objects
Class objects have new semantics:
    class "A" has class object "B" if literal "A" can be used as a value of type "B"
Class objects act like ordinary nested objects
    i.e. are accessible from class scope via getClassifier()
Jvm backend: class object fields and class have the name of class object ("Default")
	as opposed to special "OBJECT$" and "object"
Serialization: only the name of class object is needed to serialize data
2015-02-16 15:38:27 +03:00
Michael Nedzelsky df8fed096c add support for compile time constant serialization 2015-02-03 14:41:24 +03:00
Andrey Breslav 0f0f205248 Serializing information about star projections 2015-02-02 19:52:02 +03:00
Alexander Udalov 5903b8c4a7 Reorder and optimize dependencies between modules and libraries
- drop 'kotlin-runtime' and other dependencies which are exported by
  other modules ('util' and 'util.runtime' in case of 'kotlin-runtime')
- make all Kotlin modules from the compiler depend on 'util' for clarity
- put 'util' and 'util.runtime' to the bottom of the list everywhere: when
  kotlin-runtime gets reflection, classes from core/ should have higher
  priority than their previous versions from kotlin-runtime.jar
2015-01-28 19:58:35 +03:00
Alexander Udalov 64c6055030 Rename jet -> kotlin in frontend, descriptors: resolve
org.jetbrains.jet.lang.resolve -> org.jetbrains.kotlin.resolve
2015-01-11 05:09:01 +03:00
Alexander Udalov 524fdc2527 Rename jet -> kotlin in descriptors, types, names
org.jetbrains.jet.lang.descriptors -> org.jetbrains.kotlin.descriptors
org.jetbrains.jet.lang.types -> org.jetbrains.kotlin.types
org.jetbrains.jet.lang.resolve.name -> org.jetbrains.kotlin.name
2015-01-10 15:52:20 +03:00
Alexander Udalov e88f89d1c6 Rename jet -> kotlin in descriptors: built-ins
org.jetbrains.jet.lang.types.lang -> org.jetbrains.kotlin.builtins
2015-01-10 15:52:16 +03:00
Alexander Udalov 05eaf81ba6 Rename jet -> kotlin and regroup files in serialization
org.jetbrains.jet.descriptors.serialization ->
org.jetbrains.kotlin.serialization

Deserialization goes to subpackage deserialization, built-ins-related stuff
goes to subpackage builtins
2015-01-09 16:37:22 +03:00
Alexander Udalov f447a860b1 Rename package jet -> kotlin in util.runtime (StorageManager)
org.jetbrains.jet.storage -> org.jetbrains.kotlin.storage
2015-01-08 23:32:08 +03:00
Alexander Udalov f37e2f173d Rename package jet -> kotlin in util, util-runtime
org.jetbrains.jet.config -> org.jetbrains.kotlin.config
org.jetbrains.jet.utils -> org.jetbrains.kotlin.utils

Also move coreLib.kt to package 'org.jetbrains.kotlin.utils'
2015-01-08 23:32:08 +03:00
Ilya Ryzhenkov be717f48f8 Stop using deprecated APIs 2014-12-16 17:33:24 +03:00
Svetlana Isakova 5b4f10e698 Made vararg parameters have Array<out T> type
instead of simply Array<T>
  #KT-1638 Fixed
  #KT-2163 Fixed
  #KT-3213 Fixed
  #KT-4172 Fixed
  #KT-5534 Fixed
2014-12-12 23:08:28 +03:00
Stanislav Erokhin f640f82ed0 Add serialization for PRIVATE_TO_THIS 2014-12-08 18:24:30 +03:00
Valentin Kipyatkov b8d1f115bf Renamed JetType.isNullable() to isMarkedNullable() 2014-12-03 21:36:10 +03:00
Alexander Udalov 63bfa004fd Introduce binary representation for annotations
Will be used where annotations can't be stored elsewhere: for example,
built-ins, JS, type annotations on JDK<8
2014-12-03 16:10:19 +03:00
Alexander Udalov 9a86318908 Introduce extension for built-ins serialization, drop .kotlin_class_names 2014-12-03 15:58:14 +03:00
Alexander Udalov 9bd815126b Rename NameTable -> StringTable in serialization
Since almost the beginning, it was also used to store arbitrary strings, not
just names
2014-12-03 15:58:13 +03:00
Andrey Breslav ea4f0ab214 Methods in KotlinBuiltIns made static where already possible 2014-12-03 15:39:09 +03:00
Alexander Udalov fd2ddff750 Minor, simplify serialization of enum entries
Enum entries are never reordered during sort (see MemberComparator)
2014-11-28 15:35:59 +03:00
Pavel V. Talanov bd575c39dd Fix calling toString() on ProtoContainer 2014-11-27 21:17:20 +03:00
Pavel V. Talanov f0a9c4f683 Extract non-descriptor specific abstract ancestor for BinaryClassAnnotationAndConstantLoader 2014-11-27 21:17:19 +03:00
Pavel V. Talanov 39e1dfbcc0 Merge AnnotationLoader and ConstantLoader into single interface
Merge all implementation classes into single BinaryClassAnnotationAndConstantLoader
2014-11-27 21:17:18 +03:00
Pavel V. Talanov e4d3a65124 Make AnnotationLoader and ConstantLoader accept descriptor-independent data
Rewrite BaseDescriptorLoader to operate on data derived from proto
Intdoduce ProtoContainer to replace containing descriptor as input data
2014-11-27 21:17:16 +03:00
Alexander Udalov 8cb1c7f0e6 Pass NameResolver to loadClassAnnotations()
It's not used at the moment, but will be in the upcoming implementation of
annotation loader (for JS, built-ins and type annotations)
2014-11-26 17:27:08 +03:00