Skip to content

Commit

Permalink
GC marking cleanup
Browse files Browse the repository at this point in the history
* Clean up pointer cast in `push_root`

    Only check `jl_is_datatype` once on the tag.

* Rename `push_root` to avoid confusion with `gc_push_root`

    Also pass the whole tag in to reduce the number of load on the tag.

* Atomically check and set gc bits

    This makes sure we won't overcount with parallel marking.
    Note that the setmark is still not threadsafe due to global metadata update.

* `gc_setmark` overhaul

    * Add fast path to do nothing if the object was already marked
    * Return whether the object's gc bits are changed or not
    * Use this info to replace the custom logic for arrays

* Separate marking and scanning of the object

    Make sure in `gc_mark_obj` that the object will only be scanned once.
  • Loading branch information
yuyichao committed Jan 10, 2017
1 parent f864b22 commit 97066b4
Show file tree
Hide file tree
Showing 4 changed files with 190 additions and 141 deletions.
Loading

0 comments on commit 97066b4

Please sign in to comment.