
5 Jan
2014
5 Jan
'14
7:48 a.m.
On 2014-01-05 at 01:32:07 +0100, Carter Schonwald wrote:
i'm inclined to assume that its a parser error. instead of (v)= call fun(args...argn);, did you try v = call fun(args1...n) ; ?
I've looked more closely at the parser, and the relevant productions... | 'call' expr '(' exprs0 ')' ';' { doCall $2 [] $4 } | '(' formals ')' '=' 'call' expr '(' exprs0 ')' ';' { doCall $6 $2 $8 } ...actually require the return values to be newly declared registers, therefore the following works: foo() { W_ arg1, arg2; arg1 = 1; arg2 = 2; (W_ ret1, W_ ret2) = call stg_fun (arg1,arg2); return (ret2, ret1); } Cheers, hvr