, Rather than generating code to deal with all these possibilities at every call-to-unknown-function site, ghc delegates this to a bunch of specialized functions which are part of the RTS. The compilation ofcall_some_want_Int# therefore looks deceptively simple:
R1 = I32[Sp + 0]; I32[Sp + 0] = 1234; jump stg_ap_n_fast ();
stg_ap_n_fast deals with the application of an unknown function to a single Int#; hence the _n in the name. It finds out how many arguments f has (by looking at the pointer ...