Pavel V. Talanov
fb6fbdfaad
Get rid of getClassResolver method in JavaDescriptorResolver
2012-10-08 21:54:06 +04:00
Evgeny Gerashchenko
5bc2422cb0
Failing with compilation error when Java library has wrong @KotlinSignatureAnnotation.
2012-10-08 21:48:54 +04:00
Alexander Udalov
326720afc8
Fix failing build
...
Add runtime and annotations.jar to classpath when compiling Java in codegen
tests
2012-10-08 21:09:07 +04:00
Nikolay Krasko
a145e93ebb
Don't repeat full qualified name in error messages for field annotations
2012-10-08 21:07:23 +04:00
Nikolay Krasko
d0b41ff153
Check absence of explicit initializer in field annotation
2012-10-08 21:07:22 +04:00
Nikolay Krasko
3a410064be
Test for syntax errors in field annotations
2012-10-08 21:07:20 +04:00
Nikolay Krasko
24fc3cc53f
More validation checks for field annotations
2012-10-08 21:07:19 +04:00
Nikolay Krasko
6ffd1aceaa
Check field signature name
2012-10-08 21:07:19 +04:00
Alexander Udalov
c9984c3d06
Generate not-null assertions on method parameters
...
Intrinsics.checkParameterIsNotNull() gets its caller's class and method names
from the stack trace to render them in an exception message.
Fix codegen tests because now it's now allowed to pass null to non-null
argument in tests
2012-10-08 19:13:20 +04:00
Alexander Udalov
753ae9e550
Add a compiler parameter to generate not-null parameter assertions
...
Enable/disable assertion generation on parameters in the beginning of
methods accessible from Java
2012-10-08 19:03:36 +04:00
Alexander Udalov
12ce447c24
Refactor FunctionCodegen.generateMethod()
2012-10-08 19:03:33 +04:00
Alexander Udalov
bf779b4ca5
Generate not-null assertions only for descriptors coming from Java
...
Introduce BindingContext.IS_DECLARED_IN_JAVA, store that info in
JavaDescriptorResolver
2012-10-08 19:03:29 +04:00
Alexander Udalov
988af8208c
Refactor, make CodegenTestCase.generateCommon() static and reusable
2012-10-08 19:03:19 +04:00
Alexander Udalov
fcbc95bbb4
Generate not-null assertions after getting a field
2012-10-08 14:11:57 +04:00
Alexander Udalov
27bea0a607
Pass state and property descriptor to StackValue.Property
2012-10-08 14:11:57 +04:00
Alexander Udalov
95ec2448eb
Generate not-null assertions after method calls
...
If a method comes from Java and is annotated as returning NotNull, after
calling it we should check if it actually returned something other than null.
Introduce checkReturnedValueIsNotNull() in jet/runtime/Intrinsics which does
exactly that.
CallableMethod's invoke() and invokeDefault() are now private, use asserted
versions instead
2012-10-08 14:11:56 +04:00
Alexander Udalov
1cf5e92981
Support multi-file tests with Java in CodegenTestCase
2012-10-08 14:11:54 +04:00
Alexander Udalov
19a6a3f390
Add a compiler parameter to generate not-null assertions on method call sites
...
It is off by default when invoking compiler directly, and on by default when
compiling from IDE
2012-10-08 14:11:52 +04:00
Alexander Udalov
1f3586a151
Minor refactoring in ReplInterpreter
...
GenerationState is now created with default configuration parameters
2012-10-08 14:11:48 +04:00
Dmitry Jemerov
96fe65bfea
delete obsolete generator script
2012-10-08 11:21:44 +02:00
Dmitry Jemerov
572aff8fe4
idea 11 eap -> idea 12 eap
2012-10-08 10:20:56 +02:00
Pavel V. Talanov
e72c38aabb
Make members in *Resolver classes private where possible and classes themselves final
...
Overall: very roughly split monster class JavaDescriptorResolver into smaller pieces of functionality represented by *ResolverClasses
It by no means improves abstraction (and no significant changes to the logic has been made) but makes the whole subsystem more structured and easier to understand/modify in the future
2012-10-06 20:39:38 +04:00
Pavel V. Talanov
cae349d4f0
Move method from JavaDescriptorResolver to PropertiesResolver and ClassResolver
2012-10-06 20:25:54 +04:00
Pavel V. Talanov
55a60b3296
Move util method from JavaDescriptorResolver to DescriptorResolverUtils
2012-10-06 20:17:37 +04:00
Pavel V. Talanov
086fadc9be
Move util method from JavaDescriptorResolver to JavaDescriptorSignatureResolver
2012-10-06 20:16:40 +04:00
Pavel V. Talanov
dee9902d64
Move util method from JavaDescriptorResolver to ClassResolver
2012-10-06 20:14:48 +04:00
Pavel V. Talanov
37fd1aebf6
Extract util methods from JavaDescriptorResolver to the new class DescriptorResolverUtils
2012-10-06 20:09:45 +04:00
Pavel V. Talanov
b70ba37c34
Extract ValueParameterResolver class from JavaDescriptorResolver
2012-10-06 20:02:29 +04:00
Pavel V. Talanov
471169303a
Extract InnerClassResolver class from JavaDescriptorResolver
2012-10-06 19:57:18 +04:00
Pavel V. Talanov
e3d631fb63
Move method from JavaDescriptorResolver to FunctionResolver
2012-10-06 19:54:12 +04:00
Pavel V. Talanov
bf76fa665e
Move method from JavaDescriptorResolver to NamespaceResolver
2012-10-06 19:51:51 +04:00
Pavel V. Talanov
f3c707a71f
Move methods from JavaDescriptorResolver to ClassResolver
2012-10-06 19:49:59 +04:00
Pavel V. Talanov
913659a58a
Move methods from JavaDescriptorResolver to ClassResolver
2012-10-06 19:47:49 +04:00
Pavel V. Talanov
a0bcc27ffa
Move methods from JavaDescriptorResolver to ClassResolver
2012-10-06 19:43:49 +04:00
Pavel V. Talanov
4f0ac287b3
Move methods from JavaDescriptorResolver to FunctionResolver
2012-10-06 19:31:45 +04:00
Pavel V. Talanov
6424e0fe22
Extract NamespaceResolver class from JavaDescriptorResolver
2012-10-06 19:13:43 +04:00
Pavel V. Talanov
88bd991729
Extract FunctionResolver and AnnotationResolver classes from JavaDescriptorResolver
2012-10-06 19:08:57 +04:00
Pavel V. Talanov
6ce1f8c111
Extract CompileTimeResolver class from JavaDescriptorResolver
2012-10-06 18:56:11 +04:00
Pavel V. Talanov
a9b4b1ca68
JavaDescriptorResolver.ValueParameterDescriptor: encapsulate fields
2012-10-06 18:52:39 +04:00
Pavel V. Talanov
09501f3215
Extract ConstructorResolver class from JavaDescriptorResolver
2012-10-06 18:50:50 +04:00
Pavel V. Talanov
38a10bfb86
Rename: JavaDescriptorPropertiesResolver -> PropertiesResolver
2012-10-06 18:46:05 +04:00
Pavel V. Talanov
2d33b50b55
Extract ClassResolver class from JavaDescriptorResolver
2012-10-06 18:45:00 +04:00
Pavel V. Talanov
bcb6686805
Move JavaDescriptorPropertiesResolver to new resolver package
...
Make used classes and methods public
2012-10-06 18:32:54 +04:00
Pavel V. Talanov
aa4665bfba
Refactor NamedMembers: encapsulate fields
...
Also some stylistic changes
2012-10-06 18:19:40 +04:00
Nikolay Krasko
4c8849c6f9
Refactoring: Extract common functionality
2012-10-05 18:45:43 +04:00
Nikolay Krasko
0c48fbf959
Simplify and sharpen tests
2012-10-05 18:45:40 +04:00
Nikolay Krasko
e41bce013d
Move common getSignatureAnnotation() to base class
2012-10-05 15:51:26 +04:00
Nikolay Krasko
572173a8f8
Fields alternative signature processing with refactoring of AlternativeSignatureData
...
Refactoring details:
- Move and rename AlternativeSignatureData to kotlinSignature.AlternativeMethodSignatureData
- Extract TypeTransforming visitor
- Extract AlternativeSignatureMistmatchException
- Move errors, return type, and syntax processing to base class
2012-10-05 15:51:23 +04:00
Nikolay Krasko
4bb0181613
Move AlternativeSignatureData.java to kotlinSignature/AlternativeMethodSignatureData.java
2012-10-05 15:51:20 +04:00
Nikolay Krasko
cc4be6ad67
Allow annotate java fields in GUI
2012-10-05 15:51:17 +04:00