Mercurial > hg > graal-compiler
changeset 5448:f67b71c0e9e5
Merge
author | Gilles Duboscq <duboscq@ssw.jku.at> |
---|---|
date | Fri, 25 May 2012 13:21:58 +0200 |
parents | 78a6f682326f (current diff) ecba62805b64 (diff) |
children | 56f4afcf71f7 |
files | |
diffstat | 3 files changed, 25 insertions(+), 51 deletions(-) [+] |
line wrap: on
line diff
--- 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;
--- 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);
--- 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) {