| 325 | } |
| 326 | |
| 327 | void CLikeCodeGen::PrintBinaryInstr(CodeGenContext & ctx, BinaryInstruction * instr) |
| 328 | { |
| 329 | auto op0 = instr->Operands[0].Ptr(); |
| 330 | auto op1 = instr->Operands[1].Ptr(); |
| 331 | if (instr->Is<StoreInstruction>()) |
| 332 | { |
| 333 | PrintOp(ctx, op0); |
| 334 | ctx.Body << " = "; |
| 335 | PrintOp(ctx, op1); |
| 336 | ctx.Body << ";\n"; |
| 337 | return; |
| 338 | } |
| 339 | auto varName = ctx.DefineVariable(instr); |
| 340 | if (instr->Is<MemberLoadInstruction>()) |
| 341 | { |
| 342 | ctx.Body << varName << " = "; |
| 343 | PrintBinaryInstrExpr(ctx, instr); |
| 344 | ctx.Body << ";\n"; |
| 345 | return; |
| 346 | } |
| 347 | ctx.Body << varName << " = "; |
| 348 | PrintBinaryInstrExpr(ctx, instr); |
| 349 | ctx.Body << ";\n"; |
| 350 | } |
| 351 | |
| 352 | void CLikeCodeGen::PrintUnaryInstrExpr(CodeGenContext & ctx, UnaryInstruction * instr) |
| 353 | { |
nothing calls this directly
no test coverage detected