Dan Sugalski wrote:
At 6:03 PM +0100 3/12/03, Leopold Toetsch wrote:
So my proposal is, to reduce the amount of parameters passed in registers
Okay, done! Checkin to follow soon.
Wow, really fast, thanks.
Still remaing - probably /me not understanding the following:
The following registers, with the exception of P registers, are used only when calling a subroutine for which there is a compile-time prototype. The first 27 PMC parameters may be passed in registers P5 through P31.
D'oh! Fixed.
P5 through P15
The first 11 PMC parameters.
Could you please tighten this a little bit more: - a compile-time prototype is the signature, I presume?
Yes. The whole intent of this was to allow for subs whose parameters weren't PMCs. Say, for example, you had a sub who's signature was:
foo(int, int, float, string)
If we knew that at compile time we could put the first two parameters in I5 and I6, the float param in N5, and the string parameter in S5. If we *didn't* know the signature, we'd put the parameters in P5-P8. I'd planned on having a way to let the sub know which way we were calling it (with or without signature) so it'd know where to get its parameters.
I'd assumed that the sub would take the "no prototype" case and move the params to the right places based on the sub prototype, as I figured the sub being called would know its own prototype.
The sub calling PDD is a little sloppier than I'd like. Once I get the object stuff nailed down a little better, I'd like to readdress it some. Mainly to skip passing parameters on the stack and using an array PMC to hold the overflow (both on input and output), and better return value specifications.
Objects first, though--PDD 15 beckons. *Then* you and I can work out the fuzzy bits so it both makes sense and IMCC can work with it well.
--
Dan
--------------------------------------"it's like this"------------------- Dan Sugalski even samurai [EMAIL PROTECTED] have teddy bears and even teddy bears get drunk