changeset 22201:df6a1647cfb3

Move .sl testcases/outputs (resources) into projects src directory
author Stefan Anzinger <stefan.anzinger@oracle.com>
date Tue, 29 Sep 2015 15:01:34 +0200
parents 7abcbeb12d08
children 3d9e283e2487
files truffle/com.oracle.truffle.sl.test/src/com/oracle/truffle/sl/test/SLSimpleTestSuite.java truffle/com.oracle.truffle.sl.test/src/com/oracle/truffle/sl/test/SLTestRunner.java truffle/com.oracle.truffle.sl.test/src/com/oracle/truffle/sl/test/instrument/SLSimpleInstrumentTestSuite.java truffle/com.oracle.truffle.sl.test/src/tests/Add.output truffle/com.oracle.truffle.sl.test/src/tests/Add.sl truffle/com.oracle.truffle.sl.test/src/tests/Arithmetic.output truffle/com.oracle.truffle.sl.test/src/tests/Arithmetic.sl truffle/com.oracle.truffle.sl.test/src/tests/Break.output truffle/com.oracle.truffle.sl.test/src/tests/Break.sl truffle/com.oracle.truffle.sl.test/src/tests/Builtins.output truffle/com.oracle.truffle.sl.test/src/tests/Builtins.sl truffle/com.oracle.truffle.sl.test/src/tests/CalcShell.input truffle/com.oracle.truffle.sl.test/src/tests/CalcShell.output truffle/com.oracle.truffle.sl.test/src/tests/CalcShell.sl truffle/com.oracle.truffle.sl.test/src/tests/Call.output truffle/com.oracle.truffle.sl.test/src/tests/Call.sl truffle/com.oracle.truffle.sl.test/src/tests/Comparison.output truffle/com.oracle.truffle.sl.test/src/tests/Comparison.sl truffle/com.oracle.truffle.sl.test/src/tests/ControlFlow.output truffle/com.oracle.truffle.sl.test/src/tests/ControlFlow.sl truffle/com.oracle.truffle.sl.test/src/tests/DefineFunction.output truffle/com.oracle.truffle.sl.test/src/tests/DefineFunction.sl truffle/com.oracle.truffle.sl.test/src/tests/Div.output truffle/com.oracle.truffle.sl.test/src/tests/Div.sl truffle/com.oracle.truffle.sl.test/src/tests/Fibonacci.output truffle/com.oracle.truffle.sl.test/src/tests/Fibonacci.sl truffle/com.oracle.truffle.sl.test/src/tests/FunctionLiteral.output truffle/com.oracle.truffle.sl.test/src/tests/FunctionLiteral.sl truffle/com.oracle.truffle.sl.test/src/tests/HelloEqualsWorld.output truffle/com.oracle.truffle.sl.test/src/tests/HelloEqualsWorld.sl truffle/com.oracle.truffle.sl.test/src/tests/HelloWorld.output truffle/com.oracle.truffle.sl.test/src/tests/HelloWorld.sl truffle/com.oracle.truffle.sl.test/src/tests/Inlining.output truffle/com.oracle.truffle.sl.test/src/tests/Inlining.sl truffle/com.oracle.truffle.sl.test/src/tests/Loop.output truffle/com.oracle.truffle.sl.test/src/tests/Loop.sl truffle/com.oracle.truffle.sl.test/src/tests/LoopCall.output truffle/com.oracle.truffle.sl.test/src/tests/LoopCall.sl truffle/com.oracle.truffle.sl.test/src/tests/LoopInvalidate.output truffle/com.oracle.truffle.sl.test/src/tests/LoopInvalidate.sl truffle/com.oracle.truffle.sl.test/src/tests/LoopPolymorphic.output truffle/com.oracle.truffle.sl.test/src/tests/LoopPolymorphic.sl truffle/com.oracle.truffle.sl.test/src/tests/LoopPrint.output truffle/com.oracle.truffle.sl.test/src/tests/LoopPrint.sl truffle/com.oracle.truffle.sl.test/src/tests/Mul.output truffle/com.oracle.truffle.sl.test/src/tests/Mul.sl truffle/com.oracle.truffle.sl.test/src/tests/Null.output truffle/com.oracle.truffle.sl.test/src/tests/Null.sl truffle/com.oracle.truffle.sl.test/src/tests/Object.output truffle/com.oracle.truffle.sl.test/src/tests/Object.sl truffle/com.oracle.truffle.sl.test/src/tests/String.output truffle/com.oracle.truffle.sl.test/src/tests/String.sl truffle/com.oracle.truffle.sl.test/src/tests/Sub.output truffle/com.oracle.truffle.sl.test/src/tests/Sub.sl truffle/com.oracle.truffle.sl.test/src/tests/Sum.output truffle/com.oracle.truffle.sl.test/src/tests/Sum.sl truffle/com.oracle.truffle.sl.test/src/tests/error/TypeError01.output truffle/com.oracle.truffle.sl.test/src/tests/error/TypeError01.sl truffle/com.oracle.truffle.sl.test/src/tests/error/TypeError02.output truffle/com.oracle.truffle.sl.test/src/tests/error/TypeError02.sl truffle/com.oracle.truffle.sl.test/src/tests/error/TypeError03.output truffle/com.oracle.truffle.sl.test/src/tests/error/TypeError03.sl truffle/com.oracle.truffle.sl.test/src/tests/error/TypeError04.output truffle/com.oracle.truffle.sl.test/src/tests/error/TypeError04.sl truffle/com.oracle.truffle.sl.test/src/tests/error/TypeError05.output truffle/com.oracle.truffle.sl.test/src/tests/error/TypeError05.sl truffle/com.oracle.truffle.sl.test/src/tests/error/TypeError06.output truffle/com.oracle.truffle.sl.test/src/tests/error/TypeError06.sl truffle/com.oracle.truffle.sl.test/src/tests/error/TypeError07.output truffle/com.oracle.truffle.sl.test/src/tests/error/TypeError07.sl truffle/com.oracle.truffle.sl.test/src/tests/error/UndefinedFunction01.output truffle/com.oracle.truffle.sl.test/src/tests/error/UndefinedFunction01.sl truffle/com.oracle.truffle.sl.test/src/tests_instrumentation/Instrumentation_assnCount.output truffle/com.oracle.truffle.sl.test/src/tests_instrumentation/Instrumentation_assnCount.sl truffle/com.oracle.truffle.sl.test/tests/Add.output truffle/com.oracle.truffle.sl.test/tests/Add.sl truffle/com.oracle.truffle.sl.test/tests/Arithmetic.output truffle/com.oracle.truffle.sl.test/tests/Arithmetic.sl truffle/com.oracle.truffle.sl.test/tests/Break.output truffle/com.oracle.truffle.sl.test/tests/Break.sl truffle/com.oracle.truffle.sl.test/tests/Builtins.output truffle/com.oracle.truffle.sl.test/tests/Builtins.sl truffle/com.oracle.truffle.sl.test/tests/CalcShell.input truffle/com.oracle.truffle.sl.test/tests/CalcShell.output truffle/com.oracle.truffle.sl.test/tests/CalcShell.sl truffle/com.oracle.truffle.sl.test/tests/Call.output truffle/com.oracle.truffle.sl.test/tests/Call.sl truffle/com.oracle.truffle.sl.test/tests/Comparison.output truffle/com.oracle.truffle.sl.test/tests/Comparison.sl truffle/com.oracle.truffle.sl.test/tests/ControlFlow.output truffle/com.oracle.truffle.sl.test/tests/ControlFlow.sl truffle/com.oracle.truffle.sl.test/tests/DefineFunction.output truffle/com.oracle.truffle.sl.test/tests/DefineFunction.sl truffle/com.oracle.truffle.sl.test/tests/Div.output truffle/com.oracle.truffle.sl.test/tests/Div.sl truffle/com.oracle.truffle.sl.test/tests/Fibonacci.output truffle/com.oracle.truffle.sl.test/tests/Fibonacci.sl truffle/com.oracle.truffle.sl.test/tests/FunctionLiteral.output truffle/com.oracle.truffle.sl.test/tests/FunctionLiteral.sl truffle/com.oracle.truffle.sl.test/tests/HelloEqualsWorld.output truffle/com.oracle.truffle.sl.test/tests/HelloEqualsWorld.sl truffle/com.oracle.truffle.sl.test/tests/HelloWorld.output truffle/com.oracle.truffle.sl.test/tests/HelloWorld.sl truffle/com.oracle.truffle.sl.test/tests/Inlining.output truffle/com.oracle.truffle.sl.test/tests/Inlining.sl truffle/com.oracle.truffle.sl.test/tests/Loop.output truffle/com.oracle.truffle.sl.test/tests/Loop.sl truffle/com.oracle.truffle.sl.test/tests/LoopCall.output truffle/com.oracle.truffle.sl.test/tests/LoopCall.sl truffle/com.oracle.truffle.sl.test/tests/LoopInvalidate.output truffle/com.oracle.truffle.sl.test/tests/LoopInvalidate.sl truffle/com.oracle.truffle.sl.test/tests/LoopPolymorphic.output truffle/com.oracle.truffle.sl.test/tests/LoopPolymorphic.sl truffle/com.oracle.truffle.sl.test/tests/LoopPrint.output truffle/com.oracle.truffle.sl.test/tests/LoopPrint.sl truffle/com.oracle.truffle.sl.test/tests/Mul.output truffle/com.oracle.truffle.sl.test/tests/Mul.sl truffle/com.oracle.truffle.sl.test/tests/Null.output truffle/com.oracle.truffle.sl.test/tests/Null.sl truffle/com.oracle.truffle.sl.test/tests/Object.output truffle/com.oracle.truffle.sl.test/tests/Object.sl truffle/com.oracle.truffle.sl.test/tests/String.output truffle/com.oracle.truffle.sl.test/tests/String.sl truffle/com.oracle.truffle.sl.test/tests/Sub.output truffle/com.oracle.truffle.sl.test/tests/Sub.sl truffle/com.oracle.truffle.sl.test/tests/Sum.output truffle/com.oracle.truffle.sl.test/tests/Sum.sl truffle/com.oracle.truffle.sl.test/tests/error/TypeError01.output truffle/com.oracle.truffle.sl.test/tests/error/TypeError01.sl truffle/com.oracle.truffle.sl.test/tests/error/TypeError02.output truffle/com.oracle.truffle.sl.test/tests/error/TypeError02.sl truffle/com.oracle.truffle.sl.test/tests/error/TypeError03.output truffle/com.oracle.truffle.sl.test/tests/error/TypeError03.sl truffle/com.oracle.truffle.sl.test/tests/error/TypeError04.output truffle/com.oracle.truffle.sl.test/tests/error/TypeError04.sl truffle/com.oracle.truffle.sl.test/tests/error/TypeError05.output truffle/com.oracle.truffle.sl.test/tests/error/TypeError05.sl truffle/com.oracle.truffle.sl.test/tests/error/TypeError06.output truffle/com.oracle.truffle.sl.test/tests/error/TypeError06.sl truffle/com.oracle.truffle.sl.test/tests/error/TypeError07.output truffle/com.oracle.truffle.sl.test/tests/error/TypeError07.sl truffle/com.oracle.truffle.sl.test/tests/error/UndefinedFunction01.output truffle/com.oracle.truffle.sl.test/tests/error/UndefinedFunction01.sl truffle/com.oracle.truffle.sl.test/tests_instrumentation/Instrumentation_assnCount.output truffle/com.oracle.truffle.sl.test/tests_instrumentation/Instrumentation_assnCount.sl
diffstat 145 files changed, 922 insertions(+), 922 deletions(-) [+]
line wrap: on
line diff
--- a/truffle/com.oracle.truffle.sl.test/src/com/oracle/truffle/sl/test/SLSimpleTestSuite.java	Fri Sep 25 16:53:27 2015 +0200
+++ b/truffle/com.oracle.truffle.sl.test/src/com/oracle/truffle/sl/test/SLSimpleTestSuite.java	Tue Sep 29 15:01:34 2015 +0200
@@ -44,7 +44,7 @@
 import org.junit.runner.RunWith;
 
 @RunWith(SLTestRunner.class)
