changeset 18707:3d4e1284d39e

LocationMarker: fix handling of illegal values.
author Josef Eisl <josef.eisl@jku.at>
date Mon, 15 Dec 2014 18:52:10 +0100
parents b6e98df9ba7d
children ed8477e2561c
files graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/alloc/LocationMarker.java
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/alloc/LocationMarker.java	Tue Dec 16 21:02:12 2014 +0100
+++ b/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/alloc/LocationMarker.java	Mon Dec 15 18:52:10 2014 +0100
@@ -28,6 +28,7 @@
 
 import com.oracle.graal.api.code.*;
 import com.oracle.graal.api.meta.*;
+import com.oracle.graal.compiler.common.*;
 import com.oracle.graal.compiler.common.cfg.*;
 import com.oracle.graal.debug.*;
 import com.oracle.graal.lir.*;
@@ -188,11 +189,14 @@
             if (shouldProcessValue(operand)) {
                 Debug.log("clear operand: %s", operand);
                 frameMap.clearReference(operand, currentSet);
+            } else {
+                assert isIllegal(operand) || operand.getPlatformKind() != Kind.Illegal || mode == OperandMode.TEMP : String.format("Illegal PlatformKind is only allowed for TEMP mode: %s, %s",
+                                operand, mode);
             }
         }
 
         protected boolean shouldProcessValue(Value operand) {
-            return (isRegister(operand) && attributes(asRegister(operand)).isAllocatable() || isStackSlot(operand)) && operand.getKind() != Kind.Illegal;
+            return (isRegister(operand) && attributes(asRegister(operand)).isAllocatable() || isStackSlot(operand)) && operand.getPlatformKind() != Kind.Illegal;
         }
     }