aboutsummaryrefslogtreecommitdiff
path: root/src/ir_print.cpp
diff options
context:
space:
mode:
authorAndrew Kelley <superjoe30@gmail.com>2017-08-09 10:09:38 -0400
committerAndrew Kelley <superjoe30@gmail.com>2017-08-09 10:09:38 -0400
commit35d3444e2742faa3c2e805cdcbfeceaf0287eefc (patch)
tree408182308c5f962660f200c59b2619be8d194ffc /src/ir_print.cpp
parent54675b060ae6139f60e111521b9a2688f66977a0 (diff)
downloadzig-35d3444e2742faa3c2e805cdcbfeceaf0287eefc.tar.gz
zig-35d3444e2742faa3c2e805cdcbfeceaf0287eefc.zip
more intuitive left shift and right shift operators
Before: * << is left shift, not allowed to shift 1 bits out * <<% is left shift, allowed to shift 1 bits out * >> is right shift, allowed to shift 1 bits out After: * << is left shift, allowed to shift 1 bits out * >> is right shift, allowed to shift 1 bits out * @shlExact is left shift, not allowed to shift 1 bits out * @shrExact is right shift, not allowed to shift 1 bits out Closes #413
Diffstat (limited to 'src/ir_print.cpp')
-rw-r--r--src/ir_print.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/ir_print.cpp b/src/ir_print.cpp
index 97e4ae5fbc..3af16802ad 100644
--- a/src/ir_print.cpp
+++ b/src/ir_print.cpp
@@ -92,12 +92,14 @@ static const char *ir_bin_op_id_str(IrBinOp op_id) {
return "^";
case IrBinOpBinAnd:
return "&";
- case IrBinOpBitShiftLeft:
+ case IrBinOpBitShiftLeftLossy:
return "<<";
- case IrBinOpBitShiftLeftWrap:
- return "<<%";
- case IrBinOpBitShiftRight:
+ case IrBinOpBitShiftLeftExact:
+ return "@shlExact";
+ case IrBinOpBitShiftRightLossy:
return ">>";
+ case IrBinOpBitShiftRightExact:
+ return "@shrExact";
case IrBinOpAdd:
return "+";
case IrBinOpAddWrap: