This helps to reduce peak memory in lowerings/codegen by a lot.
A more robust approach would be to have a separate BindingContext for
each file, and clear each of them after running psi2ir on it. This would
also lower peak memory usage in psi2ir.
Provide a fallback workaround compiler argument
-Xir-do-not-clear-binding-context just in case BindingContext is in fact
used somewhere and it's not caught by tests.
This commit unifies the expectation format between the stepping and
LVT tests in the new debugging test harness.
Furthermore, it introduces a compression of runs of locations without
linenumbers. These default to showing as bytecode offsets from
previous line number, which overspecifies the tests: the bytecodes
chosen should not be constrained by a debugging step test.
This commit enables the execution of suspend box tests in a separate
test. It's a QoL improvement in the existing bb tests but, motivating
these changes, enables the new debugger stepping tests to step
coroutine code.
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
instead of statically registering it.
Static registering can cause subtle errors when plugin implementation
(e.g. SerializationDescriptorPluginForKotlinxSerialization) is registered
from multiple classloaders: in multi-module with daemon compilation scenario
#KT-41857 Fixed
Move collectionStubMethodLowering before jvmInlineClassPhase, and make
them interact properly.
Note that some issues still remain in inline class <-> special bridges
interaction.
KT-40187 KT-42469
java.lang.NoClassDefFoundError: it/unimi/dsi/fastutil/objects/Object2FloatMap
at com.intellij.configurationStore.MyXmlSerializer$bindingProducer$1.createRootBinding(xmlSerializer.kt:172)
at com.intellij.configurationStore.MyXmlSerializer$bindingProducer$1.createRootBinding(xmlSerializer.kt:170)
at com.intellij.configurationStore.OldBindingProducer.getRootBinding(xmlSerializer.kt:154)
at com.intellij.configurationStore.MyXmlSerializer.getRootBinding(xmlSerializer.kt:186)
at com.intellij.util.xmlb.Serializer.getRootBinding(Serializer.java:18)
at com.intellij.configurationStore.JdomSerializerImpl.serializeObjectInto(xmlSerializer.kt:78)
at com.intellij.configurationStore.XmlSerializer.serializeObjectInto(xmlSerializer.kt:39)
at com.intellij.configurationStore.XmlSerializer.serializeObjectInto$default(xmlSerializer.kt:38)
at com.intellij.configurationStore.XmlSerializer.serializeObjectInto(xmlSerializer.kt)
at com.intellij.codeInsight.CodeInsightSettings.writeExternal(CodeInsightSettings.java:231)
at org.jetbrains.kotlin.test.testFramework.KtUsefulTestCase.<clinit>(KtUsefulTestCase.java:123)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at junit.framework.TestSuite.createTest(TestSuite.java:60)
at junit.framework.TestSuite.addTestMethod(TestSuite.java:307)
at junit.framework.TestSuite.addTestsFromTestCase(TestSuite.java:150)
at junit.framework.TestSuite.<init>(TestSuite.java:129)