Commit Graph

5184 Commits

Author SHA1 Message Date
Evgeny Gerashchenko f713b03abc Fixed propagation for non-abstract methods inherited from traits. 2013-04-11 21:06:33 +04:00
Nikolay Krasko e242f31dff Rename methods (prefix -> prefixes) 2013-04-11 20:00:23 +04:00
Nikolay Krasko a79e997611 Add ability to test for unexpected directives in tested file 2013-04-11 20:00:20 +04:00
Nikolay Krasko 5ccea1185d Make completion test framework be configurable for writing multi-platform tests 2013-04-11 20:00:20 +04:00
Nikolay Krasko 1d05125c8f Refactoring: change parameters order in InTextDirectivesUtils 2013-04-11 20:00:19 +04:00
Alexander Udalov 57f6870e68 Remove useless parameter from FunctionGenerationStrategy 2013-04-10 20:25:16 +04:00
Alexander Udalov 330efd3967 Remove useless methods from codegen utils 2013-04-10 20:25:16 +04:00
Alexander Udalov 306e4bdbd7 Get rid of FunctionCodegen.MethodInfo
generateMethodBody() is now responsible for generating the local variable
table, therefore the data class MethodInfo is not needed anymore to return
multiple values from it
2013-04-10 20:25:15 +04:00
Alexander Udalov a67866823e Refactor FunctionCodegen.genJetAnnotations()
Always map descriptor to the callable method and take the signature from there,
since this way the signature appears to be more accurate. The whole
"mapSignature vs mapToCallableMethod.getSignature" story needs some
investigation though.

Also make the method non-static, remove useless checks, etc
2013-04-10 20:25:14 +04:00
Alexander Udalov 9187116055 Refactor componentN() function generation
Adopt to the new FunctionGenerationStrategy
2013-04-10 20:25:14 +04:00
Alexander Udalov 34009a2134 Refactor copy() function generation for data classes
Use FunctionCodegen and the newly created FunctionGenerationStrategy to
generate the needed instructions. Make some methods in FunctionCodegen private
since they're not used anymore outside of the class
2013-04-10 20:25:13 +04:00
Alexander Udalov 9bb3663b54 Extract generation logic from FunctionCodegen
Create a new class FunctionGenerationStrategy, which is used to specify exactly
how the body of a function will be generated. This is made primarily to factor
out the hard dependency on PSI in FunctionCodegen.generateMethod(). The PSI
element is now optional and is only used for debug information (as an argument
to newMethod() and endVisit()). This also helps to refactor the confusing logic
about generating default property accessors.

Assert for whether we generate code now for the declared member is now useless,
since generateMethod() will be used also for generating any possible members.

Also surround with "if ( != null)" some method call in genJetAnnotations(), as
null is possible here
2013-04-10 20:25:12 +04:00
Alexander Udalov 98688eed66 Simplify FrameMap construction in FunctionCodegen 2013-04-10 20:25:12 +04:00
Alexander Udalov b2e389d90b Minor refactoring in FunctionCodegen
Combine two nested classes, MethodBounds and LocalVariablesInfo, into one
MethodInfo. Rename some methods. No logic has changed
2013-04-10 20:25:11 +04:00
Alexander Udalov 099fa6c11e Minor refactoring in Function/PropertyCodegen
Check if we need to generate code before calling generateMethod()
There were 4 such checks, 2 of them in PropertyCodegen, one in
FunctionCodegen.gen() and one in ClosureCodegen. Every usage except the last
was prepended with the check
2013-04-10 20:25:10 +04:00
Alexander Udalov 559b742737 Create AnonymousFunctionDescriptor
Will be used to check if the descriptor represents a function literal
2013-04-10 20:25:10 +04:00
Evgeny Gerashchenko d502d45772 Disabled highlighting for variables which are captured in inlined closure. 2013-04-10 20:10:49 +04:00
Evgeny Gerashchenko 6285e5a9f4 Renamed method. 2013-04-10 16:13:45 +04:00
Nikolay Krasko ebd72df058 KT-3491 Wrong (or not obvious) warning
#KT-3491 Fixed
2013-04-10 13:14:49 +04:00
Wojciech Lopata 13022922af ChangeFunctionReturnTypeFix quickfix 2013-04-09 20:35:17 +04:00
Natalia.Ukhorskaya 1dce3b5da4 Invoke top level function with default argument using src class 2013-04-09 17:11:25 +04:00
Alexey Sedunov 691a62fa2b Add assignment creation to JetPsiFactory 2013-04-09 13:15:47 +04:00
Natalia.Ukhorskaya a943e68225 Rename method 2013-04-09 12:52:30 +04:00
Natalia.Ukhorskaya eb768ea59a Do not create LightClasses for kt files as sources for libraries 2013-04-09 12:52:29 +04:00
Evgeny Gerashchenko b1ea79113f Replaced hard exception with LOG.error. 2013-04-04 17:51:51 +04:00
Svetlana Isakova d843608298 'checkType' for qualified properties as function arguments 2013-04-03 20:44:47 +04:00
Evgeny Gerashchenko 6e43b78deb KT-3459 "import java.util.*" is removed by optimize imports if the only usage is a SAM constructor
#KT-3459 fixed
2013-04-03 17:44:01 +04:00
Svetlana Isakova 8f1b728a08 try to use bounds in type inference
if some parameters are unknown
2013-04-03 15:51:17 +04:00
Svetlana Isakova 2a36da9549 small refactoring
removed unnecessary variable
added annotation
2013-04-03 15:51:17 +04:00
Evgeny Gerashchenko c4f2740074 KT-3469 AssertionError: Couldn't find super type for super function
Class descriptor for Java class was recreated in KotlinSignatureInJavaMarkerProvider.

 #KT-3469 fixed
