Commit Graph

54 Commits

Author SHA1 Message Date
Alexander Udalov 925b0e567e Minor, delete leftovers from package part refactorings 2015-10-28 21:51:19 +03:00
Alexander Udalov d29757d927 Make upper bounds of type parameter a list instead of a set
The same for lower bounds, also refactor type parameter implementations
2015-10-28 19:11:56 +03:00
Dmitry Jemerov d6a3870101 rename Kt to Kotlin in KtType, KtIcons 2015-10-20 16:23:31 +02:00
Dmitry Jemerov 49033e0002 rename Jet* classes to Kt* 2015-10-19 21:35:30 +02:00
Alexey Tsvetkov ea40f8af92 Serialize flags 2015-10-19 20:45:01 +03:00
Alexey Tsvetkov 264bd5235b Add isData() to ClassDescriptor 2015-10-19 20:45:00 +03:00
Svetlana Isakova 25b40455ad Serialize/deserialize annotations on type parameters 2015-10-16 21:58:47 +03:00
Alexander Udalov 4c21142648 Store type parameter names sometimes instead of ids
This helps to reuse instances of types when TypeTable is enabled in cases when
a file or a class contains a lot of functions with type parameters with the
same name (like Maps.kt in the stdlib with "Map<K, V>")
2015-10-15 18:25:40 +03:00
Alexander Udalov fb5d8de84b Use type table in DescriptorSerializer, add switch to enable/disable, test 2015-10-15 18:25:40 +03:00
Dmitry Petrov 8cd624a58a Drop package facades: code cleanup in Kotlin project. 2015-10-15 10:33:47 +03:00
Alexander Udalov 15b0d3c7c7 Minor, safer way to avoid storing defaults in proto 2015-10-11 17:10:39 +03:00
Alexander Udalov 3506a9615e Don't write default values of flags, provide sensible defaults 2015-10-11 17:10:28 +03:00
Alexander Udalov e4efa27b76 Drop Callable and primary/secondary constructor proto messages 2015-10-11 17:10:26 +03:00
Ilya Gorbunov 90e5ee8a7e Replace KotlinPackage legacy facade with corresponding package parts. 2015-10-07 22:36:29 +03:00
Alexander Udalov b47982a0a6 Write new protobuf messages for packages as well as classes
An addition to ad735cd
2015-10-05 09:08:51 +03:00
Alexander Udalov ad735cd788 Split ProtoBuf.Callable to three messages: constructor, function, property
Serialize both at the moment, will drop the old one after bootstrap
2015-10-03 00:59:30 +03:00
Alexander Udalov e4090d3f30 Cleanup descriptors.proto, regenerate
- move enums and messages nested in Callable to top level, since they're likely
  to be reused in other messages soon
- delete obsolete comments: some did not any value, some became obsolete with
  custom options ("id in StringTable" -> name_id_in_table)
