[#5218] Ruby Book Eng tl, ch1 question — Jon Babcock <jon@...>

13 messages 2000/10/02

[#5404] Object.foo, setters and so on — "Hal E. Fulton" <hal9000@...>

OK, here is what I think I know.

14 messages 2000/10/11

[#5425] Ruby Book Eng. tl, 9.8.11 -- seishitsu ? — Jon Babcock <jon@...>

18 messages 2000/10/11
[#5427] RE: Ruby Book Eng. tl, 9.8.11 -- seishitsu ? — OZAWA -Crouton- Sakuro <crouton@...> 2000/10/11

At Thu, 12 Oct 2000 03:49:46 +0900,

[#5429] Re: Ruby Book Eng. tl, 9.8.11 -- seishitsu ? — Jon Babcock <jon@...> 2000/10/11

Thanks for the input.

[#5432] Re: Ruby Book Eng. tl, 9.8.11 -- seishitsu ? — Yasushi Shoji <yashi@...> 2000/10/11

At Thu, 12 Oct 2000 04:53:41 +0900,

[#5516] Re: Some newbye question — ts <decoux@...>

>>>>> "D" == Davide Marchignoli <marchign@di.unipi.it> writes:

80 messages 2000/10/13
[#5531] Re: Some newbye question — matz@... (Yukihiro Matsumoto) 2000/10/14

Hi,

[#5544] Re: Some newbye question — Davide Marchignoli <marchign@...> 2000/10/15

On Sat, 14 Oct 2000, Yukihiro Matsumoto wrote:

[#5576] Re: local variables (nested, in-block, parameters, etc.) — Dave Thomas <Dave@...> 2000/10/16

matz@zetabits.com (Yukihiro Matsumoto) writes:

[#5617] Re: local variables (nested, in-block, parameters, etc.) — "Brian F. Feldman" <green@...> 2000/10/16

Dave Thomas <Dave@thomases.com> wrote:

[#5705] Dynamic languages, SWOT ? — Hugh Sasse Staff Elec Eng <hgs@...>

There has been discussion on this list/group from time to time about

16 messages 2000/10/20
[#5712] Re: Dynamic languages, SWOT ? — Charles Hixson <charleshixsn@...> 2000/10/20

Hugh Sasse Staff Elec Eng wrote:

[#5882] [RFC] Towards a new synchronisation primitive — hipster <hipster@...4all.nl>

Hello fellow rubyists,

21 messages 2000/10/26

[ruby-talk:5327] Re: Ruby 1.6.1 config+widget problems.

From: ts <decoux@...>
Date: 2000-10-08 11:53:05 UTC
List: ruby-talk #5327
>>>>> "s" == schneik  <schneik@us.ibm.com> writes:

s> malloc.realloc(??, ??) at 0xd016e830
s> ruby_xrealloc(0x2ff17d90, 0x28), line 117 in "gc.c"
s> unnamed block $b400, line 4623 in "parse.y"
s> top_local_setup(), line 4623 in "parse.y"

 Try this patch. It call scope_dup (which transform a SCOPE_ALLOCA in a
 SCOPE_MALLOC) rather than just setting the flag SCOPE_DONT_RECYCLE

pigeon% diff -u eval.c~ eval.c
--- eval.c~     Wed Sep 27 05:43:12 2000
+++ eval.c      Sun Oct  8 13:20:26 2000
@@ -796,10 +796,12 @@
 
 typedef struct thread * rb_thread_t;
 static rb_thread_t curr_thread = 0;
+static void scope_dup(struct SCOPE *);
 
 #define POP_SCOPE()                    \
     if (ruby_scope->flag & SCOPE_DONT_RECYCLE) {\
-       if (_old) _old->flag |= SCOPE_DONT_RECYCLE;\
+       if (_old)\
+           scope_dup(_old);\
     }                                  \
     if (!(ruby_scope->flag & SCOPE_MALLOC)) {\
        ruby_scope->local_vars = 0;     \
@@ -1259,7 +1261,7 @@
     }
 
     if (ruby_scope->flag & SCOPE_DONT_RECYCLE)
-       saved_scope->flag |= SCOPE_DONT_RECYCLE;
+       scope_dup(saved_scope);
     ruby_scope = saved_scope;
     ruby_safe_level = safe;
     POP_TAG();
@@ -3499,7 +3501,7 @@
     ruby_block = block;
     ruby_frame = ruby_frame->prev;
     if (ruby_scope->flag & SCOPE_DONT_RECYCLE)
-       old_scope->flag |= SCOPE_DONT_RECYCLE;
+       scope_dup(old_scope);
     ruby_scope = old_scope;
     if (state) JUMP_TAG(state);
     return result;
@@ -4650,7 +4652,7 @@
     if (!NIL_P(scope)) {
        ruby_frame = frame.tmp;
        if (ruby_scope->flag & SCOPE_DONT_RECYCLE)
-           old_scope->flag |= SCOPE_DONT_RECYCLE;
+           scope_dup(old_scope);
        ruby_scope = old_scope;
        ruby_block = old_block;
        ruby_dyna_vars = old_d_vars;
@@ -8178,7 +8180,7 @@
     cont = Data_Wrap_Struct(rb_cCont, thread_mark,
                                         thread_free, th);
 
-    ruby_scope->flag |= SCOPE_DONT_RECYCLE;
+    scope_dup(ruby_scope);
     for (tag=prot_tag; tag; tag=tag->prev) {
        scope_dup(tag->scope);
     }
pigeon% 



Guy Decoux

In This Thread

Prev Next