Commit Graph

914 Commits

Author SHA1 Message Date
Alexey Tsvetkov 264bd5235b Add isData() to ClassDescriptor 2015-10-19 20:45:00 +03:00
Dmitry Petrov 621d26aeeb Drop package facades: fix incremental compilation tests & proto comparison tests
(package facades are no longer generated)
2015-10-19 16:03:21 +03:00
Dmitry Petrov f227908151 Drop package facades:
- update incremental compilation tests
2015-10-19 16:03:21 +03:00
Dmitry Petrov 70c91b2e75 Drop package facades:
- getting rid of package facades in InlineCodegen & related stuff.
Provide binary source element to top-level package members.
2015-10-19 16:03:20 +03:00
Dmitry Petrov dc399ac46b Drop package facades: get rid of isPackageClassFqName 2015-10-19 16:03:18 +03:00
Dmitry Petrov d19ce49606 Dropping package facades:
- do not depend on package facade in LazyJavaPackageFragment
2015-10-19 16:03:16 +03:00
Dmitry Petrov 149e70aa07 Dropping package facades:
- light classes: do not generate light class for package facade
- drop package facades as multifile classes compilation mode support
- get rid of some additional package facade fqName usages
- update tests for light classes
2015-10-19 16:03:16 +03:00
Denis Zharkov cc94acdabc Do not load common for special properties from Java
I.e. do not treat getName in Java enum as override of Enum.name
2015-10-17 17:46:17 +03:00
Denis Zharkov d8ede6d03e Transform Enum.values to property 2015-10-17 17:46:16 +03:00
Natalia Ukhorskaya 9168572b8c Write local variable for inline function and inline argument 2015-10-17 17:02:55 +03:00
Yan Zhulanow 9ae3b0fa9c Drop loading Java annotation methods as functions 2015-10-16 22:13:34 +03:00
Svetlana Isakova 25b40455ad Serialize/deserialize annotations on type parameters 2015-10-16 21:58:47 +03:00
Denis Zharkov 032ba44070 Minor. Add optimization for getOverriddenBuiltinWithDifferentJvmName 2015-10-16 18:16:03 +03:00
Denis Zharkov d335f71dfe Generate special bridges for builtins with same name but different JVM descriptor 2015-10-16 18:16:02 +03:00
Denis Zharkov 978a4cfa3c Minor. Refine naming for SpecialBuiltinMembers 2015-10-16 18:16:02 +03:00
Zalim Bashorov 79d38a6c8f Report the error when a declaration in Kotlin accidentally overrides a static member from Java 2015-10-16 16:14:34 +03:00
Alexander Udalov 32a9bddbf9 Increase ABI version after yet another change to binary format 2015-10-15 18:25:42 +03:00
Alexander Udalov 9eb2e16b94 Support strings directly in JVM string table
For small strings it may be beneficial to store them as is in the proto at one
point instead of in a class annotation, because each annotation argument in the
classfile has a constant overhead which may be significant for small strings
2015-10-15 18:25:41 +03:00
Alexander Udalov 82d2e623d3 Support a more optimized way of storing types in metadata
Together with almost every type now there's also an id which references a type
from a separate table. Storing such ids instead of Type messages will allow to
reduce the size of the metadata for files where types are used many times over
and over again. Currently only deserialization of such types is supported,
along with the former mechanism
2015-10-15 18:25:39 +03:00
Dmitry Petrov 8cd624a58a Drop package facades: code cleanup in Kotlin project. 2015-10-15 10:33:47 +03:00
Alexander Udalov bd5f068454 Fix build after subtle change of Enum.name from function to property 2015-10-14 22:00:48 +03:00
Alexander Udalov 3c74f48f91 Pass KProperty instances to property delegates
Inherit KProperty from PropertyMetadata, cache corresponding KProperty objects
instead of PropertyMetadataImpl objects, add support for properties with 2
receivers
2015-10-14 20:45:24 +03:00
Mikhail Glukhikh 4614e74e3f isFromJavaOrBuiltins() is now public (compilation fix) 2015-10-14 20:40:34 +03:00
Mikhail Glukhikh d4a1a469b7 Number rename: xxxValue() --> toXxx(), test 2015-10-14 20:40:21 +03:00
Mikhail Glukhikh f8a356747e Stdlib rename: 'name' and 'ordinal' are now properties in Enum, same name functions are deprecated 2015-10-14 20:40:13 +03:00
Mikhail Glukhikh 78cfeb0d7d Stdlib rename: List.indexOf(T), List.lastIndexOf(T), MutableCollection.removeAll(Collection<T>), MutableCollection.retainAll(Collection<T>) 2015-10-14 20:40:09 +03:00
Denis Zharkov e062e32f95 Do not load special builtin overrides from Java as synthesized
It has been done just to avoid clashes with real declarations that look
like our builtins: e.g. 'String removeAt(int index) {}' and 'String remove(int index) {}'in Java.

