view graal/com.oracle.truffle.sl.test/tests/DefineFunction.sl @ 21415:c435184ca071

Prefer ipv4 on dacapo benchmark (was set to false before)
author Stefan Anzinger <stefan.anzinger@oracle.com>
date Tue, 19 May 2015 09:51:55 +0200
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();
}