/home/travis/build/MoarVM/MoarVM/src/gc/wb.c
Line | Count | Source |
1 | | #include <moar.h> |
2 | | |
3 | | /* Called when the write barrier macro detects we need to trigger |
4 | | * the write barrier. Arguments are the same as to the barrier macro |
5 | | * itself (updating is the object that we're about to write a pointer |
6 | | * into, and referenced is the object that the pointer references). |
7 | | * This barrier forces a re-scan of the object's contents during a GC |
8 | | * run - even a nursery only one - since somewhere it has references |
9 | | * to a nursery object. */ |
10 | 11.9M | void MVM_gc_write_barrier_hit(MVMThreadContext *tc, MVMCollectable *update_root) { |
11 | 11.9M | if (!(update_root->flags & MVM_CF_IN_GEN2_ROOT_LIST)) |
12 | 954k | MVM_gc_root_gen2_add(tc, update_root); |
13 | 11.9M | } |