changeset 23268:1ced4f8e6e7f

fixed cast exception when using -G:Meter=
author Doug Simon <doug.simon@oracle.com>
date Thu, 07 Jan 2016 14:54:32 +0100
parents 345f08efb500
children 52f1bd96653f
files graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/GraalCompiler.java
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/GraalCompiler.java	Thu Jan 07 13:57:36 2016 +0100
+++ b/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/GraalCompiler.java	Thu Jan 07 14:54:32 2016 +0100
@@ -363,7 +363,9 @@
                     JavaKind kind = JavaKind.Illegal;
                     if (dp.reference instanceof ConstantReference) {
                         VMConstant constant = ((ConstantReference) dp.reference).getConstant();
-                        kind = ((JavaConstant) constant).getJavaKind();
+                        if (constant instanceof JavaConstant) {
+                            kind = ((JavaConstant) constant).getJavaKind();
+                        }
                     }
                     dms[kind.ordinal()].add(1);
                 }