diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2000-08-31 09:08:14 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2000-08-31 09:08:14 +0000 |
commit | 6001314def338002ae1dc50bcf120805bee78a44 (patch) | |
tree | f005d9bc7449c28452d80a6fc624b05a8d6af740 | |
parent | c3262595ab9267240495be797e55e610122032f2 (diff) | |
download | ruby-6001314def338002ae1dc50bcf120805bee78a44.tar.gz |
matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@921 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | eval.c | 24 | ||||
-rw-r--r-- | gc.c | 2 |
3 files changed, 15 insertions, 15 deletions
@@ -1,9 +1,11 @@ -Thu Aug 31 17:06:09 2000 Yukihiro Matsumoto <matz@ruby-lang.org> +Thu Aug 31 18:07:14 2000 Yukihiro Matsumoto <matz@ruby-lang.org> * stable version 1.6.0 released. Thu Aug 31 14:28:39 2000 Yukihiro Matsumoto <matz@ruby-lang.org> + * gc.c (rb_gc_mark): T_SCOPE condition must be more precise. + * eval.c (scope_dup): should not make all duped scope orphan. Thu Aug 31 10:11:47 2000 Yukihiro Matsumoto <matz@ruby-lang.org> @@ -805,10 +805,8 @@ static rb_thread_t curr_thread = 0; if (ruby_scope != top_scope)\ rb_gc_force_recycle((VALUE)ruby_scope);\ } \ - else { \ - ruby_scope->flag |= SCOPE_NOSTACK;\ - } \ } \ + ruby_scope->flag |= SCOPE_NOSTACK; \ ruby_scope = _old; \ scope_vmode = _vmode; \ } @@ -5687,17 +5685,17 @@ scope_dup(scope) ID *tbl; VALUE *vars; - scope->flag |= SCOPE_DONT_RECYCLE; - if (scope->flag & SCOPE_MALLOC) return; - - if (scope->local_tbl) { - tbl = scope->local_tbl; - vars = ALLOC_N(VALUE, tbl[0]+1); - *vars++ = scope->local_vars[-1]; - MEMCPY(vars, scope->local_vars, VALUE, tbl[0]); - scope->local_vars = vars; - scope->flag = SCOPE_MALLOC; + if (!(scope->flag & SCOPE_MALLOC)) { + if (scope->local_tbl) { + tbl = scope->local_tbl; + vars = ALLOC_N(VALUE, tbl[0]+1); + *vars++ = scope->local_vars[-1]; + MEMCPY(vars, scope->local_vars, VALUE, tbl[0]); + scope->local_vars = vars; + scope->flag = SCOPE_MALLOC; + } } + scope->flag |= SCOPE_DONT_RECYCLE; } static void @@ -621,7 +621,7 @@ rb_gc_mark(ptr) case T_SCOPE: if (obj->as.scope.local_vars && - obj->as.scope.flag != SCOPE_ALLOCA) { + (obj->as.scope.flag & SCOPE_MALLOC) != 0) { int n = obj->as.scope.local_tbl[0]+1; VALUE *vars = &obj->as.scope.local_vars[-1]; |