2013-04-03 15:13:10 +04:00
Zalim Bashorov a665fa2049 Rewrote nonLiteralFilenameFilter and filenameFilter tests without working with FS.
Removed filenameFilter test from excludes for AndroidTests.
2013-04-02 22:11:57 +04:00
Evgeny Gerashchenko 1ddf074052 Compacted serialized versions of methods and functions in JavaToKotlinMethodMapGenerated. 2013-04-02 22:04:22 +04:00
Evgeny Gerashchenko 9bccb98a7d KT-3468 Kotlin can't understand compareTo was overridden in Java
Never using parameter names when serializing methods. They were added to external name if JDK sources were present and not added if JDK sources were absent.

 #KT-3468 fixed
2013-04-02 22:04:22 +04:00
Andrey Breslav ffeb73beb5 EA-43573 - assert: KotlinJavaFileStubProvider$.generate
The problem was that KotlinJavaFileStubProvider instances remembered information that changed between their invocation:
 e.g. when a package gets renamed the qualified name in a java file stub does not get updated
2013-04-02 13:11:55 +04:00
Svetlana Isakova d57003dece added ? as type argument to avoid raw types
to CallResolutionContext
2013-04-01 20:02:08 +04:00
Svetlana Isakova 12c0a2cb77 KT-3461 Nullable argument allowed where shouldn't be
#KT-3461 Fixed
2013-04-01 19:07:36 +04:00
Andrey Breslav d42a9f37a3 Proper checking for a qualified name
When i18n plugin is enabled, it looks for classes like "java.lang.Object...)" while highlighting annotations.xml

EA-43709 - IAE: NameUtils.requireIdentifier
2013-04-01 13:37:02 +04:00
Evgeny Gerashchenko 72284c36d4 Added examples in code. 2013-03-29 20:36:48 +04:00
Evgeny Gerashchenko 8014f1af0b Extracted method. 2013-03-29 20:36:48 +04:00
Evgeny Gerashchenko e5d14f6970 Minor. Simplified, reformatted, got rid of warnings. 2013-03-29 20:36:47 +04:00
Evgeny Gerashchenko 056c7e0df3 Simplified code. 2013-03-29 20:36:47 +04:00
Evgeny Gerashchenko 6ff9bfd4bb Supported SAM constructor calls without function literal. 2013-03-29 20:36:47 +04:00
Evgeny Gerashchenko f11a1a2d28 Minor. Simplified, reformatted, got rid of warnings. 2013-03-29 20:36:46 +04:00
Alexey Sedunov 6a7cd7c6e3 Add tests for mutability annotation support in type resolver 2013-03-29 18:42:47 +04:00
Alexey Sedunov fc7bb67aca Add extended annotation to test environment 2013-03-29 18:42:44 +04:00
Alexey Sedunov 393ebf44aa Implement mutability annotation support in type resolver 2013-03-29 18:42:43 +04:00
Alexey Sedunov 975c66b946 Add module with extended annotations (mutable, read-only) 2013-03-29 18:42:43 +04:00
Evgeny Gerashchenko dcb95fc5ac Fixed priorities for synthetic functions. 2013-03-29 13:10:31 +04:00
Natalia.Ukhorskaya 73bbda5b93 AndroidTests: do not run test which use file system 2013-03-29 11:47:05 +04:00
Evgeny Gerashchenko 13d856db8e Moved max priority constant to PriorityProvider. 2013-03-28 20:08:35 +04:00