-@SLTestSuite({"truffle/com.oracle.truffle.sl.test/tests", "tests"})
+@SLTestSuite({"tests"})
 public class SLSimpleTestSuite {
 
     public static void main(String[] args) throws Exception {
--- a/truffle/com.oracle.truffle.sl.test/src/com/oracle/truffle/sl/test/SLTestRunner.java	Fri Sep 25 16:53:27 2015 +0200
+++ b/truffle/com.oracle.truffle.sl.test/src/com/oracle/truffle/sl/test/SLTestRunner.java	Tue Sep 29 15:01:34 2015 +0200
@@ -187,7 +187,7 @@
                 suffix = sep + "build/truffle-sl.jar!" + classPart;
             } else if (externalForm.startsWith("file:")) {
                 prefix = "file:";
-                suffix = sep + "bin" + classPart;
+                suffix = classPart;
             } else {
                 return null;
             }
--- a/truffle/com.oracle.truffle.sl.test/src/com/oracle/truffle/sl/test/instrument/SLSimpleInstrumentTestSuite.java	Fri Sep 25 16:53:27 2015 +0200
+++ b/truffle/com.oracle.truffle.sl.test/src/com/oracle/truffle/sl/test/instrument/SLSimpleInstrumentTestSuite.java	Tue Sep 29 15:01:34 2015 +0200
@@ -44,7 +44,7 @@
 import org.junit.runner.RunWith;
 
 @RunWith(SLInstrumentTestRunner.class)
-@SLInstrumentTestSuite({"truffle/com.oracle.truffle.sl.test/tests_instrumentation", "tests_instrumentation"})
+@SLInstrumentTestSuite({"tests_instrumentation"})
 public class SLSimpleInstrumentTestSuite {
 
     public static void main(String[] args) throws Exception {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/truffle/com.oracle.truffle.sl.test/src/tests/Add.output	Tue Sep 29 15:01:34 2015 +0200
@@ -0,0 +1,7 @@
+7
+34
+34
+34
+4000000000003
+3000000000004
+7000000000000
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/truffle/com.oracle.truffle.sl.test/src/tests/Add.sl	Tue Sep 29 15:01:34 2015 +0200
@@ -0,0 +1,9 @@
+function main() {  
+  println(3 + 4);  
+  println(3 + "4");  
+  println("3" + 4);  
+  println("3" + "4");  
+  println(3 + 4000000000000);  
+  println(3000000000000 + 4);  
+  println(3000000000000 + 4000000000000);  
+}  
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/truffle/com.oracle.truffle.sl.test/src/tests/Arithmetic.output	Tue Sep 29 15:01:34 2015 +0200
@@ -0,0 +1,10 @@
+5
+1
+-3
+14
+11
+5
+-3
+1
+18
+11
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/truffle/com.oracle.truffle.sl.test/src/tests/Arithmetic.sl	Tue Sep 29 15:01:34 2015 +0200
@@ -0,0 +1,12 @@
+function main() {  
+  println(3 + 4 - 2);  
+  println(3 - 4 + 2);  
+  println(3 - 4 - 2);  
+  println(3 * 4 + 2);  
+  println(3 + 4 * 2);  
+  println(3 + (4 - 2));  
+  println(3 - (4 + 2));  
+  println(3 - (4 - 2));  
+  println(3 * (4 + 2));  
+  println(3 + (4 * 2));  
+}  
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/truffle/com.oracle.truffle.sl.test/src/tests/Break.output	Tue Sep 29 15:01:34 2015 +0200
@@ -0,0 +1,1 @@
+942
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/truffle/com.oracle.truffle.sl.test/src/tests/Break.sl	Tue Sep 29 15:01:34 2015 +0200
@@ -0,0 +1,10 @@
+function main() {  
+  i = 0;  
+  while (i < 1000) {
+    if (i >= 942) {
+      break;
+    }  
+    i = i + 1;  
+  }
+  return i;  
+}  
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/truffle/com.oracle.truffle.sl.test/src/tests/Builtins.output	Tue Sep 29 15:01:34 2015 +0200
@@ -0,0 +1,1 @@
+Hello World!
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/truffle/com.oracle.truffle.sl.test/src/tests/Builtins.sl	Tue Sep 29 15:01:34 2015 +0200
@@ -0,0 +1,4 @@
+function main() {  
+  println("Hello World!");  
+  nanoTime();  
+}  
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/truffle/com.oracle.truffle.sl.test/src/tests/CalcShell.input	Tue Sep 29 15:01:34 2015 +0200
@@ -0,0 +1,15 @@
+i
+80
+c
+return cur + i;
+r
+c
+if (i <= 2) { return 1; } else { return prev + cur; }
+r
+i
+100
+r
+c
+if (i == 0) { return 1; } else { return cur * i; }
+r
+x
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/truffle/com.oracle.truffle.sl.test/src/tests/CalcShell.output	Tue Sep 29 15:01:34 2015 +0200
@@ -0,0 +1,35 @@
+available commands:
+x: exit
+c: define the calculation function with the parameters prev, cur, and i
+   prev and cur start with 0; i is the loop variable from 0 to n
+     example: 'return cur + i;' computes the sum of 1 to n
+     example: 'if (i == 0) { return 1; } else { return cur * i; }' computes the factorial of i
+     example: 'if (i <= 2) { return 1; } else { return prev + cur; }' computes the nth Fibonacci number
+i: define the number of iterations, i.e, the number n in the examples above
+r: Run the calculation loop often, and print the first and last result
+t: Run the calculation loop a couple of time, and print timing information for each run
+h: Print this help message
+
+cmd>
+n>
+cmd>
+function>
+cmd>
+** first: 3240
+** last:  3240
+cmd>
+function>
+cmd>
+** first: 23416728348467685
+** last:  23416728348467685
+cmd>
+n>
+cmd>
+** first: 354224848179261915075
+** last:  354224848179261915075
+cmd>
+function>
+cmd>
+** first: 93326215443944152681699238856266700490715968264381621468592963895217599993229915608941463976156518286253697920827223758251185210916864000000000000000000000000
+** last:  93326215443944152681699238856266700490715968264381621468592963895217599993229915608941463976156518286253697920827223758251185210916864000000000000000000000000
+cmd>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/truffle/com.oracle.truffle.sl.test/src/tests/CalcShell.sl	Tue Sep 29 15:01:34 2015 +0200
@@ -0,0 +1,89 @@
+function iterations() {
+  return 80;
+}
+
+function calcLoop(n) {
+  i = 0;
+  prev = cur = 0;
+  while (i <= n) {
+    next = calc(prev, cur, i);
+    prev = cur;
+    cur = next;  
+    i = i + 1;
+  }  
+  return cur;  
+}
+
+function timing(n) {
+  i = 0;
+  while (i < 20) {
+    start = nanoTime();
+    calcLoop(n);
+    end = nanoTime();
+    i = i + 1;
+
+    println("** run " + i + ": " + (end - start) + " ns");
+  }
+}
+
+function run(n) {
+  firstResult = calcLoop(n);
+  println("** first: " + firstResult);
+  i = 0;
+  while (i < 100) {
+    calcLoop(n);
+    i = i + 1;
+  }
+  lastResult = calcLoop(n);
+  println("** last:  " + lastResult);
+  
+  if (firstResult != lastResult) {
+    println("ERROR: result not stable");
+  }
+}  
+
+function help() {
+  println("available commands:");
+  println("x: exit");
+  println("c: define the calculation function with the parameters prev, cur, and i");
+  println("   prev and cur start with 0; i is the loop variable from 0 to n");
+  println("     example: 'return cur + i;' computes the sum of 1 to n"); 
+  println("     example: 'if (i == 0) { return 1; } else { return cur * i; }' computes the factorial of i"); 
+  println("     example: 'if (i <= 2) { return 1; } else { return prev + cur; }' computes the nth Fibonacci number");
+  println("i: define the number of iterations, i.e, the number n in the examples above");
+  println("r: Run the calculation loop often, and print the first and last result");
+  println("t: Run the calculation loop a couple of time, and print timing information for each run");
+  println("h: Print this help message");
+  println("");
+}
+
+function main() {
+  help();
+  
+  while (1 == 1) {
+    println("cmd>");
+    cmd = readln();
+    if (cmd == "x" || cmd == "") {
+      return;
+    }
+    if (cmd == "h") {
+      help();
+    }
+    if (cmd == "c") {
+      println("function>");
+      code = readln();
+      defineFunction("function calc(prev, cur, i) { " + code + "}");
+    }
+    if (cmd == "t") {
+      timing(iterations());
+    }
+    if (cmd == "r") {
+      run(iterations());
+    }
+    if (cmd == "i") {
+      println("n>");
+      n = readln();
+      defineFunction("function iterations() { return " + n + "; }");
+    }
+  }
+}  
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/truffle/com.oracle.truffle.sl.test/src/tests/Call.output	Tue Sep 29 15:01:34 2015 +0200
@@ -0,0 +1,8 @@
+42
+42
+42
+42
+42
+42
+42
+42
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/truffle/com.oracle.truffle.sl.test/src/tests/Call.sl	Tue Sep 29 15:01:34 2015 +0200
@@ -0,0 +1,16 @@
+function ret(a) { return a; } 
+function dub(a) { return a * 2; } 
+function inc(a) { return a + 1; } 
+function dec(a) { return a - 1; } 
+function call(f, v) { return f(v); }
+ 
+function main() {  
+  println(ret(42));
+  println(dub(21));
+  println(inc(41));
+  println(dec(43));
+  println(call(ret, 42));
+  println(call(dub, 21));
+  println(call(inc, 41));
+  println(call(dec, 43));
+}  
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/truffle/com.oracle.truffle.sl.test/src/tests/Comparison.output	Tue Sep 29 15:01:34 2015 +0200
@@ -0,0 +1,54 @@
+<
+true
+false
+false
+true
+false
+true
+false
+false
+<=
+true
+false
+true
+true
+false
+true
+false
+true
+>
+false
+true
+false
+false
+true
+false
+true
+false
+>=
+false
+true
+true
+false
+true
+false
+true
+true
+==
+false
+false
+true
+false
+false
+false
+false
+true
+!=
+true
+true
+false
+true
+true
+true
+true
+false
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/truffle/com.oracle.truffle.sl.test/src/tests/Comparison.sl	Tue Sep 29 15:01:34 2015 +0200
@@ -0,0 +1,61 @@
+function main() {  
+  println("<");
+  println(4 < 20);  
+  println(40 < 2);  
+  println(4 < 4);  
+  println(4 < 200000000000000000000000000);  
+  println(40000000000000000000000000 < 20);  
+  println(40000000000000000000000000 < 200000000000000000000000000);  
+  println(400000000000000000000000000 < 20000000000000000000000000);  
+  println(40000000000000000000000000 < 40000000000000000000000000);  
+
+  println("<=");
+  println(4 <= 20);  
+  println(40 <= 2);  
+  println(4 <= 4);  
+  println(4 <= 200000000000000000000000000);  
+  println(40000000000000000000000000 <= 20);  
+  println(40000000000000000000000000 <= 200000000000000000000000000);  
+  println(400000000000000000000000000 <= 20000000000000000000000000);  
+  println(40000000000000000000000000 <= 40000000000000000000000000);  
+
+  println(">");
+  println(4 > 20);  
+  println(40 > 2);  
+  println(4 > 4);  
+  println(4 > 200000000000000000000000000);  
+  println(40000000000000000000000000 > 20);  
+  println(40000000000000000000000000 > 200000000000000000000000000);  
+  println(400000000000000000000000000 > 20000000000000000000000000);  
+  println(40000000000000000000000000 > 40000000000000000000000000);  
+
+  println(">=");
+  println(4 >= 20);  
+  println(40 >= 2);  
+  println(4 >= 4);  
+  println(4 >= 200000000000000000000000000);  
+  println(40000000000000000000000000 >= 20);  
+  println(40000000000000000000000000 >= 200000000000000000000000000);  
+  println(400000000000000000000000000 >= 20000000000000000000000000);  
+  println(40000000000000000000000000 >= 40000000000000000000000000);  
+
+  println("==");
+  println(4 == 20);  
+  println(40 == 2);  
+  println(4 == 4);  
+  println(4 == 200000000000000000000000000);  
+  println(40000000000000000000000000 == 20);  
+  println(40000000000000000000000000 == 200000000000000000000000000);  
+  println(400000000000000000000000000 == 20000000000000000000000000);  
+  println(40000000000000000000000000 == 40000000000000000000000000);  
+
+  println("!=");
+  println(4 != 20);  
+  println(40 != 2);  
+  println(4 != 4);  
+  println(4 != 200000000000000000000000000);  
+  println(40000000000000000000000000 != 20);  
+  println(40000000000000000000000000 != 200000000000000000000000000);  
+  println(400000000000000000000000000 != 20000000000000000000000000);  
+  println(40000000000000000000000000 != 40000000000000000000000000);  
+}  
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/truffle/com.oracle.truffle.sl.test/src/tests/ControlFlow.output	Tue Sep 29 15:01:34 2015 +0200
@@ -0,0 +1,1 @@
+1
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/truffle/com.oracle.truffle.sl.test/src/tests/ControlFlow.sl	Tue Sep 29 15:01:34 2015 +0200
@@ -0,0 +1,10 @@
+function foo() {}
+function bar() {}
+
+function main() {  
+  foo();
+  if (1 < 2) {
+    bar();
+    return 1;
+  }
+}  
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/truffle/com.oracle.truffle.sl.test/src/tests/DefineFunction.output	Tue Sep 29 15:01:34 2015 +0200
@@ -0,0 +1,2 @@
+42
+38
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/truffle/com.oracle.truffle.sl.test/src/tests/DefineFunction.sl	Tue Sep 29 15:01:34 2015 +0200
@@ -0,0 +1,11 @@
+function foo() {
+  println(test(40, 2));
+}
+
+function main() {
+  defineFunction("function test(a, b) { return a + b; }");
+  foo();
+
+  defineFunction("function test(a, b) { return a - b; }");
+  foo();
+}  
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/truffle/com.oracle.truffle.sl.test/src/tests/Div.output	Tue Sep 29 15:01:34 2015 +0200
@@ -0,0 +1,4 @@
+2
+0
+1000000000000
+1
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/truffle/com.oracle.truffle.sl.test/src/tests/Div.sl	Tue Sep 29 15:01:34 2015 +0200
@@ -0,0 +1,6 @@
+function main() {  
+  println(4 / 2);  
+  println(4 / 4000000000000);  
+  println(3000000000000 / 3);  
+  println(3000000000000 / 3000000000000);  
+}  
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/truffle/com.oracle.truffle.sl.test/src/tests/Fibonacci.output	Tue Sep 29 15:01:34 2015 +0200
@@ -0,0 +1,10 @@
+1: 1
+2: 1
+3: 2
+4: 3
+5: 5
+6: 8
+7: 13
+8: 21
+9: 34
+10: 55
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/truffle/com.oracle.truffle.sl.test/src/tests/Fibonacci.sl	Tue Sep 29 15:01:34 2015 +0200
@@ -0,0 +1,21 @@
+function fib(num) { 
+  if (num < 1) {return 0;}
+  n1 = 0;
+  n2 = 1;
+  i = 1;
+  while (i < num) {
+    next = n2 + n1;
+    n1 = n2;
+    n2 = next;
+    i = i + 1;
+  }
+  return n2;
+}
+
+function main() {  
+  i = 1;
+  while (i <= 10) {
+    println(i + ": " + fib(i));
+    i = i + 1;
+  }
+}  
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/truffle/com.oracle.truffle.sl.test/src/tests/FunctionLiteral.output	Tue Sep 29 15:01:34 2015 +0200
@@ -0,0 +1,2 @@
+42
+38
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/truffle/com.oracle.truffle.sl.test/src/tests/FunctionLiteral.sl	Tue Sep 29 15:01:34 2015 +0200
@@ -0,0 +1,16 @@
+function add(a, b) {
+  return a + b;
+}
+
+function sub(a, b) {
+  return a - b;
+}
+
+function foo(f) {
+  println(f(40, 2));
+}
+
+function main() {
+  foo(add);
+  foo(sub);
+}  
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/truffle/com.oracle.truffle.sl.test/src/tests/HelloEqualsWorld.output	Tue Sep 29 15:01:34 2015 +0200
@@ -0,0 +1,90 @@
+Initial stack trace:
+Frame: root doIt, a=0, hello=null
+Frame: root main, i=0
+After 123 assignment:
+Frame: root doIt, a=0, hello=123
+Frame: root main, i=0
+After hello assignment:
+Frame: root doIt, a=0, hello=world
+Frame: root main, i=0
+Initial stack trace:
+Frame: root doIt, a=1, hello=null
+Frame: root main, i=1
+After 123 assignment:
+Frame: root doIt, a=1, hello=123
+Frame: root main, i=1
+After hello assignment:
+Frame: root doIt, a=1, hello=world
+Frame: root main, i=1
+Initial stack trace:
+Frame: root doIt, a=2, hello=null
+Frame: root main, i=2
+After 123 assignment:
+Frame: root doIt, a=2, hello=123
+Frame: root main, i=2
+After hello assignment:
+Frame: root doIt, a=2, hello=world
+Frame: root main, i=2
+Initial stack trace:
+Frame: root doIt, a=3, hello=null
+Frame: root main, i=3
+After 123 assignment:
+Frame: root doIt, a=3, hello=123
+Frame: root main, i=3
+After hello assignment:
+Frame: root doIt, a=3, hello=world
+Frame: root main, i=3
+Initial stack trace:
+Frame: root doIt, a=4, hello=null
+Frame: root main, i=4
+After 123 assignment:
+Frame: root doIt, a=4, hello=123
+Frame: root main, i=4
+After hello assignment:
+Frame: root doIt, a=4, hello=world
+Frame: root main, i=4
+Initial stack trace:
+Frame: root doIt, a=5, hello=null
+Frame: root main, i=5
+After 123 assignment:
+Frame: root doIt, a=5, hello=123
+Frame: root main, i=5
+After hello assignment:
+Frame: root doIt, a=5, hello=world
+Frame: root main, i=5
+Initial stack trace:
+Frame: root doIt, a=6, hello=null
+Frame: root main, i=6
+After 123 assignment:
+Frame: root doIt, a=6, hello=123
+Frame: root main, i=6
+After hello assignment:
+Frame: root doIt, a=6, hello=world
+Frame: root main, i=6
+Initial stack trace:
+Frame: root doIt, a=7, hello=null
+Frame: root main, i=7
+After 123 assignment:
+Frame: root doIt, a=7, hello=123
+Frame: root main, i=7
+After hello assignment:
+Frame: root doIt, a=7, hello=world
+Frame: root main, i=7
+Initial stack trace:
+Frame: root doIt, a=8, hello=null
+Frame: root main, i=8
+After 123 assignment:
+Frame: root doIt, a=8, hello=123
+Frame: root main, i=8
+After hello assignment:
+Frame: root doIt, a=8, hello=world
+Frame: root main, i=8
+Initial stack trace:
+Frame: root doIt, a=9, hello=null
+Frame: root main, i=9
+After 123 assignment:
+Frame: root doIt, a=9, hello=123
+Frame: root main, i=9
+After hello assignment:
+Frame: root doIt, a=9, hello=world
+Frame: root main, i=9
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/truffle/com.oracle.truffle.sl.test/src/tests/HelloEqualsWorld.sl	Tue Sep 29 15:01:34 2015 +0200
@@ -0,0 +1,22 @@
+function doIt(a) {
+  println("Initial stack trace:");
+  println(stacktrace());
+  
+  hello = 123;
+  println("After 123 assignment:");
+  println(stacktrace());
+  
+  helloEqualsWorld();
+  println("After hello assignment:");
+  println(stacktrace());
+  
+//  readln();
+}
+
+function main() {
+  i = 0;
+  while (i < 10) {
+    doIt(i);
+    i = i + 1;
+  }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/truffle/com.oracle.truffle.sl.test/src/tests/HelloWorld.output	Tue Sep 29 15:01:34 2015 +0200
@@ -0,0 +1,1 @@
+Hello World!
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/truffle/com.oracle.truffle.sl.test/src/tests/HelloWorld.sl	Tue Sep 29 15:01:34 2015 +0200
@@ -0,0 +1,3 @@
+function main() {  
+  println("Hello World!");  
+}  
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/truffle/com.oracle.truffle.sl.test/src/tests/Inlining.output	Tue Sep 29 15:01:34 2015 +0200
@@ -0,0 +1,1 @@
+1260000
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/truffle/com.oracle.truffle.sl.test/src/tests/Inlining.sl	Tue Sep 29 15:01:34 2015 +0200
@@ -0,0 +1,18 @@
+
+function a() {return 42;}
+function b() {return a();}
+function c() {return b();}
+function d() {return c();}
+function e() {return c();}
+function f() {return c();}
+function g() {return d() + e() + f();}
+
+function main() {
+    i = 0;
+    result = 0;
+    while (i < 10000) {
+        result = result + g();
+        i = i + 1;
+    }
+    return result;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/truffle/com.oracle.truffle.sl.test/src/tests/Loop.output	Tue Sep 29 15:01:34 2015 +0200
@@ -0,0 +1,1 @@
+1000
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/truffle/com.oracle.truffle.sl.test/src/tests/Loop.sl	Tue Sep 29 15:01:34 2015 +0200
@@ -0,0 +1,7 @@
+function main() {  
+  i = 0;  
+  while (i < 1000) {  
+    i = i + 1;  
+  }  
+  return i;  
+}  
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/truffle/com.oracle.truffle.sl.test/src/tests/LoopCall.output	Tue Sep 29 15:01:34 2015 +0200
@@ -0,0 +1,1 @@
+1000
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/truffle/com.oracle.truffle.sl.test/src/tests/LoopCall.sl	Tue Sep 29 15:01:34 2015 +0200
@@ -0,0 +1,20 @@
+function add(a, b) {
+  return a + b;
+}
+
+function loop(n) {
+  i = 0;
+  while (i < n) {  
+    i = add(i, 1);  
+  }
+  return i;
+}
+
+function main() {
+  i = 0;
+  while (i < 20) {
+    loop(1000);
+    i = i + 1;
+  }
+  println(loop(1000));  
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/truffle/com.oracle.truffle.sl.test/src/tests/LoopInvalidate.output	Tue Sep 29 15:01:34 2015 +0200
@@ -0,0 +1,1 @@
+1000
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/truffle/com.oracle.truffle.sl.test/src/tests/LoopInvalidate.sl	Tue Sep 29 15:01:34 2015 +0200
@@ -0,0 +1,21 @@
+function add(a, b) {
+  return a + b;
+}
+
+function loop(n) {
+  i = 0;  
+  while (i < n) {  
+    i = add(i, 1);  
+  }  
+  return i;
+}  
+
+function main() {
+  i = 0;
+  while (i < 20) {
+    loop(1000);
+    i = i + 1;
+  }
+  add("a", "b");
+  println(loop(1000));  
+}  
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/truffle/com.oracle.truffle.sl.test/src/tests/LoopPolymorphic.output	Tue Sep 29 15:01:34 2015 +0200
@@ -0,0 +1,1 @@
+1000
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/truffle/com.oracle.truffle.sl.test/src/tests/LoopPolymorphic.sl	Tue Sep 29 15:01:34 2015 +0200
@@ -0,0 +1,22 @@
+function add(a, b) {
+  return a + b;
+}
+
+function loop(n) {
+  i = 0;
+  while (i < n) {
+    i = add(i, 1); 
+  }
+  return i;
+}
+
+function main() {
+  add("a", "b");
+
+  i = 0;
+  while (i < 20) {
+    loop(1000);
+    i = i + 1;
+  }
+  println(loop(1000));  
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/truffle/com.oracle.truffle.sl.test/src/tests/LoopPrint.output	Tue Sep 29 15:01:34 2015 +0200
@@ -0,0 +1,1 @@
+1000
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/truffle/com.oracle.truffle.sl.test/src/tests/LoopPrint.sl	Tue Sep 29 15:01:34 2015 +0200
@@ -0,0 +1,16 @@
+function loop(n) {
+  i = 0;  
+  while (i < n) {  
+    i = i + 1;  
+  }  
+  return i;
+}  
+
+function main() {
+  i = 0;
+  while (i < 20) {
+    loop(1000);
+    i = i + 1;
+  }
+  println(loop(1000));  
+}  
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/truffle/com.oracle.truffle.sl.test/src/tests/Mul.output	Tue Sep 29 15:01:34 2015 +0200
@@ -0,0 +1,4 @@
+12
+12000000000000
+12000000000000
+12000000000000000000000000
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/truffle/com.oracle.truffle.sl.test/src/tests/Mul.sl	Tue Sep 29 15:01:34 2015 +0200
@@ -0,0 +1,6 @@
+function main() {  
+  println(3 * 4);  
+  println(3 * 4000000000000);  
+  println(3000000000000 * 4);  
+  println(3000000000000 * 4000000000000);  
+}  
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/truffle/com.oracle.truffle.sl.test/src/tests/Null.output	Tue Sep 29 15:01:34 2015 +0200
@@ -0,0 +1,7 @@
+null
+true
+false
+false
+true
+false
+true
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/truffle/com.oracle.truffle.sl.test/src/tests/Null.sl	Tue Sep 29 15:01:34 2015 +0200
@@ -0,0 +1,13 @@
+/* The easiest way to generate null: a function without a return statement implicitly returns null. */
+function null() {
+}
+
+function main() {  
+  println(null());  
+  println(null() == null());  
+  println(null() != null());  
+  println(null() == 42);  
+  println(null() != 42);  
+  println(null() == "42");  
+  println(null() != "42");  
+}  
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/truffle/com.oracle.truffle.sl.test/src/tests/Object.output	Tue Sep 29 15:01:34 2015 +0200
@@ -0,0 +1,6 @@
+null
+42
+42
+why
+zzz
+zzz
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/truffle/com.oracle.truffle.sl.test/src/tests/Object.sl	Tue Sep 29 15:01:34 2015 +0200
@@ -0,0 +1,40 @@
+function main() {  
+  obj1 = new();
+  println(obj1.x);
+  obj1.x = 42;
+  println(obj1.x);
+  
+  obj2 = new();
+  obj2.o = obj1;
+  println(obj2.o.x);
+  obj2.o.y = "why";
+  println(obj1.y);
+  
+  println(mkobj().z);
+  
+  obj3 = new();
+  obj3.fn = mkobj;
+  println(obj3.fn().z);
+
+  obj4 = new();
+  write(obj4, 1);
+  read(obj4);
+  write(obj4, 2);
+  read(obj4);
+  write(obj4, "three");
+  read(obj4);
+}
+
+function mkobj() {
+  newobj = new();
+  newobj.z = "zzz";
+  return newobj;
+}
+
+function read(obj) {
+  return obj.prop;
+}
+
+function write(obj, value) {
+  return obj.prop = value;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/truffle/com.oracle.truffle.sl.test/src/tests/String.output	Tue Sep 29 15:01:34 2015 +0200
@@ -0,0 +1,10 @@
+snull
+snull
+sbar
+sfoo
+nulls
+nulls
+bars
+foos
+2 < 4: true
+Type error at String.sl line 9 col 34: operation "<" not defined for Number 2, String "4"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/truffle/com.oracle.truffle.sl.test/src/tests/String.sl	Tue Sep 29 15:01:34 2015 +0200
@@ -0,0 +1,25 @@
+function null() {
+}
+
+function foo() {
+  return "bar";
+}
+
+function f(a, b) {
+  return a + " < " + b + ": " + (a < b);
+}
+
+function main() {  
+  println("s" + null());  
+  println("s" + null);  
+  println("s" + foo());  
+  println("s" + foo);
+    
+  println(null() + "s");  
+  println(null() + "s");  
+  println(foo() + "s");  
+  println(foo + "s");
+
+  println(f(2, 4));
+  println(f(2, "4"));
+}  
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/truffle/com.oracle.truffle.sl.test/src/tests/Sub.output	Tue Sep 29 15:01:34 2015 +0200
@@ -0,0 +1,4 @@
+-1
+-3999999999997
+2999999999996
+-1000000000000
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/truffle/com.oracle.truffle.sl.test/src/tests/Sub.sl	Tue Sep 29 15:01:34 2015 +0200
@@ -0,0 +1,6 @@
+function main() {  
+  println(3 - 4);  
+  println(3 - 4000000000000);  
+  println(3000000000000 - 4);  
+  println(3000000000000 - 4000000000000);  
+}  
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/truffle/com.oracle.truffle.sl.test/src/tests/Sum.output	Tue Sep 29 15:01:34 2015 +0200
@@ -0,0 +1,1 @@
+50005000
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/truffle/com.oracle.truffle.sl.test/src/tests/Sum.sl	Tue Sep 29 15:01:34 2015 +0200
@@ -0,0 +1,9 @@
+function main() {  
+  i = 0;  
+  sum = 0;  
+  while (i <= 10000) {  
+    sum = sum + i;  
+    i = i + 1;  
+  }  
+  return sum;  
+}  
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/truffle/com.oracle.truffle.sl.test/src/tests/error/TypeError01.output	Tue Sep 29 15:01:34 2015 +0200
@@ -0,0 +1,1 @@
+Type error at TypeError01.sl line 2 col 3: operation "-" not defined for Number 3, String "4"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/truffle/com.oracle.truffle.sl.test/src/tests/error/TypeError01.sl	Tue Sep 29 15:01:34 2015 +0200
@@ -0,0 +1,3 @@
+function main() {  
+  3 - "4";  
+}  
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/truffle/com.oracle.truffle.sl.test/src/tests/error/TypeError02.output	Tue Sep 29 15:01:34 2015 +0200
@@ -0,0 +1,1 @@
+Type error at TypeError02.sl line 2 col 3: operation "if" not defined for String "4"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/truffle/com.oracle.truffle.sl.test/src/tests/error/TypeError02.sl	Tue Sep 29 15:01:34 2015 +0200
@@ -0,0 +1,3 @@
+function main() {  
+  if ("4") { }  
+}  
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/truffle/com.oracle.truffle.sl.test/src/tests/error/TypeError03.output	Tue Sep 29 15:01:34 2015 +0200
@@ -0,0 +1,1 @@
+Type error at TypeError03.sl line 2 col 3: operation "&&" not defined for String "4", ANY
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/truffle/com.oracle.truffle.sl.test/src/tests/error/TypeError03.sl	Tue Sep 29 15:01:34 2015 +0200
@@ -0,0 +1,3 @@
+function main() {  
+  "4" && 4;  
+}  
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/truffle/com.oracle.truffle.sl.test/src/tests/error/TypeError04.output	Tue Sep 29 15:01:34 2015 +0200
@@ -0,0 +1,1 @@
+Type error at TypeError04.sl line 2 col 3: operation "||" not defined for Boolean false, Number 4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/truffle/com.oracle.truffle.sl.test/src/tests/error/TypeError04.sl	Tue Sep 29 15:01:34 2015 +0200
@@ -0,0 +1,3 @@
+function main() {  
+  (1 > 2) || 4;  
+}  
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/truffle/com.oracle.truffle.sl.test/src/tests/error/TypeError05.output	Tue Sep 29 15:01:34 2015 +0200
@@ -0,0 +1,1 @@
+Type error at TypeError05.sl line 3 col 3: operation "invoke" not defined for Boolean true
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/truffle/com.oracle.truffle.sl.test/src/tests/error/TypeError05.sl	Tue Sep 29 15:01:34 2015 +0200
@@ -0,0 +1,4 @@
+function main() {
+  f = 1 < 2;
+  f();  
+}  
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/truffle/com.oracle.truffle.sl.test/src/tests/error/TypeError06.output	Tue Sep 29 15:01:34 2015 +0200
@@ -0,0 +1,1 @@
+Type error: operation "defineFunction" not defined for Number 3
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/truffle/com.oracle.truffle.sl.test/src/tests/error/TypeError06.sl	Tue Sep 29 15:01:34 2015 +0200
@@ -0,0 +1,3 @@
+function main() {
+  defineFunction(3);
+}  
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/truffle/com.oracle.truffle.sl.test/src/tests/error/TypeError07.output	Tue Sep 29 15:01:34 2015 +0200
@@ -0,0 +1,1 @@
+Type error: operation "defineFunction" not defined for NULL
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/truffle/com.oracle.truffle.sl.test/src/tests/error/TypeError07.sl	Tue Sep 29 15:01:34 2015 +0200
@@ -0,0 +1,3 @@
+function main() {
+  defineFunction();
+}  
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/truffle/com.oracle.truffle.sl.test/src/tests/error/UndefinedFunction01.output	Tue Sep 29 15:01:34 2015 +0200
@@ -0,0 +1,1 @@
+Undefined function: foo
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/truffle/com.oracle.truffle.sl.test/src/tests/error/UndefinedFunction01.sl	Tue Sep 29 15:01:34 2015 +0200
@@ -0,0 +1,3 @@
+function main() {  
+  foo();
+}  
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/truffle/com.oracle.truffle.sl.test/src/tests_instrumentation/Instrumentation_assnCount.output	Tue Sep 29 15:01:34 2015 +0200
@@ -0,0 +1,103 @@
+100
+0
+1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+100
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/truffle/com.oracle.truffle.sl.test/src/tests_instrumentation/Instrumentation_assnCount.sl	Tue Sep 29 15:01:34 2015 +0200
@@ -0,0 +1,11 @@
+function loop(count) {  
+  i = 0;  
+  while (i < count) {  
+    i = i + 1;  
+  }  
+  return i;  
+}
+
+function main() {
+  count = loop(100);
+}
--- a/truffle/com.oracle.truffle.sl.test/tests/Add.output	Fri Sep 25 16:53:27 2015 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,7 +0,0 @@
-7
-34
-34
-34
-4000000000003
-3000000000004
-7000000000000
--- a/truffle/com.oracle.truffle.sl.test/tests/Add.sl	Fri Sep 25 16:53:27 2015 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,9 +0,0 @@
-function main() {  
-  println(3 + 4);  
-  println(3 + "4");  
-  println("3" + 4);  
-  println("3" + "4");  
-  println(3 + 4000000000000);  
-  println(3000000000000 + 4);  
-  println(3000000000000 + 4000000000000);  
-}  
--- a/truffle/com.oracle.truffle.sl.test/tests/Arithmetic.output	Fri Sep 25 16:53:27 2015 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,10 +0,0 @@
-5
-1
--3
-14
-11
-5
--3
-1
-18
-11
--- a/truffle/com.oracle.truffle.sl.test/tests/Arithmetic.sl	Fri Sep 25 16:53:27 2015 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,12 +0,0 @@
-function main() {  
-  println(3 + 4 - 2);  
-  println(3 - 4 + 2);  
-  println(3 - 4 - 2);  
-  println(3 * 4 + 2);  
-  println(3 + 4 * 2);  
-  println(3 + (4 - 2));  
-  println(3 - (4 + 2));  
-  println(3 - (4 - 2));  
-  println(3 * (4 + 2));  
-  println(3 + (4 * 2));  
-}  
--- a/truffle/com.oracle.truffle.sl.test/tests/Break.output	Fri Sep 25 16:53:27 2015 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-942
--- a/truffle/com.oracle.truffle.sl.test/tests/Break.sl	Fri Sep 25 16:53:27 2015 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,10 +0,0 @@
-function main() {  
-  i = 0;  
-  while (i < 1000) {
-    if (i >= 942) {
-      break;
-    }  
-    i = i + 1;  
-  }
-  return i;  
-}  
--- a/truffle/com.oracle.truffle.sl.test/tests/Builtins.output	Fri Sep 25 16:53:27 2015 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-Hello World!
--- a/truffle/com.oracle.truffle.sl.test/tests/Builtins.sl	Fri Sep 25 16:53:27 2015 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,4 +0,0 @@
-function main() {  
-  println("Hello World!");  
-  nanoTime();  
-}  
--- a/truffle/com.oracle.truffle.sl.test/tests/CalcShell.input	Fri Sep 25 16:53:27 2015 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,15 +0,0 @@
-i
-80
-c
-return cur + i;
-r
-c
-if (i <= 2) { return 1; } else { return prev + cur; }
-r
-i
-100
-r
-c
-if (i == 0) { return 1; } else { return cur * i; }
-r
-x
--- a/truffle/com.oracle.truffle.sl.test/tests/CalcShell.output	Fri Sep 25 16:53:27 2015 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,35 +0,0 @@
-available commands:
-x: exit
-c: define the calculation function with the parameters prev, cur, and i
-   prev and cur start with 0; i is the loop variable from 0 to n
-     example: 'return cur + i;' computes the sum of 1 to n
-     example: 'if (i == 0) { return 1; } else { return cur * i; }' computes the factorial of i
-     example: 'if (i <= 2) { return 1; } else { return prev + cur; }' computes the nth Fibonacci number
-i: define the number of iterations, i.e, the number n in the examples above
-r: Run the calculation loop often, and print the first and last result
-t: Run the calculation loop a couple of time, and print timing information for each run
-h: Print this help message
-
-cmd>
-n>
-cmd>
-function>
-cmd>
-** first: 3240
-** last:  3240
-cmd>
-function>
-cmd>
-** first: 23416728348467685
-** last:  23416728348467685
-cmd>
-n>
-cmd>
-** first: 354224848179261915075
-** last:  354224848179261915075
-cmd>
-function>
-cmd>
-** first: 93326215443944152681699238856266700490715968264381621468592963895217599993229915608941463976156518286253697920827223758251185210916864000000000000000000000000
-** last:  93326215443944152681699238856266700490715968264381621468592963895217599993229915608941463976156518286253697920827223758251185210916864000000000000000000000000
-cmd>
--- a/truffle/com.oracle.truffle.sl.test/tests/CalcShell.sl	Fri Sep 25 16:53:27 2015 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,89 +0,0 @@
-function iterations() {
-  return 80;
-}
-
-function calcLoop(n) {
-  i = 0;
-  prev = cur = 0;
-  while (i <= n) {
-    next = calc(prev, cur, i);
-    prev = cur;
-    cur = next;  
-    i = i + 1;
-  }  
-  return cur;  
-}
-
-function timing(n) {
-  i = 0;
-  while (i < 20) {
-    start = nanoTime();
-    calcLoop(n);
-    end = nanoTime();
-    i = i + 1;
-
-    println("** run " + i + ": " + (end - start) + " ns");
-  }
-}
-
-function run(n) {
-  firstResult = calcLoop(n);
-  println("** first: " + firstResult);
-  i = 0;
-  while (i < 100) {
-    calcLoop(n);
-    i = i + 1;
-  }
-  lastResult = calcLoop(n);
-  println("** last:  " + lastResult);
-  
-  if (firstResult != lastResult) {
-    println("ERROR: result not stable");
-  }
-}  
-
-function help() {
-  println("available commands:");
-  println("x: exit");
-  println("c: define the calculation function with the parameters prev, cur, and i");
-  println("   prev and cur start with 0; i is the loop variable from 0 to n");
-  println("     example: 'return cur + i;' computes the sum of 1 to n"); 
-  println("     example: 'if (i == 0) { return 1; } else { return cur * i; }' computes the factorial of i"); 
-  println("     example: 'if (i <= 2) { return 1; } else { return prev + cur; }' computes the nth Fibonacci number");
-  println("i: define the number of iterations, i.e, the number n in the examples above");
-  println("r: Run the calculation loop often, and print the first and last result");
-  println("t: Run the calculation loop a couple of time, and print timing information for each run");
-  println("h: Print this help message");
-  println("");
-}
-
-function main() {
-  help();
-  
-  while (1 == 1) {
-    println("cmd>");
-    cmd = readln();
-    if (cmd == "x" || cmd == "") {
-      return;
-    }
-    if (cmd == "h") {
-      help();
-    }
-    if (cmd == "c") {
-      println("function>");
-      code = readln();
-      defineFunction("function calc(prev, cur, i) { " + code + "}");
-    }
-    if (cmd == "t") {
-      timing(iterations());
-    }
-    if (cmd == "r") {
-      run(iterations());
-    }
-    if (cmd == "i") {
-      println("n>");
-      n = readln();
-      defineFunction("function iterations() { return " + n + "; }");
-    }
-  }
-}  
--- a/truffle/com.oracle.truffle.sl.test/tests/Call.output	Fri Sep 25 16:53:27 2015 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,8 +0,0 @@
-42
-42
-42
-42
-42
-42
-42
-42
--- a/truffle/com.oracle.truffle.sl.test/tests/Call.sl	Fri Sep 25 16:53:27 2015 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,16 +0,0 @@
-function ret(a) { return a; } 
-function dub(a) { return a * 2; } 
-function inc(a) { return a + 1; } 
-function dec(a) { return a - 1; } 
-function call(f, v) { return f(v); }
- 
-function main() {  
-  println(ret(42));
-  println(dub(21));
-  println(inc(41));
-  println(dec(43));
-  println(call(ret, 42));
-  println(call(dub, 21));
-  println(call(inc, 41));
-  println(call(dec, 43));
-}  
--- a/truffle/com.oracle.truffle.sl.test/tests/Comparison.output	Fri Sep 25 16:53:27 2015 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,54 +0,0 @@
-<
-true
-false
-false
-true
-false
-true
-false
-false
-<=
-true
-false
-true
-true
-false
-true
-false
-true
->
-false
-true
-false
-false
-true
-false
-true
-false
->=
-false
-true
-true
-false
-true
-false
-true
-true
-==
-false
-false
-true
-false
-false
-false
-false
-true
-!=
-true
-true
-false
-true
-true
-true
-true
-false
--- a/truffle/com.oracle.truffle.sl.test/tests/Comparison.sl	Fri Sep 25 16:53:27 2015 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,61 +0,0 @@
-function main() {  
-  println("<");
-  println(4 < 20);  
-  println(40 < 2);  
-  println(4 < 4);  
-  println(4 < 200000000000000000000000000);  
-  println(40000000000000000000000000 < 20);  
-  println(40000000000000000000000000 < 200000000000000000000000000);  
-  println(400000000000000000000000000 < 20000000000000000000000000);  
-  println(40000000000000000000000000 < 40000000000000000000000000);  
-
-  println("<=");
-  println(4 <= 20);  
-  println(40 <= 2);  
-  println(4 <= 4);  
-  println(4 <= 200000000000000000000000000);  
-  println(40000000000000000000000000 <= 20);  
-  println(40000000000000000000000000 <= 200000000000000000000000000);  
-  println(400000000000000000000000000 <= 20000000000000000000000000);  
-  println(40000000000000000000000000 <= 40000000000000000000000000);  
-
-  println(">");
-  println(4 > 20);  
-  println(40 > 2);  
-  println(4 > 4);  
-  println(4 > 200000000000000000000000000);  
-  println(40000000000000000000000000 > 20);  
-  println(40000000000000000000000000 > 200000000000000000000000000);  
-  println(400000000000000000000000000 > 20000000000000000000000000);  
-  println(40000000000000000000000000 > 40000000000000000000000000);  
-
-  println(">=");
-  println(4 >= 20);  
-  println(40 >= 2);  
-  println(4 >= 4);  
-  println(4 >= 200000000000000000000000000);  
-  println(40000000000000000000000000 >= 20);  
-  println(40000000000000000000000000 >= 200000000000000000000000000);  
-  println(400000000000000000000000000 >= 20000000000000000000000000);  
-  println(40000000000000000000000000 >= 40000000000000000000000000);  
-
-  println("==");
-  println(4 == 20);  
-  println(40 == 2);  
-  println(4 == 4);  
-  println(4 == 200000000000000000000000000);  
-  println(40000000000000000000000000 == 20);  
-  println(40000000000000000000000000 == 200000000000000000000000000);  
-  println(400000000000000000000000000 == 20000000000000000000000000);  
-  println(40000000000000000000000000 == 40000000000000000000000000);  
-
-  println("!=");
-  println(4 != 20);  
-  println(40 != 2);  
-  println(4 != 4);  
-  println(4 != 200000000000000000000000000);  
-  println(40000000000000000000000000 != 20);  
-  println(40000000000000000000000000 != 200000000000000000000000000);  
-  println(400000000000000000000000000 != 20000000000000000000000000);  
-  println(40000000000000000000000000 != 40000000000000000000000000);  
-}  
--- a/truffle/com.oracle.truffle.sl.test/tests/ControlFlow.output	Fri Sep 25 16:53:27 2015 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-1
--- a/truffle/com.oracle.truffle.sl.test/tests/ControlFlow.sl	Fri Sep 25 16:53:27 2015 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,10 +0,0 @@
-function foo() {}
-function bar() {}
-
-function main() {  
-  foo();
-  if (1 < 2) {
-    bar();
-    return 1;
-  }
-}  
--- a/truffle/com.oracle.truffle.sl.test/tests/DefineFunction.output	Fri Sep 25 16:53:27 2015 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,2 +0,0 @@
-42
-38
--- a/truffle/com.oracle.truffle.sl.test/tests/DefineFunction.sl	Fri Sep 25 16:53:27 2015 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,11 +0,0 @@
-function foo() {
-  println(test(40, 2));
-}
-
-function main() {
-  defineFunction("function test(a, b) { return a + b; }");
-  foo();
-
-  defineFunction("function test(a, b) { return a - b; }");
-  foo();
-}  
--- a/truffle/com.oracle.truffle.sl.test/tests/Div.output	Fri Sep 25 16:53:27 2015 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,4 +0,0 @@
-2
-0
-1000000000000
-1
--- a/truffle/com.oracle.truffle.sl.test/tests/Div.sl	Fri Sep 25 16:53:27 2015 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,6 +0,0 @@
-function main() {  
-  println(4 / 2);  
-  println(4 / 4000000000000);  
-  println(3000000000000 / 3);  
-  println(3000000000000 / 3000000000000);  
-}  
--- a/truffle/com.oracle.truffle.sl.test/tests/Fibonacci.output	Fri Sep 25 16:53:27 2015 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,10 +0,0 @@
-1: 1
-2: 1
-3: 2
-4: 3
-5: 5
-6: 8
-7: 13
-8: 21
-9: 34
-10: 55
--- a/truffle/com.oracle.truffle.sl.test/tests/Fibonacci.sl	Fri Sep 25 16:53:27 2015 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,21 +0,0 @@
-function fib(num) { 
-  if (num < 1) {return 0;}
-  n1 = 0;
-  n2 = 1;
-  i = 1;
-  while (i < num) {
-    next = n2 + n1;
-    n1 = n2;
-    n2 = next;
-    i = i + 1;
-  }
-  return n2;
-}
-
-function main() {  
-  i = 1;
-  while (i <= 10) {
-    println(i + ": " + fib(i));
-    i = i + 1;
-  }
-}  
--- a/truffle/com.oracle.truffle.sl.test/tests/FunctionLiteral.output	Fri Sep 25 16:53:27 2015 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,2 +0,0 @@
-42
-38
--- a/truffle/com.oracle.truffle.sl.test/tests/FunctionLiteral.sl	Fri Sep 25 16:53:27 2015 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,16 +0,0 @@
-function add(a, b) {
-  return a + b;
-}
-
-function sub(a, b) {
-  return a - b;
-}
-
-function foo(f) {
-  println(f(40, 2));
-}
-
-function main() {
-  foo(add);
-  foo(sub);
-}  
--- a/truffle/com.oracle.truffle.sl.test/tests/HelloEqualsWorld.output	Fri Sep 25 16:53:27 2015 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,90 +0,0 @@
-Initial stack trace:
-Frame: root doIt, a=0, hello=null
-Frame: root main, i=0
-After 123 assignment:
-Frame: root doIt, a=0, hello=123
-Frame: root main, i=0
-After hello assignment:
-Frame: root doIt, a=0, hello=world
-Frame: root main, i=0
-Initial stack trace:
-Frame: root doIt, a=1, hello=null
-Frame: root main, i=1
-After 123 assignment:
-Frame: root doIt, a=1, hello=123
-Frame: root main, i=1
-After hello assignment:
-Frame: root doIt, a=1, hello=world
-Frame: root main, i=1
-Initial stack trace:
-Frame: root doIt, a=2, hello=null
-Frame: root main, i=2
-After 123 assignment:
-Frame: root doIt, a=2, hello=123
-Frame: root main, i=2
-After hello assignment:
-Frame: root doIt, a=2, hello=world
-Frame: root main, i=2
-Initial stack trace:
-Frame: root doIt, a=3, hello=null
-Frame: root main, i=3
-After 123 assignment:
-Frame: root doIt, a=3, hello=123
-Frame: root main, i=3
-After hello assignment:
-Frame: root doIt, a=3, hello=world
-Frame: root main, i=3
-Initial stack trace:
-Frame: root doIt, a=4, hello=null
-Frame: root main, i=4
-After 123 assignment:
-Frame: root doIt, a=4, hello=123
-Frame: root main, i=4
-After hello assignment:
-Frame: root doIt, a=4, hello=world
-Frame: root main, i=4
-Initial stack trace:
-Frame: root doIt, a=5, hello=null
-Frame: root main, i=5
-After 123 assignment:
-Frame: root doIt, a=5, hello=123
-Frame: root main, i=5
-After hello assignment:
-Frame: root doIt, a=5, hello=world
-Frame: root main, i=5
-Initial stack trace:
-Frame: root doIt, a=6, hello=null
-Frame: root main, i=6
-After 123 assignment:
-Frame: root doIt, a=6, hello=123
-Frame: root main, i=6
-After hello assignment:
-Frame: root doIt, a=6, hello=world
-Frame: root main, i=6
-Initial stack trace:
-Frame: root doIt, a=7, hello=null
-Frame: root main, i=7
-After 123 assignment:
-Frame: root doIt, a=7, hello=123
-Frame: root main, i=7
-After hello assignment:
-Frame: root doIt, a=7, hello=world
-Frame: root main, i=7
-Initial stack trace:
-Frame: root doIt, a=8, hello=null
-Frame: root main, i=8
-After 123 assignment:
-Frame: root doIt, a=8, hello=123
-Frame: root main, i=8
-After hello assignment:
-Frame: root doIt, a=8, hello=world
-Frame: root main, i=8
-Initial stack trace:
-Frame: root doIt, a=9, hello=null
-Frame: root main, i=9
-After 123 assignment:
-Frame: root doIt, a=9, hello=123
-Frame: root main, i=9
-After hello assignment:
-Frame: root doIt, a=9, hello=world
-Frame: root main, i=9
\ No newline at end of file
--- a/truffle/com.oracle.truffle.sl.test/tests/HelloEqualsWorld.sl	Fri Sep 25 16:53:27 2015 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,22 +0,0 @@
-function doIt(a) {
-  println("Initial stack trace:");
-  println(stacktrace());
-  
-  hello = 123;
-  println("After 123 assignment:");
-  println(stacktrace());
-  
-  helloEqualsWorld();
-  println("After hello assignment:");
-  println(stacktrace());
-  
-//  readln();
-}
-
-function main() {
-  i = 0;
-  while (i < 10) {
-    doIt(i);
-    i = i + 1;
-  }
-}
--- a/truffle/com.oracle.truffle.sl.test/tests/HelloWorld.output	Fri Sep 25 16:53:27 2015 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-Hello World!
--- a/truffle/com.oracle.truffle.sl.test/tests/HelloWorld.sl	Fri Sep 25 16:53:27 2015 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,3 +0,0 @@
-function main() {  
-  println("Hello World!");  
-}  
--- a/truffle/com.oracle.truffle.sl.test/tests/Inlining.output	Fri Sep 25 16:53:27 2015 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-1260000
\ No newline at end of file
--- a/truffle/com.oracle.truffle.sl.test/tests/Inlining.sl	Fri Sep 25 16:53:27 2015 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,18 +0,0 @@
-
-function a() {return 42;}
-function b() {return a();}
-function c() {return b();}
-function d() {return c();}
-function e() {return c();}
-function f() {return c();}
-function g() {return d() + e() + f();}
-
-function main() {
-    i = 0;
-    result = 0;
-    while (i < 10000) {
-        result = result + g();
-        i = i + 1;
-    }
-    return result;
-}
--- a/truffle/com.oracle.truffle.sl.test/tests/Loop.output	Fri Sep 25 16:53:27 2015 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-1000
--- a/truffle/com.oracle.truffle.sl.test/tests/Loop.sl	Fri Sep 25 16:53:27 2015 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,7 +0,0 @@
-function main() {  
-  i = 0;  
-  while (i < 1000) {  
-    i = i + 1;  
-  }  
-  return i;  
-}  
--- a/truffle/com.oracle.truffle.sl.test/tests/LoopCall.output	Fri Sep 25 16:53:27 2015 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-1000
--- a/truffle/com.oracle.truffle.sl.test/tests/LoopCall.sl	Fri Sep 25 16:53:27 2015 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,20 +0,0 @@
-function add(a, b) {
-  return a + b;
-}
-
-function loop(n) {
-  i = 0;
-  while (i < n) {  
-    i = add(i, 1);  
-  }
-  return i;
-}
-
-function main() {
-  i = 0;
-  while (i < 20) {
-    loop(1000);
-    i = i + 1;
-  }
-  println(loop(1000));  
-}
--- a/truffle/com.oracle.truffle.sl.test/tests/LoopInvalidate.output	Fri Sep 25 16:53:27 2015 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-1000
--- a/truffle/com.oracle.truffle.sl.test/tests/LoopInvalidate.sl	Fri Sep 25 16:53:27 2015 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,21 +0,0 @@
-function add(a, b) {
-  return a + b;
-}
-
-function loop(n) {
-  i = 0;  
-  while (i < n) {  
-    i = add(i, 1);  
-  }  
-  return i;
-}  
-
-function main() {
-  i = 0;
-  while (i < 20) {
-    loop(1000);
-    i = i + 1;
-  }
-  add("a", "b");
-  println(loop(1000));  
-}  
--- a/truffle/com.oracle.truffle.sl.test/tests/LoopPolymorphic.output	Fri Sep 25 16:53:27 2015 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-1000
--- a/truffle/com.oracle.truffle.sl.test/tests/LoopPolymorphic.sl	Fri Sep 25 16:53:27 2015 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,22 +0,0 @@
-function add(a, b) {
-  return a + b;
-}
-
-function loop(n) {
-  i = 0;
-  while (i < n) {
-    i = add(i, 1); 
-  }
-  return i;
-}
-
-function main() {
-  add("a", "b");
-
-  i = 0;
-  while (i < 20) {
-    loop(1000);
-    i = i + 1;
-  }
-  println(loop(1000));  
-}
--- a/truffle/com.oracle.truffle.sl.test/tests/LoopPrint.output	Fri Sep 25 16:53:27 2015 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-1000
--- a/truffle/com.oracle.truffle.sl.test/tests/LoopPrint.sl	Fri Sep 25 16:53:27 2015 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,16 +0,0 @@
-function loop(n) {
-  i = 0;  
-  while (i < n) {  
-    i = i + 1;  
-  }  
-  return i;
-}  
-
-function main() {
-  i = 0;
-  while (i < 20) {
-    loop(1000);
-    i = i + 1;
-  }
-  println(loop(1000));  
-}  
--- a/truffle/com.oracle.truffle.sl.test/tests/Mul.output	Fri Sep 25 16:53:27 2015 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,4 +0,0 @@
-12
-12000000000000
-12000000000000
-12000000000000000000000000
--- a/truffle/com.oracle.truffle.sl.test/tests/Mul.sl	Fri Sep 25 16:53:27 2015 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,6 +0,0 @@
-function main() {  
-  println(3 * 4);  
-  println(3 * 4000000000000);  
-  println(3000000000000 * 4);  
-  println(3000000000000 * 4000000000000);  
-}  
--- a/truffle/com.oracle.truffle.sl.test/tests/Null.output	Fri Sep 25 16:53:27 2015 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,7 +0,0 @@
-null
-true
-false
-false
-true
-false
-true
--- a/truffle/com.oracle.truffle.sl.test/tests/Null.sl	Fri Sep 25 16:53:27 2015 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,13 +0,0 @@
-/* The easiest way to generate null: a function without a return statement implicitly returns null. */
-function null() {
-}
-
-function main() {  
-  println(null());  
-  println(null() == null());  
-  println(null() != null());  
-  println(null() == 42);  
-  println(null() != 42);  
-  println(null() == "42");  
-  println(null() != "42");  
-}  
--- a/truffle/com.oracle.truffle.sl.test/tests/Object.output	Fri Sep 25 16:53:27 2015 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,6 +0,0 @@
-null
-42
-42
-why
-zzz
-zzz
--- a/truffle/com.oracle.truffle.sl.test/tests/Object.sl	Fri Sep 25 16:53:27 2015 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,40 +0,0 @@
-function main() {  
-  obj1 = new();
-  println(obj1.x);
-  obj1.x = 42;
-  println(obj1.x);
-  
-  obj2 = new();
-  obj2.o = obj1;
-  println(obj2.o.x);
-  obj2.o.y = "why";
-  println(obj1.y);
-  
-  println(mkobj().z);
-  
-  obj3 = new();
-  obj3.fn = mkobj;
-  println(obj3.fn().z);
-
-  obj4 = new();
-  write(obj4, 1);
-  read(obj4);
-  write(obj4, 2);
-  read(obj4);
-  write(obj4, "three");
-  read(obj4);
-}
-
-function mkobj() {
-  newobj = new();
-  newobj.z = "zzz";
-  return newobj;
-}
-
-function read(obj) {
-  return obj.prop;
-}
-
-function write(obj, value) {
-  return obj.prop = value;
-}
--- a/truffle/com.oracle.truffle.sl.test/tests/String.output	Fri Sep 25 16:53:27 2015 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,10 +0,0 @@
-snull
-snull
-sbar
-sfoo
-nulls
-nulls
-bars
-foos
-2 < 4: true
-Type error at String.sl line 9 col 34: operation "<" not defined for Number 2, String "4"
--- a/truffle/com.oracle.truffle.sl.test/tests/String.sl	Fri Sep 25 16:53:27 2015 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,25 +0,0 @@
-function null() {
-}
-
-function foo() {
-  return "bar";
-}
-
-function f(a, b) {
-  return a + " < " + b + ": " + (a < b);
-}
-
-function main() {  
-  println("s" + null());  
-  println("s" + null);  
-  println("s" + foo());  
-  println("s" + foo);
-    
-  println(null() + "s");  
-  println(null() + "s");  
-  println(foo() + "s");  
-  println(foo + "s");
-
-  println(f(2, 4));
-  println(f(2, "4"));
-}  
--- a/truffle/com.oracle.truffle.sl.test/tests/Sub.output	Fri Sep 25 16:53:27 2015 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,4 +0,0 @@
--1
--3999999999997
-2999999999996
--1000000000000
--- a/truffle/com.oracle.truffle.sl.test/tests/Sub.sl	Fri Sep 25 16:53:27 2015 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,6 +0,0 @@
-function main() {  
-  println(3 - 4);  
-  println(3 - 4000000000000);  
-  println(3000000000000 - 4);  
-  println(3000000000000 - 4000000000000);  
-}  
--- a/truffle/com.oracle.truffle.sl.test/tests/Sum.output	Fri Sep 25 16:53:27 2015 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-50005000
--- a/truffle/com.oracle.truffle.sl.test/tests/Sum.sl	Fri Sep 25 16:53:27 2015 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,9 +0,0 @@
-function main() {  
-  i = 0;  
-  sum = 0;  
-  while (i <= 10000) {  
-    sum = sum + i;  
-    i = i + 1;  
-  }  
-  return sum;  
-}  
--- a/truffle/com.oracle.truffle.sl.test/tests/error/TypeError01.output	Fri Sep 25 16:53:27 2015 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-Type error at TypeError01.sl line 2 col 3: operation "-" not defined for Number 3, String "4"
--- a/truffle/com.oracle.truffle.sl.test/tests/error/TypeError01.sl	Fri Sep 25 16:53:27 2015 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,3 +0,0 @@
-function main() {  
-  3 - "4";  
-}  
--- a/truffle/com.oracle.truffle.sl.test/tests/error/TypeError02.output	Fri Sep 25 16:53:27 2015 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-Type error at TypeError02.sl line 2 col 3: operation "if" not defined for String "4"
--- a/truffle/com.oracle.truffle.sl.test/tests/error/TypeError02.sl	Fri Sep 25 16:53:27 2015 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,3 +0,0 @@
-function main() {  
-  if ("4") { }  
-}  
--- a/truffle/com.oracle.truffle.sl.test/tests/error/TypeError03.output	Fri Sep 25 16:53:27 2015 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-Type error at TypeError03.sl line 2 col 3: operation "&&" not defined for String "4", ANY
--- a/truffle/com.oracle.truffle.sl.test/tests/error/TypeError03.sl	Fri Sep 25 16:53:27 2015 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,3 +0,0 @@
-function main() {  
-  "4" && 4;  
-}  
--- a/truffle/com.oracle.truffle.sl.test/tests/error/TypeError04.output	Fri Sep 25 16:53:27 2015 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-Type error at TypeError04.sl line 2 col 3: operation "||" not defined for Boolean false, Number 4
--- a/truffle/com.oracle.truffle.sl.test/tests/error/TypeError04.sl	Fri Sep 25 16:53:27 2015 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,3 +0,0 @@
-function main() {  
-  (1 > 2) || 4;  
-}  
--- a/truffle/com.oracle.truffle.sl.test/tests/error/TypeError05.output	Fri Sep 25 16:53:27 2015 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-Type error at TypeError05.sl line 3 col 3: operation "invoke" not defined for Boolean true
--- a/truffle/com.oracle.truffle.sl.test/tests/error/TypeError05.sl	Fri Sep 25 16:53:27 2015 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,4 +0,0 @@
-function main() {
-  f = 1 < 2;
-  f();  
-}  
--- a/truffle/com.oracle.truffle.sl.test/tests/error/TypeError06.output	Fri Sep 25 16:53:27 2015 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-Type error: operation "defineFunction" not defined for Number 3
--- a/truffle/com.oracle.truffle.sl.test/tests/error/TypeError06.sl	Fri Sep 25 16:53:27 2015 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,3 +0,0 @@
-function main() {
-  defineFunction(3);
-}  
--- a/truffle/com.oracle.truffle.sl.test/tests/error/TypeError07.output	Fri Sep 25 16:53:27 2015 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-Type error: operation "defineFunction" not defined for NULL
--- a/truffle/com.oracle.truffle.sl.test/tests/error/TypeError07.sl	Fri Sep 25 16:53:27 2015 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,3 +0,0 @@
-function main() {
-  defineFunction();
-}  
--- a/truffle/com.oracle.truffle.sl.test/tests/error/UndefinedFunction01.output	Fri Sep 25 16:53:27 2015 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-Undefined function: foo
--- a/truffle/com.oracle.truffle.sl.test/tests/error/UndefinedFunction01.sl	Fri Sep 25 16:53:27 2015 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,3 +0,0 @@
-function main() {  
-  foo();
-}  
--- a/truffle/com.oracle.truffle.sl.test/tests_instrumentation/Instrumentation_assnCount.output	Fri Sep 25 16:53:27 2015 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,103 +0,0 @@
-100
-0
-1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-21
-22
-23
-24
-25
-26
-27
-28
-29
-30
-31
-32
-33
-34
-35
-36
-37
-38
-39
-40
-41
-42
-43
-44
-45
-46
-47
-48
-49
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-76
-77
-78
-79
-80
-81
-82
-83
-84
-85
-86
-87
-88
-89
-90
-91
-92
-93
-94
-95
-96
-97
-98
-99
-100
-100
--- a/truffle/com.oracle.truffle.sl.test/tests_instrumentation/Instrumentation_assnCount.sl	Fri Sep 25 16:53:27 2015 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,11 +0,0 @@
-function loop(count) {  
-  i = 0;  
-  while (i < count) {  
-    i = i + 1;  
-  }  
-  return i;  
-}
-
-function main() {
-  count = loop(100);
-}