| ... | @@ -9244,9 +9244,9 @@ fn cmpSelf( | ... | @@ -9244,9 +9244,9 @@ fn cmpSelf( |
| 9244 | const resolved_type = sema.typeOf(casted_lhs); | 9244 | const resolved_type = sema.typeOf(casted_lhs); |
| 9245 | const runtime_src: LazySrcLoc = src: { | 9245 | const runtime_src: LazySrcLoc = src: { |
| 9246 | if (try sema.resolveMaybeUndefVal(block, lhs_src, casted_lhs)) |lhs_val| { | 9246 | if (try sema.resolveMaybeUndefVal(block, lhs_src, casted_lhs)) |lhs_val| { |
| 9247 | if (lhs_val.isUndef()) return sema.addConstUndef(resolved_type); | 9247 | if (lhs_val.isUndef()) return sema.addConstUndef(Type.initTag(.bool)); |
| 9248 | if (try sema.resolveMaybeUndefVal(block, rhs_src, casted_rhs)) |rhs_val| { | 9248 | if (try sema.resolveMaybeUndefVal(block, rhs_src, casted_rhs)) |rhs_val| { |
| 9249 | if (rhs_val.isUndef()) return sema.addConstUndef(resolved_type); | 9249 | if (rhs_val.isUndef()) return sema.addConstUndef(Type.initTag(.bool)); |
| 9250 | | 9250 | |
| 9251 | if (lhs_val.compare(op, rhs_val, resolved_type)) { | 9251 | if (lhs_val.compare(op, rhs_val, resolved_type)) { |
| 9252 | return Air.Inst.Ref.bool_true; | 9252 | return Air.Inst.Ref.bool_true; |
| ... | @@ -9265,7 +9265,7 @@ fn cmpSelf( | ... | @@ -9265,7 +9265,7 @@ fn cmpSelf( |
| 9265 | // bool eq/neq more efficiently. | 9265 | // bool eq/neq more efficiently. |
| 9266 | if (resolved_type.zigTypeTag() == .Bool) { | 9266 | if (resolved_type.zigTypeTag() == .Bool) { |
| 9267 | if (try sema.resolveMaybeUndefVal(block, rhs_src, casted_rhs)) |rhs_val| { | 9267 | if (try sema.resolveMaybeUndefVal(block, rhs_src, casted_rhs)) |rhs_val| { |
| 9268 | if (rhs_val.isUndef()) return sema.addConstUndef(resolved_type); | 9268 | if (rhs_val.isUndef()) return sema.addConstUndef(Type.initTag(.bool)); |
| 9269 | return sema.runtimeBoolCmp(block, op, casted_lhs, rhs_val.toBool(), lhs_src); | 9269 | return sema.runtimeBoolCmp(block, op, casted_lhs, rhs_val.toBool(), lhs_src); |
| 9270 | } | 9270 | } |
| 9271 | } | 9271 | } |