Alexander Udalov
b42a3e6f6c
Write KotlinPackageFragment annotation to package$src classes
2013-09-30 22:43:17 +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
Evgeny Gerashchenko
f23ba19258
Simplified.
2013-09-25 20:59:24 +04:00
Evgeny Gerashchenko
3200997bca
Extracted method.
2013-09-25 20:59:24 +04:00
Evgeny Gerashchenko
b4bb08c013
Generating stub methods for read-only map and entry.
2013-09-25 20:59:24 +04:00
Evgeny Gerashchenko
511c908ba9
Generating stub methods for read-only collection.
2013-09-25 20:59:24 +04:00
Evgeny Gerashchenko
47b70427e1
Generating remove() for Iterator using same mechanism.
2013-09-25 20:59:23 +04:00
Evgeny Gerashchenko
b4368ad578
Generating stub methods for read-only list.
2013-09-25 20:59:23 +04:00
Evgeny Gerashchenko
e98b75b462
Do not generate toString and other methods if they are inherited.
2013-09-25 20:59:23 +04:00
Evgeny Gerashchenko
23e1484319
Using more common type.
2013-09-25 20:59:23 +04:00
Andrey Breslav
4644858b11
@NotNull propagated to JetVisitor implementations
2013-09-24 07:05:21 -07:00
Mikhael Bogdanov
7520ff1420
KT-3308: Support local generic functions in codegen
...
#KT-3308 Fixed
2013-09-24 12:59:57 +04:00
Mikhael Bogdanov
fc1c3a2e23
KT-3978: Kotlin: [Internal Error] org.jetbrains.jet.codegen.CompilationException: Back-end (JVM) Internal error: null
...
#KT-3978 Fixed
2013-09-19 15:40:28 +04:00
Mikhael Bogdanov
0486e6cf4c
Substitute CALLABLE_REFERENCE slice with FUNCTION one
2013-09-19 15:11:52 +04:00
Mikhael Bogdanov
59c04bd4cf
Do direct call to local functions, inplace closures, and callable references (not via bridge method)
2013-09-19 15:11:49 +04:00
Alexander Udalov
cb10cbdf7a
Remove PSI usages from ScriptDescriptor
2013-09-18 16:40:35 +04:00
Alexander Udalov
d0a9464504
Refactor DescriptorUtils
...
Remove dependency on org.jetbrains.jet.lang.psi, move utilities closer to their
usages, add NotNull annotations, fix formatting, etc.
2013-09-18 16:40:35 +04:00
Alexander Udalov
6ca71349f8
Create DescriptorFactory utility class
...
Will contain utilities needed to create different common descriptors, such as
default getters/setters, enum values/valueOf methods, etc.
2013-09-18 16:40:34 +04:00
Mikhael Bogdanov
8ffee527d7
KT-3573 "Error generating primary constructor" when trying to use "this" in extensions from constructors
...
#KT-3573 Fixed
2013-09-17 17:31:47 +04:00
Pavel V. Talanov
61d5d43e15
Do not generate KotlinClass/Package annotation when not in ClassBuilderMode.FULL
...
#KT-3967 Fixed
2013-09-05 21:32:48 +04:00
Alexander Udalov
2b9225fdd4
Extract descriptor.loader.java module from frontend.java
...
Will be used in runtime to load reflected classes
2013-09-04 21:55:11 +04:00
Alexander Udalov
202524ab03
Get rid of recordSourceForSynthesized
...
Sam descriptors now implement a common interface
SynthesizedCallableMemberDescriptor, introduced in frontend.
BindingContext.SOURCE_DESCRIPTOR_FOR_SYNTHESIZED is no longer needed
2013-09-04 21:55:11 +04:00
Alexander Udalov
517567fd24
Get rid of SAM_CONSTRUCTOR_TO_INTERFACE
...
use SamConstructorDescriptor instead
2013-09-04 21:55:04 +04:00
Alexander Udalov
4a620dfcbb
Get rid of SAM_ADAPTER_FUNCTION_TO_ORIGINAL
...
Use SAM adapters hierarchy instead
2013-09-04 21:55:04 +04:00
Alexander Udalov
f76942fd19
Get rid of JavaBindingContext.IS_DECLARED_IN_JAVA
...
Create specialized Java descriptor classes instead
2013-09-04 21:55:03 +04:00
Alexander Udalov
723d5ef564
Fix default argument method calls
...
In some cases, calls of methods with default arguments were invoked via the
actual generated method, not via the "...$default" accessor
2013-09-03 22:26:05 +04:00
Svetlana Isakova
01826af806
rename: deparenthesizeWithNoTypeResolution -> deparenthesize
2013-09-03 13:09:16 +04:00
Alexander Udalov
9e7aa69eb7
Resurrect JetValueParameter
...
Its name() and type() methods are still used in Kara (the latter just to check
if the type is nullable, so only the first character is needed)
2013-08-29 16:48:09 +04:00
Pavel V. Talanov
7920321e3d
Do not try to write KotlinPackage annotation if package class is not generated
2013-08-27 19:03:04 +04:00
Andrey Breslav
ca3d7f9780
Assertion message
2013-08-27 15:03:27 +04:00
Alexander Udalov
c5e37cc3de
Move classes around in frontend.java
...
Move Java<->Kotlin class mapping to 'mapping' package, move method mapping to
'kotlinSignature' (and make it package local), delete unused methods
2013-08-26 16:00:08 +04:00
Alexander Udalov
85e7b87ccd
Move java visibilities to JavaVisibilities class
...
Move related utilities to where they're used
2013-08-26 16:00:06 +04:00
Alexander Udalov
d6ca5f9416
Restore parameter annotation codegen
...
It was deleted accidentally during removal of old signatures in 55f9859
2013-08-26 15:59:55 +04:00
Alexander Udalov
763572663e
Delete almost all code related to signature writing
...
Delete org.jetbrains.jet.rt.signature and jet.typeinfo packages from runtime,
refactor BothSignatureWriter so that it now writes only java generic signature
and saves parameter types and kinds
2013-08-26 15:59:54 +04:00
Alexander Udalov
78bd6faffc
Minor, refactor JetFilesProvider
2013-08-26 15:59:51 +04:00
Alexander Udalov
19299daacd
Deserialize annotations on class object properties
...
Class object properties' backing fields are generated into static fields of the
containing class, not into fields of class object. For fields we now store the
flag which, if set, tells that this field should be looked for in the
containing class
2013-08-26 15:59:45 +04:00
Pavel V. Talanov
a9b57a5535
Rearrange JvmStdlibNames, delete old annotations
...
Delete unused constants
Move constants related to abi to JvmAbi class
Constants related to annotation names are now in JvmAnnotationNames
Remove old annotation classes
Deprecate JetClass and JetPackageClass name constants
2013-08-26 15:59:36 +04:00
Pavel V. Talanov
01735a0412
Do not write old annotations (JetClass and others)
2013-08-26 15:59:33 +04:00
Alexander Udalov
196b829002
Serialize packages via descriptors in codegen
...
Disable KotlinPackage annotation for scripts, otherwise script analyzer tries
to add descriptors to a locked scope
2013-08-23 17:39:25 +04:00
Alexander Udalov
d059a15bff
Minor, make descriptor available to NamespaceCodegen
2013-08-23 17:39:25 +04:00
Alexander Udalov
b602db03f2
DescriptorFinder now can find class names in a package
...
This helps to get rid of "repeated class_name" field in Package protobuf
message. DescriptorFinder in resolve.java uses PSI to find all classes in a
package, and the finder for built-ins just reads .kotlin_class_names file
2013-08-23 17:39:24 +04:00
Alexander Udalov
cfe9d78015
Deserialize annotations from package$src files if needed
...
For top-level members, we now write a FQ name of the package$src class which
has the member's annotations, and read the correct file in deserialization
2013-08-23 17:39:23 +04:00
Alexander Udalov
e63a087ee5
Minor refactoring in codegen
...
Replace String by JvmClassName where possible in OwnerKind, ClassFileFactory,
NamespaceCodegen, add NotNull annotations, some minor renames, etc.
2013-08-23 17:39:23 +04:00
Pavel V. Talanov
977cd7608a
Split KotlinInfo annotation into two: KotlinClass and KotlinPackage
...
Two annotations are needed to properly distinguish package classes
2013-08-23 17:39:23 +04:00
Pavel V. Talanov
8a508fe938
Refactor: use constants instead of string literals
2013-08-23 17:39:22 +04:00
Alexander Udalov
8dd27aa298
Java serialization maps descriptors correctly
...
Instead of determining JVM method names, fields, types heuristically (mapType),
do it correctly: in the place where a member is generated, its descriptor and
signature are stored into MemberMap, which is queried later when we serialize
its container
2013-08-23 17:39:22 +04:00
Alexander Udalov
cf7c27ba79
Minor, Nullable/NotNull annotations
2013-08-23 17:39:21 +04:00
Alexander Udalov
87d4e35388
Deserialize annotations on class properties w/o fields
...
Annotations on properties without backing fields are stored on a special
synthesized method inside the class
2013-08-23 17:39:21 +04:00
Alexander Udalov
c853c9be03
Create empty method for annotated properties w/o fields
...
There was no place in bytecode where annotations on properties without backing
fields could be stored to. Now they're written on a synthetic empty void method
with a special name ("propertyName$annotations").
(Annotations on properties cannot simply be written on getters in bytecode,
since a getter can have annotations of its own.)
2013-08-23 17:39:21 +04:00