Commit Graph

3700 Commits

Author SHA1 Message Date
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 054e5fb5e7 Codegen for callable reference expressions
#KT-1183 In Progress
2013-04-22 17:59:32 +04:00
Alexander Udalov 76fa9642f0 toString() for FunctionN classes
It's implemented as if the types were reified: getting the real type parameters
of the corresponding FunctionN class
2013-04-22 17:59:29 +04:00
Alexander Udalov 0ec1f20140 Write generic signature for closure FunctionN superclass
ClosureCodegen.appendType() now appends any Type as a type parameter correctly
2013-04-22 17:59:29 +04:00
Alexander Udalov 974df0ed8e Use FunctionImplN instead of FunctionN in codegen
Superclass of closures should now be FunctionImplN instead of FunctionN. Since
these -Impl classes are needed only in JVM, the corresponding descriptors and
types are created in the back-end only.
2013-04-22 17:59:29 +04:00
Mikhael Bogdanov c69e7f059d Duplicated JetTypeMapper.mapSignature removed 2013-04-18 15:03:43 +04:00
Mikhael Bogdanov a1d295638a ExpressionCOdegen.visitSimpleNameExpression simplification 2013-04-18 14:05:15 +04:00
Mikhael Bogdanov 1fd76845ad Regression test for kt3315 2013-04-17 18:55:04 +04:00
Natalia.Ukhorskaya f2b3be7416 Unify properties initialization for init and clinit 2013-04-17 16:18:10 +04:00
Mikhael Bogdanov 57b161b08a KT-3500: ClassFormatError: Duplicate method name&signature in class file && KT-3429: Traits override bug 2013-04-17 15:23:33 +04:00
Mikhael Bogdanov 3da3f94b4e KT 3492: Bug in bytecode generation for labeled super call from inner class & Property generation refactoring 2013-04-17 15:23:33 +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 6ff9bfd4bb Supported SAM constructor calls without function literal. 2013-03-29 20:36:47 +04:00
Evgeny Gerashchenko dcb95fc5ac Fixed priorities for synthetic functions. 2013-03-29 13:10:31 +04:00
Evgeny Gerashchenko 0bc65321c2 KT-1547 Wrong layout of closure classes
#KT-1547 fixed
2013-03-28 15:54:51 +04:00
Evgeny Gerashchenko 91282b992d Supported functional interfaces with generic parameters in codegen. 2013-03-27 19:19:56 +04:00
Evgeny Gerashchenko e6c047b2e0 Added tests with FilenameFilter (several arguments). 2013-03-27 19:19:56 +04:00
Evgeny Gerashchenko 835c0f85c7 Supported SAM constructors in codegen (simplest case). 2013-03-27 19:19:55 +04:00
Mikhael Bogdanov ad4eeb3f8a Properly capture local functions
Local functions in local classed wasn't captured properly
2013-03-27 15:57:27 +04:00
Mikhael Bogdanov 932c1444a2 Fix for local closures 2013-03-26 15:43:25 +04:00
Andrey Breslav 3bd202de84 Allow to call += on a val 2013-03-21 21:21:54 +04:00
Mikhael Bogdanov 93b860e4ad Always generate getter and setter 2013-03-20 20:50:06 +04:00
Alexander Udalov 7cc1ed5cb1 Add regression test for KT-3413 2013-03-18 14:52:29 +04:00
Alexander Udalov 242b97febf Fix mapGetterSignature/mapSetterSignature
In case of TRAIT_IMPL the incorrect this was written. Reuse the code from the
common mapSignature

 #KT-3413 Fixed
