JVM_IR: make primitive == object slightly less lazy.

Discarding the value used to leave an unused-but-never-destroyed
temporary variable. It's best to not separate calls to `enterTemp`
and `leaveTemp`.

Not sure what kind of test to add though, since this is minor -- if the
result of the comparison is discarded, then the entire statement is more
or less pointless.

 #KT-42251 Fixed
This commit is contained in:
pyos
2020-10-05 14:05:19 +02:00
committed by max-kammerer
parent 4c09906235
commit a9b53adc50
6 changed files with 64 additions and 60 deletions
@@ -1810,6 +1810,11 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest {
public void testSimpleConstructorNotRedundantNotOptimizable() throws Exception {
runTest("compiler/testData/codegen/bytecodeText/deadCodeElimination/simpleConstructorNotRedundantNotOptimizable.kt");
}
@TestMetadata("unusedPrimitiveAndObjectEquals.kt")
public void testUnusedPrimitiveAndObjectEquals() throws Exception {
runTest("compiler/testData/codegen/bytecodeText/deadCodeElimination/unusedPrimitiveAndObjectEquals.kt");
}
}
@TestMetadata("compiler/testData/codegen/bytecodeText/defaultArguments")