view graal/com.oracle.truffle.sl.test/tests/FunctionLiteral.sl @ 16520:9a07bf8467a6

[SPARC] Implement floatingpoint branch instructions, removing math substitutions for SPARC; fixing problems with constants in debug info (Big/Little Endian problems)
author Stefan Anzinger <stefan.anzinger@gmail.com>
date Sun, 13 Jul 2014 17:46:57 -0700
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);
}