scc

simple c99 compiler
git clone git://git.simple-cc.org/scc
Log | Files | Refs | Submodules | README | LICENSE

commit 456579a04d4747048f8a1a395fee58950c0d29d9
parent 427c2b8aa197a491481526ed26d2650370c23975
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date:   Sun, 20 Apr 2014 06:41:21 +0200

Add unqualified type op to Node

This small modificacions is going to make more clear the code
because it saves a lot of UNQUAL calls.

Diffstat:
Mcc1.h | 2++
Mcode.c | 2++
2 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/cc1.h b/cc1.h @@ -174,6 +174,8 @@ extern void expect(uint8_t tok); typedef struct node { void (*code)(struct node *); Type *type; + Type *utype; + uint8_t typeop; struct { bool lvalue : 1; } b; diff --git a/code.c b/code.c @@ -54,6 +54,8 @@ node(Inst code, Type *tp, union unode u, uint8_t nchilds) np->code = code; np->type = tp; + np->utype = UNQUAL(tp); + np->typeop = np->utype->op; np->u = u; np->b.lvalue = 0;