wingo pushed a commit to branch lightning
in repository guile.

commit a264ccee75ad507330384257ee5be2718856926d
Author: pcpa <[email protected]>
Date:   Wed Oct 16 01:13:46 2013 -0300

    Add assertion to detect double patching.
    
      This triggers the bug at the right point, otherwise, double patching
    may be quite hard to track.
---
 lib/lightning.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/lightning.c b/lib/lightning.c
index 635a201..ebc76c1 100644
--- a/lib/lightning.c
+++ b/lib/lightning.c
@@ -1367,6 +1367,7 @@ _jit_patch_at(jit_state_t *_jit, jit_node_t *instr, 
jit_node_t *label)
 {
     jit_int32_t                mask;
 
+    assert(!(instr->flag & jit_flag_node));
     instr->flag |= jit_flag_node;
     switch (instr->code) {
        case jit_code_movi:

Reply via email to