Mercurial > hg > graal-compiler
changeset 13788:6c5c17d0f57d
guard again null receiver object when reading a constant field
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Tue, 28 Jan 2014 21:24:24 +0100 |
parents | eec9f21a40b7 |
children | a98d5959a813 b42977294f02 |
files | graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/meta/HotSpotResolvedJavaField.java |
diffstat | 1 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/meta/HotSpotResolvedJavaField.java Tue Jan 28 18:46:43 2014 +0100 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/meta/HotSpotResolvedJavaField.java Tue Jan 28 21:24:24 2014 +0100 @@ -198,9 +198,9 @@ Object object = receiver.asObject(); // Canonicalization may attempt to process an unsafe read before - // processing a guard (e.g. a type check) for this read - // so we need to type check the object being read - if (isInObject(object)) { + // processing a guard (e.g. a null check or a type check) for this read + // so we need to check the object being read + if (object != null && isInObject(object)) { if (Modifier.isFinal(getModifiers())) { Constant value = readValue(receiver); if (assumeNonStaticFinalFieldsAsFinal(object.getClass()) || !value.isDefaultForKind()) {