From 7ac3b71611d7e3e29c9a1a489c20a1c58e01328e Mon Sep 17 00:00:00 2001 From: aamine Date: Thu, 5 Sep 2002 20:00:52 +0000 Subject: * gc.c (gc_sweep): should mark parser. * parse.y (rb_gc_mark_parser): new function. * intern.h (rb_gc_mark_parser): added. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2800 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 8 ++++++++ gc.c | 2 ++ intern.h | 1 + parse.y | 8 ++++++++ 4 files changed, 19 insertions(+) diff --git a/ChangeLog b/ChangeLog index 687c42e72e..ea12004e3e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +Fri Sep 6 05:03:50 2002 Minero Aoki + + * gc.c (gc_sweep): should mark parser. + + * parse.y (rb_gc_mark_parser): new function. + + * intern.h (rb_gc_mark_parser): added. + Thu Sep 5 18:32:32 2002 Yukihiro Matsumoto * variable.c (rb_path2class): should not use rb_eval_string(). diff --git a/gc.c b/gc.c index 03c47fc836..84842b3d66 100644 --- a/gc.c +++ b/gc.c @@ -1186,6 +1186,8 @@ rb_gc() /* mark generic instance variables for special constants */ rb_mark_generic_ivar_tbl(); + + rb_gc_mark_parser(); /* gc_mark objects whose marking are not completed*/ while (!MARK_STACK_EMPTY){ diff --git a/intern.h b/intern.h index acbf33d123..84a92b3db5 100644 --- a/intern.h +++ b/intern.h @@ -292,6 +292,7 @@ ID rb_id_attrset _((ID)); void rb_parser_append_print _((void)); void rb_parser_while_loop _((int, int)); int ruby_parser_stack_on_heap _((void)); +void rb_gc_mark_parser _((void)); int rb_is_const_id _((ID)); int rb_is_instance_id _((ID)); int rb_is_class_id _((ID)); diff --git a/parse.y b/parse.y index 702252acf0..61f89072dd 100644 --- a/parse.y +++ b/parse.y @@ -5357,6 +5357,14 @@ ruby_parser_stack_on_heap() #endif } +void +rb_gc_mark_parser() +{ + if (ruby_in_compile) { + rb_gc_mark_maybe(yylval.val); + } +} + void rb_parser_append_print() { -- cgit v1.2.3