diff options
author | Quentin Carbonneaux <quentin.carbonneaux@yale.edu> | 2015-07-10 11:41:11 -0400 |
---|---|---|
committer | Quentin Carbonneaux <quentin.carbonneaux@yale.edu> | 2015-09-15 23:01:27 -0400 |
commit | 935ab611f0fd841f4f7e54c95ea2e57bba44f8ab (patch) | |
tree | 36e5e22c05a1c4f13bb313435d5e2101e9a6c726 /lisc/parse.c | |
parent | 1d62b4bf478a17d7b825bb0064a50dba570dfe01 (diff) | |
download | roux-935ab611f0fd841f4f7e54c95ea2e57bba44f8ab.tar.gz |
add predecessor computation
Diffstat (limited to 'lisc/parse.c')
-rw-r--r-- | lisc/parse.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lisc/parse.c b/lisc/parse.c index 6beb8a6..ad57d7e 100644 --- a/lisc/parse.c +++ b/lisc/parse.c @@ -53,6 +53,7 @@ static struct { Blk *blk; } bmap[NBlks+1]; static Blk *curb; +static Blk **blink; static struct { long long num; @@ -200,6 +201,8 @@ blocka() b = alloc(sizeof *b); *b = zblock; + *blink = b; + blink = &b->link; return b; } @@ -441,8 +444,8 @@ parsefn(FILE *f) curb = 0; lnum = 1; fn = alloc(sizeof *fn); - ps = parseline(PLbl); - fn->start = curb; /* todo, it's a hack */ + blink = &fn->start; + ps = PLbl; do ps = parseline(ps); while (ps != PEnd); |