# HG changeset patch # User Thomas Wuerthinger # Date 1360080231 -3600 # Node ID 1a2d258d481a7cee209f1ec8d15a93a7aee9eb58 # Parent d71feabc99956601c909c556a6b472cc6cdcd548 Added getFrameDescriptor() to Frame interface. diff -r d71feabc9995 -r 1a2d258d481a graal/com.oracle.truffle.api/src/com/oracle/truffle/api/frame/Frame.java --- a/graal/com.oracle.truffle.api/src/com/oracle/truffle/api/frame/Frame.java Tue Feb 05 17:01:34 2013 +0100 +++ b/graal/com.oracle.truffle.api/src/com/oracle/truffle/api/frame/Frame.java Tue Feb 05 17:03:51 2013 +0100 @@ -31,6 +31,11 @@ public interface Frame { /** + * @return the object describing the layout of this frame + */ + FrameDescriptor getFrameDescriptor(); + + /** * @return the arguments used when calling this method */ Arguments getArguments(); diff -r d71feabc9995 -r 1a2d258d481a graal/com.oracle.truffle.api/src/com/oracle/truffle/api/frame/NativeFrame.java --- a/graal/com.oracle.truffle.api/src/com/oracle/truffle/api/frame/NativeFrame.java Tue Feb 05 17:01:34 2013 +0100 +++ b/graal/com.oracle.truffle.api/src/com/oracle/truffle/api/frame/NativeFrame.java Tue Feb 05 17:03:51 2013 +0100 @@ -126,4 +126,9 @@ @Override public void updateToLatestVersion() { } + + @Override + public FrameDescriptor getFrameDescriptor() { + throw new UnsupportedOperationException("native frame"); + } } diff -r d71feabc9995 -r 1a2d258d481a graal/com.oracle.truffle.api/src/com/oracle/truffle/api/impl/DefaultMaterializedFrame.java --- a/graal/com.oracle.truffle.api/src/com/oracle/truffle/api/impl/DefaultMaterializedFrame.java Tue Feb 05 17:01:34 2013 +0100 +++ b/graal/com.oracle.truffle.api/src/com/oracle/truffle/api/impl/DefaultMaterializedFrame.java Tue Feb 05 17:03:51 2013 +0100 @@ -117,4 +117,9 @@ public Frame unpack() { return this; } + + @Override + public FrameDescriptor getFrameDescriptor() { + return wrapped.getFrameDescriptor(); + } } diff -r d71feabc9995 -r 1a2d258d481a graal/com.oracle.truffle.api/src/com/oracle/truffle/api/impl/DefaultVirtualFrame.java --- a/graal/com.oracle.truffle.api/src/com/oracle/truffle/api/impl/DefaultVirtualFrame.java Tue Feb 05 17:01:34 2013 +0100 +++ b/graal/com.oracle.truffle.api/src/com/oracle/truffle/api/impl/DefaultVirtualFrame.java Tue Feb 05 17:03:51 2013 +0100 @@ -192,4 +192,9 @@ } currentVersion = version; } + + @Override + public FrameDescriptor getFrameDescriptor() { + return this.descriptor; + } }