Commit Graph

1034 Commits

Author SHA1 Message Date
Kirill Berezin b84f068c33 kt-1760 delegation to java iface:
- removed codegen's unnecessary lookup for a declaration
- skipped class' only supertype (if any) methods when delegating
2012-08-30 14:03:43 +04:00
Nikolay Krasko 78cb5381f7 Remove reference to error type constructor from unresolved annotation 2012-08-30 13:21:13 +04:00
Nikolay Krasko 9a9efd5b2f Extract variable refactoring 2012-08-30 13:21:10 +04:00
Nikolay Krasko 03989b9055 EA-36935 Rewriting annotations exception when file contains object with annotation. 2012-08-30 13:21:06 +04:00
Natalia.Ukhorskaya 19221e3ba6 JavaDescriptorResolver: Add resolve for annotation parameters (array, annotation, enum)
Temporary change testData for LoadJavaTest because enums in parameters of annotations in kotlin files is now unsupported
2012-08-30 10:56:33 +04:00
Natalia.Ukhorskaya 92a782ce6c AnnotationDescriptor refactoring: contains map of ValueParameterDescriptor and CompileTimeConstant for valueArgument.
DescriptorUtils: add method to get a list of sorted value arguments from AnnotationDescriptor
2012-08-30 10:56:31 +04:00
Natalia.Ukhorskaya 04deb2dd2f JetTestUtils: change signature of compileJavaFile - take collection of files to compile and list of javac options
LoadDescriptorUtil: remove duplicate code
2012-08-30 10:55:47 +04:00
Alex Tkachman b45f19c0e2 GenerationState refactored to be (almost) immutable and methodless (modulo little protection from reuse)
GenerationStrategy introduced to handle separately cases of regular compilation and building of JetLightClasses (this was only real overridable behavior of GenerationState in old code)
state subpackage introduced
2012-08-30 09:33:10 +03:00
Andrey Breslav 7caa1b8aa4 KT-2364 Drop traces of constructor-entries in enums
#KT-2364 Fixed
2012-08-29 22:07:42 +04:00
Pavel V. Talanov 32f9dcedff Merge with Alex's refactroings. 2012-08-29 17:12:07 +04:00
Pavel V. Talanov ae348a0547 Nested packages visibilities in jvm-backend. 2012-08-29 15:58:29 +04:00
Pavel V. Talanov 9295ce7086 LoadCompiledKotlinCustomTest -> LoadKotlinCustomTest.
The test itself is enhanced so it loads descriptors from source and from binaries.
Test data changed according to latest frontend changes.
2012-08-29 15:58:21 +04:00
Nikolay Krasko 22794cbf64 Fix for EA-38626 - can't find class delegate for JetLightClass constructed for kotlin enum entry. 2012-08-28 19:32:46 +04:00
Alex Tkachman 10a47ea86f big codegen rewrite 2012-08-27 17:43:03 +03:00
Pavel V. Talanov 6132946ced Introduce ClassKind#CLASS_OBJECT and ClassKind#isObject and usages.
Rename LazyClassDescriptor#onlyEnumEntries -> enumClassObjectInfo.
Determine ClassKind in JetClassInfo and JetObjectInfo constructor.
Remove complex constructor for enum entry in enum test.
Logic simplified in LazyClassMemberScope.
Minor refactorings.
2012-08-27 15:52:36 +04:00
Pavel V. Talanov b228fd66e0 Enum entry has final modality when loaded from binaries. 2012-08-27 15:52:34 +04:00
Andrey Breslav c0c2ca0ac2 Report errors when iterator() returns a nullable type 2012-08-24 19:49:33 +04:00
Andrey Breslav 66faa0c03a For-loop range expression (collection) can not be null 2012-08-24 19:49:33 +04:00
Andrey Breslav 1d01e66fc8 Tests for multi-decl for-loops over arrays of primitives 2012-08-24 19:49:32 +04:00
Andrey Breslav 707408b241 For loops over arrays generated with multi-decl support 2012-08-24 19:49:32 +04:00
Andrey Breslav d5c44c3dd8 Test data moved 2012-08-24 19:49:32 +04:00
Andrey Breslav edbc832861 Multi-decl for loops fixed 2012-08-24 19:49:32 +04:00
Andrey Breslav e57e61ac68 For-loop generation rewritten for the case of explicit iterator usage
This implementation includes multi-declarations already, but tests are coming in the next commits.
Old ForLoopgenerator renamed to IntrinsicForLoopGenerator, and will be unified with the newly introduced interface soon.

Side-effect:
KT-2668 Codegen doesn't handle member extensions in for
 #KT-2668 Fixed
