diff options
author | Yukihiro Matsumoto <[email protected]> | 1994-10-14 06:19:03 +0900 |
---|---|---|
committer | Takashi Kokubun <[email protected]> | 2019-08-17 22:09:30 +0900 |
commit | 29f237a8b1df650089b54447f070726c75706b6f (patch) | |
tree | e6ee836a39a5f2f1d433d6532de32471b655fb6d /gc.c | |
parent | 173976c97c9426aa8d96e53aef6c0e570c5fdfda (diff) |
version 0.54v0_54
https://cache.ruby-lang.org/pub/ruby/1.0/ruby-0.54.tar.gz
Diffstat (limited to 'gc.c')
-rw-r--r-- | gc.c | 13 |
1 files changed, 9 insertions, 4 deletions
@@ -164,7 +164,7 @@ rb_global_variable(var) struct RVALUE { union { struct { - int flag; /* alway 0 for freed obj */ + UINT flag; /* alway 0 for freed obj */ struct RVALUE *next; } free; struct RObject object; @@ -505,7 +505,7 @@ freemethod(key, body) ID key; void *body; { - method_free(body); + freenode(body); return ST_CONTINUE; } @@ -570,6 +570,7 @@ gc() struct literal_list *lit; struct gc_list *list; struct ENVIRON *env; + struct SCOPE *scope; int i, max; jmp_buf save_regs_gc_mark; VALUE stack_end; @@ -582,8 +583,12 @@ gc() gc_mark(env->self); if (env->argv) mark_locations_array(env->argv, env->argc); - if (env->local_vars) - mark_locations_array(env->local_vars, env->local_tbl[0]); + } + + /* mark scope stack */ + for (scope = the_scope; scope; scope = scope->prev) { + if (scope->local_vars) + mark_locations_array(scope->local_vars, scope->local_tbl[0]); } FLUSH_REGISTER_WINDOWS; |