shithub: scc

Download patch

ref: 456579a04d4747048f8a1a395fee58950c0d29d9
parent: 427c2b8aa197a491481526ed26d2650370c23975
author: Roberto E. Vargas Caballero <k0ga@shike2.com>
date: Sun Apr 20 02:41:21 EDT 2014

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.

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