]> git.unchartedbackwaters.co.uk Git - francis/libjit.git/commitdiff
don't define undefined labels for dump
authorAleksey Demakov <ademakov@gmail.com>
Mon, 22 Dec 2008 18:49:46 +0000 (18:49 +0000)
committerAleksey Demakov <ademakov@gmail.com>
Mon, 22 Dec 2008 18:49:46 +0000 (18:49 +0000)
ChangeLog
jit/jit-dump.c

index a2b66e9995c3817e840996e1f485d8b740185e59..a4081981b19c1bb175d55b9f67a7824f88b803be 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2008-12-21  Aleksey Demakov  <ademakov@gmail.com>
+
+       * jit/jit-dump.c (jit_dump_function): dump undefined labels as such
+       rather than generating new labels for them.
+
 2008-12-12  Aleksey Demakov  <ademakov@gmail.com>
 
        * jitruby/*: add Paul Brannan's ruby-libjit.
index b67b25b77a5f93277f6162098389b5a000ccd21b..be8af1fe5025c00b30146509a501d24f4bdc0431 100644 (file)
@@ -846,18 +846,15 @@ void jit_dump_function(FILE *stream, jit_function_t func, const char *name)
                while((block = jit_block_next(func, block)) != 0)
                {
                        /* Output the block's label, if it has one */
-                       if(prev_block && block->label == jit_label_undefined)
-                       {
-                               /* A new block was started, but it doesn't have a label yet */
-                               if(_jit_block_get_last(block) != 0)
-                               {
-                                       block->label = (func->builder->next_label)++;
-                               }
-                       }
                        if(block->label != jit_label_undefined)
                        {
                                fprintf(stream, ".L%ld:\n", (long)(block->label));
                        }
+                       else if (prev_block && _jit_block_get_last(block) != 0)
+                       {
+                               /* A new block was started, but it doesn't have a label yet */
+                               fprintf(stream, ".L:\n");
+                       }
                        prev_block = 1;
 
                        /* Dump the instructions in the block */