| 4417 | } |
| 4418 | |
| 4419 | void PrintIf(IfInstruction * instr) |
| 4420 | { |
| 4421 | int operandID = GetOperandValue(instr->Operand.Ptr()); |
| 4422 | operandID = ctx.ConvertBasicType( |
| 4423 | operandID, |
| 4424 | ctx.IDInfos[operandID]().GetILType(), |
| 4425 | GetTypeFromString("bool")); |
| 4426 | |
| 4427 | int TrueLabel = ++ctx.CurrentID; |
| 4428 | int FalseLabel = ++ctx.CurrentID; |
| 4429 | int MergeLabel = ++ctx.CurrentID; |
| 4430 | |
| 4431 | ctx.AddInstrSelectionMerge(MergeLabel); |
| 4432 | ctx.AddInstrBranchConditional(operandID, TrueLabel, FalseLabel); |
| 4433 | |
| 4434 | ctx.PushScope(); |
| 4435 | ctx.AddInstrLabel_AtFunctionBody(TrueLabel); |
| 4436 | GenerateCode(instr->TrueCode.Ptr(), TrueLabel); |
| 4437 | ctx.AddInstrBranch(MergeLabel); |
| 4438 | ctx.PopScope(); |
| 4439 | |
| 4440 | ctx.PushScope(); |
| 4441 | ctx.AddInstrLabel_AtFunctionBody(FalseLabel); |
| 4442 | if (instr->FalseCode) |
| 4443 | GenerateCode(instr->FalseCode.Ptr(), FalseLabel); |
| 4444 | ctx.AddInstrBranch(MergeLabel); |
| 4445 | ctx.PopScope(); |
| 4446 | |
| 4447 | ctx.AddInstrLabel_AtFunctionBody(MergeLabel); |
| 4448 | } |
| 4449 | |
| 4450 | void PrintFor(ForInstruction * instr) |
| 4451 | { |
nothing calls this directly
no test coverage detected