diff options
author | Quentin Carbonneaux <quentin.carbonneaux@yale.edu> | 2016-03-17 13:02:18 -0400 |
---|---|---|
committer | Quentin Carbonneaux <quentin.carbonneaux@yale.edu> | 2016-03-17 13:02:18 -0400 |
commit | 2889d44f24d8017f527f6f5aa1163065cc57e994 (patch) | |
tree | 2a5532cfaa3dea50e63222471d68f909f8915b96 /lisc/parse.c | |
parent | 2d9aabefff1e6a2c800ea851502a21aae43457f7 (diff) | |
download | roux-2889d44f24d8017f527f6f5aa1163065cc57e994.tar.gz |
parse fixes for struct return
Diffstat (limited to 'lisc/parse.c')
-rw-r--r-- | lisc/parse.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lisc/parse.c b/lisc/parse.c index e91e32d..f98d887 100644 --- a/lisc/parse.c +++ b/lisc/parse.c @@ -662,6 +662,7 @@ parsefn() con[0].type = CBits; fn = alloc(sizeof *fn); blink = &fn->start; + fn->retty = -1; if (peek() != TGlo) rcls = parsecls(&fn->retty); else @@ -1047,14 +1048,16 @@ printfn(Fn *fn, FILE *f) case JRet0: case JRetw: case JRetl: - case JRetc: case JRets: case JRetd: + case JRetc: fprintf(f, "\t%s", jtoa[b->jmp.type]); if (b->jmp.type != JRet0) { fprintf(f, " "); printref(b->jmp.arg, fn, f); } + if (b->jmp.type == JRetc) + fprintf(f, ", :%s", typ[fn->retty].name); fprintf(f, "\n"); break; case JJmp: |