v3.markused #
Parallel body-call precollection. Each worker analyzes a disjoint, contiguous range of fn_decl bodies with its own forked TypeChecker (private type_cache, so checker memoization never races) and writes into disjoint slots of a preallocated results array. The result content per body is a pure function of the (read-only) AST and checker tables, so the outcome is identical to the serial fallback.
fn mark_used #
fn mark_used(a &flat.FlatAst, tc &types.TypeChecker) map[string]bool
mark_used updates mark used state for markused.
fn mark_used_for_cache #
fn mark_used_for_cache(a &flat.FlatAst, tc &types.TypeChecker, test_files []string, source_modules map[string]bool) map[string]bool
mark_used_for_cache roots every concrete function in modules being built for the object cache.
fn mark_used_for_cache_with_generic_usage #
fn mark_used_for_cache_with_generic_usage(a &flat.FlatAst, tc &types.TypeChecker, test_files []string, source_modules map[string]bool) (map[string]bool, bool)
mark_used_for_cache_with_generic_usage roots cached module functions and reports whether their reachable code requires monomorphization.
fn mark_used_for_tests #
fn mark_used_for_tests(a &flat.FlatAst, tc &types.TypeChecker, test_files []string) map[string]bool
fn mark_used_for_tests_with_generic_usage #
fn mark_used_for_tests_with_generic_usage(a &flat.FlatAst, tc &types.TypeChecker, test_files []string) (map[string]bool, bool)
mark_used_for_tests_with_generic_usage is the test-file-rooted variant of mark_used_with_generic_usage.
fn mark_used_with_generic_usage #
fn mark_used_with_generic_usage(a &flat.FlatAst, tc &types.TypeChecker) (map[string]bool, bool)
mark_used_with_generic_usage also reports whether reachable code uses a generic function, struct, or sum type and therefore requires monomorphization.