Commit Graph

1472 Commits

Author SHA1 Message Date
Evgeny Gerashchenko 3352d8a954 Minor. Renamed method. 2013-12-17 20:28:56 +04:00
Evgeny Gerashchenko ecd5dc60ad Correctly checking visibility from package view. 2013-12-17 20:28:55 +04:00
Evgeny Gerashchenko df1e92959e Generified subpackages obtaining, fixed it for mixed packages. 2013-12-17 20:28:54 +04:00
Evgeny Gerashchenko d64cfa04e9 Simplified method. 2013-12-17 20:28:49 +04:00
Evgeny Gerashchenko 557aaf363a Renamed method and got rid of some usages. 2013-12-17 20:28:47 +04:00
Evgeny Gerashchenko 28ef7495af Removed obsolete code in codegen for 'var' parameters captured in closure. 'Var' parameters are forbidden now. 2013-12-17 20:28:43 +04:00
Evgeny Gerashchenko 005b59e783 Inlined method. 2013-12-17 20:28:41 +04:00
Evgeny Gerashchenko 7abe6a5b4a Big refactoring. Migrating to package views and fragments. 2013-12-17 19:18:33 +04:00
Evgeny Gerashchenko 6c9a5e6a5f Got rid of useless trace access. 2013-12-17 19:18:32 +04:00
Natalia Ukhorskaya dbaaa80918 Add i2b cast boxing Int to Byte? or Short? (fix android tests) 2013-12-16 20:54:10 +04:00
Natalia Ukhorskaya 66effee8cd Fix safe call 2013-12-16 20:54:09 +04:00
Natalia Ukhorskaya 4ef1af7d12 Cast unary intrinsics to expected type 2013-12-16 17:12:40 +04:00
Svetlana Isakova 656cc16a81 fixed: explicit receiver kind for resolved call shouldn't be used as expected receiver kind for function 2013-12-16 16:24:21 +04:00
Alexander Udalov e179e6bb2f Utilize existing mapType methods
Fix warnings related to nullable CallableDescriptor.getReturnType()
2013-12-12 23:34:08 +04:00
Alexander Udalov 0576851102 Fix codegen for closures returning 'Unit?'
Only do a checkcast when we need to coerce Object to Unit: the code was
hopefully type-checked so that it'll only be necessary when the value is either
Unit.VALUE or null
2013-12-12 21:38:20 +04:00
Alexander Udalov 2892907947 Delete Enum.name()/ordinal() JVM intrinsics
Bytecode is the same if they're generated as is from descriptors

+ Some minor code style improvements
2013-12-12 21:38:20 +04:00
Alexander Udalov 523ad697c7 Minor, fix/suppress warnings in codegen 2013-12-12 21:38:19 +04:00
Alexander Udalov 0215f892a6 Minor, simplify method 2013-12-12 21:38:19 +04:00
Alexey Sedunov a802853ac6 Fix warnings 2013-12-12 17:30:58 +04:00
Alexey Sedunov 6913f42a97 Add support of light classes for local class/object declarations 2013-12-12 17:30:52 +04:00
Natalia Ukhorskaya 1c9b093728 Rename parameter 2013-12-12 17:11:42 +04:00
Natalia Ukhorskaya 69ed9bc47a Do not cast arguments of binary operation to expected type for byte and short 2013-12-12 17:11:42 +04:00
Alexander Udalov 00da5fe1fb Fix VerifyError for 'when' of type 'Unit?' 2013-12-11 07:40:19 +04:00
Alexander Udalov 220e4e98b7 Minor, print internal class names in CallableMethod.toString() 2013-12-11 07:40:18 +04:00
Alexander Udalov ee554d2e2f Unwrap fake override of original
This fixes a couple of verify errors related to the order of supertypes in the
class declaration
2013-12-09 17:59:58 +04:00
Alexander Udalov 44ad36ef97 Minor cleanup in FunctionGenerationStrategy and inheritors 2013-12-09 17:59:58 +04:00
Alexander Udalov 7453af9f36 Minor, don't do unnecessary mapType 2013-12-09 17:58:00 +04:00
Alexander Udalov fb370a4538 Make anonymous class inner 2013-12-09 17:58:00 +04:00
Alexander Udalov 6276dd1483 Return Unit.VALUE if Unit or Any is expected
StackValue.coerce will do its job in casting void to Unit correctly

 #KT-4212 Fixed
