Mercurial > hg > graal-compiler
changeset 2283:f21664b3dd1c
Keeping up-to-date with Maxine/CRI changes.
author | Thomas Wuerthinger <thomas.wuerthinger@oracle.com> |
---|---|
date | Mon, 11 Apr 2011 10:22:05 +0200 |
parents | 0309d394eb5f |
children | 6190d20bd6d6 |
files | c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/HotSpotField.java c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/HotSpotRuntime.java c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/HotSpotTypePrimitive.java c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/HotSpotTypeResolved.java c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/HotSpotTypeUnresolved.java |
diffstat | 5 files changed, 29 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/HotSpotField.java Mon Apr 04 21:02:45 2011 +0200 +++ b/c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/HotSpotField.java Mon Apr 11 10:22:05 2011 +0200 @@ -56,8 +56,8 @@ } @Override - public CiConstant constantValue(Object object) { - if (object == null) { + public CiConstant constantValue(CiConstant receiver) { + if (receiver == null) { if (constant == null && holder.isResolved() && holder.javaClass() == C1XOptions.class) { Field f; try {
--- a/c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/HotSpotRuntime.java Mon Apr 04 21:02:45 2011 +0200 +++ b/c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/HotSpotRuntime.java Mon Apr 11 10:22:05 2011 +0200 @@ -145,6 +145,23 @@ } @Override + public RiType getRiType(CiKind kind) { + return getRiType(kind.toJavaClass()); + } + + @Override + public RiType getRiType(CiConstant constant) { + Object o = constant.asObject(); + if (o == null) return null; + return getRiType(o.getClass()); + } + + @Override + public boolean isExceptionType(RiType type) { + return type.isSubtypeOf(getRiType(Throwable.class)); + } + + @Override public RiSnippets getSnippets() { throw new UnsupportedOperationException("getSnippets"); } @@ -206,8 +223,8 @@ } @Override - public boolean compareConstantObjects(Object x, Object y) { - return x == y; + public boolean compareConstantObjects(CiConstant x, CiConstant y) { + return x.asObject() == y.asObject(); } @Override @@ -227,4 +244,9 @@ public boolean supportsArrayIntrinsics() { return true; } + + @Override + public int getArrayLength(CiConstant array) { + return Array.getLength(array.asObject()); + } }
--- a/c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/HotSpotTypePrimitive.java Mon Apr 04 21:02:45 2011 +0200 +++ b/c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/HotSpotTypePrimitive.java Mon Apr 11 10:22:05 2011 +0200 @@ -104,7 +104,7 @@ } @Override - public boolean isInstance(Object obj) { + public boolean isInstance(CiConstant obj) { return false; }
--- a/c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/HotSpotTypeResolved.java Mon Apr 04 21:02:45 2011 +0200 +++ b/c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/HotSpotTypeResolved.java Mon Apr 11 10:22:05 2011 +0200 @@ -123,7 +123,7 @@ } @Override - public boolean isInstance(Object obj) { + public boolean isInstance(CiConstant obj) { return javaMirror.isInstance(obj); }
--- a/c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/HotSpotTypeUnresolved.java Mon Apr 04 21:02:45 2011 +0200 +++ b/c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/HotSpotTypeUnresolved.java Mon Apr 11 10:22:05 2011 +0200 @@ -135,7 +135,7 @@ } @Override - public boolean isInstance(Object obj) { + public boolean isInstance(CiConstant obj) { throw unresolved("isInstance()"); }