1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@921 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
matz 2000-08-31 09:08:14 +00:00
parent c3262595ab
commit 6001314def
3 changed files with 15 additions and 15 deletions

View file

@ -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>

24
eval.c
View file

@ -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

2
gc.c
View file

@ -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];