shithub: scc

Download patch

ref: 709d86f7eb083c471a8a4757c7158e0462220a13
parent: 05003b31aac6464ff4ed9af2874c1cfe19307632
author: Roberto E. Vargas Caballero <[email protected]>
date: Mon Mar 6 08:39:32 EST 2017

[cc1] Rearrange fields of struct type

There were some types that could be changed to consume less
memory and with a better memory layout.

--- a/cc1/cc1.h
+++ b/cc1/cc1.h
@@ -302,12 +302,12 @@
 
 struct type {
 	unsigned char op;           /* type builder operator */
-	char ns;                    /* namespace for struct members */
+	unsigned char ns;           /* namespace for struct members */
 	short id;                   /* type id, used in dcls */
 	char letter;                /* letter of the type */
-	unsigned int prop;          /* type properties */
-	unsigned long size;         /* sizeof the type */
+	unsigned char prop;         /* type properties */
 	unsigned char align;        /* align of the type */
+	unsigned long size;         /* sizeof the type */
 	Type *type;                 /* base type */
 	Symbol *tag;                /* symbol of the strug tag */
 	union {