# HG changeset patch # User Gilles Duboscq # Date 1337944918 -7200 # Node ID f67b71c0e9e593491ac9b5565c24f8d5d582ff8f # Parent 78a6f682326fe5c28f58337ed71821de4ce3bc12# Parent ecba62805b64acc323788b3eb1687fa2e59b2076 Merge diff -r 78a6f682326f -r f67b71c0e9e5 graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/phases/LoweringPhase.java --- a/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/phases/LoweringPhase.java Fri May 25 13:21:43 2012 +0200 +++ b/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/phases/LoweringPhase.java Fri May 25 13:21:58 2012 +0200 @@ -29,7 +29,6 @@ import com.oracle.graal.lir.cfg.*; import com.oracle.graal.nodes.*; import com.oracle.graal.nodes.calc.*; -import com.oracle.graal.nodes.java.*; import com.oracle.graal.nodes.spi.*; import com.oracle.max.cri.ci.*; import com.oracle.max.cri.ri.*; @@ -111,27 +110,6 @@ } } - protected void run0(final StructuredGraph graph) { - ControlFlowGraph cfg = ControlFlowGraph.compute(graph, true, false, true, true); - - NodeBitMap processed = graph.createNodeBitMap(); - NodeBitMap activeGuards = graph.createNodeBitMap(); - processBlock(cfg.getStartBlock(), activeGuards, processed, null); - - processed.negate(); - final CiLoweringTool loweringTool = new LoweringToolBase(); - for (Node node : processed) { - if (node instanceof CheckCastNode) { - // This is a checkcast that was created while lowering some other node (e.g. StoreIndexed). - // This checkcast must now be LIR lowered. - // TODO (dnsimon) this is temp workaround that will be removed - } else if (node instanceof Lowerable) { - assert !(node instanceof FixedNode) || node.predecessor() == null : node; - ((Lowerable) node).lower(loweringTool); - } - } - } - private void processBlock(Block block, NodeBitMap activeGuards, NodeBitMap processed, FixedNode parentAnchor) { FixedNode anchor = parentAnchor; diff -r 78a6f682326f -r f67b71c0e9e5 graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/snippets/CheckCastSnippets.java --- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/snippets/CheckCastSnippets.java Fri May 25 13:21:43 2012 +0200 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/snippets/CheckCastSnippets.java Fri May 25 13:21:58 2012 +0200 @@ -227,7 +227,7 @@ } /** - * Gets a checkcast snippet specialized for a given set od inputs. + * Gets a checkcast snippet specialized for a given set of inputs. */ public SnippetTemplate get(int nHints, boolean isExact, boolean checkNull, Counter noHintsCounter) { Integer key = key(nHints, isExact, checkNull); diff -r 78a6f682326f -r f67b71c0e9e5 graal/com.oracle.graal.tests/src/com/oracle/graal/compiler/tests/InstanceOfTest.java --- a/graal/com.oracle.graal.tests/src/com/oracle/graal/compiler/tests/InstanceOfTest.java Fri May 25 13:21:43 2012 +0200 +++ b/graal/com.oracle.graal.tests/src/com/oracle/graal/compiler/tests/InstanceOfTest.java Fri May 25 13:21:58 2012 +0200 @@ -49,70 +49,66 @@ public void test1() { test("isString", profile(), "object"); test("isString", profile(String.class), "object"); - test("isString", profile(Long.class, Short.class), "object"); test("isString", profile(), Object.class); test("isString", profile(String.class), Object.class); - test("isString", profile(Long.class, Short.class), Object.class); } @Test public void test2() { test("isStringInt", profile(), "object"); test("isStringInt", profile(String.class), "object"); - test("isStringInt", profile(Long.class, Short.class), "object"); test("isStringInt", profile(), Object.class); test("isStringInt", profile(String.class), Object.class); - test("isStringInt", profile(Long.class, Short.class), Object.class); } @Test public void test3() { Throwable throwable = new Exception(); - test("isThrowable", profile(), throwable); - test("isThrowable", profile(String.class), throwable); - test("isThrowable", profile(Long.class, Short.class), throwable); + test("isThrowable", profile(), throwable); + test("isThrowable", profile(Throwable.class), throwable); + test("isThrowable", profile(Exception.class, Error.class), throwable); - test("isThrowable", profile(), Object.class); - test("isThrowable", profile(String.class), Object.class); - test("isThrowable", profile(Long.class, Short.class), Object.class); + test("isThrowable", profile(), Object.class); + test("isThrowable", profile(Throwable.class), Object.class); + test("isThrowable", profile(Exception.class, Error.class), Object.class); } @Test public void test4() { Throwable throwable = new Exception(); - test("isThrowableInt", profile(), throwable); - test("isThrowableInt", profile(String.class), throwable); - test("isThrowableInt", profile(Long.class, Short.class), throwable); + test("isThrowableInt", profile(), throwable); + test("isThrowableInt", profile(Throwable.class), throwable); + test("isThrowableInt", profile(Exception.class, Error.class), throwable); - test("isThrowableInt", profile(), Object.class); - test("isThrowableInt", profile(String.class), Object.class); - test("isThrowableInt", profile(Long.class, Short.class), Object.class); + test("isThrowableInt", profile(), Object.class); + test("isThrowableInt", profile(Throwable.class), Object.class); + test("isThrowableInt", profile(Exception.class, Error.class), Object.class); } @Test public void test5() { Map map = new HashMap<>(); - test("isMap", profile(), map); - test("isMap", profile(String.class), map); - test("isMap", profile(Long.class, Short.class), map); + test("isMap", profile(), map); + test("isMap", profile(HashMap.class), map); + test("isMap", profile(TreeMap.class, HashMap.class), map); - test("isMap", profile(), Object.class); - test("isMap", profile(String.class), Object.class); - test("isMap", profile(Long.class, Short.class), Object.class); + test("isMap", profile(), Object.class); + test("isMap", profile(HashMap.class), Object.class); + test("isMap", profile(TreeMap.class, HashMap.class), Object.class); } @Test public void test6() { Map map = new HashMap<>(); - test("isMapInt", profile(), map); - test("isMapInt", profile(String.class), map); - test("isMapInt", profile(Long.class, Short.class), map); + test("isMapInt", profile(), map); + test("isMapInt", profile(HashMap.class), map); + test("isMapInt", profile(TreeMap.class, HashMap.class), map); - test("isMapInt", profile(), Object.class); - test("isMapInt", profile(String.class), Object.class); - test("isMapInt", profile(Long.class, Short.class), Object.class); + test("isMapInt", profile(), Object.class); + test("isMapInt", profile(HashMap.class), Object.class); + test("isMapInt", profile(TreeMap.class, HashMap.class), Object.class); } public static boolean isString(Object o) {