pslang/examples/jit_test.psl

15 lines
285 B
PSL

func print(c: u8):
foreign func putchar(c: i32) -> i32
putchar(c as i32)
func test() -> i32:
global mut x = 0
x += 1
return x
print('0' + (test() as u8))
print('0' + (test() as u8))
print('0' + (test() as u8))
print('0' + (test() as u8))
print('0' + (test() as u8))
print('\n')