(e exprDesc, cond int)
| 773 | } |
| 774 | |
| 775 | func (f *function) jumpOnCondition(e exprDesc, cond int) int { |
| 776 | if e.kind == kindRelocatable { |
| 777 | if i := f.Instruction(e); i.opCode() == opNot { |
| 778 | f.dropLastInstruction() // remove previous opNot |
| 779 | return f.conditionalJump(opTest, i.b(), 0, not(cond)) |
| 780 | } |
| 781 | } |
| 782 | e = f.dischargeToAnyRegister(e) |
| 783 | f.freeExpression(e) |
| 784 | return f.conditionalJump(opTestSet, noRegister, e.info, cond) |
| 785 | } |
| 786 | |
| 787 | func (f *function) GoIfTrue(e exprDesc) exprDesc { |
| 788 | pc := noJump |
no test coverage detected