MCPcopy Create free account
hub / github.com/GaijinEntertainment/daScript / callWithCopyOnReturn

Function callWithCopyOnReturn

include/daScript/simulate/simulate.h:639–665  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

637 }
638
639 DAS_EVAL_ABI __forceinline vec4f callWithCopyOnReturn(const SimFunction * fn, vec4f * args, void * cmres, LineInfo * line) {
640 // PUSH
641 char * EP, *SP;
642 if (!stack.push(fn->stackSize, EP, SP)) {
643 throw_error_at(line, "stack overflow while calling %s",fn->mangledName);
644 }
645 // fill prologue
646 auto aa = abiArg; auto acm = abiCMRES;
647 abiArg = args; abiCMRES = cmres;
648#if DAS_SANITIZER
649 memset(stack.sp(), 0xcd, fn->stackSize);
650#endif
651#if DAS_ENABLE_STACK_WALK
652 Prologue * pp = (Prologue *)stack.sp();
653 pp->info = fn->debugInfo;
654 pp->arguments = args;
655 pp->cmres = cmres;
656 pp->line = line;
657#endif
658 // CALL
659 fn->code->eval(*this);
660 stopFlags = 0;
661 // POP
662 abiArg = aa; abiCMRES = acm;
663 stack.pop(EP, SP);
664 return result;
665 }
666
667#ifdef _MSC_VER
668#pragma warning(push)

Callers 2

evalWithCatchMethod · 0.85
vec4fFunction · 0.85

Calls 4

pushMethod · 0.45
spMethod · 0.45
evalMethod · 0.45
popMethod · 0.45

Tested by

no test coverage detected