2 ===================================================================
3 --- parse.y (revision 6446)
4 +++ parse.y (working copy)
18 ===================================================================
19 --- parse.c (revision 6446)
20 +++ parse.c (working copy)
21 @@ -11157,6 +11157,11 @@
34 ===================================================================
35 --- gc.c (revision 6446)
36 +++ gc.c (working copy)
44 rb_global_variable(var)
47 struct RVarmap varmap;
56 #if defined(_MSC_VER) || defined(__BORLANDC__) || defined(__CYGWIN__)
58 static int heaps_length = 0;
59 static int heaps_used = 0;
73 +rb_gc_heaps_length() {
74 + return heaps_length;
77 #define HEAP_MIN_SLOTS 10000
78 static int heap_slots = HEAP_MIN_SLOTS;
82 obj = (VALUE)freelist;
83 freelist = freelist->as.free.next;
84 - MEMZERO((void*)obj, RVALUE, 1);
86 - RANY(obj)->file = ruby_sourcefile;
87 - RANY(obj)->line = ruby_sourceline;
90 + MEMZERO((void*)obj, RVALUE, 1);
92 + if (ruby_current_node && ruby_current_node->nd_file) {
93 + RANY(obj)->file = ruby_current_node->nd_file;
94 + RANY(obj)->line = nd_line(ruby_current_node);
101 if (rb_special_const_p(ptr)) return; /* special const not marked */
102 if (obj->as.basic.flags == 0) return; /* free cell */
103 if (obj->as.basic.flags & FL_MARK) return; /* already marked */
105 obj->as.basic.flags |= FL_MARK;
106 + /* mark our new reference point for sourcefile objects */
107 + mark_source_filename(RANY(obj)->file);
109 if (lev > GC_LEVEL_MAX || (lev == 0 && ruby_stack_check())) {
110 if (!mark_stack_overflow) {