view graal/com.oracle.truffle.sl.test/tests/FunctionLiteral.sl @ 14038:af0519781660

Use correct stamp in BitLogicNode smart constructors.
author Roland Schatz <roland.schatz@oracle.com>
date Fri, 28 Feb 2014 13:51:50 +0100
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);
}