# HG changeset patch # User Josef Eisl # Date 1399485920 -7200 # Node ID b8bb788084954270fe84f34477d1560f3771d465 # Parent 8a66b661ed4956cd0d3251715542dcdf27ff5b08 AbstractFrameStateBuilder enable access to locks. diff -r 8a66b661ed49 -r b8bb78808495 graal/com.oracle.graal.java/src/com/oracle/graal/java/AbstractFrameStateBuilder.java --- a/graal/com.oracle.graal.java/src/com/oracle/graal/java/AbstractFrameStateBuilder.java Tue May 06 20:10:28 2014 +0200 +++ b/graal/com.oracle.graal.java/src/com/oracle/graal/java/AbstractFrameStateBuilder.java Wed May 07 20:05:20 2014 +0200 @@ -124,6 +124,13 @@ } /** + * @return the current lock depth + */ + public int lockDepth() { + return lockedObjects.length; + } + + /** * Gets the value in the local variables at the specified index, without any sanity checking. * * @param i the index into the locals @@ -144,6 +151,16 @@ } /** + * Gets the value in the lock at the specified index, without any sanity checking. + * + * @param i the index into the lock + * @return the instruction that produced the value for the specified lock + */ + public T lockAt(int i) { + return lockedObjects[i]; + } + + /** * Loads the local variable at the specified index, checking that the returned value is non-null * and that two-stack values are properly handled. * diff -r 8a66b661ed49 -r b8bb78808495 graal/com.oracle.graal.java/src/com/oracle/graal/java/HIRFrameStateBuilder.java --- a/graal/com.oracle.graal.java/src/com/oracle/graal/java/HIRFrameStateBuilder.java Tue May 06 20:10:28 2014 +0200 +++ b/graal/com.oracle.graal.java/src/com/oracle/graal/java/HIRFrameStateBuilder.java Wed May 07 20:05:20 2014 +0200 @@ -337,6 +337,7 @@ /** * @return the current lock depth */ + @Override public int lockDepth() { assert lockedObjects.length == monitorIds.length; return lockedObjects.length;