mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@921 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
c3262595ab
commit
6001314def
3 changed files with 15 additions and 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.
|
* stable version 1.6.0 released.
|
||||||
|
|
||||||
Thu Aug 31 14:28:39 2000 Yukihiro Matsumoto <matz@ruby-lang.org>
|
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.
|
* eval.c (scope_dup): should not make all duped scope orphan.
|
||||||
|
|
||||||
Thu Aug 31 10:11:47 2000 Yukihiro Matsumoto <matz@ruby-lang.org>
|
Thu Aug 31 10:11:47 2000 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||||
|
|
24
eval.c
24
eval.c
|
@ -805,10 +805,8 @@ static rb_thread_t curr_thread = 0;
|
||||||
if (ruby_scope != top_scope)\
|
if (ruby_scope != top_scope)\
|
||||||
rb_gc_force_recycle((VALUE)ruby_scope);\
|
rb_gc_force_recycle((VALUE)ruby_scope);\
|
||||||
} \
|
} \
|
||||||
else { \
|
|
||||||
ruby_scope->flag |= SCOPE_NOSTACK;\
|
|
||||||
} \
|
|
||||||
} \
|
} \
|
||||||
|
ruby_scope->flag |= SCOPE_NOSTACK; \
|
||||||
ruby_scope = _old; \
|
ruby_scope = _old; \
|
||||||
scope_vmode = _vmode; \
|
scope_vmode = _vmode; \
|
||||||
}
|
}
|
||||||
|
@ -5687,17 +5685,17 @@ scope_dup(scope)
|
||||||
ID *tbl;
|
ID *tbl;
|
||||||
VALUE *vars;
|
VALUE *vars;
|
||||||
|
|
||||||
scope->flag |= SCOPE_DONT_RECYCLE;
|
if (!(scope->flag & SCOPE_MALLOC)) {
|
||||||
if (scope->flag & SCOPE_MALLOC) return;
|
if (scope->local_tbl) {
|
||||||
|
tbl = scope->local_tbl;
|
||||||
if (scope->local_tbl) {
|
vars = ALLOC_N(VALUE, tbl[0]+1);
|
||||||
tbl = scope->local_tbl;
|
*vars++ = scope->local_vars[-1];
|
||||||
vars = ALLOC_N(VALUE, tbl[0]+1);
|
MEMCPY(vars, scope->local_vars, VALUE, tbl[0]);
|
||||||
*vars++ = scope->local_vars[-1];
|
scope->local_vars = vars;
|
||||||
MEMCPY(vars, scope->local_vars, VALUE, tbl[0]);
|
scope->flag = SCOPE_MALLOC;
|
||||||
scope->local_vars = vars;
|
}
|
||||||
scope->flag = SCOPE_MALLOC;
|
|
||||||
}
|
}
|
||||||
|
scope->flag |= SCOPE_DONT_RECYCLE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
2
gc.c
2
gc.c
|
@ -621,7 +621,7 @@ rb_gc_mark(ptr)
|
||||||
|
|
||||||
case T_SCOPE:
|
case T_SCOPE:
|
||||||
if (obj->as.scope.local_vars &&
|
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;
|
int n = obj->as.scope.local_tbl[0]+1;
|
||||||
VALUE *vars = &obj->as.scope.local_vars[-1];
|
VALUE *vars = &obj->as.scope.local_vars[-1];
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue