aboutsummaryrefslogtreecommitdiff
path: root/src/Module.zig
diff options
context:
space:
mode:
authorIsaac Freund <ifreund@ifreund.xyz>2021-03-21 17:19:08 +0100
committerIsaac Freund <ifreund@ifreund.xyz>2021-03-21 20:32:39 +0100
commit310a44d5be051a339b5739d59416a70604375541 (patch)
tree585f13adadeb49cd50ffd85f0343921ebc203a02 /src/Module.zig
parent7800ae05a2e00eb289a6fb8589e132ce8d30fa18 (diff)
downloadzig-310a44d5be051a339b5739d59416a70604375541.tar.gz
zig-310a44d5be051a339b5739d59416a70604375541.zip
zir: add negate/negate_wrap, implement astgen
These were previously implemented as a sub/sub_wrap instruction with a lhs of 0. Making this separate instructions however allows us to save some memory as there is no need to store a lhs.
Diffstat (limited to 'src/Module.zig')
-rw-r--r--src/Module.zig2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/Module.zig b/src/Module.zig
index dcf57bb709..27d585054a 100644
--- a/src/Module.zig
+++ b/src/Module.zig
@@ -1462,6 +1462,8 @@ pub const WipZirCode = struct {
.str,
.sub,
.subwrap,
+ .negate,
+ .negate_wrap,
.typeof,
.xor,
.optional_type,