commit 088f60d8c93ae098a85b5d2b25cfd9143d7789b2
parent 56e56694ff267c2294b3ab20e9a60c05ed9cdf47
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date: Fri, 13 Mar 2015 21:05:02 +0000
Organize functions in cc2.h using the origin files
This is a traitional way and is not bad.
Diffstat:
1 file changed, 11 insertions(+), 4 deletions(-)
diff --git a/cc2/cc2.h b/cc2/cc2.h
@@ -119,15 +119,22 @@ enum {
extern Type Funct, l_int8, l_int16, l_int32, l_int64,
l_uint8, l_uint16, l_uint32, l_uint64;
-/*TODO: separate functions for file */
+/* main.c */
extern void error(unsigned nerror, ...);
+
+/* cgen.c */
extern Node *genaddable(Node *np);
extern void generate(Symbol *fun);
-extern void genstack(Symbol *fun);
extern void apply(Node *list[], Node *(*fun)(Node *));
+
+/* parser.c */
extern Symbol *parse(void);
+extern void prtree(Node *np);
+
+/* code.c */
extern void code(uint8_t op, Node *to, Node *from);
+extern void writeout(void);
+
+/* optm.c */
extern Node *optimize(Node *np);
-extern void prtree(Node *np);
extern Node *imm(TINT i, Type *tp);
-extern void writeout(void);