diff options
| author | Graydon Hoare <[email protected]> | 2010-06-25 19:56:29 -0700 |
|---|---|---|
| committer | Graydon Hoare <[email protected]> | 2010-06-25 19:56:29 -0700 |
| commit | 968ec145278d3d6562e4b5ec4006af97dc0da563 (patch) | |
| tree | a2421d2a91a5d6b79d7e83d58d051d375c2b077a /src/boot/me | |
| parent | Fix over-conservatism in alias analysis. (diff) | |
| download | rust-968ec145278d3d6562e4b5ec4006af97dc0da563.tar.xz rust-968ec145278d3d6562e4b5ec4006af97dc0da563.zip | |
Fix marking logic.
Diffstat (limited to 'src/boot/me')
| -rw-r--r-- | src/boot/me/trans.ml | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/boot/me/trans.ml b/src/boot/me/trans.ml index a00f0b25..a8b74fcf 100644 --- a/src/boot/me/trans.ml +++ b/src/boot/me/trans.ml @@ -2639,13 +2639,15 @@ let trans_visitor (* if this has been marked already, jump to exit.*) note_gc_step slot "mark GC slot: check for mark:"; emit (Il.binary Il.AND tmp (Il.Cell gc_word) one); - let already_marked_jump = mark () in - emit (Il.jmp Il.JZ Il.CodeNone); + trace_word cx.ctxt_sess.Session.sess_trace_gc tmp; + + let already_marked_jump = + trans_compare Il.JNE (Il.Cell tmp) zero; + in (* Set mark bit in allocation header. *) - note_gc_step slot "mark GC slot: mark:"; emit (Il.binary Il.OR gc_word (Il.Cell gc_word) one); + note_gc_step slot "mark GC slot: set mark"; (* Iterate over exterior slots marking outgoing links. *) - log cx "slot rty: %s" (cell_str cell); let (body_mem, _) = need_mem_cell (get_element_ptr (deref cell) @@ -2658,7 +2660,7 @@ let trans_visitor (get_mark_glue ty curr_iso) ty_params tmp; patch null_cell_jump; - patch already_marked_jump; + List.iter patch already_marked_jump; note_gc_step slot "mark GC slot: done marking:"; | MEM_interior when type_is_structured ty -> |