view graal/com.oracle.truffle.sl.test/tests/FunctionLiteral.sl @ 21505:f73ffccf4240

[AMD64] Use shorter encoding of zero-extend opcodes.
author Roland Schatz <roland.schatz@oracle.com>
date Wed, 27 May 2015 12:23:22 +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);
}