Commit Graph

440 Commits

Author SHA1 Message Date
Natalia.Ukhorskaya 3fc2e5d20c Attempt to split long or double on the stack exception
#KT-3042 Fixed
2012-11-20 13:35:30 +04:00
Natalia.Ukhorskaya 900788a8e0 Fix javaClass property for long and double
#KT-3046 Fixed
2012-11-19 21:19:48 +04:00
Pavel V. Talanov 7bb7445c57 Fix for invoking abstract method in enum 2012-11-19 20:18:45 +04:00
Natalia.Ukhorskaya ba2eab526a Extension properties in class: don't put receiver on stack for GETFIELD/PUTFIELD instruction
#KT-3031 Fixed
2012-11-13 19:03:20 +04:00
Natalia.Ukhorskaya b5a3486131 Back-end: correct indexes of local variables for double and long
#KT-3033 Fixed
2012-11-12 15:03:54 +04:00
Natalia.Ukhorskaya 94fbf2bdf4 Add labels for extension properties
#KT-2824 Fixed
2012-11-12 13:23:00 +04:00
Alexey Sedunov 8cff709bfb #KT-3023 Fixed 2012-11-07 18:33:21 +04:00
Alexander Udalov 415b6f8efe Generate bridges for super-calls only when needed
#KT-2887 Fixed
2012-11-07 17:06:19 +04:00
Alexander Udalov 89b8bbec57 Do not add extra 'this' parameter for TImpl's accessor
Fixes weird cases like super-call from a closure inside a trait with a required
class
2012-11-07 17:06:18 +04:00
Alexander Udalov 2edb89b5c5 Refactor mysterious code in ExpressionCodegen
'super' receiver is now generated in visitSuperExpression()
2012-11-07 17:06:17 +04:00
Alexander Udalov cd35a6626e KT-2963 VerifyError using traits with required classes
#KT-2963 Fixed
2012-11-07 17:06:14 +04:00
Natalia.Ukhorskaya f139b637f3 Automatically cast error for intrinsic methods in array
#KT-2997 Fixed
2012-11-07 16:28:46 +04:00
Natalia.Ukhorskaya 91e83c2860 Wrong instruction for invoke private function
#KT-2202 Fixed
2012-11-02 11:49:10 +04:00
Natalia.Ukhorskaya 481afeb914 Use getfield or putfield instructions for private properties instead of invokevirtual getA or setA 2012-11-02 11:18:47 +04:00
Natalia.Ukhorskaya 3b58eb4b60 Generate copy function for data classes
#KT-2779 Fixed
2012-10-31 15:46:48 +04:00
Alexander Udalov 4c5fe70804 Do not compare boxed values with 0 via IFEQ/IFNE 2012-10-30 22:54:20 +04:00
Alexander Udalov 3ca976ee77 Generate bridges for delegates 2012-10-30 16:48:02 +04:00
Alexander Udalov 288e3a7b40 Cast arguments to proper types when generating delegates
Also minor refactoring in a couple places to adopt this style
2012-10-30 16:47:50 +04:00
Alexander Udalov 4cfe68da1e Coerce any type to Number before unboxing 2012-10-30 16:47:46 +04:00
Peter Kofler 28160ecb11 fix KT-2892 2012-10-29 22:16:43 +01:00
Peter Brachwitz 81de3cd46a Fix compilation of infix calls (KT-2929)
#KT-2929 Fixed
2012-10-29 22:01:56 +01:00
Sergey Mashkov edb8797fa6 KT-2987 java.lang.AbstractMethodError/java.lang.NoSuchMethodError for delegated class by parameterized parent
#KT-2987 Fixed
2012-10-25 16:26:58 +04:00
Natalia.Ukhorskaya 4db732c11b KT-2948 Assertion fails on a local enum
#KT-2948 Fixed
2012-10-23 19:23:16 +04:00
Natalia.Ukhorskaya a79a31cf01 #KT-2811 Fixed VerifyError on smart-cast 'this' 2012-10-23 13:20:29 +04:00
Alexander Udalov 8bfb2ddcce Generate bridges for properties declared in constructor
#KT-2926 Fixed
 #KT-2833 Fixed
