Mercurial > hg > graal-compiler
diff graal/com.oracle.max.graal.tests/src/com/oracle/max/graal/compiler/tests/EscapeAnalysisTest.java @ 4142:bc8527f3071c
Adjust code base to new level of warnings.
author | Thomas Wuerthinger <thomas.wuerthinger@oracle.com> |
---|---|
date | Sun, 18 Dec 2011 05:24:06 +0100 |
parents | e233f5660da4 |
children | e253ca26b2d5 |
line wrap: on
line diff
--- a/graal/com.oracle.max.graal.tests/src/com/oracle/max/graal/compiler/tests/EscapeAnalysisTest.java Sun Dec 18 05:23:52 2011 +0100 +++ b/graal/com.oracle.max.graal.tests/src/com/oracle/max/graal/compiler/tests/EscapeAnalysisTest.java Sun Dec 18 05:24:06 2011 +0100 @@ -42,6 +42,7 @@ test("test1Snippet", CiConstant.forInt(101)); } + @SuppressWarnings("all") public static int test1Snippet(int a) { Integer x = new Integer(101); return x.intValue(); @@ -52,6 +53,7 @@ test("test2Snippet", CiConstant.forInt(0)); } + @SuppressWarnings("all") public static int test2Snippet(int a) { Integer[] x = new Integer[0]; return x.length; @@ -62,6 +64,7 @@ test("test3Snippet", CiConstant.forObject(null)); } + @SuppressWarnings("all") public static Object test3Snippet(int a) { Integer[] x = new Integer[1]; return x[0]; @@ -74,6 +77,7 @@ private static native void notInlineable(); + @SuppressWarnings("all") public static int testMonitorSnippet(int a) { Integer x = new Integer(0); Integer[] y = new Integer[0]; @@ -96,6 +100,7 @@ /** * This test case differs from the last one in that it requires inlining within a synchronized region. */ + @SuppressWarnings("all") public static int testMonitor2Snippet(int a) { Integer x = new Integer(0); Integer[] y = new Integer[0]; @@ -110,7 +115,6 @@ } } - @SuppressWarnings("unused") private void test(String snippet, CiConstant expectedResult) { StructuredGraph graph = parse(snippet); for (Invoke n : graph.getInvokes()) { @@ -130,10 +134,10 @@ } Assert.assertEquals(1, retCount); int newInstanceCount = 0; - for (NewInstanceNode n : graph.getNodes(NewInstanceNode.class)) { + for (@SuppressWarnings("unused") NewInstanceNode n : graph.getNodes(NewInstanceNode.class)) { newInstanceCount++; } - for (NewObjectArrayNode n : graph.getNodes(NewObjectArrayNode.class)) { + for (@SuppressWarnings("unused") NewObjectArrayNode n : graph.getNodes(NewObjectArrayNode.class)) { newInstanceCount++; } Assert.assertEquals(0, newInstanceCount);