Re: Implementing perl BEGIN blocks

2005-08-18 Thread Leopold Toetsch
On Aug 18, 2005, at 21:54, Uri Guttman wrote: "LT" == Leopold Toetsch <[EMAIL PROTECTED]> writes: LT> Here is a plan to implement most of the needed bits. LT> # constant pi = 4 * atan2(1,1); LT> translates to LT> .sub anon_1 @IMMEDIATE, @ANON LT> $N0 = atan 1.0, 1.0 LT>

Re: Implementing perl BEGIN blocks

2005-08-18 Thread Uri Guttman
> "LT" == Leopold Toetsch <[EMAIL PROTECTED]> writes: LT> Here is a plan to implement most of the needed bits. LT> # constant pi = 4 * atan2(1,1); LT> translates to LT> .sub anon_1 @IMMEDIATE, @ANON LT> $N0 = atan 1.0, 1.0 LT> $P0 = new .Float LT> $P0 = $N0 LT

Re: Implementing perl BEGIN blocks

2005-08-18 Thread Autrijus Tang
On Thu, Aug 18, 2005 at 06:00:43PM +0200, Leopold Toetsch wrote: > This shouldn't be a problem (at least when the last few globals from > imcc are gone), i.e. compilation / running code should be fully re-rentrant. Oooh, that will be much better. > BTW can you explain why the above example print

Re: Implementing perl BEGIN blocks

2005-08-18 Thread Leopold Toetsch
Autrijus Tang wrote: On Thu, Aug 18, 2005 at 04:51:58PM +0200, Leopold Toetsch wrote: There was some recent discussion [1] [2] on p6l about BEGIN blocks and constant, which is executed at compile time too. Parrot has since quite a time the @IMMEDIATE subroutine pragma, which causes execution

Re: Implementing perl BEGIN blocks

2005-08-18 Thread Autrijus Tang
On Thu, Aug 18, 2005 at 04:51:58PM +0200, Leopold Toetsch wrote: > There was some recent discussion [1] [2] on p6l about BEGIN blocks and > constant, which is executed at compile time too. > > Parrot has since quite a time the @IMMEDIATE subroutine pragma, which > causes execution of subs during