2012-10-11 17:38:46 +04:00
Natalia.Ukhorskaya 78d22e9f81 KT-2823 TypeCastException has no message
#KT-2823 Fixed
2012-10-11 15:41:49 +04:00
Alexander Udalov e869568196 Generate bridges for property accessors
Use existing FunctionCodegen.generateBridgeIfNeeded() on property getters &
setters

 #KT-2920 Fixed
2012-10-09 16:36:24 +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 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 fcbc95bbb4 Generate not-null assertions after getting a field 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
Pavel V. Talanov 90ce15d96f Modify test for KT-1515 to actually test using javaClass in another package as stated in the request.
NOTE: not 100% that this test actually covers the corresponding fix by Alex Tkachman.
2012-10-01 16:14:40 +04:00
Alexander Udalov acf8702ccf KT-2822 Can't make a super call from an object literal
#KT-2822 Fixed
2012-09-27 16:30:58 +04:00
Andrey Breslav 92ac865c72 KT-2819 Duplicate toString() method generated in data class
#KT-2819 Fixed
2012-09-26 12:32:16 +04:00
Kirill Berezin 194ef38ba3 KT-2477 fake overrides now get INHERITED visibility in order to maximize visibility according to inherited traits\classes 2012-09-25 19:17:55 +04:00
Natalia.Ukhorskaya 32d707ca9b Inner Java Enums
KT-2691 Fixed
 KT-2686 Fixed
2012-09-24 12:33:58 +04:00
Alex Tkachman be09227569 generation of inner classes inside object literal. #KT-2607 fixed
on the way ClassCodegen and MemberCodegen refactored out and injectors regenerated
2012-09-20 17:57:07 +03:00
Alex Tkachman 00d7a0a8ae test case for KT-2655 which duplicates KT-2786 2012-09-20 17:54:40 +03:00
Alex Tkachman 242ee38606 generic signatures for properties #KT2677 fixed 2012-09-20 17:54:40 +03:00
Alex Tkachman eaf9a79420 correct handling of delegate properties #KT-2786 fixed 2012-09-20 17:54:40 +03:00
Alexander Udalov dadc97d29f Fix maven build
Do not create class objects for classes which come from Java.
2012-09-20 18:10:19 +04:00
Alexander Udalov 37fd9cea08 Place inner enum into its parent's class object
#KT-2771 In Progress

ClassifierCollector now collects all enum declarations inside non-static
classes. After all declarations are done, it processes these enums: creates
a class object if it's not present, reports errors on each enum if a class
object is not allowed, and puts every enum into this class object otherwise,
recording this fact to trace.
2012-09-20 15:02:13 +04:00
Svetlana Isakova b081615e59 added tests for collections 2012-09-20 14:42:39 +04:00
Alex Tkachman b022eec0fa call correct methods String.valueOf/StringBuilder.append in case of byte/short. #KT-2794 fixed 2012-09-20 11:46:40 +03:00
Alex Tkachman 3dd9c6ab10 {} replaced by () in data classes toString 2012-09-19 13:50:50 +03:00
Andrey Breslav 5eaa5b396b Removing usages of tuples from test data
(KT-2358 Drop tuples)
 #KT-2358 In progress
2012-09-18 20:27:09 +04:00
Andrey Breslav dee5152f9b Supporting Unit.VALUE, to replace #()
#KT-2358 In Progress
2012-09-18 20:27:09 +04:00
Alex Tkachman 7b066faa9f changed behavior of componentX/toString/hashCode and equals to work naturally with overriden properties 2012-09-18 18:08:16 +03:00
Alex Tkachman ae93018546 fix for several (unlikely all) closely related problems with handling of byte/short/char on Delvik #KT-2251 fixed 2012-09-18 16:53:55 +03:00
Alex Tkachman 0ffc8f355b attempt to fix KT-2251 2012-09-18 14:25:09 +03:00