[hackers] [scc] [cc2-qbe] Do not emit local types || Roberto E. Vargas Caballero

From: <git_AT_suckless.org>
Date: Thu, 2 Jun 2016 17:30:20 +0200 (CEST)

commit cc2f2844edf910cc11eb0e51ddb47b641dbd2315
Author: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
AuthorDate: Thu Jun 2 17:26:19 2016 +0200
Commit: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
CommitDate: Thu Jun 2 17:26:19 2016 +0200

    [cc2-qbe] Do not emit local types
    
    Local types are represented by local symbols,
    and in writeout we were writing all the local
    symbols that we had, including the types.
    Types has no kind (or class storage), so we can
    detect them checking that we have some kind in
    the symbol.

diff --git a/cc2/arch/qbe/code.c b/cc2/arch/qbe/code.c
index 5ec388e..4d3660d 100644
--- a/cc2/arch/qbe/code.c
+++ b/cc2/arch/qbe/code.c
_AT_@ -328,7 +328,7 @@ writeout(void)
 
         /* allocate stack space for local variables) */
         for ( ; p && p->id != TMPSYM; p = p->next) {
- if (p->kind != SLABEL)
+ if (p->kind && p->kind != SLABEL)
                         alloc(p);
         }
         /* store formal parameters in parameters */
Received on Thu Jun 02 2016 - 17:30:20 CEST

This archive was generated by hypermail 2.3.0 : Thu Jun 02 2016 - 17:36:14 CEST