diff options
author | Tucker Evans <tuckerevans24@gmail.com> | 2019-10-09 00:29:14 -0400 |
---|---|---|
committer | Tucker Evans <tuckerevans24@gmail.com> | 2019-10-09 00:34:04 -0400 |
commit | 0fa21580fa6d673bcf221d5942ce8fc26bb5448b (patch) | |
tree | 4a3f50e231c4e21aba3472d6cf5da50a5b28a118 /pc.y | |
parent | d1a31ddde4f7c491a8e03a9a8fde30799b591ee8 (diff) |
Fix function argument offsets
Diffstat (limited to 'pc.y')
-rw-r--r-- | pc.y | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -247,6 +247,7 @@ sub_prog_head tmp->var_type = $5; } + update_offsets($3, -1); free_tree($3); @@ -275,6 +276,8 @@ sub_prog_head assert(tmp->func_info->argv = malloc(i * sizeof(int))); assert(!set_func_types($3, tmp->func_info->argv, i)); + + update_offsets($3, -1); free_tree($3); $$ = mktree(PROC, mkid(tmp), NULL); @@ -284,6 +287,7 @@ sub_prog_head arguments :'(' param_list ')' { + cur_scope->offset -= count_args($2); $$ = $2; } |/*empty*/{ |