view graal/com.oracle.truffle.sl.test/tests/DefineFunction.sl @ 18481:f91e40c4bb47

Create separate stamps for Klass* and Method*, and make them hotspot specific.
author Roland Schatz <roland.schatz@oracle.com>
date Thu, 20 Nov 2014 15:23:46 +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();
}