changeset 22720:bba4e91a2d63

Move .sl testcases/outputs (resources) into projects src directory
author Stefan Anzinger <stefan.anzinger@oracle.com>
date Tue, 29 Sep 2015 15:02:34 +0200
parents f035cf1d2e5a
children 2d6bcedb5058
files graal/com.oracle.graal.truffle.test/sl/TestCompilationThreshold.sl graal/com.oracle.graal.truffle.test/sl/TestDeoptInInlinedFunction.output graal/com.oracle.graal.truffle.test/sl/TestDeoptInInlinedFunction.sl.disable graal/com.oracle.graal.truffle.test/sl/TestInlining.sl graal/com.oracle.graal.truffle.test/sl/TestInliningMaxCallerSize.sl graal/com.oracle.graal.truffle.test/sl/TestInliningRecursive1.sl graal/com.oracle.graal.truffle.test/sl/TestInliningRecursive2.sl graal/com.oracle.graal.truffle.test/sl/TestIsCompilationConstant1.sl graal/com.oracle.graal.truffle.test/sl/TestOSR.sl graal/com.oracle.graal.truffle.test/sl/TestTruffleBoundary01.sl graal/com.oracle.graal.truffle.test/src/com/oracle/graal/truffle/test/SLTruffleGraalTestSuite.java graal/com.oracle.graal.truffle.test/src/sl/TestCompilationThreshold.sl graal/com.oracle.graal.truffle.test/src/sl/TestDeoptInInlinedFunction.output graal/com.oracle.graal.truffle.test/src/sl/TestDeoptInInlinedFunction.sl.disable graal/com.oracle.graal.truffle.test/src/sl/TestInlining.sl graal/com.oracle.graal.truffle.test/src/sl/TestInliningMaxCallerSize.sl graal/com.oracle.graal.truffle.test/src/sl/TestInliningRecursive1.sl graal/com.oracle.graal.truffle.test/src/sl/TestInliningRecursive2.sl graal/com.oracle.graal.truffle.test/src/sl/TestIsCompilationConstant1.sl graal/com.oracle.graal.truffle.test/src/sl/TestOSR.sl graal/com.oracle.graal.truffle.test/src/sl/TestTruffleBoundary01.sl mx.graal/suite.py
diffstat 22 files changed, 212 insertions(+), 212 deletions(-) [+]
line wrap: on
line diff
--- a/graal/com.oracle.graal.truffle.test/sl/TestCompilationThreshold.sl	Tue Sep 29 14:56:58 2015 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,19 +0,0 @@
-/*
- * This test verifies the compilation threshold property.
- */
-function test() {
-}  
-
-function main() {  
-    /* TODO disableSplitting is required because otherwise it needs more calls to warm up. This still needs to be fixed. */
-    disableSplitting(test); 
-    threshold = getOption("TruffleCompilationThreshold");
-    i = 0;
-    while (i < threshold -1) {
-        test();
-        i = i + 1;
-    }
-    assertFalse(isOptimized(waitForOptimization(test)));
-    test();                         // triggers compilation
-    assertTrue(isOptimized(waitForOptimization(test)));
-}  
--- a/graal/com.oracle.graal.truffle.test/sl/TestDeoptInInlinedFunction.output	Tue Sep 29 14:56:58 2015 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,2 +0,0 @@
-[deoptimizeWhenCompiled]
-[deoptimizeWhenCompiled]
--- a/graal/com.oracle.graal.truffle.test/sl/TestDeoptInInlinedFunction.sl.disable	Tue Sep 29 14:56:58 2015 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,21 +0,0 @@
-/* 
- * This tests that simple arithmetic gets inlined.
- */
-function add(a, b) {
-    deoptimizeWhenCompiled(a == 50); 
-    return a + b;
-}
-
-
-function test() {
-    i = 0;
-    while (i < 100) {
-        i = add(i, 1);
-    }
-    return i;
-}
-
-function main() {
-    waitForOptimization(callUntilOptimized(test, 1 == 2));
-    test();
-}  
--- a/graal/com.oracle.graal.truffle.test/sl/TestInlining.sl	Tue Sep 29 14:56:58 2015 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,20 +0,0 @@
-/* 
- * This tests that simple arithmetic gets inlined.
- */
-function add(a, b) { 
-    return a + b;
-}
-
-
-function test() {
-    i = 0;
-    while (i < 100) {
-        i = add(i, 1);
-    }
-    return i;
-}
-
-function main() {
-    waitForOptimization(callUntilOptimized(test));
-    assertTrue(isInlined(test, test, add), "add is not inlined");
-}  
--- a/graal/com.oracle.graal.truffle.test/sl/TestInliningMaxCallerSize.sl	Tue Sep 29 14:56:58 2015 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,29 +0,0 @@
-/* 
- * This test verifies that CallTargets cannot exceed the TruffleInliningMaxCallerSize limit when inlining.
- */
-function inlinableFunction() { 
-    generateDummyNodes(getOption("TruffleInliningMaxCallerSize") - 7);
-}
-
-function notInlinableFunction() { 
-    generateDummyNodes(getOption("TruffleInliningMaxCallerSize") - 6);
-}
-
-function test1() {
-    inlinableFunction(); 
-}
-
-function test2() {
-    notInlinableFunction(); 
-}
-
-function main() {
-    originalMaxCallerSize = getOption("TruffleInliningMaxCallerSize");
-    setOption("TruffleInliningMaxCallerSize", 20);
-    callUntilOptimized(test1);
-    assertTrue(isInlined(test1, test1, inlinableFunction), "inlinableFunction is not inlined");
-    
-    callUntilOptimized(test2); 
-    assertFalse(isInlined(test2, test2, notInlinableFunction), "notInlinableFunction is inlined"); 
-    setOption("TruffleInliningMaxCallerSize", originalMaxCallerSize);
-}  
--- a/graal/com.oracle.graal.truffle.test/sl/TestInliningRecursive1.sl	Tue Sep 29 14:56:58 2015 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,23 +0,0 @@
-/* 
- * Test recursive calls do not get inlined and do not crash.
- */
-function fib(a) { 
-    if (a == 2 || a == 1) {
-        return 1;
-    }
-    return fib(a-1) + fib(a-2);
-}
-
-function test() {
-    i = 0;
-    sum = 0;
-    while (i < 100) {
-        sum = sum + fib(7);
-        i = i + 1;
-    }
-    return sum;
-}
-
-function main() {
-    callUntilOptimized(test);
-}  
--- a/graal/com.oracle.graal.truffle.test/sl/TestInliningRecursive2.sl	Tue Sep 29 14:56:58 2015 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,32 +0,0 @@
-/* 
- * Tests that indirect recursions are not inlined.
- */
-function fib(a) { 
-    if (a == 2 || a == 1) {
-        return 1;
-    }
-    return call(fib, a-1) + call(fib, a-2) + call(void, 0);
-}
-
-function call(f, a) {
-    return f(a);
-}
-
-function void(a) {
-    return a;
-}
-
-function test() {
-    i = 0;
-    sum = 0;
-    while (i < 100) {
-        sum = sum + fib(7);
-        i = i + 1;
-    }
-    return sum;
-}
-
-function main() {
-    callUntilOptimized(test);
-    assertTrue(isInlined(test, test, fib), "not inlined: test -> fib");
-}  
--- a/graal/com.oracle.graal.truffle.test/sl/TestIsCompilationConstant1.sl	Tue Sep 29 14:56:58 2015 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,40 +0,0 @@
-
-
-function testConstantValue1() {
-    return isCompilationConstant(42);
-}
-
-function testConstantValue2() {
-    return isCompilationConstant(21 + 21);
-}
-
-function testConstantSequence() {
-    40;
-    return isCompilationConstant(42);
-}
-
-function testConstantLocalVariable() {
-    x = 42;
-    return isCompilationConstant(x);
-}
-
-function testNonConstantAdd() {
-    return isCompilationConstant(42 + "42");
-}
-
-
-function main() {
-    callFunctionsWith("testConstant", harnessTrue);
-    callFunctionsWith("testNonConstant", harnessFalse);
-}  
-
-function harnessTrue(testFunction) {
-    callUntilOptimized(testFunction);
-    assertTrue(testFunction(), "test function " + testFunction + " is not constant");
-}
-
-
-function harnessFalse(testFunction) {
-    callUntilOptimized(testFunction);
-    assertFalse(testFunction(), "test function " + testFunction + " is constant");
-}
\ No newline at end of file
--- a/graal/com.oracle.graal.truffle.test/sl/TestOSR.sl	Tue Sep 29 14:56:58 2015 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,13 +0,0 @@
-function test() {
-  i = 0;
-  sum = 0;  
-  while (i < 300000) { 
-    sum = sum +  i;
-    i = i + 1;  
-  }
-  return sum;
-}
-
-function main() {  
-  test();
-}  
--- a/graal/com.oracle.graal.truffle.test/sl/TestTruffleBoundary01.sl	Tue Sep 29 14:56:58 2015 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,11 +0,0 @@
-/* 
- * This test verifies that CallTargets cannot exceed the TruffleInliningMaxCallerSize limit when inlining.
- */
-
-function test1() {
-    testTruffleBoundary01();
-}
-function main() {
-    callUntilOptimized(test1);
-    assertTrue(isOptimized(test1), "inlinableFunction must be compiled properly");
-}  
--- a/graal/com.oracle.graal.truffle.test/src/com/oracle/graal/truffle/test/SLTruffleGraalTestSuite.java	Tue Sep 29 14:56:58 2015 +0200
+++ b/graal/com.oracle.graal.truffle.test/src/com/oracle/graal/truffle/test/SLTruffleGraalTestSuite.java	Tue Sep 29 15:02:34 2015 +0200
@@ -42,7 +42,7 @@
 import com.oracle.truffle.sl.test.SLTestSuite;
 
 @RunWith(SLTestRunner.class)