2012-08-24 19:49:31 +04:00
Andrey Breslav b1ba3e1260 Using invokeFunction() instead of invokeFunctionWithNoParams() when generating in-expressions 2012-08-24 19:49:30 +04:00
Andrey Breslav 9ca49b50b8 Using invokeFunction() instead of invokeFunctionWithNoParams() when generating when() conditions 2012-08-24 19:49:30 +04:00
Svetlana Isakova 0dcdaccad1 KT-2640 Provide jet.MutableIterator and jet.MutableIterable
#KT-2640 fixed
2012-08-24 15:07:24 +04:00
Andrey Breslav 017a097094 Fixing compilation (thank you, IDEA's make) 2012-08-24 12:41:43 +04:00
Andrey Breslav 08bb390820 Project is available in codegen 2012-08-24 12:18:18 +04:00
Pavel V. Talanov 3da2cd8f2f Try to fix build.
Expect files to start with lowercase letter in LoadJavaCustomTest#doSimpleTest().
2012-08-23 15:48:50 +04:00
Pavel V. Talanov fbb78e47b0 Rename: *extract* -> *load* in LoadDescriptorUtil. 2012-08-23 15:24:40 +04:00
Pavel V. Talanov baca087a02 Rename test data folder according to the new test naming convention. 2012-08-23 15:24:39 +04:00
Pavel V. Talanov 4bf2b9054a Rename tests loading descriptors so that they have consistent naming.
Add comments clarifying each test purpose.
2012-08-23 15:24:38 +04:00
Pavel V. Talanov 9dc611c4fe Get rid of LoadJavaDescriptorsTest.
Implement the same test via existing LoadJavaDescriptorsTest.
Move test data.
2012-08-23 15:24:37 +04:00
Pavel V. Talanov 971b27fe61 Refactor CompileJavaAgainstKotlinTest.
Avoid duplication.
2012-08-23 15:24:36 +04:00
Pavel V. Talanov b6c9790b2c Refactor CompileKotlinAgainstKotlinTest.
Avoid duplication.
2012-08-23 15:24:35 +04:00
Pavel V. Talanov f3dd54e70f Refactor some of the tests for loading descriptors.
Move most of the logic to LoadDescriptorUtil and refactor to avoid duplication.
More descriptive names for LoadDescriptorUtil methods.
Minor code improvements.
2012-08-23 15:24:35 +04:00
Svetlana Isakova ac39daace6 KT-2667 Support multi-declarations in for-loops in control flow analysis
#KT-2667 fixed
2012-08-23 14:25:13 +04:00
Svetlana Isakova f8edaad420 make modality 'FINAL' for non-class members
not depend on actual modifier since it's not legal there
2012-08-22 20:42:35 +04:00
Svetlana Isakova bac0078646 check modifiers for package declarations
removed specific errors for illegal 'abstract' modifier
2012-08-22 20:42:35 +04:00
Svetlana Isakova 4a5269bb2d set LOCAL visibility for local functions
(it can't be INHERIT)
2012-08-22 20:42:35 +04:00
Svetlana Isakova ea611cb51d check modifiers for local declarations 2012-08-22 20:42:35 +04:00
Alexander Udalov d41f92370a comment failing test after 0cc27c0 2012-08-22 20:13:10 +04:00
Alex Tkachman fb5bf2f8c6 local classes without closures 2012-08-22 18:40:37 +03:00
Andrey Breslav 0cc27c0176 Use generic invokeFunction() instead of ad-hoc one for in-range conditions in when 2012-08-22 17:07:52 +04:00
Natalia.Ukhorskaya 3d9ad3f6cb ExpressionCodegen: take EnumEntry type from containingDeclarationDescriptor
JavaDescriptorResolver: pass to propertyDescriptor correct value of isObject parameter
2012-08-22 14:32:01 +04:00
Natalia.Ukhorskaya 6740a712d8 Move blackBoxWithJavaFile from FunctionGenTest to CodegenTestCase 2012-08-22 14:32:00 +04:00
Svetlana Isakova 5779ac15c0 Not get supertypes of Nothing
(exception EA-37833)
2012-08-22 12:35:06 +04:00
Natalia.Ukhorskaya 11fdeac930 Rename misleading method: compileKotlin -> analyzeKotlin. 2012-08-21 21:40:52 +04:00
Natalia.Ukhorskaya 2c4960b4fb Test for abstract function in java enum. 2012-08-21 21:40:51 +04:00
Natalia.Ukhorskaya 2e5d18c440 Tests for loading enum descriptors from compiled java/kotlin code. 2012-08-21 21:40:48 +04:00