Re: Optimizations for Objects

2004-03-22 Thread Piers Cawley
Leopold Toetsch [EMAIL PROTECTED] writes: Piers Cawley [EMAIL PROTECTED] wrote: The thing is, 'pushtop' is almost certainly the wrong thing to do. You should only push the registers you care about onto the register stacks. Yes: $ time parrot -j oofib.imc fib(28) = 317811 3.050051s

[perl #27833] IMCC parser chokes on empty sub

2004-03-22 Thread via RT
# New Ticket Created by Ilya Martynov # Please include the string: [perl #27833] # in the subject line of all future correspondence about this issue. # URL: http://rt.perl.org:80/rt3/Ticket/Display.html?id=27833 - IMCC parser

Re: Optimizations for Objects

2004-03-22 Thread Piers Cawley
Leopold Toetsch [EMAIL PROTECTED] writes: Piers Cawley [EMAIL PROTECTED] wrote: Leopold Toetsch [EMAIL PROTECTED] writes: You seem to be mixing up different issues with that statement. Using plain Continuation PMCs for returning just from subroutines was dead slow, w or w/o COWed stacks.

[perl #27814] Perl6 Syntax - parrot-0.1.0 - array definition bug

2004-03-22 Thread Graciliano M. P.
# New Ticket Created by Graciliano M. P. # Please include the string: [perl #27814] # in the subject line of all future correspondence about this issue. # URL: http://rt.perl.org:80/rt3/Ticket/Display.html?id=27814 This syntax won't work for array definition: my @l = ('a' , 'b' , 'c') ;

Variadic functions questions

2004-03-22 Thread Ilya Martynov
Hello all, 1) First question is how to tell if variadic function recieved 11 or 12 or more params (for simplicity let's suppose that we use only pmc parameters). According calling conventions (pdd03) first 11 params end up in P5-P15 registers and leftover goes into array in P3. The

Re: [perl #27833] IMCC parser chokes on empty sub

2004-03-22 Thread Leopold Toetsch
Ilya Martynov [EMAIL PROTECTED] wrote: IMCC parser chokes on empty subs. Simple test case: .sub _main _foo() end .end .sub _foo for now just insert a: noop .end I can imagine that there are a lot of places, where at least one instruction is assumed to be in ths sub.

Re: Optimizations for Objects

2004-03-22 Thread Leopold Toetsch
Piers Cawley [EMAIL PROTECTED] wrote: Leopold Toetsch [EMAIL PROTECTED] writes: And finally: I really don't know, if a Continuation needs just pointers to the stacks (and to which) or (COWed) copies (to which). If a 'single object per stack frame' approah, the continuation only needs

Re: typeof ParrotClass

2004-03-22 Thread Piers Cawley
Leopold Toetsch [EMAIL PROTECTED] writes: Should this really print ParrotClass: newclass P0, Foo typeof S0, P0 print S0 print \n find_type I0, Foo new P1, I0 typeof S0, P1 print S0 print \n end ParrotClass Foo Yes.

Re: Optimizations for Objects

2004-03-22 Thread Piers Cawley
Leopold Toetsch [EMAIL PROTECTED] writes: Dan Sugalski [EMAIL PROTECTED] wrote: Okay, as I see it there are two big things that we can do to speed objects up. (Well, besides speeding up the creation of continuation PMCs, which I am, at the moment, sorely tempted to put in a special pool for

Re: Variadic functions questions

2004-03-22 Thread Leopold Toetsch
Ilya Martynov [EMAIL PROTECTED] wrote: Hello all, 1) First question is how to tell if variadic function recieved 11 or 12 or more params (for simplicity let's suppose that we use only pmc parameters). According calling conventions (pdd03) first 11 params end up in P5-P15 registers

Re: Variadic functions questions

2004-03-22 Thread Jens Rieks
Hi, On Monday 22 March 2004 10:44, Ilya Martynov wrote: Hello all, 1) First question is how to tell if variadic function recieved 11 or 12 or more params (for simplicity let's suppose that we use only pmc parameters). According calling conventions (pdd03) first 11 params end up in

Re: Optimizations for Objects

2004-03-22 Thread Leopold Toetsch
Piers Cawley [EMAIL PROTECTED] wrote: How hard would it be to stick all continuations onto a 'weak' continuation stack (not seen by DOD) then, during DOD, mark the freed continuations (or the live ones). The current code is much simpler. s. void add_to_retc_free_list(Parrot_Interp, PMC*);

Re: GCC for PARROT (GCC Compiling itself to PARROT, then compiling all supported languages to PARROT from PARROT)?!?!

2004-03-22 Thread Dan Sugalski
At 11:33 AM -0500 3/20/04, Gerald E Butler wrote: Hello all, I've been investigating the possibility of creating a MACHINE DESCRIPTION (aka BACK-END) for GCC to target PARROT. My thinking is this: If a satisfactory GCC back-end targeting PARROT is created -and- PARROT is efficient enough

Re: Variadic functions questions

2004-03-22 Thread Dan Sugalski
At 12:50 PM +0100 3/22/04, Jens Rieks wrote: ops/set.ops has setp_ind op which allows to write to register by its number but it seems there is no op to read register by its number. I had the same problem, too. That needs fixing. If you want to throw together a patch, by all means go for it. --

Re: Variadic functions questions

2004-03-22 Thread Leopold Toetsch
Ilya Martynov wrote: Prints 'P3 is not NULL' Yep, some minutes ago I've fixed it. Thanks for the test, I've added it plus another one to CVS. leo

Re: Variadic functions questions

2004-03-22 Thread Leopold Toetsch
Jens Rieks [EMAIL PROTECTED] wrote: First a note: P3 is now cleared, if P15 is reached. So havin 11 args can be distinguished from having more then 11 arguments. Leo, is it easy to alias them as argc[ISPN]? Yes. It's the same as aliasing Cself to P2. If we can agree on the variable names, this

Re: Variadic functions questions

2004-03-22 Thread Ilya Martynov
LT == Leopold Toetsch [EMAIL PROTECTED] writes: LT Ilya Martynov [EMAIL PROTECTED] wrote: Hello all, 1) First question is how to tell if variadic function recieved 11 or 12 or more params (for simplicity let's suppose that we use only pmc parameters). According calling conventions (pdd03)

Re: Variadic functions questions

2004-03-22 Thread Ilya Martynov
JR == Jens Rieks [EMAIL PROTECTED] writes: JR Hi, JR On Monday 22 March 2004 10:44, Ilya Martynov wrote: Hello all, 1) First question is how to tell if variadic function recieved 11 or 12 or more params (for simplicity let's suppose that we use only pmc parameters). According calling

This week's Summary

2004-03-22 Thread Piers Cawley
The Perl 6 Summary for the week ending 2004-03-21 Spring is sprung, the Equinoctal gales seem to have blown themselves out, I'm a proud step grandfather and life is generally grand. So, what's been going on in perl6-internals? I hear you ask. Let's find out shall we? Parrot

Re: Variadic functions questions

2004-03-22 Thread Leopold Toetsch
Jens Rieks [EMAIL PROTECTED] wrote: Hi, On Monday 22 March 2004 13:54, Leopold Toetsch wrote: And P3 := overflow_args ? P0 := the_sub ?? P1 := return_continuation ? S0 := method_name ? Sounds okay. Maybe its better to either alias return_continuation to the register where P1

Re: Variadic functions questions

2004-03-22 Thread Leopold Toetsch
Ilya Martynov wrote: There is a small typo in comment for second test case: Thanks, fixed. Plus another test and checks that I3 is really 11. leo

RE: GCC for PARROT (GCC Compiling itself to PARROT, then compilin g all supported languages to PARROT from PARROT)?!?!

2004-03-22 Thread Butler, Gerald
OK, I think I'm starting to get a better picture of what needs to happen. Does this sound more reasonable? Java, C#, Fortran(???), (Managed???)C++, (Other languages with appropriate non-direct memory access) == GCC Parser == Parse Tree == Enhanced RTL (where

Re: GCC for PARROT (GCC Compiling itself to PARROT, then compilin g all supported languages to PARROT from PARROT)?!?!

2004-03-22 Thread Simon Wistow
On Mon, Mar 22, 2004 at 09:54:56AM -0500, Butler, Gerald said: The important point is that the starting language must have semantics which treat variables, object, etc. as abstract entities to be manipulated not *memory locations* to be accessed arbitrarily. Then, the parse stage must spit out

Re: [PROPOSAL] Cstat opcode and interface

2004-03-22 Thread Nick Ing-Simmons
Dan Sugalski [EMAIL PROTECTED] writes: At 10:11 AM -0800 3/10/04, Brent \Dax\ Royal-Gordon wrote: Josh Wilmes wrote: It's also quite possible that miniparrot is a waste of time. I'm pretty much of the opinion myself that it's an academic exercise at this point, but one which keeps us honest,

Re: [PROPOSAL] Cstat opcode and interface

2004-03-22 Thread Nick Ing-Simmons
Dan Sugalski [EMAIL PROTECTED] writes: At 11:12 AM -0800 3/10/04, Brent \Dax\ Royal-Gordon wrote: Dan Sugalski wrote: Which, unfortunately, will end up making things a hassle, since there's no platform-independent way to spawn a sub-process, dammit. :( Unixen seem to support system(). D'oh!

Re: Dates and times again

2004-03-22 Thread Nick Ing-Simmons
Larry Wall [EMAIL PROTECTED] writes: That would seem like good future proofing. Someday every computer will have decentish subsecond timing. I hope to see it in my lifetime... It isn't having the sub-second time in the computer it is the API to get at it... My guess is that eventually

Re: Using Ruby Objects with Parrot

2004-03-22 Thread Nick Ing-Simmons
Mark Sparshatt [EMAIL PROTECTED] writes: I'm not 100% certain about the details but I think this is how it works. In languages like C++ objects and classes are completely seperate. classes form an inheritance heirachy and objects are instances of a particular class. However in some languages (I

Re: [PROPOSAL] Cstat opcode and interface

2004-03-22 Thread Dan Sugalski
At 3:23 PM + 3/22/04, Nick Ing-Simmons wrote: Dan Sugalski [EMAIL PROTECTED] writes: At 11:12 AM -0800 3/10/04, Brent \Dax\ Royal-Gordon wrote: Dan Sugalski wrote: Which, unfortunately, will end up making things a hassle, since there's no platform-independent way to spawn a sub-process,

RE: GCC for PARROT (GCC Compiling itself to PARROT, then compilin g all supported languages to PARROT from PARROT)?!?!

2004-03-22 Thread Dan Sugalski
At 9:54 AM -0500 3/22/04, Butler, Gerald wrote: OK, I think I'm starting to get a better picture of what needs to happen. Does this sound more reasonable? With the caveat that I know nothing about gcc's internals, it seems at least reasonable. :) -- Dan

Re: [PATCH] OpsFile hits: ops/cmp.ops ops/object.ops

2004-03-22 Thread Jens Rieks
Hi, On Monday 22 March 2004 15:46, Leopold Toetsch wrote: Ist rx.ops noch aktuell? Wenn ja schaue ich da auch mal durch. Ob es so verwendet wird weiß ich nicht. Es sind aber etliche branch ops dabei. Done. Hab bei diff nur -w genommen um den Patch klein zu halten. jens Index: rx.ops

Re: [PATCH] OpsFile hits: ops/cmp.ops ops/object.ops

2004-03-22 Thread Jens Rieks
Sorry, this mail was meant to go directly to Leo. On Monday 22 March 2004 17:05, Jens Rieks wrote: Hi, On Monday 22 March 2004 15:46, Leopold Toetsch wrote: Ist rx.ops noch aktuell? Wenn ja schaue ich da auch mal durch. Ob es so verwendet wird weiß ich nicht. Es sind aber etliche branch

Re: CPAN Upload: A/AB/ABERGMAN/ponie-2.tar.gz - Ponie Development Release 2

2004-03-22 Thread Goplat
--- Steve Hay [EMAIL PROTECTED] wrote: Arthur Bergman wrote: This is Ponie, development release 2 How does one build this on Win32 with MSVC++? Running the top-level perl Configure.pl got me nowhere, so I cd'd into parrot and ran perl Configure.pl there. That ran OK, so I tried

[CVS ci] more PIR codegen improvements

2004-03-22 Thread Leopold Toetsch
* end is now inserted in @MAIN if missing * in @MAIN P1 isn't moved around * -Oc: replace savetop with up to 3 pushtopX ops It's a good idea to declare the main function: .sub _main @MAIN ... .end leo

Re: Dates and times again

2004-03-22 Thread Leopold Toetsch
Nick Ing-Simmons [EMAIL PROTECTED] wrote: Larry Wall [EMAIL PROTECTED] writes: ..., but I darn well better *know* that I can't sleep(.25), or strange things are gonna happen. But you can fake sleep() with select() or whatever. $ cat sl.pasm sleep 0.1 end $ time parrot sl.pasm real

Continuations, stacks, and whatnots

2004-03-22 Thread Dan Sugalski
Since this has gotten to be an issue... We've definitely got performance issues with continuations. This is Not Good, since we're using them for control flow. Leo's hacked in a performance fix, but it's got its own issues. I think it's time for some thought, and a more unified solution.

Re: CPAN Upload: A/AB/ABERGMAN/ponie-2.tar.gz - Ponie Development Release 2

2004-03-22 Thread Leopold Toetsch
Steve Hay [EMAIL PROTECTED] wrote: but linking parrot.exe fell over with three unresolved externals: asctime_r, gmtime_r and localtime_r. These are not present in the VC++ header files. These are fixed in Parrot CVS. Though I don't know, if ponie uses it unaltered. - Steve leo

Re: [PATCH] OpsFile hits: ops/cmp.ops ops/object.ops

2004-03-22 Thread Leopold Toetsch
Jens Rieks [EMAIL PROTECTED] wrote: Hi, [ rx.ops hints patch ] Thanks, applied. leo

Re: [CVS ci] more PIR codegen improvements

2004-03-22 Thread Sterling Hughes
On Mar 22, 2004, at 11:42 AM, Leopold Toetsch wrote: * end is now inserted in @MAIN if missing perhaps this should be a compiler warning instead? -sterling

Re: Continuations, stacks, and whatnots

2004-03-22 Thread Dan Sugalski
At 7:00 PM +0100 3/22/04, Leopold Toetsch wrote: Dan Sugalski [EMAIL PROTECTED] wrote: Since this has gotten to be an issue... Making a continuation conceptually has three steps. One must: 1) Copy the current environment contents to the continuation 2) Note the bytecode address at which the

Re: [CVS ci] more PIR codegen improvements

2004-03-22 Thread Leopold Toetsch
Sterling Hughes [EMAIL PROTECTED] wrote: On Mar 22, 2004, at 11:42 AM, Leopold Toetsch wrote: * end is now inserted in @MAIN if missing perhaps this should be a compiler warning instead? If both C@MAIN and Cend are missing, we could compile a module. So sometimes you'll get a warning and

RE: GCC for PARROT (GCC Compiling itself to PARROT, then compilin g all supported languages to PARROT from PARROT)?!?!

2004-03-22 Thread Simon Glover
On Mon, 22 Mar 2004, Butler, Gerald wrote: The important point is that the starting language must have semantics which treat variables, object, etc. as abstract entities to be manipulated not *memory locations* to be accessed arbitrarily. Then, the parse stage must spit This requirement

Re: GCC for PARROT (GCC Compiling itself to PARROT, then compilin g all supported languages to PARROT from PARROT)?!?!

2004-03-22 Thread Matt Fowles
All~ If I recall correctly, GCC supports Haskell, which is an ideal language for Parrot. Matt Simon Glover wrote: On Mon, 22 Mar 2004, Butler, Gerald wrote: The important point is that the starting language must have semantics which treat variables, object, etc. as abstract entities to be

Re: [CVS ci] more PIR codegen improvements

2004-03-22 Thread Dan Sugalski
At 7:11 PM +0100 3/22/04, Leopold Toetsch wrote: Sterling Hughes [EMAIL PROTECTED] wrote: On Mar 22, 2004, at 11:42 AM, Leopold Toetsch wrote: * end is now inserted in @MAIN if missing perhaps this should be a compiler warning instead? If both C@MAIN and Cend are missing, we could compile a

Re: Continuations, stacks, and whatnots

2004-03-22 Thread Leopold Toetsch
Dan Sugalski [EMAIL PROTECTED] wrote: ... If we go with a one frame stack chunk then we don't have to bother with COW-ing *anything* with the stack. BTW: which stacks: Register frames of course. What about Pad, User, and Control? leo

Re: Continuations, stacks, and whatnots

2004-03-22 Thread Leopold Toetsch
Dan Sugalski [EMAIL PROTECTED] wrote: At 7:00 PM +0100 3/22/04, Leopold Toetsch wrote: D'oh! (I should edit this all out but, well...) If we go with a one frame stack chunk then we don't have to bother with COW-ing *anything* with the stack. Which makes the differentiation between a return

Re: Continuations, stacks, and whatnots

2004-03-22 Thread Dan Sugalski
At 8:33 PM +0100 3/22/04, Leopold Toetsch wrote: Dan Sugalski [EMAIL PROTECTED] wrote: At 7:00 PM +0100 3/22/04, Leopold Toetsch wrote: D'oh! (I should edit this all out but, well...) If we go with a one frame stack chunk then we don't have to bother with COW-ing *anything* with the stack.

Re: GCC for PARROT (GCC Compiling itself to PARROT, then compilin g all supported languages to PARROT from PARROT)?!?!

2004-03-22 Thread Gerald E Butler
Could you please give a little more insight on Haskell and why it is/would be so good? I've never heard of it. On Mon, 2004-03-22 at 14:23, Matt Fowles wrote: All~ If I recall correctly, GCC supports Haskell, which is an ideal language for Parrot. Matt Simon Glover wrote: On Mon,

Re: GCC for PARROT (GCC Compiling itself to PARROT, then compilin g all supported languages to PARROT from PARROT)?!?!

2004-03-22 Thread Matt Fowles
I can try, although I do not know Haskell very well. Haskell is a functional language (like Scheme or ML), thus it needs support for things like closures and continuations. This also means that having an interpreter to provide higher level feature like memoizing thunks is very useful.

Re: Using Ruby Objects with Parrot

2004-03-22 Thread Piers Cawley
Nick Ing-Simmons [EMAIL PROTECTED] writes: Mark Sparshatt [EMAIL PROTECTED] writes: I'm not 100% certain about the details but I think this is how it works. In languages like C++ objects and classes are completely seperate. classes form an inheritance heirachy and objects are instances of a

Re: Continuations, stacks, and whatnots

2004-03-22 Thread Piers Cawley
Leopold Toetsch [EMAIL PROTECTED] writes: Dan Sugalski [EMAIL PROTECTED] wrote: ... If we go with a one frame stack chunk then we don't have to bother with COW-ing *anything* with the stack. BTW: which stacks: Register frames of course. What about Pad, User, and Control? I hope he means

Re: GCC for PARROT (GCC Compiling itself to PARROT, then compilin g all supported languages to PARROT from PARROT)?!?!

2004-03-22 Thread ozone
On 23/03/2004, at 6:23 AM, Matt Fowles wrote: If I recall correctly, GCC supports Haskell, which is an ideal language for Parrot. GCC doesn't support Haskell -- perhaps the compiler you're thinking of is GHC? (Glasgow Haskell Compiler). I'm starting to look at implementing a Haskell to Parrot

Re: Using Ruby Objects with Parrot

2004-03-22 Thread Larry Wall
On Tue, Mar 23, 2004 at 12:53:57AM +, Piers Cawley wrote: : Personally, I've always wished that Perl5 *had* done that. I've toyed : with the idea of blessing Stashes, but never got around to actually : implementing anything. Well, hey, we had to leave something to fix in Perl 6. What? Oh,

Re: Continuations, stacks, and whatnots

2004-03-22 Thread Dan Sugalski
At 12:59 AM + 3/23/04, Piers Cawley wrote: Leopold Toetsch [EMAIL PROTECTED] writes: Dan Sugalski [EMAIL PROTECTED] wrote: ... If we go with a one frame stack chunk then we don't have to bother with COW-ing *anything* with the stack. BTW: which stacks: Register frames of course. What

Re: GCC for PARROT (GCC Compiling itself to PARROT, then compilin g all supported languages to PARROT from PARROT)?!?!

2004-03-22 Thread Matt Fowles
I could be getting things mixed up here, but I thought I read that GHC (Glasgow Haskell Compiler) is part of GCC (GNU Compiler Collection). Although I might be misreading this paper slightly http://home.in.tum.de/~baueran/thesis/ I would greatly support adding a Haskell compiler and would be

[PATCH] add bnots (string bitwise not) ops

2004-03-22 Thread Goplat
Parrot seems to be missing the bitwise-not for strings. Attached patch adds a string_bitwise_not function, bitwise_nots vtable, and bnots ops. __ Do you Yahoo!? Yahoo! Finance Tax Center - File online. File on time. http://taxes.yahoo.com/filing.html?

Re: Continuations, stacks, and whatnots

2004-03-22 Thread Matt Fowles
All~ I am not sure that I understand why we deal with exception handlers at all. Why not just make exception handlers a second continuation passed to all functions. Then you call continuation 1 for successful returns and continuation 2 for exceptions. This will not introduce overhead to

Re: GCC for PARROT (GCC Compiling itself to PARROT, then compilin g all supported languages to PARROT from PARROT)?!?!

2004-03-22 Thread ozone
On 23/03/2004, at 12:24 PM, Matt Fowles wrote: I could be getting things mixed up here, but I thought I read that GHC (Glasgow Haskell Compiler) is part of GCC (GNU Compiler Collection). Although I might be misreading this paper slightly http://home.in.tum.de/~baueran/thesis/ GHC can

Re: Classes and metaclasses

2004-03-22 Thread chromatic
On Tue, 2004-03-16 at 11:57, Dan Sugalski wrote: (I forgot to reply to this last week) At 11:51 AM -0800 3/16/04, chromatic wrote: Just to be sure, if Class Y inherits from Class X, is X on Y's does list? If class X does X, then yes. (I *really* should've picked better names) Classes

