Mercurial > hg > graal-jvmci-8
changeset 21697:696baf53a985
Merge.
author | Thomas Wuerthinger <thomas.wuerthinger@oracle.com> |
---|---|
date | Wed, 03 Jun 2015 14:15:42 +0200 |
parents | ca140f8c35be (diff) dd987b035a0b (current diff) |
children | 921471247cd1 |
files | |
diffstat | 4 files changed, 16 insertions(+), 16 deletions(-) [+] |
line wrap: on
line diff
--- a/graal/com.oracle.graal.compiler.common/src/com/oracle/graal/compiler/common/type/AbstractPointerStamp.java Wed Jun 03 13:47:47 2015 +0200 +++ b/graal/com.oracle.graal.compiler.common/src/com/oracle/graal/compiler/common/type/AbstractPointerStamp.java Wed Jun 03 14:15:42 2015 +0200 @@ -40,7 +40,7 @@ } public boolean nonNull() { - return nonNull; + return nonNull || this.isEmpty(); } public boolean alwaysNull() {
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/meta/DefaultHotSpotLoweringProvider.java Wed Jun 03 13:47:47 2015 +0200 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/meta/DefaultHotSpotLoweringProvider.java Wed Jun 03 14:15:42 2015 +0200 @@ -109,7 +109,6 @@ @Override public void lower(Node n, LoweringTool tool) { StructuredGraph graph = (StructuredGraph) n.graph(); - if (n instanceof Invoke) { lowerInvoke((Invoke) n, tool, graph); } else if (n instanceof LoadMethodNode) { @@ -128,10 +127,6 @@ if (graph.getGuardsStage().areDeoptsFixed()) { instanceofSnippets.lower((InstanceOfNode) n, tool); } - } else if (n instanceof TypeCheckNode) { - if (graph.getGuardsStage().areDeoptsFixed()) { - lowerTypeCheckNode((TypeCheckNode) n, tool, graph); - } } else if (n instanceof InstanceOfDynamicNode) { if (graph.getGuardsStage().areDeoptsFixed()) { instanceofSnippets.lower((InstanceOfDynamicNode) n, tool); @@ -212,13 +207,6 @@ } } - private void lowerTypeCheckNode(TypeCheckNode n, LoweringTool tool, StructuredGraph graph) { - ValueNode hub = createReadHub(graph, n.getValue(), null); - ValueNode clazz = graph.unique(ConstantNode.forConstant(KlassPointerStamp.klass(), n.type().getObjectHub(), tool.getMetaAccess())); - LogicNode objectEquals = graph.unique(PointerEqualsNode.create(hub, clazz)); - n.replaceAndDelete(objectEquals); - } - private void lowerKlassLayoutHelperNode(KlassLayoutHelperNode n, LoweringTool tool) { if (tool.getLoweringStage() == LoweringTool.StandardLoweringStage.HIGH_TIER) { return;
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/CheckCastNode.java Wed Jun 03 13:47:47 2015 +0200 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/CheckCastNode.java Wed Jun 03 14:15:42 2015 +0200 @@ -60,8 +60,8 @@ } protected CheckCastNode(NodeClass<? extends CheckCastNode> c, ResolvedJavaType type, ValueNode object, JavaTypeProfile profile, boolean forStoreCheck) { - super(c, StampFactory.declaredTrusted(type)); - assert object.stamp() instanceof ObjectStamp : object + ":" + object.stamp(); + super(c, StampFactory.declaredTrusted(type).improveWith(object.stamp())); + assert object.stamp() instanceof ObjectStamp : object; assert type != null; this.type = type; this.object = object; @@ -75,7 +75,7 @@ if (synonym != null) { return synonym; } - assert object.stamp() instanceof ObjectStamp : object + ":" + object.stamp(); + assert object.stamp() instanceof ObjectStamp : object; if (assumptions != null) { AssumptionResult<ResolvedJavaType> leafConcreteSubtype = type.findLeafConcreteSubtype(); if (leafConcreteSubtype != null && !leafConcreteSubtype.getResult().equals(type)) {
--- a/graal/com.oracle.graal.replacements/src/com/oracle/graal/replacements/DefaultJavaLoweringProvider.java Wed Jun 03 13:47:47 2015 +0200 +++ b/graal/com.oracle.graal.replacements/src/com/oracle/graal/replacements/DefaultJavaLoweringProvider.java Wed Jun 03 14:15:42 2015 +0200 @@ -73,6 +73,7 @@ @Override public void lower(Node n, LoweringTool tool) { + StructuredGraph graph = (StructuredGraph) n.graph(); if (n instanceof LoadFieldNode) { lowerLoadFieldNode((LoadFieldNode) n, tool); } else if (n instanceof StoreFieldNode) { @@ -103,6 +104,10 @@ boxingSnippets.lower((BoxNode) n, tool); } else if (n instanceof UnboxNode) { boxingSnippets.lower((UnboxNode) n, tool); + } else if (n instanceof TypeCheckNode) { + if (graph.getGuardsStage().areDeoptsFixed()) { + lowerTypeCheckNode((TypeCheckNode) n, tool, graph); + } } else if (n instanceof VerifyHeapNode) { lowerVerifyHeap((VerifyHeapNode) n); } else { @@ -110,6 +115,13 @@ } } + private void lowerTypeCheckNode(TypeCheckNode n, LoweringTool tool, StructuredGraph graph) { + ValueNode hub = createReadHub(graph, n.getValue(), null); + ValueNode clazz = graph.unique(ConstantNode.forConstant(tool.getStampProvider().createHubStamp((ObjectStamp) n.getValue().stamp()), n.type().getObjectHub(), tool.getMetaAccess())); + LogicNode objectEquals = graph.unique(PointerEqualsNode.create(hub, clazz)); + n.replaceAndDelete(objectEquals); + } + protected void lowerVerifyHeap(VerifyHeapNode n) { GraphUtil.removeFixedWithUnusedInputs(n); }