diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2022-08-08 19:16:21 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2022-08-08 19:16:21 -0700 |
| commit | 1a500b969943dc6a4c549fdcbd72659702e867a2 (patch) | |
| tree | b65d3f11b30e1c43f0a63636fe908929e83b0c27 /src/Module.zig | |
| parent | 50b36e84fab023ec418eb794d6a5b4510ac6b984 (diff) | |
| download | zig-1a500b969943dc6a4c549fdcbd72659702e867a2.tar.gz zig-1a500b969943dc6a4c549fdcbd72659702e867a2.zip | |
Sema: avoid error return traces when possible
stage2 was adding bogus error return trace frames when an error was not
being returned. This commit makes several improvements:
* Make a runtime check if necessary to only emit a frame into the error
return trace when an actual error is returned.
* Use the `analyzeIsNonErrComptimeOnly` machinery to avoid runtime
checks when it is compile-time-known that the value is an error, or a
non-error.
* Make std.builtin.returnError take a non-optional stack trace pointer.
closes #12174
Diffstat (limited to 'src/Module.zig')
0 files changed, 0 insertions, 0 deletions
