Re: We *need* this op! :-)

2003-08-10 Thread Simon Glover
On Thu, 7 Aug 2003, Jos Visser wrote: > Accompanying patch adds the "fortytwo" op to Parrot, so the following > PASM becomes legal: > > fortytwo I0 > print I0 > print "\n" > end > > Example: > > $ ../parrot test42.pasm > 42 > Why not just use a macro? # .macro fortyt

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: Perl 6's for() signature

2003-08-10 Thread Austin Hastings
> -Original Message- > From: Luke Palmer [mailto:[EMAIL PROTECTED] > Actually, in Perl 6, they'll do that anyway. Scope in loops is > strictly defined by the location of the braces WRT the location of > "my". That is: > > while (my $x = somefunc()) { ... } > # $x still in scope

Re: [perl #23029] [PATCH] -Wpadded annoying

2003-08-10 Thread Lars Balker Rasmussen
Lars Balker Rasmussen (via RT) <[EMAIL PROTECTED]> writes: > # New Ticket Created by Lars Balker Rasmussen > # Please include the string: [perl #23029] > # in the subject line of all future correspondence about this issue. > # http://rt.perl.org/rt2/Ticket/Display.html?id=23029 > > > > -Wpadded

Re: struct Parrot_Lexicals; ArrayHash

2003-08-10 Thread Matt Fowles
Leo~ Why not just use a hash and ditch the array then? Matt Leopold Toetsch wrote: The current implementation of find_lex (by_name) is suboptimal. A linear scan over the list of lexical names is performed (s. sub.c:lexicals_get_position()). A better way would be to provide a list of lexicals p

Re: assign opcodes

2003-08-10 Thread Leopold Toetsch
Togos <[EMAIL PROTECTED]> wrote: > if you assign an integer to a PerlString, it's > still a PerlString. No more. I don't know, if its correct. But the behavior now seems more natural to me: new P1, .PerlInt set P1, 42 new P0, .PerlUndef assign P0, P1 # LHS is PerlInt now The dest has to

Re: parrot bug: continuations/multiple return

2003-08-10 Thread Benjamin Goldberg
Michal Wallace wrote: [snip] > def f(): > return g() [snip] > # f from line 3 > .pcc_sub _sub1 non_prototyped > .local object res1# (visitReturn:528) > find_lex $P2, 'g' # (callingExpression:325) > newsub $P3, .Continuation, ret0# (callingExpressi

Re: [perl #23029] [PATCH] -Wpadded annoying

2003-08-10 Thread Leopold Toetsch
Lars Balker Rasmussen <[EMAIL PROTECTED]> wrote: >> -Wpadded seems to be more trouble than it's worth at this stage, so I Thanks, applied, leo

Re: #define name collisions -- yet another small project

2003-08-10 Thread Dan Sugalski
At 5:27 AM +0300 8/9/03, Vladimir Lipskiy wrote: > So, the project. Someone needs to go through the configure procedure and the headers and throw a PARROT_ prefix in front of all the HAS_ defines we define, so we can avoid this problem. I have a look at the configure procedure and didn't find an

Re: bug: two segfaults

2003-08-10 Thread Vladimir Lipskiy
> I've committed a würgaround. LMAO!

RE: We *need* this op! :-)

2003-08-10 Thread Gordon Henriksen
On Fri, Aug 08, 2003 at 01:51PM -0400, David H. Adler wrote: > On Fri, Aug 08, 2003 at 12:33:03PM +0100, Nicholas Clark wrote: > > On Fri, Aug 08, 2003 at 02:20:46AM -0400, David H. Adler wrote: > > > On Thu, Aug 07, 2003 at 12:57:11PM -0400, Gordon Henriksen wrote: > > > > This is really a languag

Re: IMCC hangs

2003-08-10 Thread Vladimir Lipskiy
> Seems to be related with the multiple freeing reported by Michael. I thought his name was Michal (:>8

Re: Re[2]: parrot, win32, stand-alone distribution, separate Parrot maillist

2003-08-10 Thread Vladimir Lipskiy
> Is it as simple as checking whether the OS is Windows, and setting %options > to contain appropriate paths, e.g. It's no use while checking if the OS is Windows, 'cause the distribution is intended for only Win 32 users. So you should predefine the hash below. > %options = ( buildprefix => '',

Re: bug: two segfaults

2003-08-10 Thread Elizabeth Mattijsen
At 12:14 -0400 8/10/03, Uri Guttman wrote: > "VL" == Vladimir Lipskiy <[EMAIL PROTECTED]> writes: >> I've committed a würgaround. i get the english side of the pun. what does the german(?) side mean? The german verb "würgen" means "to strangle", if I'm not mistaken... Liz

[CVS ci] Exec

2003-08-10 Thread Daniel Grunblatt
Now Exec works exactly like the jit, I have checked in the missing restart, fixed some bugs at Parrot_jit_store_retval and make exec_start call runops instead of calling run_compiled directly, so now all test are successful. Have fun. Daniel.

Re: parrot bug: continuations/multiple return

2003-08-10 Thread Piers Cawley
Leopold Toetsch <[EMAIL PROTECTED]> writes: > As calling conventions clearly state, that the caller has to save > everything, its probably up to imcc/pcc.c to insert above > statements, if another sub gets called from a sub. I'll fix that in > a minute ;-) If and only if that's not a tail call of

configure.pl failed under cygwin, build failed on win32

2003-08-10 Thread K Stol
hello, I just picked up a fresh copy with cvs. Under cygwin, ./Configure.pl fails with the message: Determining some sizes...Linker failed (see test.ldo) at lib/Parrot/Configure/Step.pm line 147 So I tried under win32 (MS VS 6.0). Now, Configure.pl is ok, but "nmake" ends with a fatal error. I

Re: why new_pad *INT*?

2003-08-10 Thread Michal Wallace
On Sat, 9 Aug 2003, Sean O'Rourke wrote: > The problem is that when adder() gets returned, it > needs to remember the enclosing pad. So this needs to > be > > newsub $P1, .Closure, _sub1 > > which (IIRC) will save the lexical environment in which > it was created (see closure.pmc), then res

Re: parrot bug: continuations/multiple return

2003-08-10 Thread Benjamin Goldberg
Michal Wallace wrote: > Benjamin Goldberg wrote: > > Michal Wallace wrote: [snip] > > Also... why is $P2 merely an imcc temporary, without a real name? > > That is, why not do: > > > > .pcc_sub _sub1 non_prototyped > > .local object sub1 > > find_lex sub1, 'g' > > .pcc_begin non_protot

Prefixing #define names

2003-08-10 Thread Vladimir Lipskiy
OK. I'm starting out a prefixing story and here is CHAPTER I. The HAS_HEADER_ defines. prefixing.diff Description: Binary data

Re: generic code generator? [was: subroutines and python status]

2003-08-10 Thread Michal Wallace
On Tue, 5 Aug 2003, Joseph Ryan wrote: > >Okay, I don't have a good syntax in mind yet, > >the point is it's a template language and you > >can subclass/override/extend the template. > >Maybe there's no syntax and it just uses > >cleanly coded classes in some oo language. > >Or perl6 with it's g

Re: configure.pl failed under cygwin, build failed on win32

2003-08-10 Thread Vladimir Lipskiy
> >Under cygwin, ./Configure.pl fails with the message: > > > >Determining some sizes...Linker failed (see test.ldo) at > >lib/Parrot/Configure/Step.pm line > > Try to add this line > > link => 'gcc', > > to config/init/hints/cygwin.pl > > As a result, it must be in the following way: > > Conf

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

Re: #define name collisions -- yet another small project

2003-08-10 Thread Vladimir Lipskiy
> At 9:21 PM +0300 8/8/03, Vladimir Lipskiy wrote: > > > So, the project. Someone needs to go through the configure procedure > >> and the headers and throw a PARROT_ prefix in front of all the HAS_ > >> defines we define, so we can avoid this problem. > > > >Some defines have the HAVE_ prefix.

pirate guide

2003-08-10 Thread Michal Wallace
Just got the parrot calling conventions working for Py-Pirate. I also wrote a guide that explains how the code is laid out for people who don't know python: http://pirate.versionhost.com/viewcvs.cgi/pirate/GUIDE?rev=1.1 Sincerely, Michal J Wallace Sabren Enterprises, Inc. ---