aboutsummaryrefslogtreecommitdiff
path: root/src/Module.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2022-08-08 20:19:08 -0700
committerAndrew Kelley <andrew@ziglang.org>2022-08-08 20:43:05 -0700
commit3389890709b8470c59cadc21471e4a6c8dda48a6 (patch)
tree9819644d3770e73cf350e78a7f05fe270d86019b /src/Module.zig
parent1a500b969943dc6a4c549fdcbd72659702e867a2 (diff)
downloadzig-3389890709b8470c59cadc21471e4a6c8dda48a6.tar.gz
zig-3389890709b8470c59cadc21471e4a6c8dda48a6.zip
stage2: error return tracing handles ret better
Sema: insert an error return trace frame when appropriate when analyzing ret_load. Also optimize the instructions to avoid an unnecessary block sent to the backends. AstGen: always emit a dbg_stmt for return expressions, in between the defer instructions and the return instruction. This improves the following test case: ```zig pub fn main() !void { return foo(); } fn foo() !void { return error.Bad; } ``` The error return trace now points to the return token instead of pointing to the foo() function call, matching stage1.
Diffstat (limited to 'src/Module.zig')
0 files changed, 0 insertions, 0 deletions