view graal/com.oracle.truffle.sl.test/tests/FunctionLiteral.sl @ 15470:c55f44b3c5e5

remove NodesToDoubles, refactoring of node probability and inlining relevance computation
author Lukas Stadler <lukas.stadler@oracle.com>
date Fri, 02 May 2014 12:02:27 +0200
parents ff3136ecb5a7
children
line wrap: on
line source

function add(a, b) {
  return a + b;
}

function sub(a, b) {
  return a - b;
}

function foo(f) {
  println(f(40, 2));
}

function main() {
  foo(add);
  foo(sub);
}