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

Function call

include/daScript/simulate/simulate.h:568–595  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

566 }
567
568 DAS_EVAL_ABI __forceinline vec4f call(const SimFunction * fn, vec4f * args, LineInfo * line) {
569 // PUSH
570 char * EP, *SP;
571 if (!stack.push(fn->stackSize, EP, SP)) {
572 throw_error_at(line, "stack overflow while calling %s",fn->mangledName);
573 return v_zero();
574 }
575 // fill prologue
576 auto aa = abiArg;
577 abiArg = args;
578#if DAS_SANITIZER
579 memset(stack.sp(), 0xcd, fn->stackSize);
580#endif
581#if DAS_ENABLE_STACK_WALK
582 Prologue * pp = (Prologue *)stack.sp();
583 pp->info = fn->debugInfo;
584 pp->arguments = args;
585 pp->cmres = nullptr;
586 pp->line = line;
587#endif
588 // CALL
589 fn->code->eval(*this);
590 stopFlags = 0;
591 // POP
592 abiArg = aa;
593 stack.pop(EP, SP);
594 return result;
595 }
596
597 DAS_EVAL_ABI __forceinline vec4f callOrFastcall(const SimFunction * fn, vec4f * args, LineInfo * line) {
598 if ( fn->fastcall ) {

Callers 3

build-docs.pyFile · 0.85
vec4fMethod · 0.85

Calls 5

v_zeroFunction · 0.50
pushMethod · 0.45
spMethod · 0.45
evalMethod · 0.45
popMethod · 0.45

Tested by

no test coverage detected