| 351 | } |
| 352 | |
| 353 | SimNode * SimulateVisitor::sv_makeLocalCMResMove (const LineInfo & at, uint32_t offset, ExpressionPtr rE ) { |
| 354 | const auto & rightType = *rE->type; |
| 355 | // now, call with CMRES |
| 356 | if ( rE->rtti_isCall() ) { |
| 357 | auto cll = static_cast<ExprCall*>(rE); |
| 358 | if ( cll->allowCmresSkip() ) { |
| 359 | auto right = getE(rE); |
| 360 | getCallBase(right)->cmresEval = context.code->makeNode<SimNode_GetCMResOfs>(rE->at, offset); |
| 361 | return right; |
| 362 | } |
| 363 | } |
| 364 | // now, invoke with CMRES |
| 365 | if ( rE->rtti_isInvoke() ) { |
| 366 | auto cll = static_cast<ExprInvoke*>(rE); |
| 367 | if ( cll->allowCmresSkip() ) { |
| 368 | auto * right = getE(rE); |
| 369 | getCallBase(right)->cmresEval = context.code->makeNode<SimNode_GetCMResOfs>(rE->at, offset); |
| 370 | return right; |
| 371 | } |
| 372 | } |
| 373 | // now, to the regular move |
| 374 | auto left = context.code->makeNode<SimNode_GetCMResOfs>(at, offset); |
| 375 | auto right = getE(rE); |
| 376 | if ( rightType.isRef() ) { |
| 377 | return context.code->makeNode<SimNode_MoveRefValue>(at, left, right, rightType.getSizeOf()); |
| 378 | } else { |
| 379 | return context.code->makeValueNode<SimNode_Set>(rightType.getR2VType(), at, left, right); |
| 380 | } |
| 381 | } |
| 382 | |
| 383 | SimNode * SimulateVisitor::sv_makeLocalCMResCopy(const LineInfo & at, uint32_t offset, ExpressionPtr rE ) { |
| 384 | const auto & rightType = *rE->type; |
nothing calls this directly
no test coverage detected