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

Method deriveAliases

src/ast/ast_derive_alias.cpp:611–632  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

609 };
610
611 void Program::deriveAliases(TextWriter & logs, bool permanent, bool everything) {
612 bool logAliasing = options.getBoolOption("log_aliasing", false);
613 if ( logAliasing ) logs << "ALIASING:\n";
614
615 library.foreach([&](Module * mod){
616 if ( logAliasing ) logs << "module " << mod->name << ":\n";
617 mod->functions.foreach([&](const FunctionPtr & func){
618 if ( func->builtIn || !func->used || func->isTemplate ) return;
619 deriveAliasing(func, logs, logAliasing);
620 });
621 return true;
622 },"*");
623 /*
624 thisModule->functions.foreach([&](const FunctionPtr & func) {
625 if ( func->builtIn || !func->used ) return;
626 deriveAliasing(func, logs, logAliasing);
627 });
628 */
629 AliasMarker marker(this, permanent, everything, logs);
630 visit(marker);
631 if ( logAliasing ) logs << "\n";
632 }
633}

Callers 3

visitMethod · 0.80
parseDaScriptFunction · 0.80
compileDaScriptFunction · 0.80

Calls 4

deriveAliasingFunction · 0.85
getBoolOptionMethod · 0.80
visitFunction · 0.50
foreachMethod · 0.45

Tested by

no test coverage detected