Re: Start of thread proposal

2004-01-21 Thread Damien Neil
On Wed, Jan 21, 2004 at 01:14:46PM -0500, Dan Sugalski wrote: > >... seems to indicate that even whole ops like add P,P,P are atomic. > > Yep. They have to be, because they need to guarantee the integrity of > the pmc structures and the data hanging off them (which includes > buffer and string s

Re: [RESEND] Q: Array vs SArray

2004-01-21 Thread Leopold Toetsch
Dan Sugalski <[EMAIL PROTECTED]> wrote: > So, lets do the classes as: > *) Array - fixed-size, mixed-type array > *) vPArray - variable-sized PMC array > *) PArray - Fixed-size PMC array > *) vSArray - variable-sized string array > *) SArray - fixed-size string array Actually I forgot one: We alr

Re: [RESEND] Q: Array vs SArray

2004-01-21 Thread Leopold Toetsch
Dan Sugalski <[EMAIL PROTECTED]> wrote: >>4) list.c > If you want to hack in on this, go ahead, though it looks like > something that we'll ultimately need--its the guts of a sparse > mixed-type array, which is useful and we may well need at some point. Actually that was the reason, I implemented

Re: Start of thread proposal

2004-01-21 Thread Leopold Toetsch
Dan Sugalski <[EMAIL PROTECTED]> wrote: [ No Guarantees WRT data access } >>... seems to indicate that even whole ops like add P,P,P are atomic. > Yep. They have to be, because they need to guarantee the integrity of > the pmc structures and the data hanging off them (which includes > buffer and

Re: [RESEND] Q: Array vs SArray

2004-01-21 Thread LF
*) Array - fixed-size, mixed-type array *) vPArray - variable-sized PMC array *) PArray - Fixed-size PMC array *) vSArray - variable-sized string array *) SArray - fixed-size string array And so on, for N and I arrays. I'm not particularly attached to the names. (Actually I think they suck, but th

Re: [RESEND] Q: Array vs SArray

2004-01-21 Thread Luke Palmer
Dan Sugalski writes: > At 9:38 AM +0100 1/21/04, Leopold Toetsch wrote: > >Dan Sugalski <[EMAIL PROTECTED]> wrote: > > > >> Okay, at this point we've a pile of different array classes > > > >> Before we go any further we need to figure out what we want. > > > >1) Unify setting/getting element count

Re: [RESEND] Q: Array vs SArray

2004-01-21 Thread Matt Fowles
All~ So, lets do the classes as: *) Array - fixed-size, mixed-type array *) vPArray - variable-sized PMC array *) PArray - Fixed-size PMC array *) vSArray - variable-sized string array *) SArray - fixed-size string array I suggest using "Array" to mean fixed size and "Vector" to mean variable si

Re: Start of thread proposal

2004-01-21 Thread Dan Sugalski
At 10:25 AM +0100 1/21/04, Leopold Toetsch wrote: Dan Sugalski <[EMAIL PROTECTED]> wrote: One more question: =head2 Guarantees ... doesn't have anything about user data integrity. So when 2 threads access a PerlNum, they could get a mixture of the typically 2 involved words. Potentially, yeah, th

Re: [RESEND] Q: Array vs SArray

2004-01-21 Thread Dan Sugalski
At 9:38 AM +0100 1/21/04, Leopold Toetsch wrote: Dan Sugalski <[EMAIL PROTECTED]> wrote: Okay, at this point we've a pile of different array classes Before we go any further we need to figure out what we want. 1) Unify setting/getting element count - the elements() vtable is unused (not acce

how to subclass dynamic PMCs?

2004-01-21 Thread Michal Wallace
Hi all, I'm hoping this is just a simple linker option, but I've been reading "ld" manuals for the past few hours and I just don't get it. :) I'm trying to make a dynamically loaded PMC that subclasses another dynamically loaded PMC. I made two files in parrot/dynclasses/ : // file 1: pisequen