-@SLTestSuite({"graal/com.oracle.graal.truffle.test/sl", "sl"})
+@SLTestSuite({"sl"})
 public class SLTruffleGraalTestSuite {
 
     public static void main(String[] args) throws Exception {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/graal/com.oracle.graal.truffle.test/src/sl/TestCompilationThreshold.sl	Tue Sep 29 15:02:34 2015 +0200
@@ -0,0 +1,19 @@
+/*
+ * This test verifies the compilation threshold property.
+ */
+function test() {
+}  
+
+function main() {  
+    /* TODO disableSplitting is required because otherwise it needs more calls to warm up. This still needs to be fixed. */
+    disableSplitting(test); 
+    threshold = getOption("TruffleCompilationThreshold");
+    i = 0;
+    while (i < threshold -1) {
+        test();
+        i = i + 1;
+    }
+    assertFalse(isOptimized(waitForOptimization(test)));
+    test();                         // triggers compilation
+    assertTrue(isOptimized(waitForOptimization(test)));
+}  
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/graal/com.oracle.graal.truffle.test/src/sl/TestDeoptInInlinedFunction.output	Tue Sep 29 15:02:34 2015 +0200
@@ -0,0 +1,2 @@
+[deoptimizeWhenCompiled]
+[deoptimizeWhenCompiled]
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/graal/com.oracle.graal.truffle.test/src/sl/TestDeoptInInlinedFunction.sl.disable	Tue Sep 29 15:02:34 2015 +0200
@@ -0,0 +1,21 @@
+/* 
+ * This tests that simple arithmetic gets inlined.
+ */
+function add(a, b) {
+    deoptimizeWhenCompiled(a == 50); 
+    return a + b;
+}
+
+
+function test() {
+    i = 0;
+    while (i < 100) {
+        i = add(i, 1);
+    }
+    return i;
+}
+
+function main() {
+    waitForOptimization(callUntilOptimized(test, 1 == 2));
+    test();
+}  
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/graal/com.oracle.graal.truffle.test/src/sl/TestInlining.sl	Tue Sep 29 15:02:34 2015 +0200
@@ -0,0 +1,20 @@
+/* 
+ * This tests that simple arithmetic gets inlined.
+ */
+function add(a, b) { 
+    return a + b;
+}
+
+
+function test() {
+    i = 0;
+    while (i < 100) {
+        i = add(i, 1);
+    }
+    return i;
+}
+
+function main() {
+    waitForOptimization(callUntilOptimized(test));
+    assertTrue(isInlined(test, test, add), "add is not inlined");
+}  
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/graal/com.oracle.graal.truffle.test/src/sl/TestInliningMaxCallerSize.sl	Tue Sep 29 15:02:34 2015 +0200
@@ -0,0 +1,29 @@
+/* 
+ * This test verifies that CallTargets cannot exceed the TruffleInliningMaxCallerSize limit when inlining.
+ */
+function inlinableFunction() { 
+    generateDummyNodes(getOption("TruffleInliningMaxCallerSize") - 7);
+}
+
+function notInlinableFunction() { 
+    generateDummyNodes(getOption("TruffleInliningMaxCallerSize") - 6);
+}
+
+function test1() {
+    inlinableFunction(); 
+}
+
+function test2() {
+    notInlinableFunction(); 
+}
+
+function main() {
+    originalMaxCallerSize = getOption("TruffleInliningMaxCallerSize");
+    setOption("TruffleInliningMaxCallerSize", 20);
+    callUntilOptimized(test1);
+    assertTrue(isInlined(test1, test1, inlinableFunction), "inlinableFunction is not inlined");
+    
+    callUntilOptimized(test2); 
+    assertFalse(isInlined(test2, test2, notInlinableFunction), "notInlinableFunction is inlined"); 
+    setOption("TruffleInliningMaxCallerSize", originalMaxCallerSize);
+}  
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/graal/com.oracle.graal.truffle.test/src/sl/TestInliningRecursive1.sl	Tue Sep 29 15:02:34 2015 +0200
@@ -0,0 +1,23 @@
+/* 
+ * Test recursive calls do not get inlined and do not crash.
+ */
+function fib(a) { 
+    if (a == 2 || a == 1) {
+        return 1;
+    }
+    return fib(a-1) + fib(a-2);
+}
+
+function test() {
+    i = 0;
+    sum = 0;
+    while (i < 100) {
+        sum = sum + fib(7);
+        i = i + 1;
+    }
+    return sum;
+}
+
+function main() {
+    callUntilOptimized(test);
+}  
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/graal/com.oracle.graal.truffle.test/src/sl/TestInliningRecursive2.sl	Tue Sep 29 15:02:34 2015 +0200
@@ -0,0 +1,32 @@
+/* 
+ * Tests that indirect recursions are not inlined.
+ */
+function fib(a) { 
+    if (a == 2 || a == 1) {
+        return 1;
+    }
+    return call(fib, a-1) + call(fib, a-2) + call(void, 0);
+}
+
+function call(f, a) {
+    return f(a);
+}
+
+function void(a) {
+    return a;
+}
+
+function test() {
+    i = 0;
+    sum = 0;
+    while (i < 100) {
+        sum = sum + fib(7);
+        i = i + 1;
+    }
+    return sum;
+}
+
+function main() {
+    callUntilOptimized(test);
+    assertTrue(isInlined(test, test, fib), "not inlined: test -> fib");
+}  
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/graal/com.oracle.graal.truffle.test/src/sl/TestIsCompilationConstant1.sl	Tue Sep 29 15:02:34 2015 +0200
@@ -0,0 +1,40 @@
+
+
+function testConstantValue1() {
+    return isCompilationConstant(42);
+}
+
+function testConstantValue2() {
+    return isCompilationConstant(21 + 21);
+}
+
+function testConstantSequence() {
+    40;
+    return isCompilationConstant(42);
+}
+
+function testConstantLocalVariable() {
+    x = 42;
+    return isCompilationConstant(x);
+}
+
+function testNonConstantAdd() {
+    return isCompilationConstant(42 + "42");
+}
+
+
+function main() {
+    callFunctionsWith("testConstant", harnessTrue);
+    callFunctionsWith("testNonConstant", harnessFalse);
+}  
+
+function harnessTrue(testFunction) {
+    callUntilOptimized(testFunction);
+    assertTrue(testFunction(), "test function " + testFunction + " is not constant");
+}
+
+
+function harnessFalse(testFunction) {
+    callUntilOptimized(testFunction);
+    assertFalse(testFunction(), "test function " + testFunction + " is constant");
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/graal/com.oracle.graal.truffle.test/src/sl/TestOSR.sl	Tue Sep 29 15:02:34 2015 +0200
@@ -0,0 +1,13 @@
+function test() {
+  i = 0;
+  sum = 0;  
+  while (i < 300000) { 
+    sum = sum +  i;
+    i = i + 1;  
+  }
+  return sum;
+}
+
+function main() {  
+  test();
+}  
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/graal/com.oracle.graal.truffle.test/src/sl/TestTruffleBoundary01.sl	Tue Sep 29 15:02:34 2015 +0200
@@ -0,0 +1,11 @@
+/* 
+ * This test verifies that CallTargets cannot exceed the TruffleInliningMaxCallerSize limit when inlining.
+ */
+
+function test1() {
+    testTruffleBoundary01();
+}
+function main() {
+    callUntilOptimized(test1);
+    assertTrue(isOptimized(test1), "inlinableFunction must be compiled properly");
+}  
--- a/mx.graal/suite.py	Tue Sep 29 14:56:58 2015 +0200
+++ b/mx.graal/suite.py	Tue Sep 29 15:02:34 2015 +0200
@@ -14,7 +14,7 @@
             },
             {
                "name" : "truffle",
-               "version" : "364e3f0246430aa094556c0f422662120a2a89cf",
+               "version" : "df6a1647cfb3a789ed2d167c265b9a45d3da57bd",
                "urls" : [
                     {"url" : "http://lafo.ssw.uni-linz.ac.at/hg/truffle", "kind" : "hg"},
                     {"url" : "https://curio.ssw.jku.at/nexus/content/repositories/snapshots", "kind" : "binary"},