Re: Continuations, stacks, and whatnots

2004-03-22 Thread Piers Cawley
Dan Sugalski [EMAIL PROTECTED] writes: At 12:59 AM + 3/23/04, Piers Cawley wrote: Leopold Toetsch [EMAIL PROTECTED] writes: Dan Sugalski [EMAIL PROTECTED] wrote: ... If we go with a one frame stack chunk then we don't have to bother with COW-ing *anything* with the stack. BTW:

Safe execution core and ops classification

2004-03-22 Thread Leopold Toetsch
With the patches of Jens it's no more far away to provide a Safe run-core option. Still a lot todo, but... 1) Opcode classes perl5 hasn't really many different: perldoc Opcode | grep ' :[a-z]* - do we need base_loop? It's IMHO useless - turning off branching ops will break any non-trivival

Re: [Patch] add hints to ops files

2004-03-22 Thread Leopold Toetsch
attached is a patch to add hints to the ops files. Additionally to adding the hints it does: *.ops: - update the copyright year object.ops: - add unimplemented comment to singleton, removeattribute, adddoes, removedoes Thanks, applied. leo

Re: [PATCH] add bnots (string bitwise not) ops

2004-03-22 Thread Leopold Toetsch
Goplat [EMAIL PROTECTED] wrote: Parrot seems to be missing the bitwise-not for strings. Attached patch adds a string_bitwise_not function, bitwise_nots vtable, and bnots ops. Thanks, applied. leo

Re: Continuations, stacks, and whatnots

2004-03-22 Thread Leopold Toetsch
Piers Cawley [EMAIL PROTECTED] wrote: Dan Sugalski [EMAIL PROTECTED] writes: And what control stack? The continuation chain is the control stack, surely? Nope. There's the exception handlers, at the very least. Just add a field to the continuation structure NextExceptionHandler which points

Re: CPAN Upload: A/AB/ABERGMAN/ponie-2.tar.gz - Ponie Development Release 2

2004-03-22 Thread Steve Hay
Arthur Bergman wrote: This is Ponie, development release 2 How does one build this on Win32 with MSVC++? Running the top-level perl Configure.pl got me nowhere, so I cd'd into parrot and ran perl Configure.pl there. That ran OK, so I tried nmake next. It almost worked. The compiler

Re: CPAN Upload: A/AB/ABERGMAN/ponie-2.tar.gz - Ponie Development Release 2

2004-03-22 Thread Steve Hay
Steve Hay wrote: Arthur Bergman wrote: This is Ponie, development release 2 How does one build this on Win32 with MSVC++? Running the top-level perl Configure.pl got me nowhere, so I cd'd into parrot and ran perl Configure.pl there. That ran OK, so I tried nmake next. It almost