Re: Memory corruption

2004-01-21 Thread Leopold Toetsch
Leopold Toetsch <[EMAIL PROTECTED]> wrote: > Steve Fink <[EMAIL PROTECTED]> wrote: >> It crashes on a memcpy inside compact_pool > Some remarks what I could find out: > - current COW copying of stacks is AFAIK borken - both "copies" of > one COWed stack share the same Buffer header I have now

Re: open issue review (easy stuff)

2004-01-21 Thread Arvindh Rajesh Tamilmani
Robert Spier wrote: >24941: [PATCH] RE: More Buffer IO Bugs (was: Strangeness when printing to file) > > patch applied. Arvindh __ Do you Yahoo!? Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes http://hotjobs.sweepstakes.yahoo.com/signingbonus

RE: [perl #25129] IO Buffer Test

2004-01-21 Thread Tamilmani, Arvindh Rajesh (Cognizant)
>This is a test for the buffer bug that >was discussed on p6i a few days ago. > >It does not remove the test file it makes >because I do not know a good way to do this. You may use teardown() defined in t/src/io.t The attached patch contains stripped down versions of your program that I used to s

Re: [DOCS] C code documentation

2004-01-21 Thread Sam Vilain
My vote goes for the simplest that will still parse; /* =head1 foo */ After all, arent't we all using editors that can highlight the scructure of our code to our satisfaction ? Surely even VIM et al can stick in dividers or something to make them stand out if the coder desires? I've already go

Re: Start of thread proposal

2004-01-21 Thread nigelsandever
21/01/2004 02:12:09, Gordon Henriksen <[EMAIL PROTECTED]> wrote: > This is false. The mark phase will still need to run over the entire > process, else it cannot detect all references into the pool. > If by reference, you mean address, then that is true. If when a reference is taken, the addres

Re: Q: Sub vs Closure lexical pads

2004-01-21 Thread Luke Palmer
Leopold Toetsch writes: > While trying to generate a small example that shows the memory > corruption problem reported by Steve, I came along these issues: > > a) [1] is .Sub, [2] is turned off >The subroutine prints main's $m - very likely wrong. Well, Subs don't do anything with pads, so I

Q: Sub vs Closure lexical pads

2004-01-21 Thread Leopold Toetsch
While trying to generate a small example that shows the memory corruption problem reported by Steve, I came along these issues: a) [1] is .Sub, [2] is turned off The subroutine prints main's $m - very likely wrong. Q: Should the Sub get a NULL scratch pad, or a new empty scratch pad stack? b)

Re: Start of thread proposal

2004-01-21 Thread Leopold Toetsch
Dan Sugalski <[EMAIL PROTECTED]> wrote: One more question: >=head2 Guarantees ... doesn't have anything about user data integrity. So when 2 threads access a PerlNum, they could get a mixture of the typically 2 involved words. But: >=item All shared PMCs must have a threadsafe vtable > The fi

[DOCS] C code documentation

2004-01-21 Thread Michael Scott
PDD 7 "Conventions and Guidelines for Parrot Source Code" has a section on "Code Comments" that has been followed for C code. I'm about to change this. The existing documentation headers will be replaced with pod headers contained within C multi-line comment delimiters. I'm going to stick to e

Re: [RESEND] Q: Array vs SArray

2004-01-21 Thread Leopold Toetsch
Dan Sugalski <[EMAIL PROTECTED]> wrote: > Okay, at this point we've a pile of different array classes > Before we go any further we need to figure out what we want. 1) Unify setting/getting element count - the elements() vtable is unused (not accessible by opcode) - we use get_integer()

Re: Start of thread proposal

2004-01-21 Thread Leopold Toetsch
[EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > I believe that parrot already has the concept of memory pools in it's > memory management. The idea is that by allocating similarly sized objects The problem is not in the fixed sized header pools, its with the *memory* pool used e.g for string memor