2013-03-15 22:03:39 +04:00
Alexander Udalov 68844131b0 Fix broken isEnumClassObject methods
Out of three methods, two were incorrect
2013-03-15 16:00:55 +04:00
Mikhael Bogdanov b3ec87f956 ClassObject instance field refactoring 2013-03-04 16:42:55 +04:00
Mikhael Bogdanov 6e1e495397 KT-3374 Wrong this@method receiver 2013-02-28 15:22:35 +04:00
Mikhael Bogdanov 029b2d9770 Test fixes for 'New diagnostic error for ambiguous object expression type' 2013-02-19 17:56:56 +04:00
Evgeny Gerashchenko b9e5704057 Updated test data and stdlib sources. 2013-02-13 18:08:37 +04:00
Mikhael Bogdanov c61c8d7fa0 Compilation Exception - remove duplicated this on stack
#KT-3114 Fixed
2013-02-11 15:19:49 +04:00
Alexander Udalov 83b93071d3 Fix over-optimized comparison with null 2013-02-11 02:01:39 +04:00
Alexander Udalov 64bc79aaac Fix safe calls codegen for nullable generic 2013-02-06 17:54:30 +04:00
Alexander Udalov 433660b2ce Fix codegen of !! for nullable generics 2013-02-06 17:54:29 +04:00
Alexander Udalov 75f09b7527 Fix codegen of as-casts for nullable generics 2013-02-06 17:54:28 +04:00
Alexander Udalov 70f67c7993 Fix elvis expression in case of nullable generic 2013-02-06 17:54:27 +04:00
Alexander Udalov 1f4dd8cd33 Add CodegenUtil.isNullableType(), fix assertions
JetType.isNullable() is not accurate when the type denotes a type parameter:
a parameter can be not null (isNullable=false), but its upper bound can be
nullable (<T: Any?>), so null may appear in the value of such type. Therefore
it's preferred to use a special check (isNullableType()) in codegen from now on

Do not generate assertion for parameters of not-null types which have a
nullable upper bound + the same with Java method calls

Also fix Intrinsics class internal name in tests

 #KT-3313 Fixed
2013-02-05 21:52:29 +04:00
Alexander Udalov 4ca522bf0e Fix codegen of do-while condition
The condition of a do-while loop can use variables declared in the loop
(variables can only be declared inside a block). Previously this behaviour
caused crash because after the block was generated, all variables declared
inside that block were gone from myFrameMap

 #KT-3280 Fixed
2013-02-04 15:30:38 +04:00
Alexander Udalov 2e64aac788 Add regression test for KT-3132
#KT-3132 Obsolete
2013-01-31 20:59:16 +04:00
Andrey Breslav bbde38a6dc KT-1360 Vararg bug in front-end 2013-01-31 18:54:37 +04:00
Andrey Breslav 2d2c44ca9d KT-2106 Mixed named and positional arguments should be allowed
#KT-2106 Fixed
2013-01-31 15:43:14 +04:00
Evgeny Gerashchenko 21c37951d6 Removed old range test which were spread all over the place. 2013-01-30 19:23:51 +04:00
Evgeny Gerashchenko b2e74b1473 Adapted code to new structure of ranges. 2013-01-29 22:55:06 +04:00
Evgeny Gerashchenko 9fa3e47b65 Added start and end property to generic range. 2013-01-29 22:55:05 +04:00
Evgeny Gerashchenko 0e0c048074 New structure of range classes. 2013-01-29 22:55:05 +04:00
Evgeny Gerashchenko 0ff3589bb9 Moved *Range.step() functions to stdlib. 2013-01-29 22:55:05 +04:00
Evgeny Gerashchenko c8a194c0a8 Dropped *Range.isReversed 2013-01-29 22:55:04 +04:00
Alexander Udalov 9007a6214a Fix closure's reference to outer closure
#KT-3276 Fixed
2013-01-29 22:41:58 +04:00
Alexander Udalov 10c5949199 Extract some codegen tests to black box testData 2013-01-28 18:20:33 +04:00
Alexander Udalov 7ce62a5b64 Remove generated codegen tests, move all testData to box/
A single test file will be generated out of box/ directory
2013-01-28 18:20:21 +04:00
Alexander Udalov 41a416da60 Move blackBoxFile() testData to box/ directory
Delete all test methods (and empty test classes), since they'll be
auto-generated
2013-01-28 18:20:17 +04:00