ykjit / yk

yk packages
https://ykjit.github.io/yk/
Other
29 stars 7 forks source link

Add func type and indirect call support to the JIT IR parser. #1275

Closed ltratt closed 3 months ago

ltratt commented 3 months ago

I need this for a test I want to write, so I haven't over-thought the syntax. Function types have the syntax:

func_type t1(i8) -> i32

and so on. Indirect calls have the syntax:

%0: ...
%1: ...
%2: i32 = icall<t1> %0(%1)

Note that there is now a discrepancy between indirect call printing (which has never made any attempt to print out the function type) and parsing (which has to have the function type available). Homogenising the two would be a good thing.