summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog8
-rw-r--r--gc.c2
-rw-r--r--intern.h1
-rw-r--r--parse.y8
4 files changed, 19 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 687c42e..ea12004 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+Fri Sep 6 05:03:50 2002 Minero Aoki <aamine@loveruby.net>
+
+ * 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 <matz@ruby-lang.org>
* variable.c (rb_path2class): should not use rb_eval_string().
diff --git a/gc.c b/gc.c
index 03c47fc..84842b3 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 acbf33d..84a92b3 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 702252a..61f8907 100644
--- a/parse.y
+++ b/parse.y
@@ -5358,6 +5358,14 @@ ruby_parser_stack_on_heap()
}
void
+rb_gc_mark_parser()
+{
+ if (ruby_in_compile) {
+ rb_gc_mark_maybe(yylval.val);
+ }
+}
+
+void
rb_parser_append_print()
{
ruby_eval_tree =