view graal/com.oracle.truffle.sl.test/tests/DefineFunction.sl @ 18319:56cc1a799a60

(re)converted Value to an interface
author Doug Simon <doug.simon@oracle.com>
date Fri, 07 Nov 2014 22:00:11 +0100
parents b16ec83edc73
children
line wrap: on
line source

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();
}