| 413 | } |
| 414 | |
| 415 | SimNode * SimulateVisitor::sv_makeLocalRefMove (const LineInfo & at, uint32_t stackTop, uint32_t offset, ExpressionPtr rE ) { |
| 416 | const auto & rightType = *rE->type; |
| 417 | // now, call with CMRES |
| 418 | if ( rE->rtti_isCall() ) { |
| 419 | auto cll = static_cast<ExprCall*>(rE); |
| 420 | if ( cll->allowCmresSkip() ) { |
| 421 | auto right = getE(rE); |
| 422 | getCallBase(right)->cmresEval = context.code->makeNode<SimNode_GetLocalRefOff>(rE->at, stackTop, offset); |
| 423 | return right; |
| 424 | } |
| 425 | } |
| 426 | // now, invoke with CMRES |
| 427 | if ( rE->rtti_isInvoke() ) { |
| 428 | auto cll = static_cast<ExprInvoke*>(rE); |
| 429 | if ( cll->allowCmresSkip() ) { |
| 430 | auto right = getE(rE); |
| 431 | getCallBase(right)->cmresEval = context.code->makeNode<SimNode_GetLocalRefOff>(rE->at, stackTop, offset); |
| 432 | return right; |
| 433 | } |
| 434 | } |
| 435 | // now, to the regular move |
| 436 | auto left = context.code->makeNode<SimNode_GetLocalRefOff>(at, stackTop, offset); |
| 437 | auto right = getE(rE); |
| 438 | if ( rightType.isRef() ) { |
| 439 | return context.code->makeNode<SimNode_MoveRefValue>(at, left, right, rightType.getSizeOf()); |
| 440 | } else { |
| 441 | return context.code->makeValueNode<SimNode_Set>(rightType.getR2VType(), at, left, right); |
| 442 | } |
| 443 | } |
| 444 | |
| 445 | SimNode * SimulateVisitor::sv_makeLocalRefCopy(const LineInfo & at, uint32_t stackTop, uint32_t offset, ExpressionPtr rE ) { |
| 446 | const auto & rightType = *rE->type; |
nothing calls this directly
no test coverage detected