Re: calling conventions, variable-length parameter lists

2003-08-14 Thread Michal Wallace
On Fri, 8 Aug 2003, TOGoS wrote: > I want to be able to have a function with > this kind of signature: > > func ($param1, *$otherparams) > > AFAIK, there is no way to implement this > with the current calling conventions. You > would have to do something with variable > register IDs, which we do

Re: calling conventions, variable-length parameter lists

2003-08-14 Thread TOGoS
--- TOGoS <[EMAIL PROTECTED]> wrote: > > Leopold Toetsch wrote: > > TOGoS wrote: > Unprototyped :-) I guess I didn't make that > quite clear, enough. > >>> > >>> Setup a param array, that's all. > >>> > >>> leo > >> Umm... OK. Here's what I've done: I created 2 > >> functions that I ca

Re: calling conventions, variable-length parameter lists

2003-08-14 Thread TOGoS
Leopold Toetsch wrote: > TOGoS wrote: Unprototyped :-) I guess I didn't make that quite clear, enough. >>> >>> Setup a param array, that's all. >>> >>> leo >> Umm... OK. Here's what I've done: I created 2 >> functions that I can use when dealing >> with variable-length parameter lists.

Re: calling conventions, variable-length parameter lists

2003-08-14 Thread Luke Palmer
> Luke said: > > > > sub ($param1, [EMAIL PROTECTED]) > > > > In which case, if it's prototyped, we stuff > > everything besides the > > first parameter into a PMC representing > > @otherparams. > > > > And if you meant something else, can't help ya. > > > > Luke > > Maybe I misunderstand w

Re: calling conventions, variable-length parameter lists

2003-08-14 Thread Michal Wallace
On Fri, 8 Aug 2003, TOGoS wrote: > Unprototyped :-) I guess I didn't make that quite > clear, enough. Nah, you did. I just didn't think about it... :) I think I see the problem now. > maybe this kind of unprototyped function is expected > to be uncommon enough that we can put up with having

Re: calling conventions, variable-length parameter lists

2003-08-14 Thread Leopold Toetsch
Luke Palmer <[EMAIL PROTECTED]> wrote: > Sure that will be possible. You put the first 11 args in P5-P15, and > the rest in P4. s/P4/P3/g > Luke leo

Re: calling conventions, variable-length parameter lists

2003-08-14 Thread TOGoS
> > Unprototyped :-) I guess I didn't make that quite > > clear, enough. > > Setup a param array, that's all. > > leo Umm... OK. Here's what I've done: I created 2 functions that I can use when dealing with variable-length parameter lists. One to turn an array into pcc-compliant parameters, and on

Re: calling conventions, variable-length parameter lists

2003-08-10 Thread TOGoS
Luke said: > > sub ($param1, [EMAIL PROTECTED]) > > In which case, if it's prototyped, we stuff > everything besides the > first parameter into a PMC representing > @otherparams. > > And if you meant something else, can't help ya. > > Luke Maybe I misunderstand what 'prototyped' means. I as

calling conventions, variable-length parameter lists

2003-08-10 Thread TOGoS
I want to be able to have a function with this kind of signature: func ($param1, *$otherparams) AFAIK, there is no way to implement this with the current calling conventions. You would have to do something with variable register IDs, which we don't have and which would probably be a bad idea, any

Re: calling conventions, variable-length parameter lists

2003-08-09 Thread Luke Palmer
> I want to be able to have a function with > this kind of signature: > > func ($param1, *$otherparams) Uh. What kind of signature? What does that mean? If it's Perl 6, sub ($param1, *$otherparams) Is nothing special: it takes two parameters. Did you mean sub ($param1, [EMAIL PROT

Re: calling conventions, variable-length parameter lists

2003-08-09 Thread Leopold Toetsch
Michal Wallace <[EMAIL PROTECTED]> wrote: > On Fri, 8 Aug 2003, TOGoS wrote: >> Unprototyped :-) I guess I didn't make that quite >> clear, enough. Setup a param array, that's all. > Hmm. That would be easy if there were an easy way > to loop through the registers... > reg = 5 > for x = 1 to

Re: calling conventions, variable-length parameter lists

2003-08-09 Thread TOGoS
Luke said: > Plus, parameters to functions are likely to be used > in the code of the > function (and likewise with return values), so we're > just skipping > unloading the array into registers. OK. That makes sense, but my problem is: in the case that the called function *does* treat its paramete