shithub: scc

Download patch

ref: ab2e4ae3a9cf10339b0340865bc12aa58a90fa4f
parent: b28a0356a45b39b19116cd4f66b2a5dfd6658adf
author: Roberto E. Vargas Caballero <[email protected]>
date: Wed Sep 13 03:49:02 EDT 2017

[cc1] Improve aligment of fields in Node and Symbol

With this new order it is needed less padding bytes.

--- a/cc1/cc1.h
+++ b/cc1/cc1.h
@@ -321,14 +321,14 @@
 };
 
 struct symbol {
-	char *name;
-	Type *type;
-	unsigned short id;
 	unsigned char ctx;
 	unsigned char hide;
 	char ns;
+	unsigned short id;
+	unsigned short flags;
+	char *name;
+	Type *type;
 	unsigned char token;
-	short flags;
 	union {
 		TINT i;
 		TUINT u;
@@ -345,9 +345,9 @@
 
 struct node {
 	unsigned char op;
+	unsigned char flags;
 	Type *type;
 	Symbol *sym;
-	char flags;
 	struct node *left, *right;
 };