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

Function collectInvokeIndVariables

src/ast/ast_derive_alias.cpp:37–50  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

35 }
36
37 void collectInvokeIndVariables ( const ProgramPtr & program, const TypeDeclPtr & inv, IndirectSources & sources ) {
38 das_hash_set<Function *> accessed;
39 program->library.foreach([&](Module * mod){
40 ExpressionSources globSrc;
41 mod->functions.foreach([&](const FunctionPtr & gfunc){
42 // not built-in, used, address taken, can potentially alias, compatible
43 if ( gfunc->isTemplate ) return;
44 if ( !gfunc->builtIn && gfunc->used && gfunc->addressTaken && !gfunc->aliasCMRES && isCompatibleFunction(gfunc, inv) ) {
45 appendIndVariables(gfunc, sources, accessed);
46 }
47 });
48 return true;
49 },"*");
50 }
51
52 bool isCompatibleLambdaFunction ( const FunctionPtr & func, const TypeDeclPtr & inv ) {
53 if ( func->arguments.size()!=inv->argTypes.size()+1 ) return false;

Callers 2

preVisitMethod · 0.85
preVisitMethod · 0.85

Calls 3

isCompatibleFunctionFunction · 0.85
appendIndVariablesFunction · 0.85
foreachMethod · 0.45

Tested by

no test coverage detected