changeset 3499:dd3ecadecc60

Merge.
author Thomas Wuerthinger <thomas@wuerthinger.net>
date Mon, 08 Aug 2011 14:37:01 +0200
parents 1384a953d503 (current diff) ef79e8b2c437 (diff)
children 6111c168756f
files
diffstat 2 files changed, 2 insertions(+), 29 deletions(-) [+]
line wrap: on
line diff
--- a/graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/phases/ConvertConditionalPhase.java	Mon Aug 08 12:10:47 2011 +0200
+++ b/graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/phases/ConvertConditionalPhase.java	Mon Aug 08 14:37:01 2011 +0200
@@ -93,34 +93,7 @@
                 }
                 schedule.assignBlockToNode(conditional);
                 Block block = schedule.getNodeToBlock().get(conditional);
-                FixedNodeWithNext prev;
-                Node firstNode = block.firstNode();
-                if (firstNode instanceof Merge) {
-                    prev = (Merge) firstNode;
-                } else if (firstNode instanceof EndNode) {
-                    EndNode end = (EndNode) firstNode;
-                    Node pred = end.predecessor();
-                    Anchor anchor = new Anchor(graph);
-                    pred.replaceFirstSuccessor(end, anchor);
-                    anchor.setNext(end);
-                    prev = anchor;
-                } else if (firstNode instanceof StartNode) {
-                    StartNode start = (StartNode) firstNode;
-                    Anchor anchor = new Anchor(graph);
-                    Node next = start.next();
-                    start.setNext(null);
-                    anchor.setNext((FixedNode) next);
-                    start.setNext(anchor);
-                    prev = anchor;
-                } else if (firstNode instanceof If) {
-                    Node pred = firstNode.predecessor();
-                    Anchor anchor = new Anchor(graph);
-                    pred.replaceFirstSuccessor(firstNode, anchor);
-                    anchor.setNext((If) firstNode);
-                    prev = anchor;
-                } else {
-                    prev = (FixedNodeWithNext) firstNode;
-                }
+                Anchor prev = block.createAnchor();
                 FixedNode next = prev.next();
                 prev.setNext(null);
                 merge.setNext(next);
--- a/graal/com.oracle.max.graal.runtime/src/com/oracle/max/graal/runtime/HotSpotRuntime.java	Mon Aug 08 12:10:47 2011 +0200
+++ b/graal/com.oracle.max.graal.runtime/src/com/oracle/max/graal/runtime/HotSpotRuntime.java	Mon Aug 08 14:37:01 2011 +0200
@@ -514,7 +514,7 @@
                     graph.setReturn(ret);
                     return graph;
                 }
-            } else if (holderName.equals("Ljava/lang/Float;")) { //XXX (gd) the non-raw versions of (F/D)2(I/L) should return a sanitized NaN in the NaN case. also check NaN case for (I/L)2(F/D)
+            } else if (holderName.equals("Ljava/lang/Float;")) { //XXX (gd) the non-raw versions of (F/D)2(I/L) should return a sanitized NaN in the NaN case.
                 if (fullName.equals("floatToRawIntBits(F)I") || fullName.equals("floatToIntBits(F)I")) {
                     CompilerGraph graph = new CompilerGraph(this);
                     Return ret = new Return(new FPConversionNode(CiKind.Int, new Local(CiKind.Float, 0, graph), graph), graph);