Commit Graph

6615 Commits

Author SHA1 Message Date
Alexander Udalov 4305a009df Add regression test for KT-2673
#KT-2673 Obsolete
2013-01-18 21:27:07 +04:00
Alexander Udalov ffd62eb80e Refactor ClassGenTest
Initialize environment with JDK_ONLY in setUp(), allowing to quickly launch
tests without compilation of stdlib.

Remove duplicate/unneeded/commented out tests
2013-01-18 18:04:09 +04:00
Alexander Udalov c4a3963925 Fix nested classes codegen bug
When constructing a closure, codegen in some cases incorrectly determined if
it needed to store a reference from a nested class to the outer
2013-01-18 14:59:27 +04:00
Alexander Udalov 85bd41dfa5 Codegen tests for inner/nested classes
#KT-1174 In Progress
2013-01-16 23:11:49 +04:00
Alexander Udalov 0b51a6cae0 Disallow nested classes within inner & local classes
#KT-1174 In Progress
2013-01-16 23:11:45 +04:00
Alexander Udalov 7a3000ccac Forbid usage of outer's generic parameter in nested class
#KT-1174 In Progress
2013-01-16 23:11:42 +04:00
Alexander Udalov 43c37398af Labeled this & super to nested class' outer is an error
#KT-1174 In Progress
2013-01-16 23:11:42 +04:00
Alexander Udalov 5d92453532 Inaccessible outer class member is now an error
#KT-1174 In Progress
2013-01-16 23:11:41 +04:00
Natalia.Ukhorskaya 47abdcf565 Rename namespace class to {package.name}Package
Conflicts:

	compiler/jet.as.java.psi/src/org/jetbrains/jet/asJava/JavaElementFinder.java
2013-01-15 19:45:06 +04:00
Maxim Shafirov c293fe124d Regression test for KT-3238. The issue itself is incorrect but test may be useful 2013-01-13 03:09:40 +04:00
Alexander Udalov 4cebd3f75b Fix last if-statement in block codegen
#KT-3203 Fixed
2013-01-10 14:05:28 +04:00
Natalia.Ukhorskaya e9d1171d6d Fix VerifyError for enum constructor with default arguments 2012-12-27 12:29:09 +04:00
Natalia.Ukhorskaya 808c5abc0f Generate constructor without parameters if primary constructor has only parameters with default values
#KT-3085 Fixed
2012-12-27 12:29:06 +04:00
Natalia.Ukhorskaya 538aa869b4 Constructor with default arguments for inner class
#KT-2852 Fixed
2012-12-27 12:29:01 +04:00
Natalia.Ukhorskaya 17fa105116 Generate INVOKESPECIAL instruction for private method with default argument 2012-12-06 15:20:43 +04:00
Alexander Udalov c9bdfd2f07 Generate compareTo() properly
Take into account:
1) resolved call to compareTo (instead of always calling Comparable's method)
2) types of both caller and callee, when primitive, to avoid wrong casting
(instead of always using caller's type)

 #KT-3078 Fixed
2012-11-28 17:45:38 +04:00
Evgeny Gerashchenko a773b8426e Removed copyrights from Java test data. 2012-11-28 15:23:55 +04:00
Alexander Udalov 8e740a3ee4 Fix .put() for some stack values
#KT-3087 Fixed
2012-11-26 16:06:47 +04:00
Alexander Udalov 9d3907ff98 When-statements & correct line numbers 2012-11-22 22:32:21 +04:00
Alexander Udalov 0f496eac21 Try-catch-finally statements & correct line numbers 2012-11-22 22:32:14 +04:00
Alexander Udalov ca587513e3 Fix for finally before empty return 2012-11-22 22:32:10 +04:00
Alexander Udalov 99a908e8fe If-then-else statements & correct line numbers
#KT-3036 Fixed
2012-11-22 22:31:58 +04:00
Alexander Udalov 8564c20baa Fix condition generation of empty if 2012-11-22 22:31:53 +04:00
Alexander Udalov af601b5a90 Single-branch if-statements
Single-branch if-expressions are now compiled to statements if the result is
not used

 #KT-3036 In Progress
2012-11-22 22:31:40 +04:00
Pavel V. Talanov 7f617de8ac Rework test for KT1119 2012-11-21 19:49:51 +04:00
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