According to the PDD03 I have here:

Calling conventions:
I0  Prototyped call?
I1  Number of overflow params
I2  Number of params in PMC registers
P3  Overflow params

Return conventions:
I0  Prototyped return?
I1  Number of return values in integer registers
I2  Number of return values in string registers
I3  Number of return values in PMC registers
I4  Number of return values in numeric registers
P3  Overflow return values in an array PMC

I'm wondering why the conventions for calling
and returning aren't more symmetrical...
Why doesn't a return use I1 and I2 the same
as a call does? Especially with CPS, where
calls and returns seem almost interchangable
(you could do tricks involving passing subroutines
in P1 and pretending they were return continuations),
I think it would be better if calls and returns
used the same conventions. The existing (assuming
the return conventions in the PDD are up to date)
return conventions don't really make much sense,
anyway; if a return is non-prototyped, you'll
have to stick all the return values in P registers,
and won't use the others. So why use I1,2,and 4 like
that? I would prefer to see this:

I0  Prototyped return?
I1  Number of overflow return values
I2  Number of return values in PMC registers
P3  Overflow return values in an array PMC

so as to make call/return symmetrical
(this would also allow me to use the same
Params class in my compiler for both
calls and returns ;-)

__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

Reply via email to