[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
This commit is contained in:
Kristoffer Andersen
2020-10-05 22:22:38 +02:00
committed by max-kammerer
parent 4479bf0933
commit 2c9bf95227
13 changed files with 145 additions and 73 deletions
@@ -29,11 +29,6 @@ public class CheckLocalVariablesTableTestGenerated extends AbstractCheckLocalVar
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/checkLocalVariablesTable"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true);
}
@TestMetadata("catchClause.kt")
public void testCatchClause() throws Exception {
runTest("compiler/testData/checkLocalVariablesTable/catchClause.kt");
}
@TestMetadata("copyFunction.kt")
public void testCopyFunction() throws Exception {
runTest("compiler/testData/checkLocalVariablesTable/copyFunction.kt");