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

Function callEx

include/daScript/simulate/simulate.h:718–744  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

716
717 template <typename Fn>
718 DAS_EVAL_ABI vec4f callEx(const SimFunction * fn, vec4f *args, void * cmres, LineInfo * line, Fn && when) {
719 // PUSH
720 char * EP, *SP;
721 if(!stack.push(fn->stackSize,EP,SP)) {
722 throw_error_at(line, "stack overflow while calling %s",fn->mangledName);
723 }
724 // fill prologue
725 auto aa = abiArg; auto acm = cmres;
726 abiArg = args; abiCMRES = cmres;
727#if DAS_SANITIZER
728 memset(stack.sp(), 0xcd, fn->stackSize);
729#endif
730#if DAS_ENABLE_STACK_WALK
731 Prologue * pp = (Prologue *) stack.sp();
732 pp->info = fn->debugInfo;
733 pp->arguments = args;
734 pp->cmres = cmres;
735 pp->line = line;
736#endif
737 // CALL
738 when(fn->code);
739 stopFlags = 0;
740 // POP
741 abiArg = aa; abiCMRES = acm;
742 stack.pop(EP,SP);
743 return result;
744 }
745
746 __forceinline const char * getException() const {
747 return exception;

Callers

nothing calls this directly

Calls 3

pushMethod · 0.45
spMethod · 0.45
popMethod · 0.45

Tested by

no test coverage detected