RE: New assembler ready for testing

2002-03-15 Thread Brent Dax
Simon Cozens: # Simon Glover: # > call.pasm: it has problems with things like [D - @ - 3] # in the macros # # No macros any more. See the assembler PDD. # # > fact.pasm, local_label.pasm: it doesn't handle local # labels like $ok # # No local labels either. # # > mops_p.pasm, pmcmops.pasm:

Re: New assembler ready for testing

2002-03-15 Thread Simon Cozens
Simon Glover: > call.pasm: it has problems with things like [D - @ - 3] in the macros No macros any more. See the assembler PDD. > fact.pasm, local_label.pasm: it doesn't handle local labels like $ok No local labels either. > mops_p.pasm, pmcmops.pasm: it doesn't understand PerlInt (or

Re: PMC for Lexical-Scoping Variable Frames

2002-03-15 Thread Shlomi Fish
On Fri, 15 Mar 2002, Dan Sugalski wrote: > At 12:42 PM +0200 3/15/02, Shlomi Fish wrote: > >Does this correspond with the general Parrot philosophy? Any > >other objections? > > Did you look at PDD 6? Most of this is already spec'd out. > You mean "PDD 6: Parrot Assembly Language"? Do you imply

Re: New assembler ready for tasting

2002-03-15 Thread Melvin Smith
After installing Text::Balanced on my trusty 561 [msmith@linux parrot]$ time perl newasm examples/assembly/mops.pasm > mops.pbc Using /home/msmith/parrot/blib real0m0.564s user0m0.520s sys 0m0.050s [msmith@linux parrot]$ time perl assemble.pl examples/assembly/mops.pasm > mops.p

Re: New assembler ready for testing

2002-03-15 Thread Simon Glover
On Fri, 15 Mar 2002, Simon Glover wrote: > > stack.pasm: it can't handle the expanded opcode names like set_i_ic > This actually seems to be quite easy to fix - we just return early from expand_op is the opcode is already in expanded form. Patch again newasm attached. Simon --- newasm.o

Re: New assembler ready for testing

2002-03-15 Thread Simon Glover
OK, I've finished trying it out on all of the files in examples/assembly. Most of them assemble and run fine. The ones that don't are: call.pasm: it has problems with things like [D - @ - 3] in the macros fact.pasm, local_label.pasm: it doesn't handle local labels like $ok stack.pasm

Re: Request for help in stack processing

2002-03-15 Thread Dan Sugalski
At 4:52 PM -0500 3/15/02, Clinton A. Pierce wrote: >At 04:28 PM 3/15/2002 -0500, Dan Sugalski wrote: >>At 4:01 PM -0500 3/15/02, Clinton A. Pierce wrote: >>>I'm in the midst of writing some routines to debug pasm code, and >>>one of the things I dearly want is a "stack dump" routine. I can >>>*

Re: New assembler ready for tasting

2002-03-15 Thread Simon Cozens
Simon Glover: > With a proper fresh checkout, everything builds OK here, but I've run > into another problem: Parrot::Assembler:Utils uses Text::Balanced, but > that's not a core module in 5.6.x and earlier. Weren't we trying to > stay compatible with Perl's back to 5.5.3 ? Yep. This wasn't

Re: New assembler ready for tasting

2002-03-15 Thread Simon Glover
On Fri, 15 Mar 2002, Simon Cozens wrote: > You didn't resync. I just updated packout.c to take this function out. > There's a reason step 1 included CVS updating. :) Yep, just figured that out for myself - I rsync'd, rather than doing a cvs checkout, and not realizing it doesn't do quite the

Re: New assembler ready for tasting

2002-03-15 Thread Simon Cozens
Simon Glover: > This step spews a load of warnings of the form: Did you resync? I swear I updated packfile.h to put these back in. > ... and here make just dies with the message: You didn't resync. I just updated packout.c to take this function out. There's a reason step 1 included CVS updati

Re: New assembler ready for tasting

