Mercurial > hg > graal-compiler
changeset 21389:77a775ebd6d4
Add convenience method
author | Christian Wimmer <christian.wimmer@oracle.com> |
---|---|
date | Thu, 14 May 2015 16:14:41 -0700 |
parents | e4eae0fb72d0 |
children | f9024b74dd9e |
files | graal/com.oracle.graal.graphbuilderconf/src/com/oracle/graal/graphbuilderconf/GraphBuilderContext.java |
diffstat | 1 files changed, 9 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/graal/com.oracle.graal.graphbuilderconf/src/com/oracle/graal/graphbuilderconf/GraphBuilderContext.java Thu May 14 16:14:17 2015 -0700 +++ b/graal/com.oracle.graal.graphbuilderconf/src/com/oracle/graal/graphbuilderconf/GraphBuilderContext.java Thu May 14 16:14:41 2015 -0700 @@ -207,6 +207,15 @@ */ JavaType getInvokeReturnType(); + default Stamp getInvokeReturnStamp() { + JavaType returnType = getInvokeReturnType(); + if (returnType.getKind() == Kind.Object && returnType instanceof ResolvedJavaType) { + return StampFactory.declared((ResolvedJavaType) returnType); + } else { + return StampFactory.forKind(returnType.getKind()); + } + } + /** * Gets the inline depth of this context. A return value of 0 implies that this is the context * for the parse root.