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

Method escapeAnalysis

src/ast/ast_escape_analysis.cpp:338–345  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

336 };
337
338 bool Program::escapeAnalysis(TextWriter & logs) {
339 auto forceStack = options.getBoolOption("force_allocate_on_stack", policies.force_allocate_on_stack);
340 if ( !options.getBoolOption("force_escape_free", policies.force_escape_free) && !forceStack ) return false;
341 auto logEscape = options.getBoolOption("log_escape_analysis", policies.log_escape_analysis);
342 EscapeAnalysisVisitor ev(logEscape ? &logs : nullptr);
343 visit(ev);
344 return ev.anyChanged;
345 }
346
347 bool Program::scopeFreeOptimization(TextWriter & logs) {
348 auto forceStack = options.getBoolOption("force_allocate_on_stack", policies.force_allocate_on_stack);

Callers

nothing calls this directly

Calls 2

getBoolOptionMethod · 0.80
visitFunction · 0.50

Tested by

no test coverage detected