| 475 | } |
| 476 | |
| 477 | SimNode * SimulateVisitor::sv_makeLocalMove (const LineInfo & at, uint32_t stackTop, ExpressionPtr rE ) { |
| 478 | const auto & rightType = *rE->type; |
| 479 | // now, call with CMRES |
| 480 | if ( rE->rtti_isCall() ) { |
| 481 | auto cll = static_cast<ExprCall*>(rE); |
| 482 | if ( cll->allowCmresSkip() ) { |
| 483 | auto right = getE(rE); |
| 484 | getCallBase(right)->cmresEval = context.code->makeNode<SimNode_GetLocal>(rE->at, stackTop); |
| 485 | return right; |
| 486 | } |
| 487 | } |
| 488 | // now, invoke with CMRES |
| 489 | if ( rE->rtti_isInvoke() ) { |
| 490 | auto cll = static_cast<ExprInvoke*>(rE); |
| 491 | if ( cll->allowCmresSkip() ) { |
| 492 | auto right = getE(rE); |
| 493 | getCallBase(right)->cmresEval = context.code->makeNode<SimNode_GetLocal>(rE->at, stackTop); |
| 494 | return right; |
| 495 | } |
| 496 | } |
| 497 | // now, to the regular move |
| 498 | auto left = context.code->makeNode<SimNode_GetLocal>(at, stackTop); |
| 499 | auto right = getE(rE); |
| 500 | if ( rightType.isRef() ) { |
| 501 | return context.code->makeNode<SimNode_MoveRefValue>(at, left, right, rightType.getSizeOf()); |
| 502 | } else { |
| 503 | return context.code->makeValueNode<SimNode_Set>(rightType.getR2VType(), at, left, right); |
| 504 | } |
| 505 | } |
| 506 | |
| 507 | SimNode * SimulateVisitor::sv_makeLocalCopy(const LineInfo & at, uint32_t stackTop, ExpressionPtr rE ) { |
| 508 | const auto & rightType = *rE->type; |
nothing calls this directly
no test coverage detected