Mercurial > hg > truffle
changeset 7052:47c120841ceb
removed a usage of ResolvedJavaType.toJava()
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Tue, 27 Nov 2012 17:22:19 +0100 |
parents | 7ac6e4c10e37 |
children | 014727292ae0 |
files | graal/com.oracle.graal.printer/src/com/oracle/graal/printer/BinaryGraphPrinter.java |
diffstat | 1 files changed, 6 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/graal/com.oracle.graal.printer/src/com/oracle/graal/printer/BinaryGraphPrinter.java Tue Nov 27 16:37:02 2012 +0100 +++ b/graal/com.oracle.graal.printer/src/com/oracle/graal/printer/BinaryGraphPrinter.java Tue Nov 27 17:22:19 2012 +0100 @@ -214,17 +214,13 @@ writeByte(POOL_NULL); return; } - if (object instanceof ResolvedJavaType) { - writePoolObject(((ResolvedJavaType) object).toJava()); - return; - } Integer id = constantPool.get(object); if (id == null) { addPoolEntry(object); } else { if (object instanceof Enum<?>) { writeByte(POOL_ENUM); - } else if (object instanceof Class<?>) { + } else if (object instanceof Class<?> || object instanceof JavaType) { writeByte(POOL_CLASS); } else if (object instanceof NodeClass) { writeByte(POOL_NODE_CLASS); @@ -270,6 +266,11 @@ writeByte(POOL_ENUM); writePoolObject(object.getClass()); writeInt(((Enum) object).ordinal()); + } else if (object instanceof JavaType) { + JavaType type = (JavaType) object; + writeByte(POOL_CLASS); + writeString(MetaUtil.toJavaName(type)); + writeByte(KLASS); } else if (object instanceof NodeClass) { NodeClass nodeClass = (NodeClass) object; writeByte(POOL_NODE_CLASS);