Re: approaching python

2003-08-01 Thread Leopold Toetsch
Benjamin Goldberg wrote: save $P1 restore $P2 [ ... ] $P2 = $P1 or even removed entirely, rewriting everything after the "" to refer to $P1 instead of $P2. Does imcc do anything like this? Not yet. But it will do, at least for Parrot calling conventions, where register moves should

Re: approaching python

2003-08-01 Thread Benjamin Goldberg
Benjamin Goldberg wrote: [snip] > If someone's code emits something like: > >save $P1 >restore $P2 > > Then IMCC should be able to optimize that to: > >$P = $P1 >$P2 = $P Actually, that (sometimes) should be able to be changed to: $P2 = $P1 noop or: noop

Re: approaching python

2003-08-01 Thread Benjamin Goldberg
Joseph F. Ryan wrote: > Benjamin Goldberg wrote: >> Joseph Ryan wrote: >>> Benjamin Goldberg wrote: [snip] Hmm... If imcc is smart enough, (or perhaps I should say, when the flow control is simple/clear enough) it should be able to see when a value is pushed onto the stack, and late

Re: approaching python

2003-07-30 Thread Michal Wallace
On Sun, 27 Jul 2003, Joseph Ryan wrote: > Benjamin Goldberg wrote: > > >[...] the problem isn't that python uses *more* registers than > >, but rather, that it doesn't use registers at all. Instead, > >it uses a stack. So, for example, python's add instruction might get > >translated into the f

Re: approaching python

2003-07-29 Thread Joseph F. Ryan
Benjamin Goldberg wrote: > >Joseph Ryan wrote: > >>Benjamin Goldberg wrote: >> >>>K Stol wrote: >>> The register stuff, I presume, is register allocation and the like? When targeting IMCC, you can use an infinite amount of registers. Just keep a counter in the code generator, each time

Re: approaching python

2003-07-28 Thread Michal Wallace
On 28 Jul 2003, Luke Palmer wrote: > Klass-jan wrote: > > Maybe it's not possible to have the eval instruction right away, in the new > > Python->IMC code generator. As long as this command is not used in the code > > for this new code generator, this can just be skipped, and it may be > > impleme

Re: approaching python

2003-07-28 Thread Luke Palmer
> - Original Message - > From: "Luke Palmer" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Cc: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>; > <[EMAIL PROTECTED]> > Sent: Monday, July 28, 2003 4:46 AM > Subject: Re: approaching py

Re: approaching python

2003-07-28 Thread K Stol
- Original Message - From: "Luke Palmer" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Monday, July 28, 2003 4:46 AM Subject: Re: approaching python > Klass-jan wrote: &

Re: approaching python

2003-07-28 Thread Luke Palmer
Klass-jan wrote: > Maybe it's not possible to have the eval instruction right away, in the new > Python->IMC code generator. As long as this command is not used in the code > for this new code generator, this can just be skipped, and it may be > implemented in IMC by hand, and inserted into the new

Re: approaching python

2003-07-28 Thread K Stol
- Original Message - From: "Joseph Ryan" <[EMAIL PROTECTED]> To: "Benjamin Goldberg" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Sunday, July 27, 2003 7:56 PM Subject: Re: approaching python > Benjamin Goldberg wrote: > > >K Sto

Re: approaching python

2003-07-28 Thread Vladimir Lipskiy
> Nono, the problem isn't that python uses *more* registers than > , but rather, that it doesn't use registers at all. Instead, > it uses a stack. So, for example, python's add instruction might get Nobody said Python used more registers than . Michal just worried if it would be problematic to d

Re: approaching python

2003-07-27 Thread Joseph Ryan
Benjamin Goldberg wrote: K Stol wrote: The register stuff, I presume, is register allocation and the like? When targeting IMCC, you can use an infinite amount of registers. Just keep a counter in the code generator, each time a new register is needed, just increment the counter and add a "${S|N|I

Re: approaching python

2003-07-27 Thread Benjamin Goldberg
K Stol wrote: > > - Original Message - > From: "Michal Wallace" <[EMAIL PROTECTED]> > To: "Luke Palmer" <[EMAIL PROTECTED]> > Cc: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> > Sent: Thursday, July 24, 2003 12:01 PM > Subje

Re: approaching python

2003-07-25 Thread K Stol
- Original Message - From: "Michal Wallace" <[EMAIL PROTECTED]> To: "Luke Palmer" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Thursday, July 24, 2003 12:01 PM Subject: Re: approaching python > > On 24 Jul

Re: approaching python

2003-07-25 Thread K Stol
- Original Message - From: "Benjamin Goldberg" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, July 24, 2003 6:07 PM Subject: Re: approaching python > K Stol wrote: > > > > - Original Message - > > From: "Michal Wallac

Re: approaching python

2003-07-24 Thread Benjamin Goldberg
K Stol wrote: > > - Original Message - > From: "Michal Wallace" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Wednesday, July 23, 2003 4:48 PM > Subject: approaching python > > > > > Hey all, > > > > I've bee

Re: approaching python

2003-07-24 Thread Joseph F. Ryan
Luke Palmer wrote: >Klass-Jan Stol writes: > >>>The thing is, I don't have a lot of experience when it comes to >>>compilers, but I do know a whole lot about python. :) If this >>>approach makes sense, is there someone with IMCC experience who'd >>>be willing to do some virtual pair programming wi

Re: approaching python

2003-07-24 Thread Michal Wallace
On Thu, 24 Jul 2003, Joseph F. Ryan wrote: > I'm not familiar with the Python bytecode spec (to be a little more > accurate, I'm completely clueless about it), but perhaps something > similar can be done? Also, another thing to consider is that it > might be easier to translate python bytecode d

Re: approaching python

2003-07-24 Thread Michal Wallace
On 24 Jul 2003, Luke Palmer wrote: > Klass-Jan Stol writes: > > module, right? I don't know Python, and I've a little experience > > with IMC, but it seems to me only a new code generator module should ...[snip] > Well... sortof. It's definitely going to take writing a whole new > code generato

Re: approaching python

2003-07-24 Thread Christian Renz
to link with python, we should probably write our own parser.[1] Just use Perl 6 to write it :). Ooops... looks like a chicken-and-egg problem... Greetings, Christian

Re: approaching python

2003-07-24 Thread K Stol
- Original Message - From: "Luke Palmer" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Thursday, July 24, 2003 2:22 AM Subject: Re: approaching python > Klass-Jan Stol writes: > > > The thin

Re: approaching python

2003-07-24 Thread Luke Palmer
Klass-Jan Stol writes: > > The thing is, I don't have a lot of experience when it comes to > > compilers, but I do know a whole lot about python. :) If this > > approach makes sense, is there someone with IMCC experience who'd > > be willing to do some virtual pair programming with me and spike > >

Re: approaching python

2003-07-24 Thread K Stol
- Original Message - From: "Michal Wallace" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, July 23, 2003 4:48 PM Subject: approaching python > > Hey all, > > I've been thinking about the "compiling python to > parrot" c

approaching python

2003-07-23 Thread Michal Wallace
Hey all, I've been thinking about the "compiling python to parrot" concept. Right now it looks like the approach is to start from scratch, but I'm wondering if it might make more sense to leverage python itself, at least for now? Python has a compiler module (written in python and standard wi