changeset 6377:f3dcc071d696

fix for partial escape analysis bugs (related to StoreIndexed and monitors)
author Lukas Stadler <lukas.stadler@jku.at>
date Thu, 13 Sep 2012 11:27:37 +0200
parents ccdf43a09204
children 4df5ec0f8082
files graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/phases/ea/PartialEscapeAnalysisPhase.java
diffstat 1 files changed, 8 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/phases/ea/PartialEscapeAnalysisPhase.java	Wed Sep 12 16:22:44 2012 +0200
+++ b/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/phases/ea/PartialEscapeAnalysisPhase.java	Thu Sep 13 11:27:37 2012 +0200
@@ -599,6 +599,9 @@
                         if (index < 0 || index >= arrayObj.fieldState.length) {
                             // out of bounds or not constant
                             replaceWithMaterialized(array, x, state, arrayObj);
+                            if (valueObj != null) {
+                                replaceWithMaterialized(value, x, state, valueObj);
+                            }
                         } else {
                             arrayObj.fieldState[index] = value;
                             if (changeGraph) {
@@ -731,6 +734,11 @@
                                 }
                             }
                         });
+                        for (ObjectState obj : state.states()) {
+                            if (obj.lockCount > 0) {
+                                virtual.add(obj);
+                            }
+                        }
 
                         ArrayDeque<ObjectState> queue = new ArrayDeque<>(virtual);
                         while (!queue.isEmpty()) {