Commit Graph

41 Commits

Author SHA1 Message Date
Alexander Udalov 73aa465ee9 Add tests for issues fixed in JVM IR
Note that KT-30696 is fixed only in the single-module case, and KT-42012
is not fixed fully (see KT-44855).

 #KT-30041
 #KT-30629
 #KT-30696
 #KT-30933
 #KT-32351
 #KT-32749
 #KT-38849
 #KT-42012
 #KT-42990
 #KT-44234
 #KT-44529
 #KT-44631
 #KT-44647
2021-02-10 21:42:10 +01:00
Igor Chevdar 6f9bcf249b [IR] Supported inlining of adapted references + tests 2021-02-09 17:23:19 +05:00
Dmitriy Novozhilov 64a300bfcd [TD] Update testdata according to previous commit 2021-02-02 17:53:52 +03:00
Alexander Udalov 5480faf5c5 Add tests for issues fixed in JVM IR and other obsolete issues
#KT-6007
 #KT-16445
 #KT-17753
 #KT-22488
 #KT-23881
 #KT-24135
 #KT-26360
 #KT-27427
 #KT-27449
 #KT-27830
 #KT-28042
 #KT-29595
 #KT-30708
 #KT-32793
2021-02-01 18:29:59 +01:00
Denis.Zharkov ad30c6c380 FIR: Fix callable references resolution when they're being returned from lambdas 2021-01-21 18:53:03 +03:00
pyos 6dc08cb2fd Add a bytecode test that checks inlining of adapted references 2020-09-29 19:49:46 +02:00
Mark Punzalan 348ba3e08c [FIR] Enable BlackBoxInlineCodegen tests for FIR.
16 out of 638 tests (2.5%) are currently failing.
2020-09-29 10:21:21 +03:00
Alexander Udalov 9e357354fb Add JVM/JVM_IR mixed compilation tests for compileKotlinAgainstKotlin/boxInline 2020-09-07 19:41:37 +02:00
Mikhael Bogdanov 4b6202c902 JVM_IR. Support inlining of bound CR 2019-12-30 08:35:46 +01:00
Mikhael Bogdanov b9dee4e93a Remove assertion on sorted ranges: it could be empty if lambda doesn't contain any linenumber
#KT-35101 Fixed
2019-12-02 12:08:36 +01:00
Alexander Udalov a485a5ffd6 JVM IR: load fields for JvmField properties from dependencies
This is needed to properly lower JvmField property calls to field
accesses.
2019-11-20 15:35:12 +01:00
Georgy Bronnikov 7ede26e8f4 IrCompileKotlinAgainstInlineKotlin tests 2019-09-06 09:19:57 +03:00
Igor Chevdar ad8bcda99e [IR] Merged K/N inliner with the common one 2019-08-16 18:32:19 +03:00
Mikhael Bogdanov 81e6416bfe Support bound callable reference inlining in IR 2019-06-04 14:56:13 +02:00
pyos 8c55376f0c Unmute almost all JVM_IR tests that use property references 2019-03-19 12:00:29 +01:00
Svyatoslav Kuzmich aa811dcfb3 [JS IR BE] Add KJS_WITH_FULL_RUNTIME directive to compiler tests 2019-01-24 16:14:40 +03:00
Mikhael Bogdanov f7ce8c18c6 Add tests for Obsolete issues
#KT-18977 Obsolete
2019-01-09 10:20:54 +01:00
Mikhael Bogdanov 9a059809bf Add test for Obsolete issues
#KT-15956 Obsolete
 #KT-15751 Obsolete
 #KT-16417 Obsolete
 #KT-21787 Obsolete