2013-12-09 17:57:59 +04:00
Alexander Udalov f19ede0637 Don't treat values of type "Unit?" to be always equal to Unit.VALUE
Two changes here: StackValue.Constant does cast iff value is non-null (if null,
no cast between classes is really needed, as null can be an instance of
anything), and codegen for safe qualified expressions uses correct type for the
expression

 #KT-4265 Fixed
2013-12-09 15:52:19 +04:00
Alexander Udalov 96f753278c Minor, prettify code 2013-12-09 15:52:19 +04:00
Andrey Breslav 934d8ee199 Rename class 2013-12-06 00:28:13 +04:00
Andrey Breslav 9f319e8b24 TCO: Re-use parameter values already loaded onto the stack for a recursive call 2013-12-06 00:28:12 +04:00
Andrey Breslav 2a03d40233 TCO: Optimize all function calls, not only JetCallExpressions 2013-12-06 00:28:11 +04:00
Andrey Breslav 6d369b985f Do not rely on JetCallExpressions in tail-call detection
Calls come in other forms too
2013-12-06 00:28:11 +04:00
Sergey Mashkov 9da3d2f051 Support tail-call optimization in the JVM back-end 2013-12-05 23:53:06 +04:00
Sergey Mashkov cfbcbb80f5 Store methodStartLabel in MethodContext 2013-12-05 23:53:06 +04:00
Natalia Ukhorskaya a9da88b425 Remove NumberValueTypeConstructor 2013-12-05 15:23:42 +04:00
Natalia Ukhorskaya cbcca6c08e Support IntegerValueTypeConstant in java backend 2013-12-05 15:21:57 +04:00
Natalia Ukhorskaya d63f6843c8 Merge ConstantExpressionEvaluator and CompileTimeConstantResolver 2013-12-05 15:21:50 +04:00
Alexander Udalov 028274b934 Don't assert that class is found in BindingContext
This isn't true when light classes are generated, according to other such
checks in the same file

 #KT-4276 Fixed
2013-12-04 15:57:52 +04:00
Alexander Udalov fa7076a4fa Fix ClassCastException with nullable chars
#KT-4210 Fixed
 #KT-4098 Fixed
 #KT-4251 Fixed
2013-12-04 15:57:52 +04:00
Alexander Udalov 4aa6a42483 Support codegen of empty for-loop
#KT-3009 Fixed
 EA-35742 fixed
2013-12-04 15:19:56 +04:00
Alexander Udalov 61ff9eb45b Support codegen of empty do-while-loop
#KT-3009 In Progress
2013-12-04 15:19:56 +04:00
Alexander Udalov 9058272528 Support codegen of empty while-loop
#KT-3009 In Progress
2013-12-04 15:19:56 +04:00
Alexander Udalov 4cd4026174 Support empty if-statements
Type-check "if (...) ;" to Unit, report "implicit cast to Unit", propagate data
flow info out of its condition

 #KT-2478 Fixed
2013-12-04 15:19:47 +04:00
Alexander Udalov 9890f2e5ac Simplify CodegenBinding.canHaveOuter(), make it work for objects
This fixes CompileKotlinAgainstKotlinTest
2013-12-02 19:56:10 +04:00
Alexander Udalov 5a4cc1e2fe Put enum entries into enum class in JDR 2013-12-02 19:56:07 +04:00
Alexander Udalov 60e7722a82 Enum entries are put into enum class, not its class object 2013-12-02 19:56:06 +04:00
Alexander Udalov a5d6d6719c EnumValue now has a ClassDescriptor for its enum entry 2013-12-02 19:56:06 +04:00