Commit Graph

10416 Commits

Author SHA1 Message Date
Andrey Breslav 991256bfd3 Use preloader in the IDE 2013-04-26 14:33:27 +04:00
Andrey Breslav ddb474ea8e Reorder method parameters 2013-04-26 14:33:27 +04:00
Andrey Breslav 2ce6d16433 Allowing multiple jars 2013-04-26 14:33:26 +04:00
Andrey Breslav 2f65506d76 Support time measurement 2013-04-26 14:33:26 +04:00
Andrey Breslav bbb661506a Preloader for command-line compiler 2013-04-26 14:33:18 +04:00
Andrey Breslav b3248baae9 "-noverify" by default to speed up class loading 2013-04-26 14:32:55 +04:00
Andrey Breslav 3179f67bfc Tasks for quickly building kotlin-compiler.jar using the results of incremental compilation in the IDE 2013-04-26 14:32:55 +04:00
Evgeny Gerashchenko 837ab0ac4f Updated test data since another quick fix is available. 2013-04-26 14:03:06 +04:00
Wojciech Lopata b3a87d943a CastExpressionFix 2013-04-26 13:13:20 +04:00
Wojciech Lopata 59716fec9c Cleanup in a test 2013-04-26 13:12:20 +04:00
Alexander Kirillin 0a597e563a Implemented "Change signature" refactoring 2013-04-25 21:13:33 +04:00
Alexander Kirillin 500a165191 Type and expression code fragments initial implementation 2013-04-25 21:13:33 +04:00
Alexander Kirillin 6591f54ad5 Added check for read-only files in intention actions 2013-04-25 21:13:33 +04:00
Zalim Bashorov fe19c9471e Merge pull request #256 from lopekpl/change_function_return_type_fixes
Quickfixes for RETURN_TYPE_MISMATCH and NO_RETURN_IN_FUNCTION_WITH_BLOCK_BODY
Simple quickfix for TYPE_MISMATCH
2013-04-25 05:02:13 -07:00
Wojciech Lopata 9b11db7a74 ChangeFunctionReturnTypeFix for TYPE_MISMATCH error 2013-04-24 14:34:20 +02:00
Evgeny Gerashchenko 267bb01f62 Added @NotNull annotation for Charset.defaultCharset().
Other code cleanup.
2013-04-24 16:18:34 +04:00
Zemian Deng f7099a5b6a Use default param to String encoding name instead of using extra overloaded method. 2013-04-24 16:18:34 +04:00
Zemian Deng c3b46341d7 #KT-3533 Fixed - not to null in encoding name parameter in String, Bytes, and File. 2013-04-24 16:18:33 +04:00
Mikhael Bogdanov b6fc0c5c13 KT-3538: Super call to trait implemetation invokes method from base class 2013-04-24 15:52:09 +04:00
Wojciech Lopata 893cbd6b48 Quickfix for RETURN_TYPE_MISMATCH and NO_RETURN_IN_FUNCTION_WITH_BLOCK_BODY 2013-04-24 12:21:28 +02:00
Wojciech Lopata dde4260d10 Fix ChangeFunctionReturnTypeFix.getText() method 2013-04-24 12:17:47 +02:00
Mikhael Bogdanov aa2db75266 KT-3389: Local class construction results in CompilationException && KT-2873 && KT-3210
KT-2873: VerifyError on instantiating a local class inside a closure
KT-3210 Inline Class: CompilationException: Back-end (JVM) Internal error: wrong code generated java.lang.ArrayIndexOutOfBoundsException null

 #KT-3389 Fixed
2013-04-24 13:49:47 +04:00
Wojciech Lopata e49389bf07 Make clear ChangeFunctionReturnTypeFix can't hadle function literals 2013-04-24 11:38:40 +02:00
Wojciech Lopata b5bbe26583 Remove unreachable code 2013-04-24 11:38:40 +02:00
Mikhael Bogdanov 9682b72643 Inner class generation now performed on visiting appropriate declaration 2013-04-23 16:08:02 +04:00
Natalia.Ukhorskaya 5baa10df41 Update to IDEA 12.1.2 (build 129.298) 2013-04-23 11:46:40 +04:00
Alexander Udalov 959f2fb70b Fix codegen tests on Android
Since Android tests move files around, changing their packages, and 'toString'
tests the exact name of a class, we now get it via Java reflection
2013-04-22 21:47:17 +04:00
Alexander Udalov d45889048b Increase ABI version
Due to changes related to FunctionN now being interfaces, FunctionImplN
classes, KFunctionN, callable references
2013-04-22 17:59:32 +04:00
Alexander Udalov 56f8f021f9 Generate proper generic signature for closure classes 2013-04-22 17:59:32 +04:00
Alexander Udalov ace7bd9bc8 Fix StackValue.coerce void to Object
We can only put Unit.VALUE on stack if we're requested an instance of Object or
Unit. In other cases (arbitrary objects / arrays) we put null instead
2013-04-22 17:59:32 +04:00
Alexander Udalov 36ddfaa24b Minor refactoring in CodegenAnnotatingVisitor
Create a private helper method
2013-04-22 17:59:32 +04:00
Alexander Udalov 054e5fb5e7 Codegen for callable reference expressions
#KT-1183 In Progress
2013-04-22 17:59:32 +04:00
Alexander Udalov 1eeaaad05d Refactor method/constructor calls in codegen
- use ResolvedCall where possible
- 'call' parameter to invokeMethodWithArguments was used only to generate
  callee, e.g. in "A()" where A is an expression which can be invoke()'d.
  In case of constructors and enum entry delegation specifiers there's no need
  to generate callee, so 'call' is made Nullable with a subsequent assert