2019-01-08 13:52:47 +01:00
Mikhael Bogdanov 02d9c526e2 Proper resort variables on inlining lowered ir closures
Original problem is that lowered ir closures doesn't meet inliner expectations
 about captured variable position in inlining method.
 E.g.: Call 'foo(valueParam) { capturedParam }' to
  inline function 'foo' with declaration

      inline fun foo(valueParam: Foo, inlineParamWithCaptured: Bar.() ->) ....

 is reorganized through inlining to equivalent call foo(valueParam, capturedParam1, cp2 ...).
 But lowered closure for lambda parameter has totally different parameters order:

     fun loweredLambda$x(extensionReceiver, captured1, cp2..., valueParam1, vp2...)

 So before inlining lowered closure should be transformed to

     fun loweredLambda$x(extensionReceiver, valueParam1, vp2..., captured1, cp2..)

 #KT-28547 Fixed
2019-01-03 07:57:36 +01:00
Roman Artemev fb499def59 Update tests 2018-10-25 15:49:21 +03:00
Roman Artemev 89bec8ec59 Update tests 2018-09-18 15:30:17 +03:00
Mikhael Bogdanov 357359b1dd Unmute ir-tests after CR support 2018-08-09 14:22:50 +03:00
Anton Bannykh 07b3b66fd9 JS IR: unmute tests 2018-07-10 13:34:19 +03:00
Mikhael Bogdanov e149cbe852 Mute failed jvm ir tests 2018-06-28 12:26:41 +02:00
Anton Bannykh 96355e2732 JS IR: mute codegen box tests automatically 2018-06-09 19:15:38 +03:00
Alexander Udalov 386a3fb5ce Fix tests after f4f5359725 2017-11-27 16:03:38 +01:00
Alexander Udalov f4f5359725 Fix exception on inlining callable reference with implicit this in LHS
Use ResolvedCall to determine the receiver type in the JVM codegen,
instead of manually inspecting the PSI

 #KT-20821 Fixed
2017-11-27 12:46:55 +01:00
Mikhael Bogdanov 49252f6eec Properly process primitive receiver on inlining bound callable references
#KT-18728 Fixed
2017-07-03 10:51:51 +02:00
Mikhael Bogdanov 4f914fafca Calculate default mask shift properly
#KT-18689 Fixed
2017-06-29 14:57:42 +02:00
Mikhael Bogdanov a8625b632d Fix for KT-16411, KT-16412: Exception from compiler when try call SAM constructor where argument is callable reference to nested class inside object
#Fixed KT-16411
  #Fixed KT-16412
2017-02-21 11:40:25 +01:00
Alexey Andreev d35ddc1017 JS: unmute tests that now pass 2017-01-24 20:09:32 +03:00
Alexey Andreev 7a0f75f164 JS: refactor generation of callable references to functions 2017-01-24 20:09:29 +03:00
Anton Bannykh 07bb7ef4d3 JS: extension lambdas translated same as local lambdas (KT-13312 fixed) 2017-01-23 20:09:36 +03:00
Mikhael Bogdanov 2566a7a25e Rename receiver$0 in CallableReference to receiver
#KT-15449 Fixed
2016-12-29 16:57:02 +01:00
Anton Bannykh 159df7964a JS: bound callable references (KT-13573). 2016-11-28 16:33:58 +03:00
Michael Bogdanov 7230965e62 Support for property reference inlining 2016-09-07 12:01:49 +03:00
Michael Bogdanov a12d7b6019 Check lambda inlining in package part files in test framework 2016-09-07 12:01:47 +03:00
Michael Bogdanov e0d525b72a Support bound function reference inlining 2016-08-17 11:26:45 +03:00
Alexander Udalov cc84aabdcf Migrate boxInline tests to new multi-file framework 2016-02-27 15:40:05 +03:00
Alexander Udalov 661f4efc68 Forbid callable references to members and extensions with empty LHS
This syntax is reserved to be likely used in the future as a shorthand for
"this::foo" where the resulting expression doesn't take the receiver as a
parameter but has "this" already bound to it
2015-10-03 04:37:04 +03:00
Michael Bogdanov e200b97ca4 Inline callable references
#KT-6900 Fixed
2015-04-13 16:11:21 +03:00