[JVM] Use reference comparison for objects defined in StrictBasicValue
This commit is contained in:
+1
-1
@@ -671,7 +671,7 @@ class CoroutineTransformerMethodVisitor(
|
|||||||
val value = frame.getLocal(slot)
|
val value = frame.getLocal(slot)
|
||||||
if (value.type == null || (shouldOptimiseUnusedVariables && !livenessFrame.isAlive(slot))) continue
|
if (value.type == null || (shouldOptimiseUnusedVariables && !livenessFrame.isAlive(slot))) continue
|
||||||
|
|
||||||
if (value == StrictBasicValue.NULL_VALUE) {
|
if (value === StrictBasicValue.NULL_VALUE) {
|
||||||
referencesToSpill += slot to null
|
referencesToSpill += slot to null
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -170,7 +170,7 @@ abstract class BoxingInterpreter(
|
|||||||
|
|
||||||
private fun merge(v: BasicValue, w: BasicValue, isLocalVariable: Boolean) =
|
private fun merge(v: BasicValue, w: BasicValue, isLocalVariable: Boolean) =
|
||||||
when {
|
when {
|
||||||
v == StrictBasicValue.UNINITIALIZED_VALUE || w == StrictBasicValue.UNINITIALIZED_VALUE ->
|
v === StrictBasicValue.UNINITIALIZED_VALUE || w === StrictBasicValue.UNINITIALIZED_VALUE ->
|
||||||
StrictBasicValue.UNINITIALIZED_VALUE
|
StrictBasicValue.UNINITIALIZED_VALUE
|
||||||
v is BoxedBasicValue -> {
|
v is BoxedBasicValue -> {
|
||||||
if (w is BoxedBasicValue) {
|
if (w is BoxedBasicValue) {
|
||||||
|
|||||||
Reference in New Issue
Block a user