[patch] math.ops, out PMC

2003-10-29 Thread Sterling Hughes
Hey, Attached is a small patchlet, that allows the following code to execute: .pcc_sub _main prototyped .sym PerlUndef a a = new PerlUndef a = 10 + 5 print a .end And avoids having to instead do: .pcc_sub _main prototyped .sym PerlUndef a a = new P

Re: How to run typeless languages fast on parrot?

2003-11-07 Thread Sterling Hughes
> At 04:10 PM 11/5/2003 -0700, Luke Palmer wrote: > >Actually that was pretty good for an early version. You could help IMCC > >out by not creating those PerlUndefs until you're going to assign to > >them. > > Also, anytime you use a temporary to assing a constant literal, you > should be able to

Calling functions in IMCC

2003-11-07 Thread Sterling Hughes
Hey, I'm having problems figuring out how to pass parameters to a function with the current imcc. It either segfaults (in hash_str() from find_basic_blocks()) or gives me 'No entries on the UserStack', depending on how I do it wrong. :) Does anyone have a minimal example of using imcc to call

Re: Proposal: parrot-compilers list

2003-11-17 Thread Sterling Hughes
Melvin Smith wrote: In the past couple of years we've seen several sub-projects pop-up and subsequently fizzle out (maybe due to Parrot slow progress or maybe due to lack of critical mass). I propose creating 'parrot-compilers' as a general purpose list for any and all language development (until a

Re: Proposal: parrot-compilers list

2003-11-18 Thread Sterling Hughes
The reason I think parrot-compilers would be useful, is that its dedicated to helping people (like me) write compilers for parrot, whereas (in my understanding), perl6-internals@ is really about the development of the vm itself (I would subscribe to both). I see parrot-compilers@ as opening up

Re: Some PIR "How do I?" questions

2003-11-22 Thread Sterling Hughes
Dan Sugalski wrote: These could use some documenting (and yes, I know the answer to many) for future use for folks generating PIR. (Hint, hint -- documentation is a good thing) *) How do I declare an externally visible subroutine? *) How do I store a global variable *) How do I load a global vari

get_pmc_keyed() in PerlString?

2003-12-03 Thread Sterling Hughes
Hey, I'm right now looking at getting a proper implementation of array/string offsets done for the PHP compiler. Here's the problem, in PHP you can access indices of both string's an array's in the same way, meaning: Is just as valid as: To have this available easily using Perl's types, get

Re: threads and shared interpreter data structures

2003-12-21 Thread Sterling Hughes
> I'm currently investigating various issues related to internal > interpreter data structures and multiple threads. > Here is one, that need some design decision: > > Parrot_base_vtables[] (the master array of all registered vtables) is > currently a true global. This causes nice errors and seg

crash in HEAD

2004-02-04 Thread Sterling Hughes
Hey, The following PIR crashes CVS head: .sub _main $P0 = new PerlUndef .sym PerlUndef i i = new PerlUndef i = 0 L0: $I0 = 0 $P1 = new PerlUndef $P1 = 10 unless i < $P1 goto L3 $I0 = 1 L3: if $I0 goto L1 goto

Re: Optimizations for Objects

2004-03-17 Thread Sterling Hughes
That's all fine and good, and the generic method cache will help here. However... we can do better. What I'm thinking of is caching the actual found method PMC pointer in the class somewhere (hanging off the vtable or in the class' attributes or something) such that we don't actually have to *d

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

Addition to compiler_faq.pod

2004-05-14 Thread Sterling Hughes
patch attached. gist: "how do i manage a simple case of lexical pads?" cfaq.diff Description: Binary data -sterling

Re: compiler-faq

2004-05-30 Thread Sterling Hughes
Leopold Toetsch wrote: William Coleda <[EMAIL PROTECTED]> wrote: I was going to submit this as a patch, but I ended up with a conflict, and Dan threatened he wouldn't apply it anyway, so I'll just post it here for comment. Feel free to apply any or all of it. I would be very happy to hear of a be