commit c1e0104d5d49ab4d4f6545f90fb4c14cb76cd7b8
Author:     Roberto E. Vargas Caballero <[email protected]>
AuthorDate: Thu May 26 15:06:17 2016 +0200
Commit:     Roberto E. Vargas Caballero <[email protected]>
CommitDate: Thu May 26 15:06:17 2016 +0200

    [cc2] Update the number of cases per switch
    
    This is a very important field because it will determinate
    which of the possible implementation will be used for the
    switch.

diff --git a/cc2/parser.c b/cc2/parser.c
index f03b9dd..292d1ce 100644
--- a/cc2/parser.c
+++ b/cc2/parser.c
@@ -337,15 +337,18 @@ static void
 waft(Node *np)
 {
        Node *p;
+       struct swtch *cur;
 
        if (swp == swtbl)
                error(EWTACKU);
-       p = swp[-1].last;
 
+       cur = swp - 1;
+       p = cur->last;
        np->next = p->next;
        np->prev = p;
        p->next = np;
-       swp[-1].last = np;
+       cur->last = np;
+       cur->nr++;
 }
 
 static void

Reply via email to