view graal/com.oracle.truffle.sl.test/tests/DefineFunction.sl @ 13901:45f9dbb93988

modified Kind.format() to avoid calling any user code (JBS:GRAAL-14)
author Doug Simon <doug.simon@oracle.com>
date Thu, 06 Feb 2014 23:14:06 +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();
}