summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoraamine <aamine@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-09-05 20:00:52 +0000
committeraamine <aamine@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-09-05 20:00:52 +0000
commit7ac3b71611d7e3e29c9a1a489c20a1c58e01328e (patch)
treefd0c6c3d77158cc30e706e4ddafbe6b2dcca3dbb
parent49cd091cf24ba06d2cd019289815cd3f41c28d1f (diff)
* 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
-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 =