v.markused #

fn mark_used #

fn mark_used(mut table ast.Table, pref &pref.Preferences, ast_files []&ast.File)

mark_used walks the AST, starting at main() and marks all used fns transitively

struct Walker #

struct Walker {
pub mut:
	table        &ast.Table
	used_fns     map[string]bool
	used_consts  map[string]bool
	used_globals map[string]bool
	n_asserts    int
	pref         &pref.Preferences
mut:
	files       []&ast.File
	all_fns     map[string]ast.FnDecl
	all_consts  map[string]ast.ConstField
	all_globals map[string]ast.GlobalField
}

fn (Walker) mark_fn_as_used #

fn (mut w Walker) mark_fn_as_used(fkey string)

fn (Walker) mark_const_as_used #

fn (mut w Walker) mark_const_as_used(ckey string)

fn (Walker) mark_global_as_used #

fn (mut w Walker) mark_global_as_used(ckey string)

fn (Walker) mark_root_fns #

fn (mut w Walker) mark_root_fns(all_fn_root_names []string)

fn (Walker) mark_exported_fns #

fn (mut w Walker) mark_exported_fns()

fn (Walker) stmt #

fn (mut w Walker) stmt(node ast.Stmt)

fn (Walker) fn_decl #

fn (mut w Walker) fn_decl(mut node ast.FnDecl)

fn (Walker) call_expr #

fn (mut w Walker) call_expr(mut node ast.CallExpr)

fn (Walker) fn_by_name #

fn (mut w Walker) fn_by_name(fn_name string)

fn (Walker) struct_fields #

fn (mut w Walker) struct_fields(sfields []ast.StructField)

fn (Walker) const_fields #

fn (mut w Walker) const_fields(cfields []ast.ConstField)

fn (Walker) or_block #

fn (mut w Walker) or_block(node ast.OrExpr)