pslang/examples/jit_test.psl

14 lines
217 B
PSL

func add1(x : u32) -> u32:
return x + 1u
func sub1(x : u32) -> u32:
return x - 1u
func add_or_sub(add : bool) -> (u32 -> u32):
if add:
return add1
else:
return sub1
func test(x: i32) -> i32:
return 10 / 0