RE: inline functions (was Re: [netlabs #629] [PATCH] Memory manager/garbage collector -major revision)

2002-05-31 Thread Brent Dax
Melvin Smith: # The common way is to define our own INLINE definition and # have Configure check for it, define it null if needed, and # conditionally include it into a file as extern if so. # # Sounds like a job for. BrentDax++! We already *have* an INLINE, and it's done with #ifdefs. :^

Re: [netlabs #629] [PATCH] Memory manager/garbage collector -major revision

2002-05-29 Thread Jerome Vouillon
On Tue, May 28, 2002 at 11:02:05AM -0400, [EMAIL PROTECTED] wrote: > I also agree its funny we are worrying > about performance when its not apparent > the allocation overhead even has anything > to do with the current performance problem. I don't think performance is really the issue here. Rath

Re: [netlabs #629] [PATCH] Memory manager/garbage collector -major revision

2002-05-28 Thread Robert Spier
>What are the debugging issues you mention? Note that this macro will >never fail: there is no pointer deferencing, no memory allocation, ... Never is a bad word to use for anything more complicated than x=1+2. (Which will hopefully get constant folded and optimized away anyway.) It is impossib

Re: [netlabs #629] [PATCH] Memory manager/garbage collector -major revision

2002-05-28 Thread Jerome Vouillon
On Tue, May 28, 2002 at 07:54:49AM -0700, Robert Spier wrote: > > >#define PARROT_str_local(d)\ > > STRING * d = NULL; \ > > frame frame_##d;\ > > int dummy_##d = ( \ > > (frame_##d.ptr = &d), \ > > (

Re: [netlabs #629] [PATCH] Memory manager/garbage collector -major revision

2002-05-28 Thread Jerome Vouillon
On Tue, May 28, 2002 at 03:45:58PM +0200, Jerome Vouillon wrote: > On Tue, May 28, 2002 at 08:30:52AM -0400, Mike Lambert wrote: > > PARROT_str_params_3(a, b, c); > > What's the point of this? With rule 5 that prevents function call nesting, > > you're guaranteed of all your arguments being rooted

Re: [netlabs #629] [PATCH] Memory manager/garbage collector -major revision

2002-05-28 Thread mrjoltcola
On Tue, 28 May 2002 12:50:06 +0200 Jerome Vouillon <[EMAIL PROTECTED]> wrote: >I propose the following alternate guidelines. > > > STRING * concat (STRING* a, STRING* b, STRING* c) { >PARROT_start(); >PARROT_str_params_3(a, b, c); >PARROT_str_local_2(d, e); > >d = string_concat(a

Re: [netlabs #629] [PATCH] Memory manager/garbage collector -major revision

2002-05-28 Thread Robert Spier
>#define PARROT_str_local(d)\ > STRING * d = NULL; \ > frame frame_##d;\ > int dummy_##d = ( \ > (frame_##d.ptr = &d), \ > (frame_##d.next = stack_top), \ > (stack_top = &frame_##d), \ >

Re: [netlabs #629] [PATCH] Memory manager/garbage collector -major revision

2002-05-28 Thread Jerome Vouillon
On Tue, May 28, 2002 at 08:30:52AM -0400, Mike Lambert wrote: > Can you provide an implementation of the macros you described above? I > have a few concerns which I'm not sure if they are addressed. For example: #define PARROT_start() \ frame * saved_top = stack_top; > PARROT_str_loca

Re: [netlabs #629] [PATCH] Memory manager/garbage collector -major revision

2002-05-28 Thread Jerome Vouillon
On Tue, May 28, 2002 at 04:57:01AM -0700, Brent Dax wrote: > I assume the lack of mentions of Buffers are an oversight. Right. It would be great if there was only one kind of parrot objects... > # (5) do not nest function calls > #(for instance, "e = string_concat (string_concat(a, b

RE: [netlabs #629] [PATCH] Memory manager/garbage collector -major revision

2002-05-28 Thread Brent Dax
Jerome Vouillon: # I propose the following alternate guidelines. # # First, the code would look something like this: # # STRING * concat (STRING* a, STRING* b, STRING* c) { # PARROT_start(); # PARROT_str_params_3(a, b, c); # PARROT_str_local_2(d, e); # # d = string_concat(a, b

Re: [netlabs #629] [PATCH] Memory manager/garbage collector -major revision

2002-05-28 Thread Jerome Vouillon
I propose the following alternate guidelines. First, the code would look something like this: STRING * concat (STRING* a, STRING* b, STRING* c) { PARROT_start(); PARROT_str_params_3(a, b, c); PARROT_str_local_2(d, e); d = string_concat(a, b); e = string_concat(d, c);

Re: [netlabs #629] [PATCH] Memory manager/garbage collector -major revision

2002-05-28 Thread Jerome Vouillon
On Tue, May 28, 2002 at 04:45:06AM -0400, Mike Lambert wrote: > When you call new_*_header, the neonate > flag is automatically turned on for you. As a programmer writing a > function, you explicitly turn off the neonate flag when you attach it to > the root set, or let it die on the stack. If you

Re: [netlabs #629] [PATCH] Memory manager/garbage collector - major revision

2002-05-28 Thread Jerome Vouillon
On Mon, May 27, 2002 at 04:33:07PM -, Peter Gibbs wrote: > These changes do cause a slight performance degradation, but I believe it is > worth it for the overall simplification of transparent protection of the > newborn. > Performance can only be a secondary goal, after correct behaviour. Wh

Re: [netlabs #629] [PATCH] Memory manager/garbage collector -major revision

2002-05-27 Thread Dan Sugalski
At 4:33 PM + 5/27/02, "Peter Gibbs" (via RT) wrote: >Dan's suggestion of reversing the logic of >DOD runs would work for the pure infant mortality situation (except >perhaps for the odd pathological op), but it still leaves problems >with the dependency of buffer memory collection on prior d