shithub: scc

Download patch

ref: dd645ca9e70c446ad5e785a882ff43ac0c1868d0
parent: 6b19e590b87ade3cb94f1e336c894f039ad4a8e0
author: Roberto E. Vargas Caballero <k0ga@shike2.com>
date: Wed Aug 17 09:19:19 EDT 2016

[cc2-qbe] Move calls to tmpnode() to the call to code()

This makes the code more consice and it avoids to have
non sequential identifiers for temporary variables.

--- a/cc2/arch/qbe/cgen.c
+++ b/cc2/arch/qbe/cgen.c
@@ -115,8 +115,6 @@
 	Type *tp;
 
 	tp = &np->type;
-	tmpnode(new, tp);
-
 	switch (tp->size) {
 	case 1:
 		op = ASLDB;
@@ -133,7 +131,8 @@
 	default:
 		abort();
 	}
-	code(op, new, np, NULL);
+	code(op, tmpnode(new, tp), np, NULL);
+
 	return new;
 }