view graal/com.oracle.truffle.sl.test/tests/DefineFunction.sl @ 18531:cdb9c605051a

removed some static accesses to HotSpotGraalRuntime from some tests
author Doug Simon <doug.simon@oracle.com>
date Wed, 26 Nov 2014 13:57:50 +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();
}