But synthesized members are even weaker than extensions.

Solution is just to ignore the latter declaration and treat first as effective override
of out builltin.
2015-10-14 20:39:51 +03:00
Denis Zharkov 6fa8083a70 Transform builtin Map declaration and adjust stdlib 2015-10-14 20:39:38 +03:00
Denis Zharkov 1305d9755a Transform CharSequence.length to property 2015-10-14 20:39:29 +03:00
Denis Zharkov 6c0d55e4ed Minor. Rename kotlin file and package part: builtinsPropertiesUtil -> specialBuiltinMembers 2015-10-14 20:39:27 +03:00
Denis Zharkov 0a6bf31a2c Refactor util methods
Group semantically similar parts by objects
2015-10-14 20:39:24 +03:00
Yan Zhulanow 275f3f8954 'operator' checks 2015-10-14 01:29:10 +03:00
Yan Zhulanow bc3d1ddda0 Remove old 'get' delegate convention in interfaces 2015-10-14 01:29:09 +03:00
Alexander Udalov 78829b9e8f Minor, drop some obsolete usages of TRAIT in compiler 2015-10-13 20:29:39 +03:00
Michael Bogdanov f4b7913dd3 sanitizeAsJavaIdentifier function moved to JvmAbi 2015-10-13 11:14:32 +03:00
Dmitry Petrov 7e9e427d4c Java 8 rules for method overrides:
- report errors on implementing methods of Any in interfaces
- update testData

~~~

Java 8 override restrictions: interface can't implement a method of 'Any'
- update compiler sources
2015-10-12 14:12:31 +03:00
Dmitry Jemerov 1523d5bcbf removing static type assertions work in progress 2015-10-12 11:11:23 +02:00
Denis Zharkov 6d864e0854 Adjust collection stubs generating to 'remove' transformation
See substitutedList* tests in Backend
2015-10-11 19:59:30 +03:00
Denis Zharkov 89ded4ab1d Implement hack to support both remove() and removeAt() in MutableList<Int>
Also add couple of tests about CharSequence.get
2015-10-11 19:57:22 +03:00
Denis Zharkov 742a538aed Support loading builtin methods from Java with different names 2015-10-11 19:57:22 +03:00
Denis Zharkov a98d1e1e55 Minor. Convert some properties to functions 2015-10-11 19:57:08 +03:00
Alexander Udalov 9d626ef1d9 Rename KotlinCallable annotation to KotlinFunction 2015-10-11 17:10:40 +03:00
Alexander Udalov d4320b43fa Delete useless class, simplify reading class visitor 2015-10-11 17:10:38 +03:00
Alexander Udalov 9e4823ef82 Write module name to metadata, fix reflection for file facades
Module name will be used for proper introspection of internal members
2015-10-11 17:10:37 +03:00
Alexander Udalov 790c59d9e5 Increase ABI & stub version
See previous commits for motivation
2015-10-11 17:10:36 +03:00
Alexander Udalov a4732b442d Don't create KClass and KPackage instances in <clinit>
This proved to be a fragile technique, which probably doesn't even improve
performance in most cases but has lots of unexpected problems: unconditional
initialization of reflection classes, increasing the size of the bytecode, bugs
with <clinit> in annotations on JVM 6, inability to support conversion of a
class from Kotlin to Java without recompiling clients which use it
reflectively, etc.
2015-10-11 17:10:35 +03:00
Alexander Udalov 8c4d7fdf24 Drop deprecated nested classes from Kotlin metadata annotations 2015-10-11 17:10:33 +03:00
Alexander Udalov 1c229d173e Forget old classes from jet.runtime.typeinfo.*, drop JetValueParameter 2015-10-11 17:10:32 +03:00
Alexander Udalov 934ffed944 Don't write field signatures when not necessary 2015-10-11 17:10:30 +03:00
Alexander Udalov 864926ee2e Don't always write JVM method signatures to metadata
When the trivial type mapping (implemented in JvmProtoBufUtil) from
ProtoBuf.Type instances works fine, don't write the signature since it can be
loaded by exactly the same trivial type mapping
2015-10-11 17:10:30 +03:00