summaryrefslogtreecommitdiff
path: root/gc.c
diff options
context:
space:
mode:
authoraamine <aamine@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-09-02 12:19:30 +0000
committeraamine <aamine@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-09-02 12:19:30 +0000
commit10c4364287e67e8d74d28f90c72b667aa8d8be3b (patch)
treee76417887fb3e3fe98f895eac82cfbd1ff060953 /gc.c
parentd92e76de6451d13ae4d22be61f3a9e21bebfa775 (diff)
* gc.c (gc_sweep): does reclaim nodes in also compile time, if we can.
* ruby.c (load_file): omit GC if we can. * parse.y (ruby_parser_stack_on_heap): new function. * intern.h (ruby_parser_stack_on_heap): added. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2780 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'gc.c')
-rw-r--r--gc.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/gc.c b/gc.c
index 1503d42..e5ecea7 100644
--- a/gc.c
+++ b/gc.c
@@ -863,8 +863,9 @@ gc_sweep()
int freed = 0;
int i, used = heaps_used;
- if (ruby_in_compile) {
- /* should not reclaim nodes during compilation */
+ if (ruby_in_compile && ruby_parser_stack_on_heap()) {
+ /* should not reclaim nodes during compilation
+ if yacc's semantic stack is not allocated on machine stack */
for (i = 0; i < used; i++) {
p = heaps[i]; pend = p + heaps_limits[i];
while (p < pend) {