Mercurial > hg > graal-jvmci-8
changeset 15558:b8bb78808495
AbstractFrameStateBuilder enable access to locks.
author | Josef Eisl <josef.eisl@jku.at> |
---|---|
date | Wed, 07 May 2014 20:05:20 +0200 |
parents | 8a66b661ed49 |
children | 9440ab398f49 |
files | graal/com.oracle.graal.java/src/com/oracle/graal/java/AbstractFrameStateBuilder.java graal/com.oracle.graal.java/src/com/oracle/graal/java/HIRFrameStateBuilder.java |
diffstat | 2 files changed, 18 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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. *
--- 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;