view graal/com.oracle.truffle.sl.test/tests/Null.sl @ 17250:9f001294893d

Truffle: Added test case that compiler intrinsics are not intrinsified if hidden behind a @SlowPath.
author Christian Humer <christian.humer@gmail.com>
date Mon, 29 Sep 2014 18:37:24 +0200
parents b16ec83edc73
children
line wrap: on
line source

/* The easiest way to generate null: a function without a return statement implicitly returns null. */
function null() {
}

function main() {  
  println(null());  
  println(null() == null());  
  println(null() != null());  
  println(null() == 42);  
  println(null() != 42);  
  println(null() == "42");  
  println(null() != "42");  
}