2015-10-02 20:30:55 +03:00
Pavel V. Talanov 0ae842a05d 'descriptors' module exports 'deserialization', not the other way around
Also remove some of redundantly specified dependencies
2015-10-01 17:53:13 +03:00
Yan Zhulanow 32e2a550b4 'infix' modifier 2015-09-30 04:03:27 +03:00
Alexander Udalov 3b9d90429b Simplify local class name serialization, don't go through extension
Also fix it for the case of a class in a non-default package
2015-09-29 16:26:28 +03:00
Alexander Udalov 542bfab96f Don't write unnecessary information to ValueParameter proto
Flags can have a default value and the index can be trivially computed almost
all the time
2015-09-29 16:26:28 +03:00
Alexander Udalov ccf72668e0 Don't write default upper bound for type parameters in protobuf 2015-09-29 16:26:27 +03:00
Alexander Udalov 7d5bd3cf50 Simplify storage of JVM signatures in binary metadata
Store the whole method & field descriptor strings. Moving these strings to
separate annotation arguments later will allow to reuse them with the ones in
the constant pool, presumably allowing to save lots of space (up to 10%)
2015-09-29 16:26:25 +03:00
Alexander Udalov 68051fa3bb Minor, refine parameter type of StringTable#getFqNameIndex 2015-09-29 16:26:25 +03:00
Alexander Udalov da68c4d9ee Extract interface out of StringTable
Rework SerializerExtension interface: don't pass StringTable to each method
every time, create it in each extension's constructor instead and expose to
DescriptorSerializer with an interface method
2015-09-29 16:26:24 +03:00
Alexander Udalov e749bc262d Delete deprecated Type.Constructor message, advance ABI version 2015-09-29 16:26:24 +03:00
Yan Zhulanow bc727a170b Add 'operator' keyword 2015-09-23 21:25:51 +03:00
Dmitry Petrov 3cd1c222f0 Generate delegates to multifile class members in package facade classes
(unless using -Xmultifile-package-facades option)
2015-09-23 17:41:13 +03:00
Denis Zharkov 98dd08109d Serialize/Deserialize const modifier 2015-09-23 08:20:56 +03:00
Alexander Udalov 4ca8a51234 Move Interner from deserialization to util
This class is not used in core and should not end up in kotlin-reflect.jar
2015-09-22 18:22:59 +03:00
Alexander Udalov 93b5065cf5 Get rid of SerializationUtil, move methods to DescriptorSerializer 2015-09-22 18:22:55 +03:00
Alexander Udalov 04b8991bdd Minor, move BuiltInsSerializerExtension to module builtins-serializer 2015-09-22 18:22:54 +03:00
Michael Nedzelsky a8e1c1f7d3 move Interner.java to deserialization module 2015-09-19 00:13:55 +03:00
Michael Bogdanov 49ee4169f3 Package part proto generation fix 2015-09-07 16:29:14 +03:00
Michael Bogdanov 7f2973dc7d proto serialization 2015-09-07 16:28:48 +03:00
Yan Zhulanow add13cae82 lateinit modifier on property 2015-09-05 00:54:18 +03:00
Alexander Udalov df935f5bb7 Support reflection on lambdas and function expressions
Write a special annotation containing the bytes for the Callable protobuf
message and deserialize it at runtime properly

 #KT-9005 Fixed
2015-09-03 21:43:58 +03:00
Yan Zhulanow e7703df0b6 Use a single AnnotatedCallableKind enum item for property 2015-08-31 15:33:14 +03:00
Michael Nedzelsky ef8381f8af two optional fields have been added to Type.Constructor message in descriptors.proto in preparation to remove field which requires double interpetation 2015-07-28 19:48:37 +03:00
Pavel V. Talanov aae8ccfd57 Refactor: AnnotationSerializer does not depend on bultins 2015-07-17 19:21:24 +03:00
Pavel V. Talanov c313887641 Split CompileTimeConstant into two entities
1. ConstantValue
	* just holds some value and its type
	* implementations for concrete constants
2. CompileTimeConstant
	* is only produced by ConstantExpressionEvaluator
	* has additional flags (canBeUsedInAnnotation etc)
	* has two implementations TypedCompileTimeConstant containing a constant value
		and IntegerValueConstant which does not have exact type
	* can be converted to ConstantValue

Adjustt usages to use ConstantValue if flags are not needed
Add tests for some uncovered cases
2015-07-16 02:28:05 +03:00
Pavel V. Talanov 5dc5d77e60 Inject builtins in constants 2015-07-15 21:09:52 +03:00
Pavel V. Talanov ea1a85e78c Introduce CompileTimeConstantFactory 2015-07-15 21:09:40 +03:00
Pavel V. Talanov b0a4520710 Refactor compile constants to reduce boolean parameter hell 2015-07-15 20:57:02 +03:00
Pavel V. Talanov 0369de86c7 Convert compile constant classes to kotlin: j2k 2015-07-15 20:56:41 +03:00
Denis Zharkov 0a19fb7df2 Make project compilable after types enhancement 2015-07-09 16:36:46 +03:00
Denis Zharkov d71fe0d11a Drop JavaClassValue and it's usages
Also drop related testData
2015-06-12 09:55:10 +03:00
Alexander Udalov 48b18f18d3 Restore explicit imports of Kotlin function types in Java
This is a follow-up to 738a84e259 and
d4965a4f3e. Optimize imports in all files
affected in those commits, drop temporary _.kt
2015-05-26 18:46:27 +03:00
Alexander Udalov 738a84e259 Temporary hack to migrate functions to package kotlin.jvm.functions
Add a file in package 'kotlin.jvm.functions' to the project and replace
explicit imports of functions 'kotlin.Function{n}' to two imports 'kotlin.*'
and 'kotlin.jvm.functions.*', so that the codebase can be compiled both by the
old and by the new compiler
2015-05-26 15:04:34 +03:00
Alexander Udalov 0732b78853 Serialize/deserialize annotations on types 2015-04-29 01:03:55 +03:00