Commit Graph

29 Commits

Author SHA1 Message Date
Kristoffer Andersen 3291f8455b [JVM+IR] Update straight-forward LVT tests 2020-10-23 11:19:58 +02:00
Kristoffer Andersen 2c9bf95227 [JVM+IR] New LVT debugging test harness improvements
This is the first step in a push to improve the test coverage of the
IR debugging experience. This commit improves on the sketch of local
variable table tests built on the new debugger stepping
infrastructure. As improvements on the existing
checkLocalVariableTableTest they:
 - don't overspecify codegen strategy: no hard requirements on slots.
 - test the observed lifespans of locals by stepping through code.

Ultimately this should enable us to bring over all existing tests for
improved coverage of both old and new JVM backends.

WIP list:
 - Gracefully handle absent LVT: treat as empty Add type of local and
 - type of value stored there to expectations Print values in local
 - slots if primitive or java.lang.String Enable specifying
 - expectations per backend Gracefully handle absent box methods
 - Gracefully handle null values in slots of reference type
 - Port a first LVT test
2020-10-23 11:19:58 +02:00
pyos 5c55f67923 JVM_IR: generate shorter names for classes in delegate initializers
#KT-41493 Fixed
2020-10-20 21:14:44 +02:00
Alexander Udalov 8a4510c21b Regenerate tests 2020-01-02 10:31:00 +01:00
Dmitriy Novozhilov e7f8c8e155 [TEST] Regenerate tests after previous commit 2019-12-12 16:11:45 +03:00
Mads Ager 3b2843fe7a Introduce local variable type checker.
CheckLocalVariablesTableTests will now check the validity of
the locals table against types of locals computed based on the
bytecode.

These checks and the new destructuringInFor test act as a
regression test for the changes in
https://github.com/JetBrains/kotlin/pull/2613

These checks also caught a similar issue for destructuring
lambda parameters, where the local is introduced before the
value has been written to the local slot. This change also
fixes that.

Finally, this change fixes the asmLike tests to correctly
look up the name of parameters in the locals table.
2019-10-07 15:06:44 +02:00
Jiaxiang Chen 2c102ecd57 Replicate old backend's naming logic for captured receiver parameter and extension receiver parameters.
Context for determine if a value parameter is captured from outer
context is not directly available after lowering, hence introduce a new
IrDeclarationOrigin for captured receiver parameter to avoid duplicate
calculation.
2019-07-08 16:25:18 +09:00
nikita.movshin 65244b4bea Update copyright.
Change the copyright from "JetBrains s.r.o." to
"JetBrains s.r.o. and Kotlin Project contributors"
Update only 2 lines copyright.
2019-04-23 20:09:22 +03:00
Ilmir Usmanov 6f14dcfacb Put suspend lambda's parameters to LVT
#KT-26412 Fixed
 #KT-28534 Fixed
2019-03-30 04:18:50 +03:00
Ilmir Usmanov ec7315e6da Add $completion entry to suspend functions' LVT
#KT-28810 Fixed
2019-02-22 13:50:35 +03:00
Mikhael Bogdanov cf47bc0130 Update copyright in generated compiler tests 2019-01-02 12:37:06 +01:00
Ilmir Usmanov 8ec49adcf0 Minor. Ignore test 2018-09-11 17:50:46 +03:00
Ilmir Usmanov f507a26a12 Generate decomposed lambda params in suspend lambda's local variables
Unlike ordinary lambdas, suspend lambdas do the computation in
doResume(Ljava/lang/Object;Ljava/lang/Throwable;)Ljava/lang/Object;
method. As you can see, there are no decomposed parameters. As a result,
they used not to be generated.
To fix the issue, I add decomposed parameters to value parameters while
generating local variables table.

In addition, when generating suspend lambda for inline, the codegen
does not take this kind of parameters into account. This is also fixed.

 #KT-18576: Fixed
2018-05-03 10:35:13 +03:00
Zalim Bashorov ab03ab84bb Regenerate tests 2018-04-19 13:17:27 +03:00
Zalim Bashorov 9970dd051f Fix copyright's start year in generated tests 2018-03-14 15:04:58 +03:00
Dmitry Jemerov e80dae1802 Update copyright in generated tests 2018-01-10 11:55:28 +01:00
Mikhael Bogdanov 5071baf970 Support increment and '*=' operations on inline properties 2017-01-10 14:09:42 +01:00
Mikhail Zarechenskiy 6cccad9647 Update year in license and regenerate tests 2017-01-10 12:01:17 +03:00
Zalim Bashorov 1dedb38481 Regenerate tests 2016-11-09 21:41:12 +03:00
Denis Zharkov a9fcee098d Support single-underscore named variables in JVM backend
There are mainly two kind of changes:
- skipping 'componentX' calls for destructuring entries named _
- fixing local variable table for them
 - skip entries for destructuring entries named _
 - use $noName_<i> format for lambda parameters named _

 #KT-3824 Fixed
 #KT-2783 Fixed
2016-10-24 10:19:25 +03:00
Denis Zharkov 4793f71da2 Properly generate indices for destructured parameters in inline case
#KT-14399 Fixed
2016-10-19 16:05:50 +03:00
Denis Zharkov e75efc88ff Add support for desctructuring of lambda parameters in JVM backend
#KT-5828 In Progress
2016-09-19 20:22:57 +03:00
Michael Bogdanov 16afe74dc1 Fix for KT-11117: Android Kotlin DEX transformation error when I use arrayOf as an anonymous object property
#KT-11117 Fixed
2016-02-29 12:53:58 +03:00
Stanislav Erokhin 341b251e4d Update copyright in generated tests. 2016-02-16 18:59:10 +03:00
Dmitry Jemerov 970d6f6834 generate local variables table for @JvmOverloads-generated methods
#KT-7319 Fixed
2016-02-02 12:11:51 +01:00
Dmitry Jemerov 19af88738b remove Jet from names of classes in tests: phase 2 2015-11-03 14:06:04 +01:00
Alexander Udalov 94df191f86 Regenerate tests 2015-04-10 20:26:34 +03:00
Alexander Udalov 3b81d63334 Rename jet -> kotlin in compiler-tests (except resolve)
Move test-related code to org.jetbrains.kotlin.test, also move some tests to
packages with better names
2015-01-12 00:24:12 +03:00
Alexander Udalov de6e8a7493 Rename package jet -> kotlin in backend
org.jetbrains.jet.codegen -> org.jetbrains.kotlin.codegen
2015-01-08 23:32:09 +03:00