Re: overloaded operator calling conventions

2004-12-16 Thread Sam Ruby
Leopold Toetsch wrote: Sam Ruby wrote: A few observations, first from an Parrot Internal perspective... in general, the code for the opcodes tend to do things like the following: $1-vtable-get_string(interpreter, $1) Note that the object tends to be repeated as the first argument. It often the

Re: overloaded operator calling conventions

2004-12-16 Thread Sam Ruby
Leopold Toetsch wrote: Luke Palmer [EMAIL PROTECTED] wrote: Leopold Toetsch writes: Why do we have the special notion of current_object in the first place? Why not just pass all in as P5, P6, ...? I agree that this is the way to go. Especially if we have some marker somewhere that tells us that

Re: overloaded operator calling conventions

2004-12-16 Thread Leopold Toetsch
Sam Ruby wrote: A few observations, first from an Parrot Internal perspective... in general, the code for the opcodes tend to do things like the following: $1-vtable-get_string(interpreter, $1) Note that the object tends to be repeated as the first argument. It often the case that the first

Re: overloaded operator calling conventions

2004-12-16 Thread Leopold Toetsch
Sam Ruby wrote: Leopold Toetsch wrote: class_self.__super(args) so again the invocant is the first argument after interpreter. Believe it or not, I think we are agreeing. *g* To invoke a method on an object using Parrot Calling Conventions, P2 needs to be the object used for dispatch purposes,

Re: overloaded operator calling conventions

2004-12-15 Thread Leopold Toetsch
Dan Sugalski [EMAIL PROTECTED] wrote: The note here is that Parrot's MMD function signature for binary ops doesn't match what Python needs. Parrot is: void binary_mmd_op(pmc left, pmc right, pmc dest) where Python is: pmc dest = left.add(pmc right) Perl6 allows (according to

Re: overloaded operator calling conventions

2004-12-15 Thread Luke Palmer
Leopold Toetsch writes: Why do we have the special notion of current_object in the first place? Why not just pass all in as P5, P6, ...? I agree that this is the way to go. Especially if we have some marker somewhere that tells us that we were called as a method. Luke

Re: overloaded operator calling conventions

2004-12-15 Thread Leopold Toetsch
Luke Palmer [EMAIL PROTECTED] wrote: Leopold Toetsch writes: Why do we have the special notion of current_object in the first place? Why not just pass all in as P5, P6, ...? I agree that this is the way to go. Especially if we have some marker somewhere that tells us that we were called as

Re: overloaded operator calling conventions

2004-12-14 Thread Leopold Toetsch
Dan Sugalski [EMAIL PROTECTED] wrote: At 7:45 AM +0100 12/11/04, Leopold Toetsch wrote: Thinking more about that it seems that we don't have much chance to keep the current scheme that the destination is passed in. I fully expected this to be an issue. Perl 5 and perl 6 are going to have

Re: overloaded operator calling conventions

2004-12-13 Thread Dan Sugalski
At 7:45 AM +0100 12/11/04, Leopold Toetsch wrote: Thinking more about that it seems that we don't have much chance to keep the current scheme that the destination is passed in. (This is probably out of order -- I've a lot of mail I'm backed up on unfortunately, but since it was CC'd directly to

Re: overloaded operator calling conventions

2004-12-11 Thread Sam Ruby
Leopold Toetsch wrote: Comments? leo As enjoyable as this discussion has been, I'd like to ask that it be put on hold for a few days. I've nearly got all the previously defined languages/python/t/basic tests running, and once they are running, I'd like to do a bit of refactoring and

Re: overloaded operator calling conventions

2004-12-10 Thread Leopold Toetsch
Leopold Toetsch [EMAIL PROTECTED] wrote: [ fullquote ] A recent discussion with Sam has shown that the current calling conventions for overloaded operators don't match Python semantics (nor Perl6 when I interpret S06 and S13 correctly). The difference is that Parrot is passing in the

overloaded operator calling conventions

2004-12-09 Thread Leopold Toetsch
A recent discussion with Sam has shown that the current calling conventions for overloaded operators don't match Python semantics (nor Perl6 when I interpret S06 and S13 correctly). The difference is that Parrot is passing in the destination argument while these languages are returning the