view graal/com.oracle.truffle.sl.test/tests/DefineFunction.sl @ 14763:a6c1c3eb20c4

transition to JDK8 - introduce support for more than one JDK in mx - update version in annotiationprocessors - update project definitions (truffle api is not part of the transition) - fix style errors
author Doug Simon <doug.simon@oracle.com>
date Wed, 26 Mar 2014 14:34:08 +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();
}