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

Function intersectSources

src/ast/ast_derive_alias.cpp:226–238  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

224 }
225
226 Variable * intersectSources ( ExpressionSources & a, ExpressionSources & b ) {
227 if ( a.size() < b.size() ) {
228 for ( auto va : a ) {
229 if ( b.find(va)!=b.end() ) return va;
230 }
231 return nullptr;
232 } else {
233 for ( auto vb : b ) {
234 if ( a.find(vb)!=a.end() ) return vb;
235 }
236 return nullptr;
237 }
238 }
239
240 void deriveAliasing ( const FunctionPtr & func, TextWriter & logs, bool logAliasing ) {
241 if ( func->arguments.size()==0 && func->useGlobalVariables.size()==0 && func->useFunctions.size()==0 ) return;

Callers 2

preVisitMakeLocalMethod · 0.85
preVisitMethod · 0.85

Calls 3

sizeMethod · 0.45
findMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected