Skip to content
  •'s avatar
    Stack overflow crash in JavaScript garbage collector mark pass · 5fca29f7 authored
    Reviewed by Gavin Barraclough and Sam Weinig
    Make the GC mark phase iterative by using an explicit mark stack.
    To do this marking any single object is performed in multiple stages
      * The object is appended to the MarkStack, this sets the marked
        bit for the object using the new markDirect() function, and then
      * When the MarkStack is drain()ed the object is popped off the stack
        and markChildren(MarkStack&) is called on the object to collect
        all of its children.  drain() then repeats until the stack is empty.
    Additionally I renamed a number of methods from 'mark' to 'markAggregate'
    in order to make it more clear that marking of those object was not
    going to result in an actual recursive mark.
    git-svn-id: 268f45cc-cd09-0410-ab3c-d52691b4dbfc