Re: imcc's

2003-08-01 Thread Leopold Toetsch
Joseph F. Ryan <[EMAIL PROTECTED]> wrote: > I think you should try to implement lamda through .Sub's. Take a look > at parrot/t/pmc/sub.t for some examples. However, you might not be > able to rely on IMCC to handle arguments and results so much, since I > don't think IMCC uses the new cps callin

Re: imcc's "call" vs first class functions

2003-08-01 Thread Leopold Toetsch
Michal Wallace <[EMAIL PROTECTED]> wrote: > Hey all, > I've got lambda (single-expression anonymous subroutine) > working in pirate now, but I wasn't sure how to get it > to do the correct calling convention with IMCC's "call". I'm pretty sure, that you should use Parrot calling conventions for

Re: imcc's "call" vs first class functions

2003-08-01 Thread K Stol
If I understood well, the problem is that subroutines can be saved in variables, right (or registers for that matter)? So, if there is some subroutine "f", you could just do: $I1 = addr _f# get address of subroutine f $P1 = new Sub# create a new Sub PMC $P1 = $I1# store add

RE: imcc's

2003-08-01 Thread Joseph F. Ryan
I think you should try to implement lamda through .Sub's. Take a look at parrot/t/pmc/sub.t for some examples. However, you might not be able to rely on IMCC to handle arguments and results so much, since I don't think IMCC uses the new cps calling style yet. (but I'm not sure, so don't hold

Re: IMCC's bsr handling

2003-02-22 Thread Leopold Toetsch
Steve Fink wrote: [Apologies if you receive this twice, No problemm, the duplicate filter in procmail takes care of it. On Sat, Feb 08, 2003 at 12:19:35PM +0100, Leopold Toetsch wrote: When we want these kind of branches, then they must be more high level, defining all possible branch targe

Re: IMCC's bsr handling

2003-02-21 Thread Steve Fink
[Apologies if you receive this twice, but my messages from work haven't been going through, so I'm resending everything now that I have my home net connection back.] On Sat, Feb 08, 2003 at 12:19:35PM +0100, Leopold Toetsch wrote: > Steve Fink wrote: > > > bsr $I0 > > > >It will complain that

Re: IMCC's bsr handling

2003-02-08 Thread Leopold Toetsch
Steve Fink wrote: bsr $I0 It will complain that it can't fixup the label '$I0'. I can't imagine, how to get a correct CFG with these kind of register jump instructions. They are too low level, lacking any hint where they might jump to. When we want these kind of branches, then they mus

Re: IMCC's bsr handling

2003-02-07 Thread Leopold Toetsch
Steve Fink wrote: In tracking this down, I also noticed that imcc seems to assume that you will do a saveall/restoreall pair around bsr calls. I have now a partial fix for this committed. When imcc sees a bsr *and* knows the label (all is in one compilation unit) *and* when there is no save

Re: IMCC's bsr handling

2003-02-07 Thread Leopold Toetsch
Steve Fink wrote: IMCC doesn't handle bsr with non-constant args. A test program would be something like L: $I0 = addr L bsr $I0 It will complain that it can't fixup the label '$I0'. Yep. That's missing. I'll hvae a look at it. (But you could invoke a Sub, which is ok IIRC). In tr