Mercurial > hg > graal-compiler
changeset 5288:d30314b667eb
Merge
author | Lukas Stadler <lukas.stadler@jku.at> |
---|---|
date | Tue, 24 Apr 2012 17:22:36 +0200 |
parents | e96c8d2925da (diff) 71e00437d0a8 (current diff) |
children | 6519cf82d390 2baec1384f2d |
files | |
diffstat | 12 files changed, 31 insertions(+), 50 deletions(-) [+] |
line wrap: on
line diff
--- a/graal/com.oracle.graal.graph/src/com/oracle/graal/graph/NodeClass.java Tue Apr 24 16:04:14 2012 +0200 +++ b/graal/com.oracle.graal.graph/src/com/oracle/graal/graph/NodeClass.java Tue Apr 24 17:22:36 2012 +0200 @@ -561,11 +561,22 @@ value = unsafe.getInt(node, dataOffsets[i]); } else if (type == Boolean.TYPE) { value = unsafe.getBoolean(node, dataOffsets[i]); + } else if (type == Double.TYPE) { + value = String.format(Locale.ENGLISH, "%7.5f", unsafe.getDouble(node, dataOffsets[i])); } else { assert false; } } else { value = unsafe.getObject(node, dataOffsets[i]); + if (type.isArray()) { + if (!type.getComponentType().isPrimitive()) { + value = Arrays.toString((Object[]) value); + } else if (type.getComponentType() == Integer.TYPE) { + value = Arrays.toString((int[]) value); + } else if (type.getComponentType() == Double.TYPE) { + value = Arrays.toString((double[]) value); + } + } } properties.put("data." + dataNames[i], value); }
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/ri/HotSpotTypeResolvedImpl.java Tue Apr 24 16:04:14 2012 +0200 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/ri/HotSpotTypeResolvedImpl.java Tue Apr 24 17:22:36 2012 +0200 @@ -34,10 +34,8 @@ */ public final class HotSpotTypeResolvedImpl extends HotSpotType implements HotSpotTypeResolved { - /** - * - */ private static final long serialVersionUID = 3481514353553840471L; + private Class javaMirror; private String simpleName; private int accessFlags;
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/ControlSplitNode.java Tue Apr 24 16:04:14 2012 +0200 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/ControlSplitNode.java Tue Apr 24 17:22:36 2012 +0200 @@ -46,7 +46,7 @@ return blockSuccessors.size(); } - protected final double[] branchProbability; + @Data protected final double[] branchProbability; public ControlSplitNode(Stamp stamp, BeginNode[] blockSuccessors, double[] branchProbability) { super(stamp);
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/FixedNode.java Tue Apr 24 16:04:14 2012 +0200 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/FixedNode.java Tue Apr 24 17:22:36 2012 +0200 @@ -22,13 +22,11 @@ */ package com.oracle.graal.nodes; -import java.util.*; - import com.oracle.graal.nodes.type.*; public abstract class FixedNode extends ValueNode { - private double probability; + @Data private double probability; public FixedNode(Stamp stamp) { super(stamp); @@ -47,13 +45,6 @@ } @Override - public Map<Object, Object> getDebugProperties() { - Map<Object, Object> properties = super.getDebugProperties(); - properties.put("probability", String.format(Locale.ENGLISH, "%7.5f", probability)); - return properties; - } - - @Override public boolean verify() { assertTrue(this.successors().isNotEmpty() || this.predecessor() != null, "FixedNode should not float"); return super.verify();
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/ArithmeticNode.java Tue Apr 24 16:04:14 2012 +0200 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/ArithmeticNode.java Tue Apr 24 17:22:36 2012 +0200 @@ -30,7 +30,7 @@ */ public abstract class ArithmeticNode extends BinaryNode { - private final boolean isStrictFP; + @Data private final boolean isStrictFP; /** * Creates a new arithmetic operation.
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/extended/ReadHubNode.java Tue Apr 24 16:04:14 2012 +0200 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/extended/ReadHubNode.java Tue Apr 24 17:22:36 2012 +0200 @@ -22,7 +22,6 @@ */ package com.oracle.graal.nodes.extended; -import com.oracle.max.cri.ci.*; import com.oracle.graal.cri.*; import com.oracle.graal.nodes.*; import com.oracle.graal.nodes.spi.*; @@ -37,7 +36,7 @@ } public ReadHubNode(ValueNode object) { - super(StampFactory.forKind(CiKind.Object)); + super(StampFactory.objectNonNull()); this.object = object; }
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/MethodCallTargetNode.java Tue Apr 24 16:04:14 2012 +0200 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/MethodCallTargetNode.java Tue Apr 24 17:22:36 2012 +0200 @@ -40,7 +40,6 @@ @Data private final RiType returnType; @Data private RiResolvedMethod targetMethod; @Data private InvokeKind invokeKind; - private final Stamp returnStamp; /** * @param arguments @@ -50,12 +49,6 @@ this.invokeKind = invokeKind; this.returnType = returnType; this.targetMethod = targetMethod; - CiKind returnKind = targetMethod.signature().returnKind(false); - if (returnKind == CiKind.Object && returnType instanceof RiResolvedType) { - returnStamp = StampFactory.declared((RiResolvedType) returnType); - } else { - returnStamp = StampFactory.forKind(returnKind); - } } @Override @@ -146,6 +139,11 @@ } public Stamp returnStamp() { - return returnStamp; + CiKind returnKind = targetMethod.signature().returnKind(false); + if (returnKind == CiKind.Object && returnType instanceof RiResolvedType) { + return StampFactory.declared((RiResolvedType) returnType); + } else { + return StampFactory.forKind(returnKind); + } } }
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/NewArrayNode.java Tue Apr 24 16:04:14 2012 +0200 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/NewArrayNode.java Tue Apr 24 17:22:36 2012 +0200 @@ -83,13 +83,6 @@ tool.addScalar(length).constantBound(Condition.GE, CiConstant.INT_0); } - @Override - public Map<Object, Object> getDebugProperties() { - Map<Object, Object> properties = super.getDebugProperties(); - properties.put("exactType", exactType()); - return properties; - } - public EscapeOp getEscapeOp() { return ESCAPE; }
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/NewInstanceNode.java Tue Apr 24 16:04:14 2012 +0200 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/NewInstanceNode.java Tue Apr 24 17:22:36 2012 +0200 @@ -36,7 +36,7 @@ */ public final class NewInstanceNode extends FixedWithNextNode implements EscapeAnalyzable, LIRLowerable, Node.IterableNodeType { - private final RiResolvedType instanceClass; + @Data private final RiResolvedType instanceClass; /** * Constructs a NewInstanceNode.
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/NewObjectArrayNode.java Tue Apr 24 16:04:14 2012 +0200 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/NewObjectArrayNode.java Tue Apr 24 17:22:36 2012 +0200 @@ -33,7 +33,7 @@ */ public final class NewObjectArrayNode extends NewArrayNode implements LIRLowerable, Node.IterableNodeType { - private final RiResolvedType elementClass; + @Data private final RiResolvedType elementClass; /** * Constructs a new NewObjectArrayNode.
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/NewTypeArrayNode.java Tue Apr 24 16:04:14 2012 +0200 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/NewTypeArrayNode.java Tue Apr 24 17:22:36 2012 +0200 @@ -32,7 +32,7 @@ */ public final class NewTypeArrayNode extends NewArrayNode implements LIRLowerable { - private final RiResolvedType elementType; + @Data private final RiResolvedType elementType; public NewTypeArrayNode(ValueNode length, RiResolvedType elementType) { super(StampFactory.exactNonNull(elementType.arrayOf()), length);
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/virtual/VirtualObjectNode.java Tue Apr 24 16:04:14 2012 +0200 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/virtual/VirtualObjectNode.java Tue Apr 24 17:22:36 2012 +0200 @@ -22,28 +22,26 @@ */ package com.oracle.graal.nodes.virtual; -import java.util.*; - -import com.oracle.max.cri.ri.*; import com.oracle.graal.nodes.*; import com.oracle.graal.nodes.spi.*; import com.oracle.graal.nodes.type.*; +import com.oracle.max.cri.ri.*; public class VirtualObjectNode extends ValueNode implements LIRLowerable { - @Data private RiType type; - private EscapeField[] fields; - private int fieldsCount; + @Data private RiResolvedType type; + @Data private EscapeField[] fields; + @Data private int fieldsCount; - public VirtualObjectNode(RiType type, EscapeField[] fields) { + public VirtualObjectNode(RiResolvedType type, EscapeField[] fields) { super(StampFactory.illegal()); this.type = type; this.fields = fields; this.fieldsCount = fields.length; } - public VirtualObjectNode(RiType type, int fieldCount) { + public VirtualObjectNode(RiResolvedType type, int fieldCount) { super(StampFactory.illegal()); this.type = type; this.fieldsCount = fieldCount; @@ -63,13 +61,6 @@ } @Override - public Map<Object, Object> getDebugProperties() { - Map<Object, Object> properties = super.getDebugProperties(); - properties.put("type", type); - return properties; - } - - @Override public String toString(Verbosity verbosity) { if (verbosity == Verbosity.Name) { return super.toString(Verbosity.Name) + " " + type.name();