2002-03-15 Thread Simon Glover
On Fri, 15 Mar 2002, Simon Cozens wrote: > Here's how to play with it: > > 1) CVS update and build Parrot > 2) "make packout.o" This step spews a load of warnings of the form: packout.c:22: warning: no previous prototype for `PackFile_pack_size' packout.c: In function `PackFile_pack

New assembler ready for tasting

2002-03-15 Thread Simon Cozens
This is very rough, since we haven't worked out a great way to integrate XS and Parrot. But you can try it. It's nice and small: % wc -l newasm Packfile.xs Packfile.pm Makefile.PL lib/Parrot/Assembler/Utils.pm 188 newasm 94 Packfile.xs 108 Packfile.pm 12 Makefile.PL 46 li

Re: Request for help in stack processing

2002-03-15 Thread Clinton A. Pierce
At 04:28 PM 3/15/2002 -0500, Dan Sugalski wrote: >At 4:01 PM -0500 3/15/02, Clinton A. Pierce wrote: >>I'm in the midst of writing some routines to debug pasm code, and one of >>the things I dearly want is a "stack dump" routine. I can *almost* code >>this in pasm, except I'm missing one last c

Re: Request for help in stack processing

2002-03-15 Thread Dan Sugalski
At 4:01 PM -0500 3/15/02, Clinton A. Pierce wrote: >I'm in the midst of writing some routines to debug pasm code, and >one of the things I dearly want is a "stack dump" routine. I can >*almost* code this in pasm, except I'm missing one last component: a >way to tell the depth of the stack with

Re: GC and allocation controls?

2002-03-15 Thread Dan Sugalski
At 2:59 PM -0600 3/15/02, David M. Lloyd wrote: >On Fri, 15 Mar 2002, Nicholas Clark wrote: > >> On Fri, Mar 15, 2002 at 03:42:50PM -0500, Dan Sugalski wrote: >> >> > >> On Fri, 15 Mar 2002, Tim Bunce wrote: >> > >> > Might be good to also provide "higher level" controls that just >> > >> >

Request for help in stack processing

2002-03-15 Thread Clinton A. Pierce
I'm in the midst of writing some routines to debug pasm code, and one of the things I dearly want is a "stack dump" routine. I can *almost* code this in pasm, except I'm missing one last component: a way to tell the depth of the stack without causing the runtime to bail. Any of the following

Re: GC and allocation controls?

2002-03-15 Thread Dave Mitchell
On Fri, Mar 15, 2002 at 08:50:47PM +, Nicholas Clark wrote: > On Fri, Mar 15, 2002 at 03:42:50PM -0500, Dan Sugalski wrote: > > > >> On Fri, 15 Mar 2002, Tim Bunce wrote: > > >> > Might be good to also provide "higher level" controls that just > > >> > provide hints to the GC. Somewhat lik

Re: GC and allocation controls?

2002-03-15 Thread David M. Lloyd
On Fri, 15 Mar 2002, Nicholas Clark wrote: > On Fri, Mar 15, 2002 at 03:42:50PM -0500, Dan Sugalski wrote: > > > >> On Fri, 15 Mar 2002, Tim Bunce wrote: > > >> > Might be good to also provide "higher level" controls that just > > >> > provide hints to the GC. Somewhat like the "use less qw(me

Re: GC and allocation controls?

2002-03-15 Thread Dan Sugalski
At 7:42 PM + 3/15/02, Nicholas Clark wrote: >On Fri, Mar 15, 2002 at 12:58:19AM +, Alex Gough wrote: >> On Fri, 15 Mar 2002, Tim Bunce wrote: >> > Might be good to also provide "higher level" controls that just >> > provide hints to the GC. Somewhat like the "use less qw(memory);" >> >

Re: GC and allocation controls?

2002-03-15 Thread Nicholas Clark
On Fri, Mar 15, 2002 at 12:58:19AM +, Alex Gough wrote: > On Fri, 15 Mar 2002, Tim Bunce wrote: > > Might be good to also provide "higher level" controls that just > > provide hints to the GC. Somewhat like the "use less qw(memory);" > > pragma that never quite happened for perl5, but with mor

Changes to PMC vtable

2002-03-15 Thread Dan Sugalski
Okay, here's the scoop. All the GC related vtable stuff? Tossed. We now have exactly two entries. mark: Called if the PMC has the PMC_custom_mark_FLAG set. Assumed to mark all the buffers and PMCs this PMC contains collect: Called if the PMC has the PMC_private_GC_FLAG set. Any memory allocat

Re: PMC for Lexical-Scoping Variable Frames

2002-03-15 Thread Dan Sugalski
At 12:42 PM +0200 3/15/02, Shlomi Fish wrote: >Does this correspond with the general Parrot philosophy? Any >other objections? Did you look at PDD 6? Most of this is already spec'd out. -- Dan --"it's like this"---

PMC for Lexical-Scoping Variable Frames

2002-03-15 Thread Shlomi Fish
Many of the languages (if not most) that are planned to be implemented above Parrot are lexically-scoped. The methodology to implement such behaviour on top of an otherwise non-LS VM was described by Abelson and Sussman in the book "Structure and Interpretation of Computer Programs": http://mitp

Re: String replacement

2002-03-15 Thread Simon Cozens
Melvin Smith: > Anyone planning on hacking up a string replace op anytime soon > for assigning into a string? Ideally, substr S1, S2, I1, I2, S3 > Or is the plan to do this with keyed access? I hadn't thought of using keys on strings; probably not a great idea. -- Heh, heh, heh, heh... the NO