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

Function addExternEx

include/daScript/ast/ast_interop.h:350–365  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

348 template <typename FuncArgT, typename FuncT, FuncT fn, template <typename FuncTT, FuncTT fnt> class SimNodeT = SimNode_ExtFuncCall, typename QQ = defaultTempFn>
349#endif
350 inline auto addExternEx ( Module & mod, const ModuleLibrary & lib, const char * name, SideEffects seFlags,
351 const char * cppName = nullptr, QQ && tempFn = QQ() ) {
352#if DAS_SLOW_CALL_INTEROP
353 using SimNodeType = SimNodeT<FuncT>;
354 auto fnX = new ExternalFn<FuncT, SimNodeType, FuncArgT>(fn, name, lib, cppName);
355#else
356 using SimNodeType = SimNodeT<FuncT, fn>;
357 auto fnX = new ExternalFn<FuncT, fn, SimNodeType, FuncArgT>(name, lib, cppName);
358#endif
359 tempFn(fnX);
360#if VERIFY_JIT_ARGUMENTS
361 VerifyFn<FuncT, fn>::verify(fnX);
362#endif
363 addExternFunc(mod, fnX, SimNodeType::IS_CMRES, seFlags);
364 return fnX;
365 }
366
367#if DAS_SLOW_CALL_INTEROP
368 template <typename FuncT, FuncT fn, template <typename FuncTT> class SimNodeT = SimNode_ExtFuncCallRef, typename QQ = defaultTempFn>

Callers

nothing calls this directly

Calls 2

verifyFunction · 0.85
addExternFuncFunction · 0.85

Tested by

no test coverage detected