- remove generateJavaConstructorCall() method, since it did no useful work.
  Java constructor invocation is broken anyway and needs to be fixed (KT-3532)
- minor code style / formatting issues fixed, several methods renamed to better
  reflect semantics
2013-04-22 17:59:32 +04:00
Alexander Udalov db65237989 Refactor ClosureCodegen
- make several commonly used parameters ClosureCodegen's fields
- take an arbitrary strategy for closure function body codegen
- don't make extra binding context lookups
2013-04-22 17:59:31 +04:00
Alexander Udalov 80b78f0f6d invokeinterface FunctionN.invoke()
Instead of invokevirtual on FunctionImpl class, do invokeinterface on a
Function trait. This will allow to invoke functions on classes which don't
inherit from FunctionImpl classes.

Also rename the method to the more sensible name
2013-04-22 17:59:31 +04:00
Alexander Udalov 141b996709 Minor refactoring in ExpressionCodegen
Inline useless method, factor out resolveToCallableMethod logic from
resolveToCallable
2013-04-22 17:59:31 +04:00
Alexander Udalov f509407852 Extract static helpers to FunctionTypesUtil
Also move 'getInternalClassName' method from CodegenUtil to FunctionTypesUtil,
since it's related to function types
2013-04-22 17:59:31 +04:00
Alexander Udalov 121cb13883 Minor refactoring in CodegenBinding
- CLASS_FOR_FUNCTION slice was used for two purposes: to record closure classes
  for functions and for scripts. Separate this slice into two slices:
  CLASS_FOR_FUNCTION and CLASS_FOR_SCRIPT
- add classNameForAnonymousClass() overloaded method to CodegenBinding, taking
  a function descriptor (not a PSI element)
2013-04-22 17:59:31 +04:00
Alexander Udalov f907d008e7 Refactor ClosureCodegen
Extract some methods, replace types with more generic (ExpressionCodegen ->
LocalLookup), make more stuff fields instead of parameters passed to every
method, annotate with Nullable/NotNull
2013-04-22 17:59:31 +04:00
Alexander Udalov fee7846c7e LHS of callable reference can't be a type parameter 2013-04-22 17:59:31 +04:00
Alexander Udalov d40906a690 Disallow references to extensions in classes
It's not clear in which order should the two receiver arguments be passed to
them, and there's no corresponding K*FunctionN class for now

 #KT-1183 In Progress
2013-04-22 17:59:31 +04:00
Alexander Udalov c4b4fa750c Resolve callable reference expressions
#KT-1183 In Progress
2013-04-22 17:59:31 +04:00
Alexander Udalov 1db026aac5 Add CheckValueArgumentsMode to call resolver
Now it's ENABLED everywhere. DISABLED will be used for resolving callable
reference expressions, since there won't be any arguments near the function
call to check

 #KT-1183 In Progress
2013-04-22 17:59:30 +04:00
Alexander Udalov 1d07068c7c Minor refactoring in CallExpressionResolver
Kill useless parameters
2013-04-22 17:59:30 +04:00
Alexander Udalov 77ef20a51e Generate KFunction/KMemberFunction/KExtensionFunction
#KT-1183 In Progress
2013-04-22 17:59:30 +04:00
Alexander Udalov b343e94ea5 Refactor GenerateFunctions
Extract some methods && constants, inline some useless methods, replace
PrintStream with PrintWriter, make some methods non-static
2013-04-22 17:59:30 +04:00
Alexander Udalov dac0d77e90 Parse simple callable reference expressions
#KT-1183 In Progress
2013-04-22 17:59:30 +04:00
Alexander Udalov a6e242d166 Add new token COLONCOLON (::) for callable reference
#KT-1183 In Progress
2013-04-22 17:59:30 +04:00
Alexander Udalov d566250b18 Introduce JetCallableReferenceExpression
Reuse the obsolete hash qualified expression as a newly born callable reference
expression: Foo::bar. It's not a qualified expression anymore, since the
receiver part is now a JetTypeReference and it also can be empty ("::bar")

 #KT-1183 In Progress
2013-04-22 17:59:30 +04:00
Alexander Udalov b7671d8af2 Delete unused method
It was only used in parsing tuples, which are dropped
2013-04-22 17:59:30 +04:00