From 5640e24ee066d1e8ed46ea4f53142e84d19399ca Mon Sep 17 00:00:00 2001 From: lemon Date: Tue, 5 Sep 2023 13:48:56 +0200 Subject: [PATCH] move definition of struct label --- c.c | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/c.c b/c.c index 56f3366..92075a3 100644 --- a/c.c +++ b/c.c @@ -15,16 +15,6 @@ struct comp { pmap_of(struct label) labels; }; -struct label { - struct span usespan; - struct block *blk; - /* if usespan.ex.len == 0, this label is resolved and blk is the block that - * the label starts, otherwise the label is unresolved and blk is the head - * of a linked list of relocations, the next list entry is in blk->s1, etc, - * terminated by NULL */ - -}; - /** Parsing helper functions **/ #define peek(Cm,Tk) lexpeek(&(Cm)->lx,Tk) #define lex(Cm,Tk) lex(&(Cm)->lx,Tk) @@ -2867,6 +2857,15 @@ static void block(struct comp *cm, struct function *fn); static bool stmt(struct comp *cm, struct function *fn); static void localdecl(struct comp *cm, struct function *fn, bool forinit); +struct label { + struct span usespan; + struct block *blk; + /* if usespan.ex.len == 0, this label is resolved and blk is the block that + * the label starts, otherwise the label is unresolved and blk is the head + * of a linked list of relocations, the next list entry is in blk->s1, etc, + * terminated by NULL */ +}; + static void deflabel(struct comp *cm, struct function *fn, const struct span *span, const char *name) { -- 2.45.2