Mercurial > hg > truffle
diff c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/server/ReplacingStreams.java @ 2295:160aacf936ad
removed last instances of RiType.javaClass, small changes to InvocationSocket and ReplacingStreams to make remote compilation work
author | Lukas Stadler <lukas.stadler@jku.at> |
---|---|
date | Tue, 12 Apr 2011 16:58:56 +0200 |
parents | 8c426c2891c8 |
children |
line wrap: on
line diff
--- a/c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/server/ReplacingStreams.java Mon Apr 11 18:01:44 2011 +0200 +++ b/c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/server/ReplacingStreams.java Tue Apr 12 16:58:56 2011 +0200 @@ -46,6 +46,7 @@ invocation = new InvocationSocket(output, input); addStaticObject(CiValue.IllegalValue); + addStaticObject(HotSpotProxy.DUMMY_CONSTANT_OBJ); } public void setInvocationSocket(InvocationSocket invocation) { @@ -167,12 +168,26 @@ // is the object a constant of object type? if (obj.getClass() == CiConstant.class) { - System.out.println("CiConstant " + obj); CiConstant constant = (CiConstant) obj; + if (constant.kind != CiKind.Object) { + return obj; + } + Object contents = constant.asObject(); + if (contents == null) { + return obj; + } // don't replace if the object already is a placeholder - if (constant.kind == CiKind.Object && !(constant.asObject() instanceof Placeholder) && constant.asObject() != null) { - return CiConstant.forObject(createDummyPlaceholder(constant.asObject())); + if (contents instanceof Placeholder || contents instanceof Long) { + return obj; } + placeholder = objectMap.get(contents); + if (placeholder != null) { + return CiConstant.forObject(placeholder); + } + if (contents instanceof Remote) { + return CiConstant.forObject(createRemoteCallPlaceholder(contents)); + } + return CiConstant.forObject(createDummyPlaceholder(contents)); } return obj; }