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

Function addExternTempRef

include/daScript/ast/ast_interop.h:372–389  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

370 template <typename FuncT, FuncT fn, template <typename FuncTT, FuncTT fnt> class SimNodeT = SimNode_ExtFuncCallRef, typename QQ = defaultTempFn>
371#endif
372 inline auto addExternTempRef ( Module & mod, const ModuleLibrary & lib, const char * name, SideEffects seFlags,
373 const char * cppName = nullptr, QQ && tempFn = QQ() )
374 {
375#if DAS_SLOW_CALL_INTEROP
376 using SimNodeType = SimNodeT<FuncT>;
377 auto fnX = new ExternalFn<FuncT, SimNodeType, FuncT>(fn, name, lib, cppName);
378#else
379 using SimNodeType = SimNodeT<FuncT, fn>;
380 auto fnX = new ExternalFn<FuncT, fn, SimNodeType, FuncT>(name, lib, cppName);
381#endif
382 tempFn(fnX);
383 fnX->result->temporary = true;
384#if VERIFY_JIT_ARGUMENTS
385 VerifyFn<FuncT, fn>::verify(fnX);
386#endif
387 addExternFunc(mod, fnX, SimNodeType::IS_CMRES, seFlags);
388 return fnX;
389 }
390
391 template <InteropFunction func, typename RetT, typename ...Args>
392 inline auto addInterop ( Module & mod, const ModuleLibrary & lib, const char * name, SideEffects seFlags,

Callers

nothing calls this directly

Calls 2

verifyFunction · 0.85
addExternFuncFunction · 0.85

Tested by

no test coverage detected